Skip to content

Commit

Permalink
fix: kadena balance issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Feb 27, 2025
1 parent b14e85c commit 911b4c7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/extension/src/providers/kadena/libs/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ class API implements ProviderAPIInterface {
const error = balance.result.error as { message: string | undefined };
const message = error.message ?? 'Unknown error retrieving balances';
// expected error when account does not exist on a chain (balance == 0)
if (message.includes('row not found')) {
if (
message.includes('row not found') ||
message.includes('No value found in table')
) {
return toBase('0', this.decimals);
}
throw new Error(message);
Expand Down

0 comments on commit 911b4c7

Please sign in to comment.