Skip to content

Commit

Permalink
Merge pull request #312 from aura-nw/euphoria
Browse files Browse the repository at this point in the history
Euphoria
  • Loading branch information
harisato authored Aug 25, 2023
2 parents c49ba90 + 8433fe5 commit 987f81f
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/pages/Staking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,19 @@ function Staking(props): ReactElement {
setDataDelegateOfUser(null)

const validatorsRes: any = await getAllValidators()
const validator = validatorsRes.validator
.map((val) => ({
commission: val.commission.commission_rates.rate * 100,
delegators: val.delegators_count,
operatorAddress: val.operator_address,
votingPower: {
percent_voting_power: val.percent_voting_power,
tokens: {
amount: val.tokens,
denom: nativeCurrency.symbol,
},
const validatorItem = validatorsRes.validator.find((item) => item.operator_address === address)
const validator = {
commission: validatorItem.commission.commission_rates.rate * 100,
delegators: validatorItem.delegators_count,
operatorAddress: validatorItem.operator_address,
votingPower: {
percent_voting_power: validatorItem.percent_voting_power,
tokens: {
amount: validatorItem.tokens,
denom: nativeCurrency.symbol,
},
}))
?.find((item) => item.operatorAddress === address)
},
}

const delegation = {
claimedReward: {
Expand Down

0 comments on commit 987f81f

Please sign in to comment.