Merge pull request #759 from cmgustavo/bug/01-amount-input
Bug/01 amount input
This commit is contained in:
commit
4467ae270f
7 changed files with 136 additions and 44 deletions
|
|
@ -267,8 +267,12 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.topAmount = function() {
|
||||
var maxSat = ($rootScope.availableBalance * config.unitToSatoshi).toFixed(0) - bitcore.TransactionBuilder.FEE_PER_1000B_SAT;
|
||||
$scope.amount = maxSat / config.unitToSatoshi;
|
||||
$scope.getAvailableAmount = function() {
|
||||
return ((($rootScope.availableBalance * config.unitToSatoshi).toFixed(0) - bitcore.TransactionBuilder.FEE_PER_1000B_SAT) / config.unitToSatoshi);
|
||||
};
|
||||
|
||||
$scope.topAmount = function(form) {
|
||||
$scope.amount = $scope.getAvailableAmount();
|
||||
form.amount.$pristine = false;
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue