Fix IBC fetch from registry
This commit is contained in:
parent
6d0b250bf1
commit
2567aea4be
@ -42,10 +42,14 @@ export const useIBCModule = defineStore('module-ibc', {
|
||||
fetchConnection(path: string) {
|
||||
const client = new ChainRegistryClient();
|
||||
client.fetchIBCPathInfo(path).then(res => {
|
||||
const connId = res.chain_1.chain_name === this.chain.current?.prettyName || this.chain.chainName ?
|
||||
res.chain_1.connection_id : res.chain_2.connection_id
|
||||
this.registryConf = res
|
||||
this.showConnection(connId)
|
||||
const isFirstChain = res.chain_1.chain_name === this.chain.current?.prettyName || res.chain_1.chain_name === this.chain.chainName;
|
||||
|
||||
const connId = isFirstChain
|
||||
? res.chain_1.connection_id
|
||||
: res.chain_2.connection_id;
|
||||
|
||||
this.registryConf = res;
|
||||
this.showConnection(connId);
|
||||
})
|
||||
},
|
||||
showConnection(connId?: string | number) {
|
||||
|
Loading…
Reference in New Issue
Block a user