Add nonce display settings ; nonce is always displayed
This commit is contained in:
@@ -229,7 +229,7 @@ void computeFees(char *displayBuffer, uint32_t displayBufferSize) {
|
||||
}
|
||||
|
||||
void finalizeParsing(bool direct) {
|
||||
char displayBuffer[50];
|
||||
char displayBuffer[79]; // required to store the string representation of uint256_t max
|
||||
uint8_t decimals = WEI_TO_ETHER;
|
||||
uint8_t *ticker = (uint8_t *) PIC(chainConfig->coinName);
|
||||
ethPluginFinalize_t pluginFinalize;
|
||||
@@ -353,6 +353,15 @@ void finalizeParsing(bool direct) {
|
||||
sizeof(displayBuffer));
|
||||
compareOrCopy(strings.common.fullAmount, displayBuffer, called_from_swap);
|
||||
}
|
||||
// Prepare nonce to display
|
||||
if (genericUI) {
|
||||
uint256_t nonce;
|
||||
convertUint256BE(tmpContent.txContent.nonce.value,
|
||||
tmpContent.txContent.nonce.length,
|
||||
&nonce);
|
||||
tostring256(&nonce, 10, displayBuffer, sizeof(displayBuffer));
|
||||
compareOrCopy(strings.common.nonce, displayBuffer, called_from_swap);
|
||||
}
|
||||
// Compute maximum fee
|
||||
if (genericUI) {
|
||||
computeFees(displayBuffer, sizeof(displayBuffer));
|
||||
|
||||
@@ -131,6 +131,14 @@ UX_STEP_CB(
|
||||
"Reject",
|
||||
});
|
||||
|
||||
UX_STEP_NOCB(
|
||||
ux_approval_tx_display_nonce_step,
|
||||
bnnn_paging,
|
||||
{
|
||||
.title = "Nonce",
|
||||
.text = strings.common.nonce,
|
||||
});
|
||||
|
||||
UX_STEP_NOCB(ux_approval_tx_data_warning_step,
|
||||
pbb,
|
||||
{
|
||||
@@ -144,6 +152,7 @@ UX_FLOW(ux_approval_tx_flow,
|
||||
&ux_approval_tx_1_step,
|
||||
&ux_approval_tx_2_step,
|
||||
&ux_approval_tx_3_step,
|
||||
&ux_approval_tx_display_nonce_step,
|
||||
&ux_approval_tx_4_step,
|
||||
&ux_approval_tx_5_step,
|
||||
&ux_approval_tx_6_step);
|
||||
@@ -153,6 +162,7 @@ UX_FLOW(ux_approval_tx_data_warning_flow,
|
||||
&ux_approval_tx_data_warning_step,
|
||||
&ux_approval_tx_2_step,
|
||||
&ux_approval_tx_3_step,
|
||||
&ux_approval_tx_display_nonce_step,
|
||||
&ux_approval_tx_4_step,
|
||||
&ux_approval_tx_5_step,
|
||||
&ux_approval_tx_6_step);
|
||||
Reference in New Issue
Block a user