add addressbook entry when send success
This commit is contained in:
parent
89362ef929
commit
ef90113dd8
9 changed files with 126 additions and 37 deletions
|
|
@ -83,7 +83,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
$scope.showCommentPopup = function() {
|
||||
popupService.showPrompt(gettextCatalog.getString('Memo'), ' ', {}, function(text) {
|
||||
$log.debug('Saving memo');
|
||||
|
||||
console.log("#######################");
|
||||
console.log(text);
|
||||
var args = {
|
||||
txid: $scope.btx.txid,
|
||||
body: text
|
||||
|
|
|
|||
|
|
@ -1,10 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout) {
|
||||
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $log, addressbookService) {
|
||||
|
||||
if ($scope.cb) $timeout($scope.cb, 100);
|
||||
|
||||
$scope.cancel = function() {
|
||||
$scope.txStatusModal.hide();
|
||||
};
|
||||
|
||||
$scope.save = function(addressbookEntry) {
|
||||
$scope.txStatusModal.hide();
|
||||
$state.go('tabs.send.addressbook', {
|
||||
fromSendTab: true,
|
||||
addressbookEntry: addressbookEntry
|
||||
})
|
||||
}
|
||||
|
||||
addressbookService.list(function(err, ab) {
|
||||
if (err) $log.error(err);
|
||||
if (ab[$scope.tx.toAddress]) {
|
||||
$scope.entryExist = true;
|
||||
$log.debug('Entry already exist');
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue