diff --git a/js/controllers/send.js b/js/controllers/send.js index dd3df7441..d170dbae2 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -378,7 +378,6 @@ angular.module('copayApp.controllers').controller('SendController', $scope.getAvailableAmount = function() { if (!$rootScope.safeUnspentCount) return null; - // Each signature takes var estimatedFee = copay.Wallet.estimatedFee($rootScope.safeUnspentCount); var amount = ((($rootScope.availableBalance * w.settings.unitToSatoshi).toFixed(0) - estimatedFee) / w.settings.unitToSatoshi); diff --git a/js/models/Wallet.js b/js/models/Wallet.js index 15c378742..f7d68e65c 100644 --- a/js/models/Wallet.js +++ b/js/models/Wallet.js @@ -2335,9 +2335,8 @@ Wallet.prototype.createTx = function(toAddress, amountSatStr, comment, opts, cb) var ntxid; try { ntxid = self.createTxSync(toAddress, amountSatStr, comment, safeUnspent, opts); - log.debub('TX Created: ntxid', ntxid); //TODO + log.debug('TX Created: ntxid', ntxid); //TODO } catch (e) { -console.log('[Wallet.js.2340]', e); //TODO return cb(e); } diff --git a/test/unit/controllers/controllersSpec.js b/test/unit/controllers/controllersSpec.js index 654484485..dfc539e55 100644 --- a/test/unit/controllers/controllersSpec.js +++ b/test/unit/controllers/controllersSpec.js @@ -42,6 +42,7 @@ describe("Unit: Controllers", function() { beforeEach(inject(function($controller, $rootScope) { scope = $rootScope.$new(); $rootScope.iden = sinon.stub(); + $rootScope.safeUnspentCount = 1; var w = {}; w.isReady = sinon.stub().returns(true); @@ -467,6 +468,7 @@ describe("Unit: Controllers", function() { expect(form.amount.$pristine).to.equal(false); }); it('should return available amount', function() { + form.amount.$setViewValue(123356); var amount = scope.getAvailableAmount(); expect(amount).to.equal(123356); }); diff --git a/views/send.html b/views/send.html index 5aac3faf1..b5a2499d3 100644 --- a/views/send.html +++ b/views/send.html @@ -11,9 +11,9 @@