diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index e1e2c3640..3365cbee9 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -141,7 +141,6 @@
Add Memo Memo -
{{btx.note.body}}
diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index dd2ed813c..d5b6f79d3 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -81,7 +81,12 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio }; $scope.showCommentPopup = function() { - popupService.showPrompt(gettextCatalog.getString('Memo'), ' ', {}, function(text) { + var opts = {}; + if ($scope.btx.note && $scope.btx.note.body) opts.defaultText = $scope.btx.note.body; + + popupService.showPrompt(null, gettextCatalog.getString('Memo'), opts, function(text) { + if (typeof text == "undefined") return; + $log.debug('Saving memo'); var args = { diff --git a/src/js/services/popupService.js b/src/js/services/popupService.js index 1e1c93a22..c50903d46 100644 --- a/src/js/services/popupService.js +++ b/src/js/services/popupService.js @@ -37,7 +37,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni inputPlaceholder: opts.inputPlaceholder, defaultText: opts.defaultText }).then(function(res) { - return cb(res) + return cb(res); }); };