From fad64861524c53b2065d27333cae9720fcf69a47 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 24 Feb 2026 15:02:22 +0000 Subject: [PATCH] fix: Post-purchase holder dashboard on landing page (#150) Co-Authored-By: Claude Sonnet 4.6 --- landing/src/views/HolderDashboardView.vue | 35 ++++- .../src/components/TransactionHistory.vue | 147 +++++++++++++----- .../ui-shared/src/composables/useEthPrice.ts | 65 ++++++++ .../src/composables/useHolderDashboard.ts | 4 +- packages/ui-shared/src/index.ts | 1 + 5 files changed, 203 insertions(+), 49 deletions(-) create mode 100644 packages/ui-shared/src/composables/useEthPrice.ts diff --git a/landing/src/views/HolderDashboardView.vue b/landing/src/views/HolderDashboardView.vue index 6a48557..d135f81 100644 --- a/landing/src/views/HolderDashboardView.vue +++ b/landing/src/views/HolderDashboardView.vue @@ -32,13 +32,16 @@ >
Unrealized P&L
- {{ unrealizedPnlEth >= 0 ? '+' : '' }}{{ formatEth(unrealizedPnlEth) }} ETH + {{ unrealizedPnlEth >= 0 ? '+' : '−' }}{{ fmtEthUsd(Math.abs(unrealizedPnlEth)) }} +
+
+ {{ unrealizedPnlEth >= 0 ? '+' : '−' }}{{ formatEthCompact(Math.abs(unrealizedPnlEth)) }}
{{ unrealizedPnlPercent >= 0 ? '+' : '' }}{{ unrealizedPnlPercent.toFixed(1) }}%
- Avg cost: {{ formatEth(avgCostBasis) }} ETH/KRK · Current: {{ formatEth(currentPriceEth) }} ETH/KRK + Avg cost: {{ fmtEthUsd(avgCostBasis) }}/KRK · Current: {{ fmtEthUsd(currentPriceEth) }}/KRK
@@ -51,8 +54,9 @@
ETH Backing
-
{{ formatEth(ethBacking) }}
-
ETH
+
{{ fmtEthUsd(ethBacking) }}
+
{{ formatEthCompact(ethBacking) }}
+
ETH
@@ -68,7 +72,7 @@ @@ -236,6 +244,17 @@ function formatEth(val: number): string { .negative & color: #EF4444 + &__value-secondary + font-size: 0.85rem + margin-top: 0.15rem + opacity: 0.6 + + .positive & + color: #10B981 + + .negative & + color: #EF4444 + &__percent font-size: 1.2rem font-weight: 600 diff --git a/packages/ui-shared/src/components/TransactionHistory.vue b/packages/ui-shared/src/components/TransactionHistory.vue index 7fe87be..c7e42b7 100644 --- a/packages/ui-shared/src/components/TransactionHistory.vue +++ b/packages/ui-shared/src/components/TransactionHistory.vue @@ -2,7 +2,7 @@

Transaction History - {{ visibleTransactions.length }} + {{ transactions.length }}

@@ -10,7 +10,9 @@ Loading transactions…
-
No transactions found for this address.
+
⚠ {{ error }}
+ +
No transactions found for this address.
@@ -19,12 +21,12 @@ - + - + - +
Date Type Amount (KRK)Value (ETH)Value Tx
{{ formatDate(tx.timestamp) }} @@ -32,7 +34,16 @@ {{ formatKrk(tx.tokenAmount) }}{{ tx.ethAmount !== '0' ? formatEth(tx.ethAmount) : '—' }} + + + {{ shortHash(tx.txHash) }} ↗ @@ -47,6 +58,7 @@