diff --git a/applications/viewer/src/routes/transactions/+page.svelte b/applications/viewer/src/routes/transactions/+page.svelte index 65e136f4..8b3a9802 100644 --- a/applications/viewer/src/routes/transactions/+page.svelte +++ b/applications/viewer/src/routes/transactions/+page.svelte @@ -1,43 +1,17 @@ -
- - {#if showToast} -
- Transaction hash copied to clipboard! -
- {/if} +
+
+ + {#if showToast} +
+ + Copied to clipboard +
+ {/if} -

Recent Transactions

+
+
+

Recent Transactions

+
- {#if isErrorData(data)} -
- {data.body?.error || 'Unknown error loading transactions.'} +
+ + +
- {:else} - - {#if !data.txs || data.txs.length === 0} -
- No transactions found. -
- {:else} -
+ + {#if !isErrorData(data) && data.txs && data.txs.length > 0} +
- - - + + +
-
- {#if loading} - -
- -
- {/if} -
- - - - - - - - + {/if} + + {#if isErrorData(data)} +
+ + {data.body?.error || 'Failed to load transactions. Please check your connection to the Yaci node.'} +
+ {:else if !data.txs || data.txs.length === 0} +
+

No transactions found

+

Waiting for new transactions to be produced...

+
+ {:else} +
+ + {#if loading} +
+ +
+ {/if} + +
Tx HashBlock / SlotTotal Output (ADA)Fee (ADA)Output Addresses
+ + + + + + + - - {#each data.txs as tx (tx.tx_hash)} - - + {#each data.txs as tx (tx.tx_hash)} + + - - - - {/each}
Tx HashBlock / SlotTotal OutputFeeAddresses
- {truncate(tx.tx_hash, 15)} - +
+
+ + {truncate(tx.tx_hash, 24, "...")} + + +
- {tx.block_number} / {tx.slot} + +
+ {@html iconCube} + + {tx.block_number} +
/ {tx.slot}
+
- {formatAda(tx.total_output)} + +
+
+ {@html iconCardano} +
+
+ {formatAda(tx.total_output)} ADA +
+
- {formatAda(tx.fee)} + +
+
+ {@html iconCardano} +
+
+ {formatAda(tx.fee)} ADA +
+
- {#if tx.output_addresses} - {#each tx.output_addresses as address, i (address + i)} -
- {/each} - {/if} +
+
+ {#if tx.output_addresses && tx.output_addresses.length > 0} + {#each tx.output_addresses as address, i (address + i)} +
+ +
+ {/each} + {:else} + No outputs + {/if} +
+ +
+ {#each data.txs as tx (tx.tx_hash)} +
+
+
+
Tx Hash
+ + {tx.tx_hash} + +
+ +
+ +
+
+
{@html iconCube} Block
+ {tx.block_number} + (Slot {tx.slot}) +
+
+
+
{@html iconCardano}
Output +
+
{formatAda(tx.total_output)}
+
+
+ +
+
+
{@html iconCardano}
+ Fee: {formatAda(tx.fee)} ADA +
+
+
+ {/each} +
-
- - - + + +
{/if} - {/if} -
+
+
+ .scrollbar-thin::-webkit-scrollbar { width: 4px; } + .scrollbar-thin::-webkit-scrollbar-track { background: transparent; } + .scrollbar-thin::-webkit-scrollbar-thumb { background-color: #e5e7eb; border-radius: 4px; } + .scrollbar-thin:hover::-webkit-scrollbar-thumb { background-color: #d1d5db; } + \ No newline at end of file