MetaMask / MetaMask/eth-sig-util

Production build error: Can't convert a BigInt value to a number

Open
#304 4 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
583
Forks
228
Avg merge
11h 22m
Merged PRs (30d)
7

Description

Hey everyone! So I am using this library to generate the signature for a meta gasless transaction for a mini game I building. And it works perfectly on localhost but when I generate the build folder and use the serve library to run this build folder on a local server I get this Cannot convert a BigInt value to a number error as seen below:

![cannotConvert](https://user-images.githubusercontent.com/42664403/229265568-706d3aeb-8d68-4741-a84f-c5f93b41c092.png)

I also get some warnings when I run the react app using the start command provided by the react-app. I don't know if they have anything to do with it but I'll show a few I am getting below

![warnings](https://user-images.githubusercontent.com/42664403/229265651-71719620-6b23-437f-a3f7-a05ce1bc8d57.png)

Also the react app is built with create-react-app and is using react version ^18.2.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the error with the library in a create-react-app production build using React 18.2.0, then compare the production build with the localhost development run. The issue is resolved when the signature generation works in the served build without the BigInt conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
blockchain, build-system, cryptography
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.