Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
fix: sign in popup not closing on native (#2546)
Browse files Browse the repository at this point in the history
  • Loading branch information
intergalacticspacehighway committed Nov 21, 2023
1 parent f227240 commit 7e693cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/app/components/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { PortalProvider } from "@gorhom/portal";

import { Button } from "@showtime-xyz/universal.button";
import { Fieldset } from "@showtime-xyz/universal.fieldset";
import { useRouter } from "@showtime-xyz/universal.router";
import { Text } from "@showtime-xyz/universal.text";
import { View } from "@showtime-xyz/universal.view";

Expand Down Expand Up @@ -32,6 +33,7 @@ export function Login() {
const { sendCode } = useLoginWithSMS();
const otpInputRef = useRef<any>(null);
const { authenticationStatus } = useAuth();
const router = useRouter();

useEffect(() => {
if (showOtp) {
Expand Down Expand Up @@ -111,7 +113,10 @@ export function Login() {
setPhoneNumber(phoneNumber);
setShowOtp(true);
}}
handleSubmitWallet={handleSubmitWallet}
handleSubmitWallet={async () => {
await handleSubmitWallet();
router.pop();
}}
loading={loading && !isConnectingToWallet}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/app/hooks/auth/use-wallet-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function useWalletLogin() {
dispatch("LOG_IN_SUCCESS");

dispatch("EXPIRE_NONCE_REQUEST");
await rotateNonce(res.address);
rotateNonce(res.address);
dispatch("EXPIRE_NONCE_SUCCESS");
}
}
Expand Down

0 comments on commit 7e693cf

Please sign in to comment.