forked from didirus/AstralRinth
fix: balance displaying NaN (#5024)
* convert string to num * another potentional string addition * remove return statement * fix formatting
This commit is contained in:
@@ -440,7 +440,7 @@ const processingDate = computed<{ date: string; amount: number }>(() => {
|
||||
})
|
||||
|
||||
const grandTotal = computed(() =>
|
||||
userBalance.value ? userBalance.value.available + userBalance.value.pending : 0,
|
||||
userBalance.value ? Number(userBalance.value.available) + Number(userBalance.value.pending) : 0,
|
||||
)
|
||||
|
||||
const hasTinMismatch = computed(() => {
|
||||
@@ -508,7 +508,7 @@ const segments = computed<RevenueBarSegment[]>(() => {
|
||||
const upcoming = processing.date ? dates.filter((d) => d.date !== processing.date) : dates
|
||||
|
||||
const totalPending = userBalance.value?.pending ?? 0
|
||||
const total = available + totalPending
|
||||
const total = Number(available) + Number(totalPending)
|
||||
|
||||
if (total <= 0) return [] as RevenueBarSegment[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user