Skip to content

Commit

Permalink
fix emoney mainnet expected returns (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitcoinera authored Mar 25, 2020
1 parent 2c87327 commit a306cb1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/reducers/emoneyV0-reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ async function getTotalNetworkAnnualRewards(inflations, totalBackedValues) {
'denom'
)
const rewardsSumInEur = inflations.reduce((sum, inflation) => {
return BigNumber(sum).plus(
BigNumber(inflation.inflation).times(
totalBackedValueDictionary[inflation.denom].eurValue // we use the eur value to be able to sum up the individual token values
)
)
return totalBackedValueDictionary[inflation.denom]
? BigNumber(sum).plus(
BigNumber(inflation.inflation).times(
totalBackedValueDictionary[inflation.denom].eurValue // we use the eur value to be able to sum up the individual token values
)
)
: 0
}, 0)

return rewardsSumInEur
Expand Down

0 comments on commit a306cb1

Please sign in to comment.