update wallet connect

This commit is contained in:
liangping 2024-06-16 08:48:48 +08:00
parent 76953ca789
commit 9d882785f4
2 changed files with 11 additions and 17 deletions

View File

@ -38,7 +38,7 @@
});
gtag('config', 'G-SSBKVF3GMX');
</script>
<script type="module" src="https://cdn.jsdelivr.net/npm/ping-widget@latest/dist/ping-widget.min.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/ping-widget@v0.3.8/dist/ping-widget.min.js"></script>
</body>
</html>

View File

@ -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 "";
});
</script>
@ -101,9 +95,9 @@ if (route.path === '/SIDE-Testnet' || route.path === '/wallet/unisat') {
</div>
</div>
<Teleport to="body">
<ping-connect-wallet :params="params" :chain-id="chainId" :hd-path="chainStore.defaultHDPath"
<ping-connect-wallet :chain-id="baseStore.currentChainId" :hd-path="chainStore.defaultHDPath"
:addr-prefix="chainStore.current?.bech32Prefix || 'cosmos'" @connect="walletStateChange"
@keplr-config="walletStore.suggestChain()" />
@keplr-config="walletStore.suggestChain()" :params="params" />
</Teleport>
</template>