2016-06-10 15:16:02 -03:00
|
|
|
'use strict';
|
|
|
|
|
|
2017-01-13 01:05:52 -03:00
|
|
|
angular.module('copayApp.controllers').controller('coinbaseTxDetailsController', function($scope, coinbaseService, popupService) {
|
2016-06-10 15:16:02 -03:00
|
|
|
|
|
|
|
|
$scope.remove = function() {
|
2017-01-13 01:05:52 -03:00
|
|
|
coinbaseService.setCredentials();
|
|
|
|
|
$scope.updateRequired = false;
|
|
|
|
|
var message = 'Are you sure you want to remove this transaction?';
|
|
|
|
|
popupService.showConfirm(null, message, null, null, function(ok) {
|
|
|
|
|
if (!ok) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
coinbaseService.savePendingTransaction($scope.tx, {
|
|
|
|
|
remove: true
|
|
|
|
|
}, function(err) {
|
|
|
|
|
$scope.updateRequired = true;
|
|
|
|
|
$scope.close();
|
|
|
|
|
});
|
2016-06-10 15:16:02 -03:00
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2016-12-19 11:50:49 -03:00
|
|
|
$scope.close = function() {
|
2017-01-13 01:05:52 -03:00
|
|
|
$scope.modal.hide().then(function() {
|
|
|
|
|
if ($scope.updateRequired) $scope.updateTransactions();
|
|
|
|
|
});
|
2016-06-10 15:16:02 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
});
|