mirror of https://github.com/BTCPrivate/copay.git
check if your balance is enough to send money
This commit is contained in:
parent
c93f1eb232
commit
e03b0db150
|
@ -20,6 +20,11 @@ angular.module('copay.send').controller('SendController',
|
|||
return;
|
||||
}
|
||||
|
||||
if ($rootScope.totalBalance <= form.amount.$modelValue) {
|
||||
$rootScope.flashMessage = { message: 'You have not enough amount to send', type: 'error'};
|
||||
return;
|
||||
}
|
||||
|
||||
var address = form.address.$modelValue;
|
||||
var amount = (form.amount.$modelValue * 100000000).toString(); // satoshi to string
|
||||
|
||||
|
|
Loading…
Reference in New Issue