Now uses the new asset util functions

Now the first asset is properly stored at index 0 instead of 1
This commit is contained in:
Alexandre Paillier
2024-05-07 17:20:20 +02:00
parent 18a02dcacb
commit c2e0f7ca6a
6 changed files with 14 additions and 21 deletions

View File

@@ -52,17 +52,17 @@ void eth_plugin_prepare_query_contract_UI(ethQueryContractUI_t *queryContractUI,
memset((uint8_t *) queryContractUI, 0, sizeof(ethQueryContractUI_t));
// If no extra information was found, set the pointer to NULL
if (NO_EXTRA_INFO(tmpCtx, 1)) {
if (NO_EXTRA_INFO(tmpCtx, 0)) {
queryContractUI->item1 = NULL;
} else {
queryContractUI->item1 = &tmpCtx.transactionContext.extraInfo[1];
queryContractUI->item1 = &tmpCtx.transactionContext.extraInfo[0];
}
// If no extra information was found, set the pointer to NULL
if (NO_EXTRA_INFO(tmpCtx, 0)) {
if (NO_EXTRA_INFO(tmpCtx, 1)) {
queryContractUI->item2 = NULL;
} else {
queryContractUI->item2 = &tmpCtx.transactionContext.extraInfo[0];
queryContractUI->item2 = &tmpCtx.transactionContext.extraInfo[1];
}
queryContractUI->screenIndex = screenIndex;