fix dispatch misuse

This commit is contained in:
fernandomg 2020-07-18 10:08:16 -03:00
parent 028913d9bf
commit fc28d1c833
1 changed files with 3 additions and 9 deletions

View File

@ -184,10 +184,7 @@ const createTransaction = ({
await saveTxToHistory({ ...txArgs, signature, origin }) await saveTxToHistory({ ...txArgs, signature, origin })
showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar) showSnackbar(notificationsQueue.afterExecution.moreConfirmationsNeeded, enqueueSnackbar, closeSnackbar)
dispatch({ dispatch(fetchTransactions(safeAddress))
type: 'FETCH_TRANSACTION',
payload: fetchTransactions(safeAddress),
})
return return
} }
} }
@ -230,10 +227,7 @@ const createTransaction = ({
state, state,
), ),
]) ])
dispatch({ dispatch(fetchTransactions(safeAddress))
type: 'FETCH_TRANSACTIONS',
payload: fetchTransactions(safeAddress),
})
} catch (e) { } catch (e) {
removeTxFromStore(mockedTx, safeAddress, dispatch, state) removeTxFromStore(mockedTx, safeAddress, dispatch, state)
} }
@ -279,7 +273,7 @@ const createTransaction = ({
dispatch, dispatch,
state, state,
) )
await dispatch(fetchTransactions(safeAddress)) dispatch(fetchTransactions(safeAddress))
return receipt.transactionHash return receipt.transactionHash
}) })