Skip to content

Commit

Permalink
fix bug when getting address balance
Browse files Browse the repository at this point in the history
  • Loading branch information
vorujack committed Dec 4, 2023
1 parent 9b6527b commit 3619df6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/abstract-chain/lib/AbstractChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ abstract class AbstractChain {
* @returns an object containing the amount of each asset
*/
getAddressAssets = async (address: string): Promise<AssetBalance> =>
await this.network.getAddressAssets(address);
address === ''
? Promise.resolve({ nativeToken: 0n, tokens: [] })
: this.network.getAddressAssets(address);

/**
* gets the amount of each asset in the lock address
Expand Down

0 comments on commit 3619df6

Please sign in to comment.