compatible to v0.46.6
This commit is contained in:
parent
91c779a7e4
commit
072efbb5a6
@ -145,6 +145,9 @@ export default class ChainFetch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getBankTotal(denom) {
|
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) {
|
if (compareVersions(this.config.sdk_version, '0.40') < 0) {
|
||||||
return this.get(`/supply/total/${denom}`).then(data => ({ amount: commonProcess(data), denom }))
|
return this.get(`/supply/total/${denom}`).then(data => ({ amount: commonProcess(data), denom }))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user