fix: only show debug button for transactions with hashes

This commit is contained in:
Andre Medeiros 2019-03-07 11:03:37 -05:00
parent 0e63d6bcf9
commit cf270bfce4
1 changed files with 6 additions and 1 deletions

View File

@ -121,9 +121,14 @@ class ContractTransactions extends React.Component {
<tbody> <tbody>
{ {
this.dataToDisplay().map((log, index) => { this.dataToDisplay().map((log, index) => {
let debugButton;
if(log.transactionHash !== undefined) {
debugButton = <DebugButton forceDebuggable transaction={{hash: log.transactionHash}}/>;
}
return ( return (
<tr key={'log-' + index}> <tr key={'log-' + index}>
<td><DebugButton forceDebuggable transaction={{hash: log.transactionHash}}/></td> <td>{debugButton}</td>
<td>{`${log.name}.${log.functionName}(${log.paramString})`}</td> <td>{`${log.name}.${log.functionName}(${log.paramString})`}</td>
<td>{log.events.join(', ')}</td> <td>{log.events.join(', ')}</td>
<td>{log.gasUsed}</td> <td>{log.gasUsed}</td>