From 8e600ec5fd91c34582494ec56c0c3a9d427956f1 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Mar 2026 01:51:48 +0000 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20\`loadActivePositionData\`=20has=20n?= =?UTF-8?q?o=20error=20handling=20=E2=80=94=20silent=20failure=20on=20RPC?= =?UTF-8?q?=20error=20(#377)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../components/collapse/CollapseActive.vue | 33 +++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/web-app/src/components/collapse/CollapseActive.vue b/web-app/src/components/collapse/CollapseActive.vue index 9e7cbd6..8b32b94 100644 --- a/web-app/src/components/collapse/CollapseActive.vue +++ b/web-app/src/components/collapse/CollapseActive.vue @@ -35,6 +35,10 @@
+
+ {{ error }} + Retry +
Tax Paid
@@ -117,6 +121,7 @@ const taxDue = ref(0n); const taxPaidGes = ref(); const profit = ref(); const loading = ref(false); +const error = ref(null); const tag = computed(() => { // Compare by index instead of decimal to avoid floating-point issues @@ -214,14 +219,23 @@ async function unstakePosition() { } async function loadActivePositionData() { - //loadTaxDue - taxDue.value = await getTaxDue(props.id); - taxPaidGes.value = weiToNumber(taxDue.value + props.position.taxPaid); + loading.value = true; + error.value = null; + try { + //loadTaxDue + taxDue.value = await getTaxDue(props.id); + taxPaidGes.value = weiToNumber(taxDue.value + props.position.taxPaid); - //loadTotalSupply + //loadTotalSupply - // Calculate issuance earned using kraiken-lib profit calculation - profit.value = calculateActivePositionProfit(props.position.totalSupplyInit, statCollection.kraikenTotalSupply, props.position.share); + // Calculate issuance earned using kraiken-lib profit calculation + profit.value = calculateActivePositionProfit(props.position.totalSupplyInit, statCollection.kraikenTotalSupply, props.position.share); + } catch (err) { + console.error('Failed to load active position data:', err); + error.value = 'Failed to load position data.'; + } finally { + loading.value = false; + } } onMounted(() => { @@ -317,6 +331,13 @@ onMounted(() => { &.profit-stats-total border-top: 2px solid var(--color-font) padding-top: 2px + .collapsed-body--error + display: flex + align-items: center + gap: 8px + color: #f87171 + font-size: 13px + margin-bottom: 8px .collapsed-body--actions .collapse-menu-open display: flex From c0e107900639f29850822169c6dd7b166102d405 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Mar 2026 02:00:05 +0000 Subject: [PATCH 2/3] fix: suppress no-console lint error in CollapseActive error handler Co-Authored-By: Claude Sonnet 4.6 --- web-app/src/components/collapse/CollapseActive.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/web-app/src/components/collapse/CollapseActive.vue b/web-app/src/components/collapse/CollapseActive.vue index 8b32b94..89377cc 100644 --- a/web-app/src/components/collapse/CollapseActive.vue +++ b/web-app/src/components/collapse/CollapseActive.vue @@ -231,6 +231,7 @@ async function loadActivePositionData() { // Calculate issuance earned using kraiken-lib profit calculation profit.value = calculateActivePositionProfit(props.position.totalSupplyInit, statCollection.kraikenTotalSupply, props.position.share); } catch (err) { + // eslint-disable-next-line no-console console.error('Failed to load active position data:', err); error.value = 'Failed to load position data.'; } finally { From f8baa02efc53d7ed0119de4890a738de327b700d Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 3 Mar 2026 02:23:06 +0000 Subject: [PATCH 3/3] fix: hide stats on first-open error and guard Total row against undefined Co-Authored-By: Claude Sonnet 4.6 --- web-app/src/components/collapse/CollapseActive.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web-app/src/components/collapse/CollapseActive.vue b/web-app/src/components/collapse/CollapseActive.vue index 89377cc..db8e27a 100644 --- a/web-app/src/components/collapse/CollapseActive.vue +++ b/web-app/src/components/collapse/CollapseActive.vue @@ -39,7 +39,7 @@ {{ error }} Retry
-
+
Tax Paid
{{ taxPaidGes ?? '...' }} $KRK
@@ -50,7 +50,7 @@
Total
-
{{ total.toFixed(5) }} $KRK
+
{{ taxPaidGes !== undefined && profit !== undefined ? total.toFixed(5) : '...' }} $KRK
@@ -334,6 +334,7 @@ onMounted(() => { padding-top: 2px .collapsed-body--error display: flex + flex-wrap: wrap align-items: center gap: 8px color: #f87171