Skip to content

Commit

Permalink
fix terra getrewards and gas prices (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitcoinera authored Mar 7, 2020
1 parent 2d0f93d commit 3f1e844
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/source/terraV3-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ const BigNumber = require('bignumber.js')
const { keyBy } = require('lodash')
const { pubkeyToAddress } = require('../tools')

// these are the gas prices per microunit
const gasPrices = [
{
denom: 'ukrw',
price: '0.091'
price: '0.01'
},
{
denom: 'uluna',
price: '0.001'
},
{
denom: 'umnt',
price: '0.091'
price: '0.01'
},
{
denom: 'usdr',
price: '0.091'
price: '0.01'
},
{
denom: 'uusd',
price: '0.091'
price: '0.01'
}
]

Expand Down Expand Up @@ -130,10 +131,9 @@ class TerraV3API extends CosmosV2API {
const rewards = (result.rewards || []).filter(
({ reward }) => reward && reward.length > 0
)
const rewardsWithFiatValue = await this.insertFiatValueinRewards(
rewards,
fiatCurrency
)
const rewardsWithFiatValue = this.calculateFiatValue
? await this.insertFiatValueinRewards(rewards, fiatCurrency)
: rewards
return this.reducers.rewardReducer(
rewardsWithFiatValue,
validatorsDictionary
Expand Down

0 comments on commit 3f1e844

Please sign in to comment.