Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash report: SyntaxError: Cannot convert 6.42619072256475129773952e+23 to a BigInt #5490

Open
Markcial opened this issue Mar 10, 2025 · 0 comments · May be fixed by #5495
Open

Crash report: SyntaxError: Cannot convert 6.42619072256475129773952e+23 to a BigInt #5490

Markcial opened this issue Mar 10, 2025 · 0 comments · May be fixed by #5495

Comments

@Markcial
Copy link

URL

https://swap.cow.fi/#/8453/limit/WETH/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913?skipLockScreen=&tab=all&page=1

Error

SyntaxError: Cannot convert 6.42619072256475129773952e+23 to a BigInt

Stacktrace

SyntaxError: Cannot convert 6.42619072256475129773952e+23 to a BigInt
    at f.BigInt (https://swap.cow.fi/assets/@uniswap-DpRVUsWX.js:1:611)
    at getRemainderAmountsWithoutSurplus (https://swap.cow.fi/assets/index-DU2ddb8t.js:605:20164)
    at getEstimatedExecutionPrice (https://swap.cow.fi/assets/index-DU2ddb8t.js:605:18983)
    at https://swap.cow.fi/assets/index-DU2ddb8t.js:890:2475
    at Object.updateMemo [as useMemo] (https://swap.cow.fi/assets/index-DU2ddb8t.js:405:76183)
    at h.useMemo (https://swap.cow.fi/assets/@sentry-CzIN27fc.js:1:7550)
    at useSafeMemo (https://swap.cow.fi/assets/index-DU2ddb8t.js:616:46172)
    at OrderRow (https://swap.cow.fi/assets/index-DU2ddb8t.js:890:2451)
    at renderWithHooks (https://swap.cow.fi/assets/index-DU2ddb8t.js:405:61983)
    at updateFunctionComponent (https://swap.cow.fi/assets/index-DU2ddb8t.js:405:97424)
    at beginWork (https://swap.cow.fi/assets/index-DU2ddb8t.js:405:113469)
    at performUnitOfWork (https://swap.cow.fi/ass

Device data

{
  "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
  "browser": {
    "name": "Brave",
    "version": "133.0.0.0",
    "major": "133"
  },
  "engine": {
    "name": "Blink",
    "version": "133.0.0.0"
  },
  "os": {
    "name": "Mac OS",
    "version": "10.15.7"
  },
  "device": {
    "vendor": "Apple",
    "model": "Macintosh"
  },
  "cpu": {}
}

Note:

Using "Number" conversion before turning that into a BigInt solves the issue:

Image

cowdan added a commit that referenced this issue Mar 10, 2025
@cowdan cowdan linked a pull request Mar 10, 2025 that will close this issue
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 a pull request may close this issue.

1 participant