From 552d9aa93f9c6c2b64882869740143fd94b3c8bc Mon Sep 17 00:00:00 2001 From: Gift-Naomi Date: Mon, 10 Jun 2024 08:57:06 +0000 Subject: [PATCH] fix: fix `getStarknetId()` crashing --- backend/src/starknet.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/src/starknet.ts b/backend/src/starknet.ts index a3a55709..b03dc24e 100644 --- a/backend/src/starknet.ts +++ b/backend/src/starknet.ts @@ -20,14 +20,13 @@ export const getStarknetId = async ( ); let domain; + let id; try { domain = await starknetIdNavigator.getStarkName(address); - } catch (error) { - console.error(error); + id = await starknetIdNavigator.getStarknetId(domain); + } catch { return null; } - const id = await starknetIdNavigator.getStarknetId(domain); - return id; };