Skip to content

Commit

Permalink
Ignore unknown enabledTokenIds
Browse files Browse the repository at this point in the history
  • Loading branch information
peachbits committed Jan 10, 2024
1 parent 6b9c268 commit 1032292
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/actions/ExchangeRateActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async function buildExchangeRates(state: RootState): Promise<GuiExchangeRates> {
exchangeRates.push({ currency_pair: `iso:USD_${walletIsoFiat}` })
}
for (const tokenId of wallet.enabledTokenIds) {
if (wallet.currencyConfig.allTokens[tokenId] == null) continue
const { currencyCode: tokenCode } = wallet.currencyConfig.allTokens[tokenId]
if (tokenCode !== currencyCode) {
exchangeRates.push({ currency_pair: `${tokenCode}_${walletIsoFiat}` })
Expand Down

0 comments on commit 1032292

Please sign in to comment.