Prevent double tap (in mobile)
This commit is contained in:
parent
6d79a5da72
commit
b210a970d3
2 changed files with 82 additions and 76 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue