diff --git a/js/controllers/send.js b/js/controllers/send.js index 6831582f6..9753a76e3 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -65,6 +65,10 @@ angular.module('copayApp.controllers').controller('SendController', var txp = w.txProposals.txps[ntxid]; var merchantData = txp.merchant; var amt = angular.element(document.querySelector('input#amount')); + var sendto = angular.element(document + .querySelector('div.send-note > p[ng-class]:first-of-type')); + var tamount = angular.element(document + .querySelector('div.send-note > p[ng-class]:nth-of-type(2)')); var submit = angular.element(document.querySelector('button[type=submit]')); var sendall = angular.element(document.querySelector('[title="Send all funds"]')); if (w.isShared()) { @@ -81,6 +85,8 @@ angular.module('copayApp.controllers').controller('SendController', $scope.loadTxs(); if (merchantData) { amt.attr('disabled', false); + sendto.html(sendto.html().replace(/
Server:.*$/, '')); + tamount.html(''); submit.attr('disabled', true); sendall.attr('class', sendall.attr('class').replace(' hidden', '')); } @@ -103,6 +109,8 @@ angular.module('copayApp.controllers').controller('SendController', $scope.loadTxs(); if (merchantData) { amt.attr('disabled', false); + sendto.html(sendto.html().replace(/
Server:.*$/, '')); + tamount.html(''); submit.attr('disabled', true); sendall.attr('class', sendall.attr('class').replace(' hidden', '')); } diff --git a/js/directives.js b/js/directives.js index bfa9aa8f7..58c99db2e 100644 --- a/js/directives.js +++ b/js/directives.js @@ -86,13 +86,16 @@ angular.module('copayApp.directives') if (amount.attr('disabled') === true) { amount.attr('disabled', false); } - if (amount.attr('disabled') === false) { + if (submit.attr('disabled') === false) { submit.attr('disabled', true); } sendto.html(sendto.html().replace(/
Server:.*$/, '')); if (!/hidden/.test(tamount.attr('class'))) { tamount.attr(tamount.attr('class') + ' hidden'); } + if (~tamount.html().indexOf('(CA: ')) { + tamount.html(''); + } if (submit.attr('disabled') === false) { submit.attr('disabled', true); }