We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47e484b commit 235a1b4Copy full SHA for 235a1b4
packages/fasset-indexer-api/src/analytics/dashboard.ts
@@ -18,7 +18,7 @@ import type {
18
19
const add = (x: bigint, y: bigint) => x + y
20
const sub = (x: bigint, y: bigint) => x - y
21
-const rat = (x: bigint, y: bigint) => Number(MAX_BIPS * x / y) / Number(MAX_BIPS)
+const rat = (x: bigint, y: bigint) => y == BigInt(0) ? 0 : Number(MAX_BIPS * x / y) / Number(MAX_BIPS)
22
23
/**
24
* DashboardAnalytics provides a set of analytics functions for the FAsset UI's dashboard.
0 commit comments