From 5556a1a35c85eea544b52d95961d3113e98db496 Mon Sep 17 00:00:00 2001 From: smgv Date: Tue, 5 Dec 2023 19:19:05 +0530 Subject: [PATCH] QA review Fix --- src/App.vue | 12 ++++--- src/components/LoginDetails/LoginDetails.vue | 33 ++++++++++++------- .../OpenloginDetails/OpenloginDetails.vue | 28 ++++++++-------- src/components/TopupDetails/TopupDetails.vue | 5 ++- .../WalletConnectDetails.vue | 1 + .../WalletServiceDetails.vue | 4 +-- src/icons/index.ts | 4 ++- 7 files changed, 52 insertions(+), 35 deletions(-) diff --git a/src/App.vue b/src/App.vue index ae9f491..b76a682 100644 --- a/src/App.vue +++ b/src/App.vue @@ -151,10 +151,11 @@ onMounted(async () => { return } - // if (wsEmbed?.communicationProvider.isLoggedIn) { - // login() - // } + if (wsEmbed?.communicationProvider.isLoggedIn) { + login() + } }) + ethersProvider = new BrowserProvider(wsEmbed.provider, 'any') web3 = new Web3() web3.setProvider(wsEmbed.provider) @@ -174,15 +175,16 @@ const getCurrentChain = async () => { switchChainTo.value = chainId.value !== '0x5' ? '0x5' : '0x1' } -const login = async (loginObj: SocialLoginObj) => { +const login = async (loginObj?: SocialLoginObj) => { try { // Note: can pass loginProvider and login_hint as params if you want to preselect a provider and login identifier eg. email // const loginaccs = await torus?.login({ loginProvider: "google", login_hint: "sample@gmail.com" }); // Passing empty will trigger showing the login modal showing all login provider options isLoading.value = true - const obj = { loginProvider: loginObj.icon as any, login_hint: emailLoginHint.value } + const obj = { loginProvider: loginObj?.icon as any, login_hint: emailLoginHint.value } const loginaccs = await wsEmbed?.login(obj) account.value = (loginaccs || [])[0] || '' + localStorage.setItem('accountLocal', account.value) userInfo.value = (await wsEmbed?.getUserInfo()) as UserInfo & { typeOfLogin: string } isLoading.value = false getCurrentChain() diff --git a/src/components/LoginDetails/LoginDetails.vue b/src/components/LoginDetails/LoginDetails.vue index bcc80d9..2666200 100644 --- a/src/components/LoginDetails/LoginDetails.vue +++ b/src/components/LoginDetails/LoginDetails.vue @@ -75,16 +75,27 @@ {{ userInfo?.name || '' }}
-

{{ getTruncateString(account || '') }} - -

+
+
+ Copied +
+
+ +
+
@@ -103,7 +114,7 @@ class="flex sm:hidden mb-4 items-center gap-2 flex-1 border px-3 py-2 border-gray-200 bg-gray-100 text-xs text-gray-500 font-medium rounded-2xl" > - + {{ userInfo?.email ? userInfo?.email : userInfo?.name }}

@@ -68,13 +69,13 @@ > Paired with your social login -

- - {{ userInfo?.email || userInfo?.name }} -

+ +

{{ userInfo?.email || userInfo?.name }}

+ @@ -83,11 +84,12 @@ > Saved in your device storage -

- {{ browserName }} {{ browserVersion }} -

+ +

{{ browserName }} {{ browserVersion }}

+
@@ -96,12 +98,12 @@ > Saved as a social recovery factor -

- {{ userInfo?.email || userInfo?.name }} -

+

{{ userInfo?.email || userInfo?.name }}

+
diff --git a/src/components/TopupDetails/TopupDetails.vue b/src/components/TopupDetails/TopupDetails.vue index da59918..4b3f62f 100644 --- a/src/components/TopupDetails/TopupDetails.vue +++ b/src/components/TopupDetails/TopupDetails.vue @@ -42,15 +42,14 @@ wallet onboarding, second step checkout!

- - + -->
How interoperability works diff --git a/src/components/WalletServiceDetails/WalletServiceDetails.vue b/src/components/WalletServiceDetails/WalletServiceDetails.vue index 5793e21..39f8db5 100644 --- a/src/components/WalletServiceDetails/WalletServiceDetails.vue +++ b/src/components/WalletServiceDetails/WalletServiceDetails.vue @@ -16,14 +16,14 @@
  • Basic whitelabel-able transaction screens
  • Customizable to your brand
  • - + -->