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

Where does the JSBI package come from? #63

Closed
brankomiric-cw opened this issue Feb 7, 2022 · 2 comments
Closed

Where does the JSBI package come from? #63

brankomiric-cw opened this issue Feb 7, 2022 · 2 comments
Labels
bug Something isn't working p0

Comments

@brankomiric-cw
Copy link

  • I'm submitting a ...
    [ x] question about how to use this project

  • Summary

Hey can you update your example from your official docs? https://docs.uniswap.org/sdk/guides/auto-router. You are using JSBI.BigInt in the example, but you aren't importing JSBI. What JSBI is this? If I install the one from npm, typescript compiler doesn't like it.

@ahmetgeymen
Copy link

I think JSBI should come from @uniswap/sdk-core. It currently resolves to version 3.2.5. Installing versions over 4.0.0 emerges another problems.

  "dependencies": {
    "@ethersproject/address": "^5.0.2",
    "big.js": "^5.2.2",
    "decimal.js-light": "^2.5.0",
    "jsbi": "^3.1.4",
    "tiny-invariant": "^1.1.0",
    "toformat": "^2.0.0"
  }

https://github.com/Uniswap/sdk-core/blob/76b41d349ef7f9e0555383b1b11f95872e91e975/package.json#L27

@hensha256
Copy link
Contributor

Yes JSBI is being brought in as a peer dependency. Currently we only support v3 and not v4, though we are considering updating this in future - e.g. see this issue

For now you must use JSBI V3 - the latest of which is v3.2.5. We are adding this as an explicit peer dependency in PR #169 to make it clearer to our users.

Sorry for the confusion!

Repository owner moved this from Todo to Done in Uniswap Protocols Open Issues Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p0
Projects
Development

No branches or pull requests

4 participants