diff --git a/src/integrations/ethereum/common/redux/transactions/actions.js b/src/integrations/ethereum/common/redux/transactions/actions.js index f1bcce4da..0423fc177 100644 --- a/src/integrations/ethereum/common/redux/transactions/actions.js +++ b/src/integrations/ethereum/common/redux/transactions/actions.js @@ -136,8 +136,8 @@ export const showTransaction = function(hash) { web3Instance, ); let events = []; - let decodedData = null; - + let decodedData; + let contract; let projectIndex; const state = getState(); @@ -192,7 +192,7 @@ export const showTransaction = function(hash) { }); } } - + if (contract) { for (let j = 0; j < events.length; j++) { events[j].decodedLog = await new Promise(resolve => { @@ -209,21 +209,23 @@ export const showTransaction = function(hash) { }); } - decodedData = await new Promise(resolve => { - // TODO: there's a better way to do this to not have to send `contract` and `contracts` every time - ipcRenderer.once( - GET_DECODED_TRANSACTION_INPUT, - (event, decodedData) => { - resolve(decodedData); - }, - ); - ipcRenderer.send( - GET_DECODED_TRANSACTION_INPUT, - contract, - state.workspaces.current.projects[projectIndex].contracts, - transaction, - ); - }); + if (transaction.input !== '0x') { + decodedData = await new Promise(resolve => { + //TODO: there's a better way to do this to not have to send `contract` and `contracts` every time + ipcRenderer.once( + GET_DECODED_TRANSACTION_INPUT, + (event, decodedData) => { + resolve(decodedData); + }, + ); + ipcRenderer.send( + GET_DECODED_TRANSACTION_INPUT, + contract, + state.workspaces.current.projects[projectIndex].contracts, + transaction, + ); + }); + } } dispatch({