Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1383 from weichang-bianjie/hotfixv0.11.0417
Browse files Browse the repository at this point in the history
R4R:fix code and switch float method of big.Rat
  • Loading branch information
weichang-x authored Apr 23, 2020
2 parents 29a3e71 + 008349a commit 91c560f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions backend/task/static_rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,12 @@ func (task StaticRewardsTask) loadDelegationsRewards(total, commission document.
return nil
}

var ret []document.Rewards
subValueFloat64, ok := subValue.Float64()
if ok {
one := document.Rewards{
Iris: subValueFloat64,
IrisAtto: subValue.String(),
}
ret = []document.Rewards{one}
subValueFloat64, _ := subValue.Float64()
one := document.Rewards{
Iris: subValueFloat64 / math.Pow10(18),
IrisAtto: subValue.FloatString(0),
}

return ret
return []document.Rewards{one}
}

func (task StaticRewardsTask) getAccountFromDb() ([]document.Account, error) {
Expand Down

0 comments on commit 91c560f

Please sign in to comment.