Prevent double tap (in mobile)

This commit is contained in:
Gustavo Maximiliano Cortez 2016-08-01 14:16:47 -03:00
commit b210a970d3
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 82 additions and 76 deletions

View file

@ -27,46 +27,49 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.error = null;
$scope.loading = 'Signing Transaction';
fingerprintService.check(fc, function(err) {
if (err) {
$scope.error = bwcError.msg(err);
$scope.loading = null;
return;
}
$timeout(function() {
handleEncryptedWallet(function(err) {
fingerprintService.check(fc, function(err) {
if (err) {
$scope.error = bwcError.msg(err);
$scope.loading = null;
return;
}
walletService.signTx(fc, txp, function(err, signedTxp) {
walletService.lock(fc);
handleEncryptedWallet(function(err) {
if (err) {
$scope.error = bwcError.msg(err);
$scope.loading = null;
return;
}
if (signedTxp.status == 'accepted') {
$scope.loading = 'Broadcasting Transaction';
walletService.broadcastTx(fc, signedTxp, function(err, broadcastedTxp) {
walletService.signTx(fc, txp, function(err, signedTxp) {
walletService.lock(fc);
if (err) {
$scope.error = bwcError.msg(err);
$scope.loading = null;
return;
}
if (signedTxp.status == 'accepted') {
$scope.loading = 'Broadcasting Transaction';
walletService.broadcastTx(fc, signedTxp, function(err, broadcastedTxp) {
$scope.loading = null;
$scope.$emit('UpdateTx');
$scope.close(broadcastedTxp);
if (err) {
$scope.error = err;
}
});
} else {
$scope.loading = null;
$scope.$emit('UpdateTx');
$scope.close(broadcastedTxp);
if (err) {
$scope.error = err;
}
});
} else {
$scope.loading = null;
$scope.$emit('UpdateTx');
$scope.close(signedTxp);
}
$scope.close(signedTxp);
}
});
});
});
});
}, 10);
};
$scope.reject = function(txp) {