Add additionalScreens field
This commit is contained in:
2
Makefile
2
Makefile
@@ -30,7 +30,7 @@ APP_LOAD_PARAMS += --path "1517992542'/1101353413'"
|
||||
|
||||
APPVERSION_M=1
|
||||
APPVERSION_N=8
|
||||
APPVERSION_P=2
|
||||
APPVERSION_P=3
|
||||
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
|
||||
APP_LOAD_FLAGS= --appFlags 0x240 --dep Ethereum:$(APPVERSION)
|
||||
|
||||
|
||||
@@ -190,6 +190,8 @@ typedef struct ethPluginProvideToken_t {
|
||||
tokenDefinition_t *token1; // set by the ETH application, to be saved by the plugin
|
||||
tokenDefinition_t *token2;
|
||||
|
||||
uint8_t additionalScreens; // Used by the plugin if it needs to display additional screens based on the information received from the token definitions.
|
||||
|
||||
uint8_t result;
|
||||
|
||||
} ethPluginProvideToken_t;
|
||||
|
||||
Submodule ethereum-plugin-sdk updated: 8ed5066fb4...9de21dd3a9
@@ -130,6 +130,8 @@ typedef struct ethPluginProvideToken_t {
|
||||
tokenDefinition_t *token1; // set by the ETH application, to be saved by the plugin
|
||||
tokenDefinition_t *token2;
|
||||
|
||||
uint8_t additionalScreens; // Used by the plugin if it needs to display additional screens based on the information received from the token definitions.
|
||||
|
||||
uint8_t result;
|
||||
|
||||
} ethPluginProvideToken_t;
|
||||
|
||||
@@ -289,8 +289,8 @@ void finalizeParsing(bool direct) {
|
||||
}
|
||||
}
|
||||
// Lookup tokens if requested
|
||||
ethPluginProvideToken_t pluginProvideToken;
|
||||
if ((pluginFinalize.tokenLookup1 != NULL) || (pluginFinalize.tokenLookup2 != NULL)) {
|
||||
ethPluginProvideToken_t pluginProvideToken;
|
||||
if (pluginFinalize.tokenLookup1 != NULL) {
|
||||
PRINTF("Lookup1: %.*H\n", ADDRESS_LENGTH, pluginFinalize.tokenLookup1);
|
||||
token1 = getKnownToken(pluginFinalize.tokenLookup1);
|
||||
@@ -321,7 +321,8 @@ void finalizeParsing(bool direct) {
|
||||
switch (pluginFinalize.uiType) {
|
||||
case ETH_UI_TYPE_GENERIC:
|
||||
dataPresent = false;
|
||||
dataContext.tokenContext.pluginUiMaxItems = pluginFinalize.numScreens;
|
||||
// Add the number of screens + the number of additional screens to get the total number of screens needed.
|
||||
dataContext.tokenContext.pluginUiMaxItems = pluginFinalize.numScreens + pluginProvideToken.additionalScreens;
|
||||
break;
|
||||
case ETH_UI_TYPE_AMOUNT_ADDRESS:
|
||||
genericUI = true;
|
||||
@@ -424,7 +425,7 @@ void finalizeParsing(bool direct) {
|
||||
}
|
||||
}
|
||||
|
||||
bool no_consent = false;
|
||||
bool no_consent;
|
||||
|
||||
no_consent = called_from_swap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user