From 984dd8ae3a6aded504585c29cbdc6399db3bbd20 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Fri, 14 Jan 2022 08:55:24 +0800 Subject: [PATCH] Use chainid, instead of 'cosmoshub', --- src/views/WalletAccountImportAddress.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/WalletAccountImportAddress.vue b/src/views/WalletAccountImportAddress.vue index b5c61fed..24975dfd 100644 --- a/src/views/WalletAccountImportAddress.vue +++ b/src/views/WalletAccountImportAddress.vue @@ -412,7 +412,8 @@ export default { this.debug = 'Please install keplr extension' return null } - const chainId = 'cosmoshub' + // const chainId = 'cosmoshub' + const chainId = await this.$http.getLatestBlock().then(ret => ret.block.header.chain_id) await window.keplr.enable(chainId) const offlineSigner = window.getOfflineSigner(chainId) return offlineSigner.getAccounts()