diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 445eef49..6c74a17c 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -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) { diff --git a/src/router/index.js b/src/router/index.js index 6bd28144..aa2baafe 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -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) diff --git a/src/store/chains/index.js b/src/store/chains/index.js index 1e92d8a5..fd390d1f 100644 --- a/src/store/chains/index.js +++ b/src/store/chains/index.js @@ -72,7 +72,7 @@ export default { } }, setIBCDenoms(state, denoms) { - state.denoms = denoms + state.denoms = { ...state.denoms, ...denoms } }, setIBCPaths(state, paths) { state.ibcPaths = paths