From de0b2afde14351f3c673e09646b7387c79acc317 Mon Sep 17 00:00:00 2001 From: Vladimir Volek Date: Tue, 8 Jan 2019 15:26:55 +0100 Subject: [PATCH] review --- .../notifications/Context/components/Static/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/notifications/Context/components/Static/index.js b/src/components/notifications/Context/components/Static/index.js index 7f9b6ac7..dc233619 100644 --- a/src/components/notifications/Context/components/Static/index.js +++ b/src/components/notifications/Context/components/Static/index.js @@ -2,6 +2,7 @@ import * as React from 'react'; import Notification from 'components/Notification'; +import Bignumber from 'bignumber.js'; import type { Props } from '../../index'; @@ -14,13 +15,16 @@ export default (props: Props) => { if (!location || !selectedAccount || !account) return null; // Ripple minimum reserve notification - if (location.pathname.includes('xrp') && parseInt(account.balance, 10) < 20) { + const { reserve, balance } = account; + const bigBalance = new Bignumber(balance); + const bigReserve = new Bignumber(reserve); + if (location.pathname.includes('xrp') && bigBalance.lessThan(bigReserve)) { notifications.push( , ); }