add send all balance

This commit is contained in:
Manuel Araoz 2014-06-19 16:26:04 -03:00
parent 29b98b6adf
commit d83f0388f3
1 changed files with 4 additions and 2 deletions

View File

@ -33,7 +33,7 @@ angular.module('copayApp.controllers').controller('SendController',
$scope.submitForm = function(form) { $scope.submitForm = function(form) {
if (form.$invalid) { if (form.$invalid) {
$rootScope.$flashMessage = { $rootScope.$flashMessage = {
message: 'You can not send a proposal transaction. Please, try again', message: 'Unable to send a transaction proposal. Please, try again',
type: 'error' type: 'error'
}; };
return; return;
@ -255,6 +255,8 @@ angular.module('copayApp.controllers').controller('SendController',
}; };
$scope.topAmount = function() { $scope.topAmount = function() {
alert('hello'); var maxSat = ($rootScope.availableBalance * config.unitToSatoshi).toFixed(0)
- bitcore.TransactionBuilder.FEE_PER_1000B_SAT;
$scope.amount = maxSat / config.unitToSatoshi;
}; };
}); });