Merge pull request #153 from gabrielbazan7/feat/addEntrySend
add addressbook entry when send success
This commit is contained in:
commit
912789ccb6
8 changed files with 123 additions and 35 deletions
|
|
@ -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