File tree 2 files changed +16
-2
lines changed
2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ const Account = {
21
21
id : encodeURIComponent ( id ) ,
22
22
} ) ;
23
23
24
+ if ( accountResponse . status === 404 ) {
25
+ return null ;
26
+ }
27
+
24
28
if ( ! accountResponse . ok ) {
25
29
throw new Error ( "Failed to fetch account" ) ;
26
30
}
@@ -51,6 +55,16 @@ export const getWalletAccount = createApiHandler({
51
55
...WellKnownWallets . workspace ( workspace ) ,
52
56
) ;
53
57
const data = await Account . fetch ( wallet , workspaceWalletId ) ;
58
+
59
+ if ( ! data ) {
60
+ return {
61
+ balance : MicroDollar . ZERO . display ( ) ,
62
+ balanceExact : MicroDollar . ZERO . display ( {
63
+ showAllDecimals : true ,
64
+ } ) ,
65
+ } ;
66
+ }
67
+
54
68
return Account . format ( data ) ;
55
69
} ,
56
70
} ) ;
Original file line number Diff line number Diff line change @@ -273,8 +273,8 @@ export interface WalletAPI {
273
273
}
274
274
275
275
// for local dev
276
- // const WALLET_API_URL = "http://localhost:8001";
277
- const WALLET_API_URL = "https://wallet.webdraw.com" ;
276
+ const WALLET_API_URL = "http://localhost:8001" ;
277
+ // const WALLET_API_URL = "https://wallet.webdraw.com";
278
278
279
279
export function createWalletClient (
280
280
apiKey : string ,
You can’t perform that action at this time.
0 commit comments