Skip to content

Commit adb4fa6

Browse files
committed
fix: Linea and Ethereum balances
1 parent 70f3b09 commit adb4fa6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ui/hooks/bridge/useLatestBalance.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
ChainId,
99
isNativeAddress,
1010
} from '@metamask/bridge-controller';
11-
import { useSelector } from 'react-redux';
1211
import { getSelectedInternalAccount } from '../../selectors';
1312
import { useAsyncResult } from '../useAsync';
1413
import { 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';
2220
import { 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

Comments
 (0)