remove re-delegations from total

This commit is contained in:
liangping 2021-11-21 11:30:33 +08:00
parent d7160ee500
commit 7bbf220906

View File

@ -143,7 +143,7 @@
<feather-icon <feather-icon
icon="MinusIcon" icon="MinusIcon"
class="d-md-none" class="d-md-none"
/><small class="d-none d-md-block"> Withdraw</small> /><small class="d-none d-md-block"> Withdraw Rewards</small>
</b-button> </b-button>
</div> </div>
</b-card-header> </b-card-header>
@ -514,11 +514,11 @@ export default {
tmp1 += Number(e.balance) tmp1 += Number(e.balance)
}) })
}) })
this.redelegations.forEach(x => { // this.redelegations.forEach(x => {
x.entries.forEach(e => { // x.entries.forEach(e => {
tmp1 += Number(e.balance) // tmp1 += Number(e.balance)
}) // })
}) // })
const unbonding = this.formatCurrency(tmp1, stakingDenom) const unbonding = this.formatCurrency(tmp1, stakingDenom)
sumCurrency += unbonding sumCurrency += unbonding
sum += tmp1 sum += tmp1
@ -620,9 +620,9 @@ export default {
this.$http.getStakingDelegations(this.address).then(res => { this.$http.getStakingDelegations(this.address).then(res => {
this.delegations = res.delegation_responses || res this.delegations = res.delegation_responses || res
}) })
this.$http.getStakingRedelegations(this.address).then(res => { // this.$http.getStakingRedelegations(this.address).then(res => {
this.redelegations = res.redelegation_responses || res // this.redelegations = res.redelegation_responses || res
}) // })
this.$http.getStakingUnbonding(this.address).then(res => { this.$http.getStakingUnbonding(this.address).then(res => {
this.unbonding = res.unbonding_responses || res this.unbonding = res.unbonding_responses || res
}) })