Merge pull request #115 from cmgustavo/bug/01-send-form

check if your balance is enough to send money
This commit is contained in:
Mario Colque 2014-04-21 12:35:34 -03:00
commit 8df747001c
1 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,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