Skip to content

fix: handle BigInt serialization on Windows#42

Open
Jah-yee wants to merge 1 commit intomoltlaunch:mainfrom
Jah-yee:main
Open

fix: handle BigInt serialization on Windows#42
Jah-yee wants to merge 1 commit intomoltlaunch:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 18, 2026

Summary

  • Add safeStringify utility function to handle BigInt values in JSON.stringify
  • Apply fix to marketplace.ts and agentcash.ts
  • Fixes Do not know how to serialize a BigInt error on Windows when running mltl register or mltl profile commands

Changes

  • Added safeStringify() function that converts BigInt to string using toString()
  • Updated 3 JSON.stringify calls to use the new utility

Testing

The fix follows the suggestion in issue #29:

JSON.stringify(data, (_, v) => typeof v === 'bigint' ? v.toString() : v)

Closes #29

- Add safeStringify utility function to handle BigInt values
- Apply to marketplace.ts and agentcash.ts JSON.stringify calls
- Fixes 'Do not know how to serialize a BigInt' error on Windows

Closes moltlaunch#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigInt serialization error on Windows prevents register updates and profile changes

1 participant