import { useIndexerGatewayClient } from '@0xsequence/hooks'
import { useAccount } from 'wagmi'
function MultiChainBalances() {
const { address } = useAccount()
const indexerGatewayClient = useIndexerGatewayClient()
// Example: Fetch token balances across chains
const fetchBalances = async () => {
const response = await indexerGatewayClient.getTokenBalancesSummary({
chainIds: [1, 137], // Ethereum and Polygon
filter: {
accountAddresses: [address || ''],
omitNativeBalances: false
}
})
return response
}
return (
<div>
{/* ... */}
</div>
)
}