fix: adjust getBankTotal function to support v0.46.3+ with new query

This commit is contained in:
Ivan Shukhov 2022-12-19 13:21:26 +01:00
parent d1bf0dffb0
commit 23de956451

View File

@ -145,7 +145,7 @@ export default class ChainFetch {
}
async getBankTotal(denom) {
if (compareVersions(this.config.sdk_version, '0.46.5') > 0) {
if (compareVersions(this.config.sdk_version, '0.46.2') > 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) {