From f4198ffd9784fdab903ed15e46011965637fe9a0 Mon Sep 17 00:00:00 2001 From: Matt Huggins Date: Sun, 28 Jan 2018 00:35:13 -0600 Subject: [PATCH] Fixed GAS claim amount (#607) --- 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