forked from cerc-io/cosmos-explorer
Merge pull request #135 from echelonfoundation/patch-2
Update Inflation and Minting for Echelon
This commit is contained in:
commit
d72f63211f
@ -135,6 +135,9 @@ export default class ChainFetch {
|
||||
if (this.config.chain_name === 'evmos') {
|
||||
return this.get('/evmos/inflation/v1/inflation_rate').then(data => Number(data.inflation_rate / 100 || 0))
|
||||
}
|
||||
if (this.config.chain_name === 'echelon') {
|
||||
return this.get('/echelon/inflation/v1/inflation_rate').then(data => Number(data.inflation_rate / 100 || 0))
|
||||
}
|
||||
if (this.isModuleLoaded('minting')) {
|
||||
return this.get('/minting/inflation').then(data => Number(commonProcess(data)))
|
||||
}
|
||||
@ -206,6 +209,24 @@ export default class ChainFetch {
|
||||
})
|
||||
return result
|
||||
}
|
||||
if (this.config.chain_name === 'echelon') {
|
||||
const result = await this.get('/echelon/inflation/v1/params').then(data => data.params)
|
||||
await this.get('/echelon/inflation/v1/period').then(data => {
|
||||
Object.entries(data).forEach(x => {
|
||||
const k = x[0]
|
||||
const v = x[1]
|
||||
result[k] = v
|
||||
})
|
||||
})
|
||||
await this.get('/echelon/inflation/v1/total_supply').then(data => {
|
||||
Object.entries(data).forEach(x => {
|
||||
const k = x[0]
|
||||
const v = x[1]
|
||||
result[k] = v
|
||||
})
|
||||
})
|
||||
return result
|
||||
}
|
||||
if (this.isModuleLoaded('minting')) {
|
||||
return this.get('/minting/parameters').then(data => commonProcess(data))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user