From bbd785e16189ac4e8028ee4219ff3fdc891b6dba Mon Sep 17 00:00:00 2001 From: Jessop Breth Date: Sat, 8 Sep 2018 18:11:32 -0400 Subject: [PATCH] checks tip input --- src/renderer/component/walletSendTip/view.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderer/component/walletSendTip/view.jsx b/src/renderer/component/walletSendTip/view.jsx index 7b658d45f..05aea75d0 100644 --- a/src/renderer/component/walletSendTip/view.jsx +++ b/src/renderer/component/walletSendTip/view.jsx @@ -50,6 +50,9 @@ class WalletSendTip extends React.PureComponent { const { balance } = this.props; const tipAmount = parseFloat(event.target.value); let newTipError; + if (!String(tipAmount).match(/^(\d*([.]\d{0,8})?)$/)) { + newTipError = __('Tip must be a valid number with no more than 8 decimal places'); + } if (tipAmount === balance) { newTipError = __('Please decrease your tip to account for transaction fees'); } else if (tipAmount > balance) {