Remove detailed fees display
This commit is contained in:
@@ -147,7 +147,7 @@ eth_plugin_result_t eth_plugin_call(int method, void *parameter) {
|
||||
switch (method) {
|
||||
case ETH_PLUGIN_INIT_CONTRACT:
|
||||
((ethPluginInitContract_t *) parameter)->interfaceVersion =
|
||||
ETH_PLUGIN_INTERFACE_VERSION_2;
|
||||
ETH_PLUGIN_INTERFACE_VERSION_1;
|
||||
((ethPluginInitContract_t *) parameter)->result = ETH_PLUGIN_RESULT_UNAVAILABLE;
|
||||
((ethPluginInitContract_t *) parameter)->pluginSharedRW = &pluginRW;
|
||||
((ethPluginInitContract_t *) parameter)->pluginSharedRO = &pluginRO;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
// Interface version. To be updated everytime we introduce breaking changes to the plugin interface.
|
||||
typedef enum {
|
||||
ETH_PLUGIN_INTERFACE_VERSION_1 = 1, // Version 1
|
||||
ETH_PLUGIN_INTERFACE_VERSION_2 = 2 // Add dataPresent to txContent
|
||||
} eth_plugin_interface_version_t;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -778,7 +778,6 @@ void coin_main(chain_config_t *coin_config) {
|
||||
#endif
|
||||
storage.contractDetails = 0x00;
|
||||
storage.displayNonce = 0x00;
|
||||
storage.displayFeeDetails = 0x00;
|
||||
storage.initialized = 0x01;
|
||||
nvm_write((void *) &N_storage, (void *) &storage, sizeof(internalStorage_t));
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ typedef struct internalStorage_t {
|
||||
unsigned char dataAllowed;
|
||||
unsigned char contractDetails;
|
||||
unsigned char displayNonce;
|
||||
unsigned char displayFeeDetails;
|
||||
uint8_t initialized;
|
||||
} internalStorage_t;
|
||||
|
||||
@@ -166,8 +165,7 @@ typedef enum {
|
||||
typedef struct txStringProperties_t {
|
||||
char fullAddress[43];
|
||||
char fullAmount[50];
|
||||
char maxFee[50]; // Used as BaseFee when detailing fees
|
||||
char priorityFee[50];
|
||||
char maxFee[50];
|
||||
char nonce[8]; // 10M tx per account ought to be enough for everybody
|
||||
char chainID[8]; // 10M different chainID ought to be enough for people to find a unique
|
||||
// chainID for their token / chain.
|
||||
|
||||
@@ -5,7 +5,6 @@ void display_settings(const ux_flow_step_t* const start_step);
|
||||
void switch_settings_contract_data(void);
|
||||
void switch_settings_display_data(void);
|
||||
void switch_settings_display_nonce(void);
|
||||
void switch_settings_display_fee_details(void);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// clang-format off
|
||||
@@ -79,15 +78,6 @@ UX_STEP_CB(
|
||||
.text = strings.common.fullAddress + 26
|
||||
});
|
||||
|
||||
UX_STEP_CB(
|
||||
ux_settings_flow_4_step,
|
||||
bnnn_paging,
|
||||
switch_settings_display_fee_details(),
|
||||
{
|
||||
.title = "Fee Details",
|
||||
.text = strings.common.fullAddress + 40
|
||||
});
|
||||
|
||||
#else
|
||||
|
||||
UX_STEP_CB(
|
||||
@@ -123,21 +113,10 @@ UX_STEP_CB(
|
||||
strings.common.fullAddress + 26
|
||||
});
|
||||
|
||||
UX_STEP_CB(
|
||||
ux_settings_flow_4_step,
|
||||
bnnn,
|
||||
switch_settings_display_fee_details(),
|
||||
{
|
||||
"Fee Details",
|
||||
"Display fee details",
|
||||
"when available",
|
||||
strings.common.fullAddress + 40
|
||||
});
|
||||
|
||||
#endif
|
||||
|
||||
UX_STEP_CB(
|
||||
ux_settings_flow_5_step,
|
||||
ux_settings_flow_4_step,
|
||||
pb,
|
||||
ui_idle(),
|
||||
{
|
||||
@@ -150,8 +129,7 @@ UX_FLOW(ux_settings_flow,
|
||||
&ux_settings_flow_1_step,
|
||||
&ux_settings_flow_2_step,
|
||||
&ux_settings_flow_3_step,
|
||||
&ux_settings_flow_4_step,
|
||||
&ux_settings_flow_5_step);
|
||||
&ux_settings_flow_4_step);
|
||||
|
||||
void display_settings(const ux_flow_step_t* const start_step) {
|
||||
strcpy(strings.common.fullAddress, (N_storage.dataAllowed ? "Allowed" : "NOT Allowed"));
|
||||
@@ -159,8 +137,6 @@ void display_settings(const ux_flow_step_t* const start_step) {
|
||||
(N_storage.contractDetails ? "Displayed" : "NOT Displayed"));
|
||||
strcpy(strings.common.fullAddress + 26,
|
||||
(N_storage.displayNonce ? "Displayed" : "NOT Displayed"));
|
||||
strcpy(strings.common.fullAddress + 40,
|
||||
(N_storage.displayFeeDetails ? "Displayed" : "NOT Displayed"));
|
||||
ux_flow_init(0, ux_settings_flow, start_step);
|
||||
}
|
||||
|
||||
@@ -181,9 +157,3 @@ void switch_settings_display_nonce() {
|
||||
nvm_write((void*) &N_storage.displayNonce, (void*) &value, sizeof(uint8_t));
|
||||
display_settings(&ux_settings_flow_3_step);
|
||||
}
|
||||
|
||||
void switch_settings_display_fee_details() {
|
||||
uint8_t value = (N_storage.displayFeeDetails ? 0 : 1);
|
||||
nvm_write((void*) &N_storage.displayFeeDetails, (void*) &value, sizeof(uint8_t));
|
||||
display_settings(&ux_settings_flow_4_step);
|
||||
}
|
||||
Reference in New Issue
Block a user