From bef2b1b29107959ce9ca84ce6ae0ecdfc2bc0ff5 Mon Sep 17 00:00:00 2001 From: Joseph Tary Date: Wed, 18 Oct 2023 09:01:04 -0700 Subject: [PATCH] fix: bad fetch when keplr not available --- web/src/api/rpc/beta2/certificates.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/api/rpc/beta2/certificates.tsx b/web/src/api/rpc/beta2/certificates.tsx index d54b2a3..d306d47 100644 --- a/web/src/api/rpc/beta2/certificates.tsx +++ b/web/src/api/rpc/beta2/certificates.tsx @@ -124,7 +124,9 @@ export const loadActiveCertificateAuto = async () => { const walletId = accounts?.[0].address; if (!walletId) { - throw new Error('Unable to fetch active certificate. Unable to determine wallet ID.'); + console.log('Unable to fetch active certificate. Unable to determine wallet ID.'); + + return { $type: 'Invalid Certificate' } as NoCertificate; } return loadActiveCertificate(walletId);