Skip to content

Commit

Permalink
check merkle_proof form input
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyofbyteball committed Mar 18, 2017
1 parent 4893874 commit 7b787a9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/js/controllers/walletHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
var address = form.address.$modelValue;
var recipient_device_address = assocDeviceAddressesByPaymentAddress[address];
var amount = form.amount.$modelValue;
var merkle_proof = form.merkle_proof.$modelValue.trim();
var merkle_proof = '';
if (form.merkle_proof && form.merkle_proof.$modelValue)
merkle_proof = form.merkle_proof.$modelValue.trim();
if (asset === "base")
amount *= unitValue;
if (asset === constants.BLACKBYTES_ASSET)
Expand Down Expand Up @@ -1031,9 +1033,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}
form.amount.$render();

form.merkle_proof.$setViewValue('');
form.merkle_proof.$render();

if (form.merkle_proof){
form.merkle_proof.$setViewValue('');
form.merkle_proof.$render();
}
if (comment) {
form.comment.$setViewValue(comment);
form.comment.$isValid = true;
Expand Down

0 comments on commit 7b787a9

Please sign in to comment.