Use chainid, instead of 'cosmoshub',

This commit is contained in:
liangping 2022-01-14 08:55:24 +08:00
parent 3cf3caab79
commit 984dd8ae3a

View File

@ -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()