Skip to content

Commit

Permalink
Restore compatibility with old version of Nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Aug 1, 2023
1 parent f94aaf9 commit d1b9bdb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/app/pages/AccountDetailsPage/AccountTokensCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,23 @@ export const AccountTokensCard: FC<AccountTokensCardProps> = ({ scope, address,
content: (
<TokenLink
scope={scope}
address={item.token_contract_addr_eth}
address={item.token_contract_addr_eth ?? item.token_contract_addr}
name={item.token_name || t('common.missing')}
/>
),
key: 'name',
},
{
content: (
<LinkableDiv id={item.token_contract_addr_eth}>
<ContractLink scope={scope} address={item.token_contract_addr_eth} />
<LinkableDiv id={item.token_contract_addr_eth ?? item.token_contract_addr}>
{item.token_contract_addr_eth === undefined ? ( // TODO remove temporal workaround when latest Nexus is deployed
<DelayedContractLink scope={scope} oasisAddress={item.token_contract_addr} />
) : (
<ContractLink
scope={scope}
address={item.token_contract_addr_eth ?? item.token_contract_addr}
/>
)}
</LinkableDiv>
),
key: 'hash',
Expand All @@ -100,7 +107,7 @@ export const AccountTokensCard: FC<AccountTokensCardProps> = ({ scope, address,
key: 'ticker',
},
],
highlight: item.token_contract_addr_eth === locationHash,
highlight: item.token_contract_addr_eth === locationHash || item.token_contract_addr === locationHash,
}))

return (
Expand Down

0 comments on commit d1b9bdb

Please sign in to comment.