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:
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define NO_EXTRA_INFO(ctx, idx) \
|
||||
(allzeroes(&(ctx.transactionContext.extraInfo[idx]), sizeof(extraInfo_t)))
|
||||
|
||||
#define NO_NFT_METADATA (NO_EXTRA_INFO(tmpCtx, 1))
|
||||
#define NO_NFT_METADATA (NO_EXTRA_INFO(tmpCtx, 0))
|
||||
|
||||
void eth_plugin_prepare_init(ethPluginInitContract_t *init,
|
||||
const uint8_t *selector,
|
||||
|
||||
@@ -533,7 +533,6 @@ __attribute__((noreturn)) void coin_main(libargs_t *args) {
|
||||
}
|
||||
|
||||
reset_app_context();
|
||||
tmpCtx.transactionContext.currentItemIndex = 0;
|
||||
|
||||
for (;;) {
|
||||
UX_INIT();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
void reset_known_tokens(void) {
|
||||
memset(tmpCtx.transactionContext.tokenSet, 0, MAX_ITEMS);
|
||||
tmpCtx.transactionContext.currentItemIndex = 0;
|
||||
}
|
||||
|
||||
static extraInfo_t *get_asset_info(uint8_t index) {
|
||||
|
||||
Reference in New Issue
Block a user