Change fields order presentation
This commit is contained in:
@@ -9,7 +9,7 @@ UX_STEP_NOCB(
|
||||
ux_domain_name_step,
|
||||
bnnn_paging,
|
||||
{
|
||||
.title = "Domain",
|
||||
.title = "To (domain)",
|
||||
.text = g_domain_name
|
||||
});
|
||||
// clang-format on
|
||||
|
||||
@@ -117,7 +117,7 @@ UX_STEP_NOCB(
|
||||
.text = strings.common.fromAddress,
|
||||
});
|
||||
UX_STEP_NOCB(
|
||||
ux_approval_address_step,
|
||||
ux_approval_to_step,
|
||||
bnnn_paging,
|
||||
{
|
||||
.title = "To",
|
||||
@@ -226,28 +226,24 @@ void ux_approve_tx(bool fromPlugin) {
|
||||
ux_approval_tx_flow[step++] = &ux_plugin_approval_after_step;
|
||||
} else {
|
||||
// We're in a regular transaction, just show the amount and the address
|
||||
if (strings.common.fromAddress[0] != 0) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_from_step;
|
||||
}
|
||||
ux_approval_tx_flow[step++] = &ux_approval_amount_step;
|
||||
#ifdef HAVE_DOMAIN_NAME
|
||||
uint64_t chain_id = get_tx_chain_id();
|
||||
if (has_domain_name(&chain_id, tmpContent.txContent.destination)) {
|
||||
ux_approval_tx_flow[step++] = &ux_domain_name_step;
|
||||
if (N_storage.verbose_domain_name) {
|
||||
if (strings.common.fromAddress[0] != 0) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_from_step;
|
||||
}
|
||||
ux_approval_tx_flow[step++] = &ux_approval_address_step;
|
||||
}
|
||||
} else {
|
||||
#endif // HAVE_DOMAIN_NAME
|
||||
if (strings.common.fromAddress[0] != 0) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_from_step;
|
||||
}
|
||||
ux_approval_tx_flow[step++] = &ux_approval_address_step;
|
||||
ux_approval_tx_flow[step++] = &ux_approval_to_step;
|
||||
#ifdef HAVE_DOMAIN_NAME
|
||||
}
|
||||
#endif // HAVE_DOMAIN_NAME
|
||||
}
|
||||
|
||||
ux_approval_tx_flow[step++] = &ux_approval_fees_step;
|
||||
|
||||
if (N_storage.displayNonce) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_nonce_step;
|
||||
}
|
||||
@@ -257,7 +253,6 @@ void ux_approve_tx(bool fromPlugin) {
|
||||
ux_approval_tx_flow[step++] = &ux_approval_network_step;
|
||||
}
|
||||
|
||||
ux_approval_tx_flow[step++] = &ux_approval_fees_step;
|
||||
ux_approval_tx_flow[step++] = &ux_approval_accept_step;
|
||||
ux_approval_tx_flow[step++] = &ux_approval_reject_step;
|
||||
ux_approval_tx_flow[step++] = FLOW_END_STEP;
|
||||
|
||||
@@ -116,22 +116,22 @@ static uint8_t setTagValuePairs(void) {
|
||||
pairs[nbPairs].value = strings.common.maxFee;
|
||||
nbPairs++;
|
||||
} else {
|
||||
pairs[nbPairs].item = "Amount";
|
||||
pairs[nbPairs].value = strings.common.fullAmount;
|
||||
nbPairs++;
|
||||
|
||||
if (strings.common.fromAddress[0] != 0) {
|
||||
pairs[nbPairs].item = "From";
|
||||
pairs[nbPairs].value = strings.common.fromAddress;
|
||||
nbPairs++;
|
||||
}
|
||||
|
||||
pairs[nbPairs].item = "Amount";
|
||||
pairs[nbPairs].value = strings.common.fullAmount;
|
||||
nbPairs++;
|
||||
|
||||
#ifdef HAVE_DOMAIN_NAME
|
||||
uint64_t chain_id = get_tx_chain_id();
|
||||
tx_approval_context.domain_name_match =
|
||||
has_domain_name(&chain_id, tmpContent.txContent.destination);
|
||||
if (tx_approval_context.domain_name_match) {
|
||||
pairs[nbPairs].item = "Domain";
|
||||
pairs[nbPairs].item = "To (domain)";
|
||||
pairs[nbPairs].value = g_domain_name;
|
||||
nbPairs++;
|
||||
}
|
||||
@@ -143,15 +143,15 @@ static uint8_t setTagValuePairs(void) {
|
||||
#ifdef HAVE_DOMAIN_NAME
|
||||
}
|
||||
#endif
|
||||
pairs[nbPairs].item = "Max fees";
|
||||
pairs[nbPairs].value = strings.common.maxFee;
|
||||
nbPairs++;
|
||||
|
||||
if (N_storage.displayNonce) {
|
||||
pairs[nbPairs].item = "Nonce";
|
||||
pairs[nbPairs].value = strings.common.nonce;
|
||||
nbPairs++;
|
||||
}
|
||||
pairs[nbPairs].item = "Max fees";
|
||||
pairs[nbPairs].value = strings.common.maxFee;
|
||||
nbPairs++;
|
||||
|
||||
if (tx_approval_context.displayNetwork) {
|
||||
pairs[nbPairs].item = "Network";
|
||||
pairs[nbPairs].value = strings.common.network_name;
|
||||
|
||||
Reference in New Issue
Block a user