mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 16:01:26 +00:00
Add low balance checking on Wallet page
This commit is contained in:
parent
4b521f29e6
commit
09cad7196b
1 changed files with 11 additions and 0 deletions
|
@ -24,6 +24,17 @@ var NewAddressSection = React.createClass({
|
||||||
|
|
||||||
var SendToAddressSection = React.createClass({
|
var SendToAddressSection = React.createClass({
|
||||||
sendToAddress: function() {
|
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({
|
this.setState({
|
||||||
results: "",
|
results: "",
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue