Add a UI warning when contract data are not enabled in the settings (#193)
* Add a UI warning when contract data are not enabled in the settings * Update wording "contract data" -> "blind signing" to raise awareness * Bump version 1.9.5 * remove hardcoded path in helper build script * Add blind signature test * Add snapshot-tmp to gitignore * Remove unused snapshots * Increase tests timings * Remove unused snapshots * Fix and rename compound blind deposit test * Update Approve and Transfer tests * Update tests * Cosmetic changes + disable debug flag * Update CHANGELOG.md
This commit is contained in:
@@ -81,6 +81,7 @@ customStatus_e customProcessor(txContext_t *context) {
|
||||
if (fieldPos == 0) { // not reached if a plugin is available
|
||||
if (!N_storage.dataAllowed) {
|
||||
PRINTF("Data field forbidden\n");
|
||||
ui_warning_contract_data();
|
||||
return CUSTOM_FAULT;
|
||||
}
|
||||
if (!N_storage.contractDetails) {
|
||||
@@ -407,6 +408,7 @@ void finalizeParsing(bool direct) {
|
||||
|
||||
if (tmpContent.txContent.dataPresent && !N_storage.dataAllowed) {
|
||||
reportFinalizeError(direct);
|
||||
ui_warning_contract_data();
|
||||
if (!direct) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -187,12 +187,12 @@ UX_STEP_NOCB(
|
||||
.text = strings.common.nonce,
|
||||
});
|
||||
|
||||
UX_STEP_NOCB(ux_approval_data_warning_step,
|
||||
UX_STEP_NOCB(ux_approval_blind_signing_warning_step,
|
||||
pbb,
|
||||
{
|
||||
&C_icon_warning,
|
||||
"Data",
|
||||
"Present",
|
||||
"Blind",
|
||||
"Signing",
|
||||
});
|
||||
// clang-format on
|
||||
|
||||
@@ -203,7 +203,7 @@ void ux_approve_tx(bool fromPlugin) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_review_step;
|
||||
|
||||
if (!fromPlugin && tmpContent.txContent.dataPresent && !N_storage.contractDetails) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_data_warning_step;
|
||||
ux_approval_tx_flow[step++] = &ux_approval_blind_signing_warning_step;
|
||||
}
|
||||
|
||||
if (fromPlugin) {
|
||||
|
||||
Reference in New Issue
Block a user