Fix instant removal of pending (#123)

This commit is contained in:
Kenny Tran 2018-11-06 06:50:48 -08:00 committed by Chi Kei Chan
parent f308632cee
commit ab1e68f5da

@ -345,6 +345,11 @@ export const sync = () => async (dispatch, getState) => {
try { try {
const data = await web3.eth.getTransactionReceipt(txId) || {}; const data = await web3.eth.getTransactionReceipt(txId) || {};
// If data is an empty obj, then it's still pending.
if (!('status' in data)) {
return;
}
dispatch({ dispatch({
type: REMOVE_PENDING_TX, type: REMOVE_PENDING_TX,
payload: txId, payload: txId,