Skip to content

Commit

Permalink
chore: keep spinning during tx broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 27, 2021
1 parent 9076b34 commit a20a38e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/modals/transaction/transaction-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ export const TransactionModal: FC<TxModalProps> = ({ balance, address }) => {
const broadcastActions = {
amount,
onBroadcastSuccess() {
setIsDecrypting(false);
closeModal();
void mutate('mempool');
},
onBroadcastFail: (error?: PostCoreNodeTransactionsError) => {
setIsDecrypting(false);
if (error) setNodeResponseError(error);
setStep(TxModalStep.NetworkError);
},
Expand All @@ -203,8 +205,6 @@ export const TransactionModal: FC<TxModalProps> = ({ balance, address }) => {
}

if (privateKey) {
setIsDecrypting(false);

try {
const transaction = await signSoftwareWalletTx({ ...txDetails, privateKey });
dispatch(broadcastTransaction({ ...broadcastActions, transaction }));
Expand Down

0 comments on commit a20a38e

Please sign in to comment.