metaplex-foundation / gumdrop

Gumdrop!
https://gumdrop.metaplex.com
32 stars 52 forks source link

Fix BN assertion error #14

Open seoulprotocol opened 1 week ago

seoulprotocol commented 1 week ago

Formatting amount with toLocaleString to handle large numbers correctly

vercel[bot] commented 1 week ago

@seoulprotocol is attempting to deploy a commit to the Metaplex Foundation Team on Vercel.

A member of the Team first needs to authorize it.

MarkSackerberg commented 1 week ago

Hey, Thanks for the PR! Cubs you explain where this was causing issues?

seoulprotocol commented 1 week ago

Hey, Thanks for the PR! Cubs you explain where this was causing issues?

@MarkSackerberg Sure. The error arise when you launch a claim on the frontend. Here is the console log Error: Assertion failed at assert (bn.js:6:1) at BN._initNumber (bn.js:128:1) at BN.init [as _init] (bn.js:82:1) at new BN (bn.js:39:1) at Claim.tsx:153:1 at step (Claim.tsx:32:1) at Object.next (Claim.tsx:13:1) at fulfilled (Claim.tsx:4:1)

Let me know if you need anything else. Thanks