Fixes
This commit is contained in:
committed by
Charles-Edouard de la Vergne
parent
18889d667b
commit
e503373411
@@ -349,6 +349,12 @@ __attribute__((noinline)) static bool finalize_parsing_helper(bool direct, bool
|
||||
uint8_t msg_sender[ADDRESS_LENGTH] = {0};
|
||||
get_public_key(msg_sender, sizeof(msg_sender));
|
||||
|
||||
address_to_string(msg_sender,
|
||||
ADDRESS_LENGTH,
|
||||
strings.common.fromAddress,
|
||||
sizeof(strings.common.fromAddress),
|
||||
chainConfig->chainId);
|
||||
PRINTF("FROM address displayed: %s\n", strings.common.fromAddress);
|
||||
// Finalize the plugin handling
|
||||
if (dataContext.tokenContext.pluginStatus >= ETH_PLUGIN_RESULT_SUCCESSFUL) {
|
||||
eth_plugin_prepare_finalize(&pluginFinalize);
|
||||
@@ -473,7 +479,7 @@ __attribute__((noinline)) static bool finalize_parsing_helper(bool direct, bool
|
||||
} else {
|
||||
strlcpy(strings.common.toAddress, displayBuffer, sizeof(strings.common.toAddress));
|
||||
}
|
||||
PRINTF("Address displayed: %s\n", strings.common.toAddress);
|
||||
PRINTF("TO address displayed: %s\n", strings.common.toAddress);
|
||||
|
||||
// Format the amount in a temporary buffer, if in swap case compare it with validated
|
||||
// amount, else commit it
|
||||
@@ -499,19 +505,6 @@ __attribute__((noinline)) static bool finalize_parsing_helper(bool direct, bool
|
||||
strlcpy(strings.common.fullAmount, displayBuffer, sizeof(strings.common.fullAmount));
|
||||
}
|
||||
PRINTF("Amount displayed: %s\n", strings.common.fullAmount);
|
||||
|
||||
if (G_called_from_swap) {
|
||||
// Transaction parameters are managed by the Exchange caller app!
|
||||
explicit_bzero(strings.common.fromAddress, sizeof(strings.common.fromAddress));
|
||||
} else {
|
||||
// Format the from address in a temporary buffer
|
||||
address_to_string(msg_sender,
|
||||
ADDRESS_LENGTH,
|
||||
strings.common.fromAddress,
|
||||
sizeof(strings.common.fromAddress),
|
||||
chainConfig->chainId);
|
||||
PRINTF("FROM Address displayed: %s\n", strings.common.fromAddress);
|
||||
}
|
||||
}
|
||||
|
||||
// Compute the max fee in a temporary buffer, if in swap case compare it with validated max fee,
|
||||
|
||||
Reference in New Issue
Block a user