fix: CollapseActive: null guard on total computed + remove redundant BigInt casts (#309)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c73f0e8bc1
commit
63ddf14a5c
1 changed files with 2 additions and 2 deletions
|
|
@ -127,7 +127,7 @@ const tag = computed(() => {
|
||||||
return '';
|
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)
|
// P&L calculations (FIXED: Use BigInt math to preserve precision)
|
||||||
const grossReturn = computed(() => {
|
const grossReturn = computed(() => {
|
||||||
|
|
@ -216,7 +216,7 @@ async function unstakePosition() {
|
||||||
async function loadActivePositionData() {
|
async function loadActivePositionData() {
|
||||||
//loadTaxDue
|
//loadTaxDue
|
||||||
taxDue.value = await getTaxDue(props.id);
|
taxDue.value = await getTaxDue(props.id);
|
||||||
taxPaidGes.value = weiToNumber(taxDue.value + BigInt(props.position.taxPaid));
|
taxPaidGes.value = weiToNumber(taxDue.value + props.position.taxPaid);
|
||||||
|
|
||||||
//loadTotalSupply
|
//loadTotalSupply
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue