Merge pull request #107 from donne1226/save-IBCDenoms-to-Store
fix denoms
This commit is contained in:
commit
bcb10125ba
@ -328,9 +328,9 @@ export default class ChainFetch {
|
||||
const conf = config || this.getSelectedConfig()
|
||||
const sdkVersion = conf.sdk_version
|
||||
if (compareVersions(sdkVersion, '0.44.2') < 0) {
|
||||
return this.get('/ibc/applications/transfer/v1beta1/denom_traces?pagination.limit=500', config).then(data => commonProcess(data))
|
||||
return this.get('/ibc/applications/transfer/v1beta1/denom_traces?pagination.limit=500', conf).then(data => commonProcess(data))
|
||||
}
|
||||
return this.get('/ibc/apps/transfer/v1/denom_traces?pagination.limit=500', config).then(data => commonProcess(data))
|
||||
return this.get('/ibc/apps/transfer/v1/denom_traces?pagination.limit=500', conf).then(data => commonProcess(data))
|
||||
}
|
||||
|
||||
async getIBCDenomTrace(hash, config = null) {
|
||||
|
@ -360,7 +360,10 @@ const router = new VueRouter({
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const c = to.params.chain
|
||||
if (c) store.commit('select', { chain_name: c })
|
||||
if (c) {
|
||||
store.commit('select', { chain_name: c })
|
||||
store.dispatch('chains/getAllIBCDenoms', Vue.prototype)
|
||||
}
|
||||
|
||||
const config = JSON.parse(localStorage.getItem('chains'))
|
||||
// const has = Object.keys(config).findIndex(i => i === c)
|
||||
|
@ -72,7 +72,7 @@ export default {
|
||||
}
|
||||
},
|
||||
setIBCDenoms(state, denoms) {
|
||||
state.denoms = denoms
|
||||
state.denoms = { ...state.denoms, ...denoms }
|
||||
},
|
||||
setIBCPaths(state, paths) {
|
||||
state.ibcPaths = paths
|
||||
|
Loading…
Reference in New Issue
Block a user