Skip to content

Commit

Permalink
When listing token balances, use locally available data
Browse files Browse the repository at this point in the history
(Instead of sending another request to look up the token data.)
  • Loading branch information
csillag committed Jul 20, 2023
1 parent 3f4c175 commit cee9430
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions .changelog/762.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
When listing token balances, use locally available data
9 changes: 4 additions & 5 deletions src/app/pages/AccountDetailsPage/AccountTokensCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,16 @@ export const AccountTokensCard: FC<AccountTokensCardProps> = ({ scope, address,
content: (
<TokenLink
scope={scope}
address={item.token_contract_addr}
address={item.token_contract_addr_eth}
name={item.token_name || t('common.missing')}
/>
),
key: 'name',
},
{
content: (
<LinkableDiv id={item.token_contract_addr}>
{/* TODO remove temporal workaround when token_contract_addr_eth becomes available as part of RuntimeEvmBalance */}
<DelayedContractLink scope={scope} oasisAddress={item.token_contract_addr} />
<LinkableDiv id={item.token_contract_addr_eth}>
<ContractLink scope={scope} address={item.token_contract_addr_eth} />
</LinkableDiv>
),
key: 'hash',
Expand All @@ -101,7 +100,7 @@ export const AccountTokensCard: FC<AccountTokensCardProps> = ({ scope, address,
key: 'ticker',
},
],
highlight: item.token_contract_addr === locationHash,
highlight: item.token_contract_addr_eth === locationHash,
}))

return (
Expand Down

0 comments on commit cee9430

Please sign in to comment.