Add low balance checking on Wallet page

This commit is contained in:
Alex Liebowitz 2016-08-02 05:34:30 -04:00
parent 4b521f29e6
commit 09cad7196b

View file

@ -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: "",
});