Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/libs/wallet-sdk/src/services/accountService.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getPactErrorCode } from '@kadena/client';
import { details } from '@kadena/client-utils/coin';
import type { ChainId } from '@kadena/types';
import type { ChainwebHostGenerator } from '../sdk/host.js';
Expand Down Expand Up @@ -36,7 +37,11 @@ export async function getAccountDetails(
accountDetails,
};
} catch (error) {
if (error.message.includes('row not found') === true) {
const errorCode = getPactErrorCode(error);
if (
errorCode === 'RECORD_NOT_FOUND' || // Account not found
errorCode === 'CANNOT_RESOLVE_MODULE' // Fungible or contract not found
) {
return {
chainId,
accountDetails: null,
Expand Down
Loading