1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

call layout functions where needed to rewrite the display after dialog choice

This commit is contained in:
Pavol Rusnak 2015-02-25 17:57:47 +01:00
parent 137a60ce01
commit eefa689b33
3 changed files with 8 additions and 5 deletions

View File

@ -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,

View File

@ -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();

View File

@ -117,7 +117,6 @@ void layoutProgress(const char *desc, int permil)
permil = OLED_WIDTH - 4;
}
oledBox(2, OLED_HEIGHT - 6, 1 + permil, OLED_HEIGHT - 3, 1);
// text
oledBox(0, OLED_HEIGHT - 16, OLED_WIDTH - 1, OLED_HEIGHT - 16 + 7, 0);
if (desc) {