Skip to content

Commit 44c63d4

Browse files
committed
chore: clean up
1 parent e50e469 commit 44c63d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/features/transactions/components/transaction-view-visual.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,13 @@ export function TransactionViewVisual({ transaction }: Props) {
329329
])
330330
)
331331
const maxNestingLevel = Math.max(...flattenedTransactions.map((t) => t.nestingLevel))
332+
const gridAccountColumns = accounts.length + 1 // +1 is to support transactions with the same sender and receiver
332333

333334
return (
334335
<div
335336
className={cn('relative grid')}
336337
style={{
337-
gridTemplateColumns: `minmax(${graphConfig.colWidth}px, ${graphConfig.colWidth + maxNestingLevel * graphConfig.indentationWidth}px) repeat(${accounts.length + 1}, ${graphConfig.colWidth}px)`,
338+
gridTemplateColumns: `minmax(${graphConfig.colWidth}px, ${graphConfig.colWidth + maxNestingLevel * graphConfig.indentationWidth}px) repeat(${gridAccountColumns}, ${graphConfig.colWidth}px)`,
338339
gridTemplateRows: `repeat(${transactionCount + 1}, ${graphConfig.rowHeight}px)`,
339340
}}
340341
>
@@ -344,7 +345,7 @@ export function TransactionViewVisual({ transaction }: Props) {
344345
<AccountId id={account} />
345346
</div>
346347
))}
347-
<div>{/* The last header cell is empty to support transactions with same sender and receiver */}</div>
348+
<div>{/* The last header cell is empty to support transactions with the same sender and receiver */}</div>
348349
{/* The below div is for drawing the background dash lines */}
349350
<div className={cn('absolute right-0 -z-10')} style={{ top: `${graphConfig.rowHeight}px` }}>
350351
<div>

0 commit comments

Comments
 (0)