Fix issues
This commit is contained in:
parent
081421d76e
commit
8cf5942065
@ -21,7 +21,6 @@ const handler = class DefaultHandler {
|
||||
}
|
||||
|
||||
processProposalTally(tally) {
|
||||
console.log(tally)
|
||||
const result = this.commonProcess(tally)
|
||||
return result
|
||||
}
|
||||
|
@ -102,26 +102,26 @@ export default class ChainFetch {
|
||||
}
|
||||
|
||||
async getValidatorDistribution(address) {
|
||||
return this.get(`/distribution/validators/${address}`).then(data => {
|
||||
const value = commonProcess(data)
|
||||
const ret = ValidatorDistribution.create({
|
||||
operator_address: address,
|
||||
self_bond_rewards: value.self_bond_rewards,
|
||||
val_commission: value.val_commission.commission,
|
||||
})
|
||||
return ret
|
||||
})
|
||||
// return Promise.all([
|
||||
// this.get(`/cosmos/distribution/v1beta1/validators/${address}/commission`),
|
||||
// this.get(`/cosmos/distribution/v1beta1/validators/${address}/outstanding_rewards`),
|
||||
// ]).then(data => {
|
||||
// return this.get(`/distribution/validators/${address}`).then(data => {
|
||||
// const value = commonProcess(data)
|
||||
// const ret = ValidatorDistribution.create({
|
||||
// operator_address: address,
|
||||
// self_bond_rewards: data[1].rewards.rewards,
|
||||
// val_commission: data[0].commission.commission,
|
||||
// self_bond_rewards: value.self_bond_rewards,
|
||||
// val_commission: value.val_commission.commission,
|
||||
// })
|
||||
// return ret
|
||||
// })
|
||||
return Promise.all([
|
||||
this.get(`/cosmos/distribution/v1beta1/validators/${address}/commission`),
|
||||
this.get(`/cosmos/distribution/v1beta1/validators/${address}/outstanding_rewards`),
|
||||
]).then(data => {
|
||||
const ret = ValidatorDistribution.create({
|
||||
operator_address: address,
|
||||
self_bond_rewards: data[1].rewards.rewards,
|
||||
val_commission: data[0].commission.commission,
|
||||
})
|
||||
return ret
|
||||
})
|
||||
}
|
||||
|
||||
async getStakingDelegatorDelegation(delegatorAddr, validatorAddr) {
|
||||
|
@ -123,13 +123,7 @@
|
||||
<span class="font-weight-bold">Status</span>
|
||||
</th>
|
||||
<td class="pb-50 text-capitalize">
|
||||
<b-badge
|
||||
v-if="validator.status===3"
|
||||
variant="light-success"
|
||||
>
|
||||
Active
|
||||
</b-badge>
|
||||
<span v-else>{{ validator.status }}</span>
|
||||
<span>{{ String(validator.status).replace('BOND_STATUS_', '') }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -200,7 +200,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<b-button
|
||||
v-if="balances[acc.addr]"
|
||||
block
|
||||
size="sm"
|
||||
variant="outline-primary"
|
||||
|
Loading…
Reference in New Issue
Block a user