Skip to content

Commit

Permalink
fix: fix getStarknetId() crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystic-Nayy committed Jun 10, 2024
1 parent c4fbdef commit 552d9aa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/src/starknet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

0 comments on commit 552d9aa

Please sign in to comment.