Skip to content

bug: NaN on explore page #2617

@conorsch

Description

@conorsch

Describe the bug
Multiple DEX frontends are throwing errors in the browser.

To Reproduce
Steps to reproduce the behavior:

  1. run veil dev env
  2. navigate to explore page at http://localhost:3000/explore
  3. observe error

Expected behavior
Page loads fine, assets render.

Screenshots
Here's the exact error text:

 ○ Compiling /explore ...
 ✓ Compiled /explore in 5s (21095 modules)
 ⨯ SyntaxError: Cannot convert NaN to a BigInt
    at BigInt (<anonymous>)
    at Object.toAmount (../../packages/types/dist/pnum.js:103:40)
    at fetchStats (src/pages/explore/server/stats.ts:59:48)
    at async eval (src/pages/explore/ui/page.tsx:12:16)
    at async ExplorePage (src/pages/explore/ui/page.tsx:17:39)
  101 |         },
  102 |         toAmount() {
> 103 |             return new Amount(splitLoHi(BigInt(value.toFixed(0))));
      |                                        ^
  104 |         },
  105 |         toValueView(metadata) {
  106 |             if (metadata) { {
  digest: '3529525386'

Additional context

The error seems specific to the /explore route to me; I can load these URLs fine:

Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions