Skip to content

Commit

Permalink
Fix mempool/pending transaction view
Browse files Browse the repository at this point in the history
  • Loading branch information
kacpersaw committed Nov 1, 2024
1 parent 0c45d5a commit 02200c0
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/routes/tx.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Tx = () => {
badgeType="coin"
amount={smidge.value}
unit={smidge.unit}
startTime={data && store.layerTimestamp(data.txResult.layer)}
startTime={data && store.layerTimestamp(data.txResult?.layer)}
color={getColorByPageName(name)}
/>
</div>
Expand Down Expand Up @@ -110,16 +110,20 @@ const Tx = () => {
</li>
<li className="item">
<span className="item-name">Timestamp</span>
<span className="item-value">
<CustomTimeAgo time={store.layerTimestamp(data.txResult.layer)} />
&nbsp;
{`${fullDate(store.layerTimestamp(data.txResult.layer))}`}
</span>
{ data.txResult?.layer ? (
<span className="item-value">
<CustomTimeAgo time={store.layerTimestamp(data.txResult.layer)} />
&nbsp;
{`${fullDate(store.layerTimestamp(data.txResult.layer))}`}
</span>
) : (<span className="item-value">-</span>)}
</li>
<li className="item">
<span className="item-name">Layer</span>
<span className="item-value">
<Link to={`/${LAYERS}/${data.txResult.layer}`}>{data.txResult.layer}</Link>
{ data.txResult?.layer ? (
<Link to={`/${LAYERS}/${data.txResult.layer}`}>{data.txResult.layer}</Link>
) : ('-')}
</span>
</li>
<li className="item">
Expand All @@ -132,12 +136,14 @@ const Tx = () => {
</li>
<li className="item">
<span className="item-name">Fee</span>
<span className="item-value">{formatSmidge(data.txResult.fee)}</span>
<span className="item-value">{formatSmidge(data.txResult?.fee || 0)}</span>
</li>
<li className="item">
<span className="item-name">Block</span>
<span className="item-value">
<Link to={`/${LAYERS}/${data.txResult.layer}/blocks`}>{base64ToHex(data.txResult.block)}</Link>
{ data.txResult?.layer ? (
<Link to={`/${LAYERS}/${data.txResult.layer}/blocks`}>{base64ToHex(data.txResult.block)}</Link>
) : ('-')}
</span>
</li>
{data.tx.type === 'TRANSACTION_TYPE_DRAIN_VAULT' && (
Expand Down

0 comments on commit 02200c0

Please sign in to comment.