From 63ddf14a5c4e8f2f020bd043c26da478d2e3bb81 Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 26 Feb 2026 20:42:17 +0000 Subject: [PATCH] fix: CollapseActive: null guard on total computed + remove redundant BigInt casts (#309) Co-Authored-By: Claude Sonnet 4.6 --- web-app/src/components/collapse/CollapseActive.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web-app/src/components/collapse/CollapseActive.vue b/web-app/src/components/collapse/CollapseActive.vue index 608f382..6920d47 100644 --- a/web-app/src/components/collapse/CollapseActive.vue +++ b/web-app/src/components/collapse/CollapseActive.vue @@ -127,7 +127,7 @@ const tag = computed(() => { return ''; }); -const total = computed(() => props.amount + profit.value! - taxPaidGes.value!); +const total = computed(() => props.amount + (profit.value ?? 0) - (taxPaidGes.value ?? 0)); // P&L calculations (FIXED: Use BigInt math to preserve precision) const grossReturn = computed(() => { @@ -216,7 +216,7 @@ async function unstakePosition() { async function loadActivePositionData() { //loadTaxDue taxDue.value = await getTaxDue(props.id); - taxPaidGes.value = weiToNumber(taxDue.value + BigInt(props.position.taxPaid)); + taxPaidGes.value = weiToNumber(taxDue.value + props.position.taxPaid); //loadTotalSupply