diff --git a/src/libs/fetch.js b/src/libs/fetch.js index 979b8fe6..4ea24d81 100644 --- a/src/libs/fetch.js +++ b/src/libs/fetch.js @@ -145,6 +145,9 @@ export default class ChainFetch { } async getBankTotal(denom) { + if (compareVersions(this.config.sdk_version, '0.46.5') > 0) { + return this.get(`/cosmos/bank/v1beta1/supply/by_denom?denom=${denom}`).then(data => commonProcess(data).amount) + } if (compareVersions(this.config.sdk_version, '0.40') < 0) { return this.get(`/supply/total/${denom}`).then(data => ({ amount: commonProcess(data), denom })) }