Skip to content

Commit

Permalink
update rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
dantudor committed Sep 22, 2021
1 parent ef190e3 commit 9ddfb18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/address/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ func CreateAddressHistory(order uint, history *navcoind.AddressHistory, tx *expl
}
h.Reward = explorer.AddressReward{}
if history.Changes.Balance != 0 {
h.Reward.Spendable = (float64(history.Result.Balance) / 100000000) / (float64(history.Changes.Balance) / 100000000) / 100
h.Reward.Spendable = (float64(history.Changes.Balance) / float64(history.Result.Balance)) * 100
}
if history.Changes.Stakable != 0 {
h.Reward.Stakable = (float64(history.Result.Stakable) / 100000000) / (float64(history.Changes.Stakable) / 100000000) / 100
h.Reward.Stakable = (float64(history.Changes.Stakable) / float64(history.Result.Stakable)) * 100
}
if history.Changes.VotingWeight != 0 {
h.Reward.VotingWeight = (float64(history.Result.VotingWeight) / 100000000) / (float64(history.Changes.VotingWeight) / 100000000) / 100
h.Reward.VotingWeight = (float64(history.Changes.VotingWeight) / float64(history.Result.VotingWeight)) * 100
}
}
}
Expand Down

0 comments on commit 9ddfb18

Please sign in to comment.