Merge pull request #519 from cmgustavo/feat/confirm-reject-proposal
Show confirmation popup before reject a proposal
This commit is contained in:
commit
3934d98292
1 changed files with 11 additions and 7 deletions
|
|
@ -96,16 +96,20 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.reject = function(txp) {
|
$scope.reject = function(txp) {
|
||||||
$scope.loading = true;
|
var title = gettextCatalog.getString('Warning!');
|
||||||
|
var msg = gettextCatalog.getString('Are you sure you want to reject this transaction?');
|
||||||
|
popupService.showConfirm(title, msg, null, null, function(res) {
|
||||||
|
if (res) {
|
||||||
|
$scope.loading = true;
|
||||||
|
|
||||||
walletService.reject($scope.wallet, $scope.tx, function(err, txpr) {
|
walletService.reject($scope.wallet, $scope.tx, function(err, txpr) {
|
||||||
if (err)
|
if (err)
|
||||||
return setError(err, gettextCatalog.getString('Could not reject payment'));
|
return setError(err, gettextCatalog.getString('Could not reject payment'));
|
||||||
|
|
||||||
$scope.close();
|
$scope.close();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.remove = function() {
|
$scope.remove = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue