paypro: better notification if the user has insufficient funds for a PP tx.
This commit is contained in:
parent
f64b1eee28
commit
eea59bc0e1
1 changed files with 5 additions and 0 deletions
|
|
@ -425,11 +425,16 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
|
||||
if (merchantData && available < +merchantData.total) {
|
||||
err = new Error('No unspent outputs available.');
|
||||
scope.notEnoughAmount = true;
|
||||
scope.sendForm.amount.$isValid = false;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
scope.sendForm.address.$isValid = false;
|
||||
notification.error('Error', err.message || 'Bad payment server.');
|
||||
if ($rootScope.$$phase !== '$apply' && $rootScope.$$phase !== '$digest') {
|
||||
$rootScope.$apply();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue