2016-06-16 14:57:30 -03:00
|
|
|
'use strict';
|
|
|
|
|
|
2016-09-21 15:13:22 -03:00
|
|
|
angular.module('copayApp.controllers').controller('txStatusController', function($scope, $timeout, $state, $log, addressbookService) {
|
2016-06-16 14:57:30 -03:00
|
|
|
|
|
|
|
|
if ($scope.cb) $timeout($scope.cb, 100);
|
|
|
|
|
|
|
|
|
|
$scope.cancel = function() {
|
|
|
|
|
$scope.txStatusModal.hide();
|
|
|
|
|
};
|
2016-09-21 15:13:22 -03:00
|
|
|
|
|
|
|
|
$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');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2016-06-16 14:57:30 -03:00
|
|
|
});
|