From 09cad7196ba3febd8428e29e23b5aebbb0e5220c Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Tue, 2 Aug 2016 05:34:30 -0400 Subject: [PATCH] Add low balance checking on Wallet page --- js/page/wallet.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/page/wallet.js b/js/page/wallet.js index eb01be58d..15978c96f 100644 --- a/js/page/wallet.js +++ b/js/page/wallet.js @@ -24,6 +24,17 @@ var NewAddressSection = React.createClass({ var SendToAddressSection = React.createClass({ sendToAddress: function() { + if (this.state.amount > this.state.balance) + { + alert("The amount you're trying to send is greater than the number of credits in your wallet."); + return; + } + else if ((this.state.balance - this.state.amount) < 1) + { + alert("Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.") + return; + } + this.setState({ results: "", });