Skip to content

Commit

Permalink
Fix signup and chain id check (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
broody authored Aug 19, 2024
1 parent 11a5a90 commit 980fe0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/keychain/src/components/connect/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function Signup({
return;
}

doSignup(decodeURIComponent(usernameField.value)).catch((e) => {
doSignup(usernameField.value).catch((e) => {
// Backward compat with iframes without this permission-policy
if (e.message.includes("publickey-credentials-create")) {
doPopup();
Expand Down Expand Up @@ -125,7 +125,6 @@ export function Signup({
},
} = data;

console.log(origin);
const controller = new Controller({
appId: origin,
chainId,
Expand Down
4 changes: 4 additions & 0 deletions packages/keychain/src/hooks/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export const useDeploy = (): DeployInterface => {
async (username: string) => {
if (isDeployed) return;

if (!chainId) {
throw new Error("Chain ID not set");
}

if (chainId === constants.StarknetChainId.SN_MAIN)
throw new Error("Mainnet not supported");

Expand Down

0 comments on commit 980fe0b

Please sign in to comment.