fetch timeout and channel/port from encounterpart

This commit is contained in:
liangping
2021-11-30 11:59:17 +08:00
parent f9052e2fe0
commit f0ef39e96a
3 changed files with 18 additions and 14 deletions
+6
View File
@@ -335,6 +335,12 @@ export default class ChainFetch {
return this.get(`/ibc/core/channel/v1beta1/channels/${channel_id}/ports/${port_id}/client_state`, config).then(data => commonProcess(data))
}
// eslint-disable-next-line camelcase
async getIBCChannel(channel_id, port_id, config = null) {
// eslint-disable-next-line camelcase
return this.get(`/ibc/core/channel/v1beta1/channels/${channel_id}/ports/${port_id}`, config).then(data => commonProcess(data))
}
static async getBankBalance(baseurl, address) {
return ChainFetch.fetch(baseurl, '/bank/balances/'.concat(address)).then(data => commonProcess(data))
}
+1 -4
View File
@@ -69,10 +69,7 @@ export function getChainConfigForSymbol(symbol) {
const key = CoinGeckoMap[symbol]
if (key) {
const confs = getLocalChains()
return Object.values(confs).find(x => {
console.log(x.coingecko, key)
return x.coingecko === key[0]
})
return Object.values(confs).find(x => x.coingecko === key[0])
}
return null
}