88 ChainId ,
99 isNativeAddress ,
1010} from '@metamask/bridge-controller' ;
11- import { useSelector } from 'react-redux' ;
1211import { getSelectedInternalAccount } from '../../selectors' ;
1312import { useAsyncResult } from '../useAsync' ;
1413import { Numeric } from '../../../shared/modules/Numeric' ;
@@ -18,7 +17,6 @@ import {
1817 getMultichainBalances ,
1918 getMultichainCurrentChainId ,
2019} from '../../selectors/multichain' ;
21- import { getProviderConfig } from '../../../shared/modules/selectors/networks' ;
2220import { MULTICHAIN_NATIVE_CURRENCY_TO_CAIP19 } from '../../../shared/constants/multichain/assets' ;
2321
2422/**
@@ -45,7 +43,6 @@ const useLatestBalance = (
4543 const nonEvmBalancesByAccountId = useMultichainSelector (
4644 getMultichainBalances ,
4745 ) ;
48- const { rpcUrl } = useSelector ( getProviderConfig ) ;
4946
5047 const nonEvmBalances = nonEvmBalancesByAccountId ?. [ id ] ;
5148
@@ -72,8 +69,7 @@ const useLatestBalance = (
7269
7370 if (
7471 token . address &&
75- formatChainIdToCaip ( currentChainId ) === formatChainIdToCaip ( chainId ) &&
76- rpcUrl
72+ formatChainIdToCaip ( currentChainId ) === formatChainIdToCaip ( chainId )
7773 ) {
7874 return (
7975 await calcLatestSrcBalance (
@@ -86,7 +82,7 @@ const useLatestBalance = (
8682 }
8783
8884 return undefined ;
89- } , [ currentChainId , token , selectedAddress , rpcUrl , nonEvmBalances ] ) ;
85+ } , [ currentChainId , token , selectedAddress , nonEvmBalances ] ) ;
9086
9187 if ( token && ! token . decimals ) {
9288 throw new Error (
0 commit comments