diff --git a/packages/canonical-bridge-widget/src/core/contract/hooks/useGetTokenBalance.ts b/packages/canonical-bridge-widget/src/core/contract/hooks/useGetTokenBalance.ts index c1ce125f..06e671b6 100644 --- a/packages/canonical-bridge-widget/src/core/contract/hooks/useGetTokenBalance.ts +++ b/packages/canonical-bridge-widget/src/core/contract/hooks/useGetTokenBalance.ts @@ -6,8 +6,9 @@ import { ERC20_TOKEN } from '@/core/contract/abi'; export const useGetTokenBalance = ({ tokenAddress }: { tokenAddress: `0x${string}` }) => { const { address } = useAccount(); - const { data: nativeBalance } = useBalance({ address }); const selectedToken = useAppSelector((state) => state.transfer.selectedToken); + const fromChain = useAppSelector((state) => state.transfer.fromChain); + const { data: nativeBalance } = useBalance({ address, chainId: fromChain?.id }); const { data: balance, isError, diff --git a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/deBridge/hooks/useGetDeBridgeFees.ts b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/deBridge/hooks/useGetDeBridgeFees.ts index a9bd4d25..a5ed7420 100644 --- a/packages/canonical-bridge-widget/src/modules/aggregator/adapters/deBridge/hooks/useGetDeBridgeFees.ts +++ b/packages/canonical-bridge-widget/src/modules/aggregator/adapters/deBridge/hooks/useGetDeBridgeFees.ts @@ -32,7 +32,10 @@ export const useGetDeBridgeFees = () => { const sendValue = useAppSelector((state) => state.transfer.sendValue); const toChain = useAppSelector((state) => state.transfer.toChain); - const { data: nativeTokenBalance } = useBalance({ address: address as `0x${string}` }); + const { data: nativeTokenBalance } = useBalance({ + address: address as `0x${string}`, + chainId: fromChain?.id, + }); const { toTokenInfo } = useToTokenInfo(); const { balance } = useGetTokenBalance({