Merge pull request #318 from chain4energy/master

Setup proper url for inflation C4E chain.
This commit is contained in:
ping 2023-02-09 17:57:56 +08:00 committed by GitHub
commit eb9a106cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,9 @@ export default class ChainFetch {
if (this.config.chain_name === 'echelon') {
return this.get('/echelon/inflation/v1/inflation_rate').then(data => Number(data.inflation_rate / 100 || 0))
}
if (this.config.chain_name === 'chain4energy') {
return this.get('/c4e/minter/v1beta1/inflation').then(data => Number(data.inflation))
}
if (this.isModuleLoaded('minting')) {
return this.get('/cosmos/mint/v1beta1/inflation').then(data => Number(commonProcess(data.inflation)))
}