fix add new comment

This commit is contained in:
Matias Alejo Garcia 2016-06-04 17:08:08 -03:00
commit 908344862c
No known key found for this signature in database
GPG key ID: 02470DB551277AB3

View file

@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.isShared = fc.credentials.n > 1;
$scope.showCommentPopup = function() {
$scope.data = {
comment: $scope.btx.note.body
comment: $scope.btx.note ? $scope.btx.note.body : '',
};
var commentPopup = $ionicPopup.show({
@ -37,6 +37,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
return;
}
// This is only to refresh the current screen data
$scope.btx.note = {};
$scope.btx.note.body = $scope.data.comment;
$scope.btx.note.editedByName = fc.credentials.copayerName;
$scope.btx.note.editedOn = Math.floor(Date.now() / 1000);