made wallet#sign synchronous
This commit is contained in:
parent
68208f7610
commit
0db8c1008b
4 changed files with 64 additions and 68 deletions
|
|
@ -445,20 +445,23 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
|
||||
$scope.sign = function(ntxid) {
|
||||
$scope.loading = true;
|
||||
w.sign(ntxid, function(ret) {
|
||||
if (!ret) {
|
||||
$scope.error = 'There was an error signing the transaction';
|
||||
|
||||
try {
|
||||
w.sign(ntxid);
|
||||
} catch (e) {
|
||||
$scope.error = 'There was an error signing the transaction';
|
||||
$scope.loadTxs();
|
||||
return;
|
||||
}
|
||||
|
||||
var p = w.txProposals.getTxProposal(ntxid);
|
||||
if (p.builder.isFullySigned()) {
|
||||
$scope.send(ntxid, function() {
|
||||
$scope.loadTxs();
|
||||
} else {
|
||||
var p = w.txProposals.getTxProposal(ntxid);
|
||||
if (p.builder.isFullySigned()) {
|
||||
$scope.send(ntxid, function() {
|
||||
$scope.loadTxs();
|
||||
});
|
||||
} else
|
||||
$scope.loadTxs();
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$scope.loadTxs();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.reject = function(ntxid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue