From cdf86a26139fa6c3173173022c2035c7fee81847 Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sun, 17 Sep 2023 08:43:42 +0700 Subject: [PATCH] polish --- src/app/auth/create/step-1.tsx | 4 ++-- src/app/auth/create/step-2.tsx | 3 ++- src/app/auth/create/step-3.tsx | 7 +++++++ src/app/auth/import/step-1.tsx | 2 +- src/app/auth/import/step-2.tsx | 3 ++- src/app/auth/import/step-3.tsx | 4 ++++ 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/app/auth/create/step-1.tsx b/src/app/auth/create/step-1.tsx index 837506e5..48c39bef 100644 --- a/src/app/auth/create/step-1.tsx +++ b/src/app/auth/create/step-1.tsx @@ -63,7 +63,7 @@ export function CreateStep1Screen() { } }; - const submit = () => { + const submit = async () => { setLoading(true); // update state @@ -72,7 +72,7 @@ export function CreateStep1Screen() { setPubkey(pubkey); // save to database - db.createAccount(npub, pubkey); + await db.createAccount(npub, pubkey); // redirect to next step navigate('/auth/create/step-2', { replace: true }); diff --git a/src/app/auth/create/step-2.tsx b/src/app/auth/create/step-2.tsx index 6f810353..84e5dfab 100644 --- a/src/app/auth/create/step-2.tsx +++ b/src/app/auth/create/step-2.tsx @@ -104,7 +104,8 @@ export function CreateStep2Screen() {