Discussions

Ask a Question
Back to All

feature request: option to fetch native token balances only

it'd be nice to just be able to receive the native token balance for every chain, instead of that + every... poocoin the user has.

like this:

const balances = await this.sdk.getAccountBalance({
      walletAddress: address,
      blockchain: ['eth', 'bsc', 'polygon'],
      onlyNative: true
    })

Would also be cool to be able to pass a filter like this:

const balances = await this.sdk.getAccountBalance({
      walletAddress: address,
      blockchain: 'eth',
      tokens: ['sometokenaddress', 'anothertokenicareabout']
    })

Otherwise I'll have to use pagination to go over tokens I don't care about just to get the native token, I know I can just use the RPC but what's the point on having a SDK then

cheers