From d83f0388f3436a3b08a16e0b32a4091d10df5187 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Thu, 19 Jun 2014 16:26:04 -0300 Subject: [PATCH] add send all balance --- js/controllers/send.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/controllers/send.js b/js/controllers/send.js index 821b0b2cb..349d60d82 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -33,7 +33,7 @@ angular.module('copayApp.controllers').controller('SendController', $scope.submitForm = function(form) { if (form.$invalid) { $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' }; return; @@ -255,6 +255,8 @@ angular.module('copayApp.controllers').controller('SendController', }; $scope.topAmount = function() { - alert('hello'); + var maxSat = ($rootScope.availableBalance * config.unitToSatoshi).toFixed(0) + - bitcore.TransactionBuilder.FEE_PER_1000B_SAT; + $scope.amount = maxSat / config.unitToSatoshi; }; });