diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html
index 8df8ce51f..13648a80e 100644
--- a/public/views/modals/tx-details.html
+++ b/public/views/modals/tx-details.html
@@ -156,8 +156,8 @@
See it on the blockchain
diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js
index cb9b40130..3b4704471 100644
--- a/src/js/controllers/modals/txDetails.js
+++ b/src/js/controllers/modals/txDetails.js
@@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.isShared = fc.credentials.n > 1;
$scope.showCommentPopup = function() {
$scope.data = {
- comment: ''
+ comment: $scope.btx.note.body
};
var commentPopup = $ionicPopup.show({
@@ -27,17 +27,19 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
};
$scope.commentPopupSave = function() {
+ $log.debug('Saving note');
fc.editTxNote({
txid: $scope.btx.txid,
- body: $scope.data.comment
+ body: $scope.data.comment,
}, function(err) {
if (err) {
$log.debug('Could not save tx comment');
return;
}
- $scope.comment = $scope.data.comment;
- $scope.editedBy = gettextCatalog.getString('Edited by') + ' ' + fc.credentials.copayerName;
- $scope.createdOn = Math.floor(Date.now() / 1000);
+ // This is only to refresh the current screen data
+ $scope.btx.note.body = $scope.data.comment;
+ $scope.btx.note.editedByName = fc.credentials.copayerName;
+ $scope.btx.note.editedOn = Math.floor(Date.now() / 1000);
commentPopup.close();
});
};