mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #8072 from gabrielbazan7/fix/creatingTxprocess
FIX: remove on going process if err
This commit is contained in:
commit
f737164be7
|
@ -573,8 +573,10 @@ export class ConfirmPage {
|
|||
if (!wallet.canSign() && !wallet.isPrivKeyExternal()) {
|
||||
this.logger.info('No signing proposal: No private key');
|
||||
this.walletProvider.onlyPublish(wallet, txp).then(() => {
|
||||
this.onGoingProcessProvider.clear();
|
||||
this.openSuccessModal(true);
|
||||
}).catch((err: any) => {
|
||||
this.onGoingProcessProvider.clear();
|
||||
this.setSendError(err);
|
||||
});
|
||||
return;
|
||||
|
@ -595,15 +597,13 @@ export class ConfirmPage {
|
|||
|
||||
confirmTx().then((nok: boolean) => {
|
||||
if (nok) {
|
||||
this.onGoingProcessProvider.clear();
|
||||
return;
|
||||
}
|
||||
publishAndSign();
|
||||
}).catch((err: any) => {
|
||||
this.logger.warn(err);
|
||||
return;
|
||||
});
|
||||
}).catch((err: any) => {
|
||||
this.onGoingProcessProvider.set('creatingTx', false);
|
||||
this.onGoingProcessProvider.clear();
|
||||
this.logger.warn(err);
|
||||
return;
|
||||
});
|
||||
|
|
|
@ -1159,11 +1159,9 @@ export class WalletProvider {
|
|||
this.ongoingProcessProvider.set('sendingTx', true);
|
||||
this.publishTx(wallet, txp).then((publishedTxp) => {
|
||||
this.invalidateCache(wallet);
|
||||
this.ongoingProcessProvider.set('sendingTx', false);
|
||||
this.events.publish('Local/TxAction', wallet.id);
|
||||
return resolve();
|
||||
}).catch((err) => {
|
||||
this.ongoingProcessProvider.set('sendingTx', false);
|
||||
return reject(this.bwcErrorProvider.msg(err));
|
||||
});
|
||||
});
|
||||
|
@ -1225,6 +1223,7 @@ export class WalletProvider {
|
|||
return reject(err);
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.ongoingProcessProvider.clear();
|
||||
return reject(this.bwcErrorProvider.msg(err));
|
||||
});
|
||||
} else {
|
||||
|
@ -1241,6 +1240,7 @@ export class WalletProvider {
|
|||
return reject(this.bwcErrorProvider.msg(err));
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.ongoingProcessProvider.clear();
|
||||
return reject(this.bwcErrorProvider.msg(err));
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue