Skip to content

Commit

Permalink
refactor(ramp): use Hex type
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei committed Jul 9, 2024
1 parent c1424f5 commit 494a122
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/UI/Ramp/hooks/useBalance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { hexToBN } from '@metamask/controller-utils';
import { useSelector } from 'react-redux';
import { hexToBN } from '@metamask/controller-utils';
import { Hex } from '@metamask/utils';
import { NATIVE_ADDRESS } from '../../../../constants/on-ramp';
import { selectAccountsByChainId } from '../../../../selectors/accountTrackerController';
import {
Expand Down Expand Up @@ -62,8 +63,7 @@ export default function useBalance(asset?: Asset) {
);
balanceFiat = weiToFiat(balanceBN, conversionRate, currentCurrency);
} else {
const exchangeRate =
tokenExchangeRates?.[assetAddress as `0x${string}`]?.price;
const exchangeRate = tokenExchangeRates?.[assetAddress as Hex]?.price;
balance =
assetAddress && assetAddress in balances
? renderFromTokenMinimalUnit(
Expand Down

0 comments on commit 494a122

Please sign in to comment.