Improve finalizeParsing() checking in swap context

Simplify code in logic_signTx.c
This commit is contained in:
Alexandre Paillier
2023-04-21 14:09:44 +02:00
parent a647c36e7f
commit 504747aba2
4 changed files with 111 additions and 100 deletions

View File

@@ -31,6 +31,4 @@ eth_plugin_result_t eth_plugin_perform_init(uint8_t *contractAddress,
// NULL for cached address, or base contract address
eth_plugin_result_t eth_plugin_call(int method, void *parameter);
void plugin_ui_start(void);
#endif // _ETH_PLUGIN_HANDLER_H_

View File

@@ -1,11 +0,0 @@
#include "shared_context.h"
#include "eth_plugin_handler.h"
#include "ux.h"
#include "feature_signTx.h"
void plugin_ui_start() {
dataContext.tokenContext.pluginUiState = PLUGIN_UI_OUTSIDE;
dataContext.tokenContext.pluginUiCurrentItem = 0;
ux_approve_tx(true);
}

View File

@@ -175,7 +175,7 @@ typedef enum {
#define NETWORK_STRING_MAX_SIZE 16
typedef struct txStringProperties_t {
typedef struct txStringProperties_s {
char fullAddress[43];
char fullAmount[79]; // 2^256 is 78 digits long
char maxFee[50];
@@ -190,7 +190,7 @@ typedef struct txStringProperties_t {
#endif
#define SHARED_CTX_FIELD_2_SIZE 40
typedef struct strDataTmp_t {
typedef struct strDataTmp_s {
char tmp[SHARED_CTX_FIELD_1_SIZE];
char tmp2[SHARED_CTX_FIELD_2_SIZE];
} strDataTmp_t;