Skip to content

Commit

Permalink
fix: removing un-used lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Briancesco committed Jan 21, 2025
1 parent 902736d commit b7ff4e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions account-kit/react/src/components/auth/card/loading/otp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ const AUTH_DELAY = 3000;

export const LoadingOtp = () => {
const { isConnected } = useSignerStatus();
const { authStep } = useAuthContext("otp_verify");
const { setAuthStep, authStep } = useAuthContext("otp_verify");
const [otpCode, setOtpCode] = useState<OTPCodeType>(initialOTPValue);
const [errorText, setErrorText] = useState(authStep.error?.message || "");
const [titleText, setTitleText] = useState(ls.loadingOtp.title);
const { setAuthStep } = useAuthContext();
// const { setAuthStep } = useAuthContext();
const resetOTP = (errorText = "") => {
setOtpCode(initialOTPValue);
setErrorText(errorText);
Expand All @@ -37,6 +37,8 @@ export const LoadingOtp = () => {
if (isConnected) {
setAuthStep({ ...authStep, status: AuthStepStatus.success });
setTitleText(ls.loadingOtp.verified);

// Wait 3 seconds before completing the auth step
setTimeout(() => {
setAuthStep({ type: "complete" });
}, AUTH_DELAY);
Expand Down
1 change: 1 addition & 0 deletions account-kit/react/src/hooks/useUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const useUser = (): UseUserResult => {
() => getUser(config) ?? null,
() => getUser(config) ?? null
);

const eoaUser = useMemo(() => {
if (account.status !== "connected" && account.status !== "reconnecting") {
return null;
Expand Down

0 comments on commit b7ff4e6

Please sign in to comment.