sync memo

This commit is contained in:
Javier 2016-09-21 17:28:59 -03:00
commit 93d694d048
5 changed files with 36 additions and 24 deletions

View file

@ -56,13 +56,18 @@ angular.module('copayApp.controllers').controller('activityController',
return popupService.showAlert(null, gettextCatalog.getString('Transaction not found'));
}
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
walletService.getTxNote(wallet, n.txid, function(err, note) {
if (err) $log.debug(gettextCatalog.getString('Could not fetch transaction note'));
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
$scope.btx.note = note;
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
});
});
});
};

View file

@ -24,10 +24,6 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
updateMemo();
initActionList();
getAlternativeAmount();
$timeout(function() {
$scope.$apply();
});
};
function updateMemo() {
@ -38,7 +34,6 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$log.debug(gettextCatalog.getString('Could not fetch transaction note'));
return;
}
$scope.note = note;
$timeout(function() {
$scope.$apply();
@ -108,7 +103,6 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.btx.note.editedOn = Math.floor(Date.now() / 1000);
}
$scope.btx.searcheableString = null;
$timeout(function() {
$scope.$apply();
});
@ -132,7 +126,6 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
$scope.rateDate = res.fetchedOn;
$scope.rateStr = res.rate + ' ' + $scope.alternativeIsoCode;
$scope.alternativeAmountStr = $filter('formatFiatAmount')(alternativeAmountBtc * res.rate) + ' ' + $scope.alternativeIsoCode;
$scope.$apply();
}
});
};

View file

@ -60,13 +60,18 @@ angular.module('copayApp.controllers').controller('tabHomeController',
return popupService.showAlert(null, gettextCatalog.getString('Transaction not found'));
}
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
walletService.getTxNote(wallet, n.txid, function(err, note) {
if (err) $log.debug(gettextCatalog.getString('Could not fetch transaction note'));
$scope.wallet = wallet;
$scope.btx = lodash.cloneDeep(tx);
$scope.btx.note = note;
$ionicModal.fromTemplateUrl('views/modals/tx-details.html', {
scope: $scope
}).then(function(modal) {
$scope.txDetailsModal = modal;
$scope.txDetailsModal.show();
});
});
});
};