mirror of https://github.com/BTCPrivate/copay.git
fix new variable names
This commit is contained in:
parent
d7e8ca4404
commit
d296601d09
|
@ -156,8 +156,8 @@
|
|||
<span class="text-gray" translate>See it on the blockchain</span>
|
||||
</button>
|
||||
<button class="button outline round dark-gray tiny" ng-click="showCommentPopup()">
|
||||
<span class="text-gray" translate ng-show="!comment">Add a comment</i></span>
|
||||
<span class="text-gray" translate ng-show="comment">Edit comment</span>
|
||||
<span class="text-gray" translate ng-show="!btx.note">Add a comment</i></span>
|
||||
<span class="text-gray" translate ng-show="btx.note">Edit comment</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue