From 9d882785f4d38283acac0766ff4b6145b4d0bb9c Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Sun, 16 Jun 2024 08:48:48 +0800 Subject: [PATCH] update wallet connect --- index.html | 2 +- src/layouts/components/NavBarWallet.vue | 26 ++++++++++--------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 3c1c9f94..156b08af 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ }); gtag('config', 'G-SSBKVF3GMX'); - + diff --git a/src/layouts/components/NavBarWallet.vue b/src/layouts/components/NavBarWallet.vue index db1b43b3..f80eaa1a 100644 --- a/src/layouts/components/NavBarWallet.vue +++ b/src/layouts/components/NavBarWallet.vue @@ -34,21 +34,15 @@ const tipMsg = computed(() => { ? { class: 'error', msg: 'Copy Error!' } : { class: 'success', msg: 'Copy Success!' }; }); -// console.log(`route: `, route); -// console.log(`baseStore: `, baseStore); -// console.log(`baseStore: currentChainId`, baseStore.currentChainId); -// console.log(`baseStore: defaultHDPath`, chainStore?.value?.defaultHDPath); -// console.log(`baseStore: `, walletStateChange); -// console.log(`baseStore: `, walletStore.suggestChain()); -let chainId = baseStore?.value?.currentChainId; -let params = ''; -if (route.path === '/SIDE-Testnet' || route.path === '/wallet/unisat') { - chainId = 'S2-testnet-2'; - params = JSON.stringify({ - wallet: ['okex', 'unisat'] - }) -} +const params = computed(() => { + if (chainStore.chainName == 'side') { + return JSON.stringify({ + wallet: ['okex', 'unisat'], + }); + } + return ""; +}); @@ -101,9 +95,9 @@ if (route.path === '/SIDE-Testnet' || route.path === '/wallet/unisat') { - + @keplr-config="walletStore.suggestChain()" :params="params" />