Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Undefined error using @uniswap/v3-sdk #171

Open
Samboy76 opened this issue Apr 7, 2023 · 1 comment
Open

Undefined error using @uniswap/v3-sdk #171

Samboy76 opened this issue Apr 7, 2023 · 1 comment

Comments

@Samboy76
Copy link

Samboy76 commented Apr 7, 2023

Hi,
When I import const { Pair, TokenAmount } = require('@uniswap/v3-sdk'); in my JS file, and attempt to perform console.log("Pair", Pair); it returns undefined.
I have correctly updated npm and reinstalled @uniswap/v3-sdk packages correctly.
What else could I do to resolve this problem?

Thank you

@Florian-S-A-W
Copy link

Hi @Samboy76

The v3-sdk does not export Pair or TokenAmount. Pair is a class that represents Uniswap V2 Pairs in the v2-sdk and TokenAmount was a class that was used in the uniswap-sdk which was renamed v2-sdk in 2021. The class has been removed and was reimplemented and updated as CurrencyAmount in the sdk-core.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants