Skip to content

Commit 0a28af1

Browse files
committed
Remove debug
1 parent e3bdd4e commit 0a28af1

File tree

2 files changed

+22
-35
lines changed

2 files changed

+22
-35
lines changed

packages/keychain/src/components/connect/Signup/Argent.tsx

+5-18
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,9 @@ function SignupArgentInner({ username }: { username: string }) {
149149
const buffer = base64url.toBuffer(challenge);
150150
const high = "0x" + buffer.subarray(0, 16).toString("hex");
151151
const low = "0x" + buffer.subarray(16, 32).toString("hex");
152-
console.log({ high, low });
153-
console.log({ challenge: "0x" + buffer.toString("hex") });
154-
155152
const typedData = registerTypedData(username, { low, high }, chainId);
156-
157-
const hash = await extAccount.hashMessage(typedData);
158-
console.log({ hash });
159-
160153
const sig = await extAccount.signMessage(typedData);
161-
const finalizeMutation = await finalizeAccountSignup(
162-
extAccount.address,
163-
chainId,
164-
sig as string[],
165-
);
166-
console.log({ finalizeMutation });
154+
await finalizeAccountSignup(extAccount.address, chainId, sig as string[]);
167155

168156
// set controller address & calldata
169157
const salt = shortString.encodeShortString(username);
@@ -283,7 +271,7 @@ function SignupArgentInner({ username }: { username: string }) {
283271
break;
284272
}
285273
}
286-
});
274+
}, [state, username, setTitle]);
287275

288276
return (
289277
<Container
@@ -419,9 +407,8 @@ function SignupArgentInner({ username }: { username: string }) {
419407
<Button
420408
colorScheme="colorful"
421409
onClick={() => {
422-
423410
console.log("deploy");
424-
onDeploy()
411+
onDeploy();
425412
}}
426413
isLoading={isDeploying}
427414
isDisabled={!(isAllFunded && isChecked && extAccount)}
@@ -455,7 +442,7 @@ function ExternalWalletProvider({ children }: PropsWithChildren) {
455442
function useTokens() {
456443
const { account: extAccount } = useAccount();
457444
const { provider } = useProvider();
458-
const { controller, prefunds } = useConnection();
445+
const { prefunds } = useConnection();
459446
const [tokens, setTokens] = useState<TokenInfo[]>([]);
460447
const [isChecked, setIsChecked] = useState(false);
461448
const [isFetching, setIsFetching] = useState(true);
@@ -476,7 +463,7 @@ function useTokens() {
476463
if (!isChecked) {
477464
setIsChecked(true);
478465
}
479-
}, [tokens, controller, isChecked, extAccount?.address, provider]);
466+
}, [tokens, isChecked, extAccount?.address, provider]);
480467

481468
useInterval(checkFunds, 3000);
482469

packages/keychain/src/components/connect/Signup/index.tsx

+17-17
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export function Signup({
3232
}: SignupProps) {
3333
const theme = useControllerTheme();
3434
const { chainId, rpcUrl, setController } = useConnection();
35-
console.log({ chainId, rpcUrl });
3635
const [error, setError] = useState<Error>();
3736
const [isRegistering, setIsRegistering] = useState(false);
3837
const [isPopup, setIsPopup] = useState(false);
@@ -242,22 +241,23 @@ export function Signup({
242241
>
243242
sign up
244243
</Button>
245-
{document.cookie.includes("argent") && (
246-
// {typeof window !== "undefined" && window["starknet_argentX"] && (
247-
<Button
248-
colorScheme="colorful"
249-
isLoading={isRegistering}
250-
isDisabled={
251-
debouncing ||
252-
!username ||
253-
isValidating ||
254-
!!usernameField.error
255-
}
256-
onClick={() => setSignupMethod(SignupMethod.ARGENT)}
257-
>
258-
<ArgentIcon />
259-
</Button>
260-
)}
244+
{typeof window !== "undefined" &&
245+
window["starknet_argentX"] &&
246+
window.document.cookie.includes("argent") && (
247+
<Button
248+
colorScheme="colorful"
249+
isLoading={isRegistering}
250+
isDisabled={
251+
debouncing ||
252+
!username ||
253+
isValidating ||
254+
!!usernameField.error
255+
}
256+
onClick={() => setSignupMethod(SignupMethod.ARGENT)}
257+
>
258+
<ArgentIcon />
259+
</Button>
260+
)}
261261
</HStack>
262262
<RegistrationLink
263263
description="Already have a Controller?"

0 commit comments

Comments
 (0)