diff --git a/examples/next/src/app/components/Connected.tsx b/examples/next/src/app/components/Connected.tsx index 7aca0b38..da9eed39 100644 --- a/examples/next/src/app/components/Connected.tsx +++ b/examples/next/src/app/components/Connected.tsx @@ -87,10 +87,8 @@ export const Connected = () => { const checkTokenBalancesForFeeOptions = async () => { if (pendingFeeOptionConfirmation) { const [account] = await walletClient!.getAddresses() - // ATTENTION: switch to new api const nativeTokenBalance = await indexerClient.getNativeTokenBalance({ accountAddress: account }) - //ATTENTION: switch to new api const tokenBalances = await indexerClient.getTokenBalancesSummary({ filter: { accountAddresses: [account], diff --git a/examples/react/src/components/Connected.tsx b/examples/react/src/components/Connected.tsx index 041a85a2..249b6426 100644 --- a/examples/react/src/components/Connected.tsx +++ b/examples/react/src/components/Connected.tsx @@ -134,10 +134,8 @@ export const Connected = () => { const checkTokenBalancesForFeeOptions = async () => { if (pendingFeeOptionConfirmation && walletClient) { const [account] = await walletClient.getAddresses() - // ATTENTION: switch to new api const nativeTokenBalance = await indexerClient.getNativeTokenBalance({ accountAddress: account }) - // ATTENTION: switch to new api const tokenBalances = await indexerClient.getTokenBalancesSummary({ filter: { accountAddresses: [account], diff --git a/packages/kit/src/hooks/data.ts b/packages/kit/src/hooks/data.ts index 41f45dab..2b25f5e6 100644 --- a/packages/kit/src/hooks/data.ts +++ b/packages/kit/src/hooks/data.ts @@ -26,7 +26,6 @@ export const time = { } export const getNativeTokenBalance = async (indexerClient: SequenceIndexer, chainId: number, accountAddress: string) => { - // ATTENTION: switch to new api const res = await indexerClient.getNativeTokenBalance({ accountAddress }) const tokenBalance: TokenBalance = { @@ -82,7 +81,6 @@ export const getTokenBalancesByContract = async (indexerClient: SequenceIndexer, } export const getBalances = async (indexerClient: SequenceIndexer, chainId: number, args: GetTokenBalancesSummaryArgs) => { - // ATTENTION: switch to new api if (!args.filter.accountAddresses[0]) { return [] } @@ -129,7 +127,6 @@ interface UseCoinBalanceArgs extends GetTokenBalancesSummaryArgs { } export const useCoinBalance = (args: UseCoinBalanceArgs) => { - // ATTENTION: switch to new api const indexerClient = useIndexerClient(args.chainId) return useQuery({ @@ -155,7 +152,6 @@ interface UseCollectibleBalanceArgs extends GetTokenBalancesDetailsArgs { } export const useCollectibleBalance = (args: UseCollectibleBalanceArgs) => { - // ATTENTION: switch to new api const indexerClient = useIndexerClient(args.chainId) return useQuery({ @@ -443,7 +439,6 @@ const getSwapPrices = async ( const currencyAddress = compareAddress(rawCurrencyAddress, NATIVE_TOKEN_ADDRESS_0X) ? zeroAddress : rawCurrencyAddress const isNativeToken = compareAddress(currencyAddress, zeroAddress) - // ATTENTION: switch to new api if (currencyAddress && !currencyBalanceInfoMap.has(currencyAddress)) { currencyBalanceInfoMap.set( currencyAddress, diff --git a/packages/wallet/src/hooks/data.ts b/packages/wallet/src/hooks/data.ts index 899e6dd1..6289d683 100644 --- a/packages/wallet/src/hooks/data.ts +++ b/packages/wallet/src/hooks/data.ts @@ -92,7 +92,6 @@ export const getBalancesAssetsSummary = async ( return [] } - // ATTENTION: switch to new api return getTokenBalancesDetails(indexerClient, { filter: { accountAddresses: [accountAddress], @@ -113,7 +112,6 @@ export const getBalancesAssetsSummary = async ( await Promise.all([ ...indexerClientsArr.map(([chainId, indexerClient]) => getNativeTokenBalance(indexerClient, chainId, accountAddress)), ...indexerClientsArr.map(([_chainId, indexerClient]) => - // ATTENTION: switch to new api getTokenBalancesSummary(indexerClient, { filter: { accountAddresses: [accountAddress],