mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
call layout functions where needed to rewrite the display after dialog choice
This commit is contained in:
parent
137a60ce01
commit
eefa689b33
@ -111,7 +111,7 @@ void layoutConfirmOutput(const CoinType *coin, const TxOutputType *out)
|
||||
static char first_half[17 + 1];
|
||||
strlcpy(first_half, out->address, sizeof(first_half));
|
||||
const char *str_out = str_amount(out->amount, coin->has_coin_shortcut ? coin->coin_shortcut : NULL, buf_out, sizeof(buf_out));
|
||||
layoutDialogSwipe(DIALOG_ICON_QUESTION,
|
||||
layoutDialog(DIALOG_ICON_QUESTION,
|
||||
"Cancel",
|
||||
"Confirm",
|
||||
NULL,
|
||||
@ -128,7 +128,7 @@ void layoutConfirmTx(const CoinType *coin, uint64_t amount_out, uint64_t amount_
|
||||
{
|
||||
const char *str_out = str_amount(amount_out, coin->has_coin_shortcut ? coin->coin_shortcut : NULL, buf_out, sizeof(buf_out));
|
||||
const char *str_fee = str_amount(amount_fee, coin->has_coin_shortcut ? coin->coin_shortcut : NULL, buf_fee, sizeof(buf_fee));
|
||||
layoutDialogSwipe(DIALOG_ICON_QUESTION,
|
||||
layoutDialog(DIALOG_ICON_QUESTION,
|
||||
"Cancel",
|
||||
"Confirm",
|
||||
NULL,
|
||||
@ -145,7 +145,7 @@ void layoutFeeOverThreshold(const CoinType *coin, uint64_t fee, uint32_t kb)
|
||||
{
|
||||
(void)kb;
|
||||
const char *str_out = str_amount(fee, coin->has_coin_shortcut ? coin->coin_shortcut : NULL, buf_out, sizeof(buf_out));
|
||||
layoutDialogSwipe(DIALOG_ICON_QUESTION,
|
||||
layoutDialog(DIALOG_ICON_QUESTION,
|
||||
"Cancel",
|
||||
"Confirm",
|
||||
NULL,
|
||||
|
@ -396,6 +396,9 @@ void signing_txack(TransactionType *tx)
|
||||
|
||||
spending += tx->outputs[0].amount;
|
||||
co = compile_output(coin, root, tx->outputs, &bin_output, !is_change);
|
||||
if (!is_change) {
|
||||
layoutProgress("Signing transaction", progress);
|
||||
}
|
||||
if (co < 0) {
|
||||
fsm_sendFailure(FailureType_Failure_Other, "Signing cancelled by user");
|
||||
signing_abort();
|
||||
@ -426,6 +429,7 @@ void signing_txack(TransactionType *tx)
|
||||
layoutHome();
|
||||
return;
|
||||
}
|
||||
layoutProgress("Signing transaction", progress);
|
||||
}
|
||||
// last confirmation
|
||||
layoutConfirmTx(coin, to_spend - change_spend, fee);
|
||||
@ -434,9 +438,9 @@ void signing_txack(TransactionType *tx)
|
||||
signing_abort();
|
||||
return;
|
||||
}
|
||||
|
||||
// Everything was checked, now phase 2 begins and the transaction is signed.
|
||||
progress_meta_step = progress_step / (inputs_count + outputs_count);
|
||||
layoutProgress("Signing transaction", progress);
|
||||
idx1 = 0;
|
||||
idx2 = 0;
|
||||
send_req_4_input();
|
||||
|
Loading…
Reference in New Issue
Block a user