Skip to content

Commit

Permalink
Update USDC balances
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstph-dvx committed Dec 9, 2024
1 parent 12e34e1 commit 29ed1d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/arb-token-bridge-ui/src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { addressIsSmartContract } from '../../util/AddressUtils'
import { useSyncConnectedChainToAnalytics } from './useSyncConnectedChainToAnalytics'
import { useInterval } from 'react-use'
import { useArbTokenBridge } from '../../hooks/useArbTokenBridge'
import { useUpdateUSDCBalances } from '../../hooks/CCTP/useUpdateUSDCBalances'

declare global {
interface Window {
Expand Down Expand Up @@ -65,6 +66,9 @@ function AppContent() {
const {
token: { updateTokenData }
} = useArbTokenBridge()
const { updateUSDCBalances } = useUpdateUSDCBalances({
walletAddress: address
})

// We want to be sure this fetch is completed by the time we open the USDC modals
useCCTPIsBlocked()
Expand All @@ -83,6 +87,7 @@ function AppContent() {
}, [actions.app])

useInterval(() => {
updateUSDCBalances()
if (selectedToken) {
updateTokenData(selectedToken.address)
}
Expand Down

0 comments on commit 29ed1d6

Please sign in to comment.