diff --git a/src/layouts/components/NavBarWallet.vue b/src/layouts/components/NavBarWallet.vue index 2d0c69d5..db1b43b3 100644 --- a/src/layouts/components/NavBarWallet.vue +++ b/src/layouts/components/NavBarWallet.vue @@ -1,8 +1,10 @@ @@ -83,7 +101,7 @@ const tipMsg = computed(() => { - diff --git a/src/modules/wallet/keplr.vue b/src/modules/wallet/keplr.vue index f1959a47..c8ce25b8 100644 --- a/src/modules/wallet/keplr.vue +++ b/src/modules/wallet/keplr.vue @@ -13,6 +13,7 @@ const selected = ref({} as ChainConfig) onMounted(() => { const chainStore = useBlockchain() selected.value = chainStore.current || Object.values(dashboard.chains)[0] + debugger; initParamsForKeplr() }) async function initParamsForKeplr() { diff --git a/src/modules/wallet/unisat.vue b/src/modules/wallet/unisat.vue new file mode 100644 index 00000000..2a04d56a --- /dev/null +++ b/src/modules/wallet/unisat.vue @@ -0,0 +1,104 @@ + + + + + + + + + {{ c.chainName }} + + + Add {{ selected.chainName }} TO Unisat Wallet + + + + + + If the chain is not offically support on Keplr, you can submit these parameters to enable Keplr. + + + diff --git a/src/router/index.ts b/src/router/index.ts index 7dc4a6d0..7030ae87 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -14,7 +14,7 @@ const router = createRouter({ router.beforeEach((to) => { const { chain } = to.params if(chain){ - const blockchain = useBlockchain() + const blockchain= useBlockchain() if(chain !== blockchain.chainName) { blockchain.setCurrent(chain.toString()) } diff --git a/src/stores/useWalletStore.ts b/src/stores/useWalletStore.ts index 5962287c..2843e72e 100644 --- a/src/stores/useWalletStore.ts +++ b/src/stores/useWalletStore.ts @@ -128,8 +128,11 @@ export const useWalletStore = defineStore('walletStore', { if(value) this.wallet = value }, suggestChain() { - // const router = useRouter() - router.push({path: '/wallet/keplr'}) + if (window.location.pathname === '/SIDE-Testnet') { + router.push({path: '/wallet/unisat'}) + } else { + router.push({path: '/wallet/keplr'}) + } } }, }); \ No newline at end of file