You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this does not work with version 1.10.0 and can cause runtime errors. In our case, the package.json dependency was set as follows:
"@uniswap/router-sdk": "^1.9.2"
This allows for 1.10.0 to be used instead of 1.9.2 because it assumes compliance with semantic versioning, i.e. no breaking changes for a minor revision. However, if it does use 1.10.0 and the constructor is used as shown above to work with 1.9.2, you will see the following error:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at _createForOfIteratorHelperLoose4 (chunk-ANO3WF4I.js?v=e35eaaa1:7757:50)
at new Trade5 (chunk-ANO3WF4I.js?v=e35eaaa1:8363:31)
It is easy enough to fix this issue as a consumer of this library by updating package.json to lock on 1.10.0 and pass an empty array for the new property, but this is not ideal.
The text was updated successfully, but these errors were encountered:
Thanks @beder-bourahmah-gluwa. Thinking of patching this in this PR. Of course, if you've already fixed your code to match, you'll have to do it once again 😓 #82
Thank you for the quick turnaround @ewilz . Since your PR makes those route arrays optional on the constructor and we were explicitly setting them to empty arrays when not utilizing them in our code, we won't need to change our code after that change is released. Thank you!
Version 1.10.0 introduced the
v4Routes
array as a required property on theTrade
object's constructor here.Previously, you could use the constructor as follows:
However, this does not work with version 1.10.0 and can cause runtime errors. In our case, the package.json dependency was set as follows:
This allows for 1.10.0 to be used instead of 1.9.2 because it assumes compliance with semantic versioning, i.e. no breaking changes for a minor revision. However, if it does use 1.10.0 and the constructor is used as shown above to work with 1.9.2, you will see the following error:
Which points at this line.
It is easy enough to fix this issue as a consumer of this library by updating package.json to lock on 1.10.0 and pass an empty array for the new property, but this is not ideal.
The text was updated successfully, but these errors were encountered: