From 83ed92a3be67f24013d3e1cd83b36bd46bab638e Mon Sep 17 00:00:00 2001 From: Matt Huggins Date: Thu, 25 Jan 2018 23:22:37 -0600 Subject: [PATCH] Fixed GAS claim amount --- app/modules/claim.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/modules/claim.js b/app/modules/claim.js index 5772ec00c..859d6601d 100644 --- a/app/modules/claim.js +++ b/app/modules/claim.js @@ -20,7 +20,8 @@ import asyncWrap from '../core/asyncHelper' import { FIVE_MINUTES_MS } from '../core/time' import { log } from '../util/Logs' -import { toNumber } from '../core/math' +import { toBigNumber, toNumber } from '../core/math' +import { COIN_DECIMAL_LENGTH } from '../core/formatters' // Constants export const SET_CLAIM = 'SET_CLAIM' @@ -210,7 +211,7 @@ export default (state: Object = initialState, action: ReduxAction) => { } return { ...state, - claimAmount: (claimAvailable + claimUnavailable) / 100000000, + claimAmount: toBigNumber(claimAvailable + claimUnavailable).div(10 ** COIN_DECIMAL_LENGTH).toNumber(), claimAvailable, claimUnavailable, claimWasUpdated