Skip to content

Commit

Permalink
hotfix: patch for broken import in @uniswap/widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
L03TJ3 committed Jul 24, 2023
1 parent 68be58a commit 294e0f4
Show file tree
Hide file tree
Showing 3 changed files with 277 additions and 236 deletions.
14 changes: 14 additions & 0 deletions .yarn/patches/@uniswap-widgets-npm-2.53.0-515f06935c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dist/clientSideSmartOrderRouter-639d63e0.js b/dist/clientSideSmartOrderRouter-639d63e0.js

This comment has been minimized.

Copy link
@L03TJ3

L03TJ3 Jul 24, 2023

Author Collaborator

Uniswap/widgets#600
There is a pending pr on their repo, but that has been open for 3 weeks.

Latest versions fail to build because of this import.
Downgrading got issues of its own:

  1. not being able to fetch pricing
  2. alternative build errors

Patch is for moving ChainId import to @uniswap/sdk-core
Also had to resolute that @uniswap/widgets uses sdk-core^4

This comment has been minimized.

Copy link
@sirpy

sirpy Jul 25, 2023

Contributor

what bugs is this fixing?

This comment has been minimized.

Copy link
@L03TJ3

L03TJ3 Jul 25, 2023

Author Collaborator
  1. ChainId export is not existing in smart-order-router package (breaks build) Uniswap/widgets#600

This comment has been minimized.

Copy link
@sirpy

sirpy Jul 25, 2023

Contributor

i dont care about their bugs.
why do we need to upgrade to this package, what issues does it solve FOR US?

This comment has been minimized.

Copy link
@L03TJ3

L03TJ3 Jul 25, 2023

Author Collaborator

upgraded versions just got pulled in... (because of ^)
And as described above, I got in to issues by downgrading the package(s)
(its both @uniswap/widgets + @uniswap/smart-order-router with issues)

I was just done with doctoring dependencies for now and this was faster then waiting for them to fix anything. + I had to patch anyway for some UI issues showing on dev/qa

This comment has been minimized.

Copy link
@L03TJ3

L03TJ3 Jul 25, 2023

Author Collaborator

At least it holds the full update/support for wallet-connect v2 (the version we used was from 3 months ago)
that's the only thing I am currently aware of that benefits US

But I cant tell what issues currently would exist

index 4d427f77e2a7a91c510a24cea8c618b97ffd5e78..f0fb228b0bf60ac70032765be51b36fa9184f15c 100644
--- a/dist/clientSideSmartOrderRouter-639d63e0.js
+++ b/dist/clientSideSmartOrderRouter-639d63e0.js
@@ -2,7 +2,8 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
import _regeneratorRuntime from '@babel/runtime/regenerator';
import { Token, CurrencyAmount } from '@uniswap/sdk-core';
-import { ChainId, StaticV2SubgraphProvider, UniswapMulticallProvider, OnChainQuoteProvider, AlphaRouter, routeAmountsToString } from '@uniswap/smart-order-router';
+import { StaticV2SubgraphProvider, UniswapMulticallProvider, OnChainQuoteProvider, AlphaRouter, routeAmountsToString } from '@uniswap/smart-order-router';
+import { ChainId } from '@uniswap/sdk-core'
import { Q as QuoteState, i as isExactInput, S as SwapRouterNativeAssets, n as nativeOnChain } from './index-19ef7fb1.js';
import JSBI from 'jsbi';
import { Protocol } from '@uniswap/router-sdk';
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"graphql": "^15.5.1",
"husky": "^8.0.2",
"jazzicon": "^1.5.0",
"jotai-immer": "^0.2.0",
"jsbi": "^3.1.5",
"lint-staged": "^13.1.0",
"lodash": "4.17.21",
Expand Down Expand Up @@ -196,9 +197,10 @@
"@gooddollar/goodprotocol": "2.0.3",
"@react-native-async-storage/async-storage": "1.17.10",
"ethereum-cryptography": "2.0.0",
"@uniswap/smart-order-router": "3.13.2-hotfix2",
"@react-native-aria/interactions": "0.2.8",
"@web3-onboard/core": "patch:@web3-onboard/core@npm%3A2.20.2#./.yarn/patches/@web3-onboard-core-npm-2.20.2-2119caa15c.patch"
"@web3-onboard/core": "patch:@web3-onboard/core@npm%3A2.20.2#./.yarn/patches/@web3-onboard-core-npm-2.20.2-2119caa15c.patch",
"@uniswap/widgets@^2.51.2": "patch:@uniswap/widgets@npm%3A2.53.0#./.yarn/patches/@uniswap-widgets-npm-2.53.0-515f06935c.patch",
"@uniswap/widgets/@uniswap/sdk-core": "^4.0.6"
},
"dependencies": {
"@babel/runtime": "^7.18.9",
Expand All @@ -213,7 +215,7 @@
"@lingui/react": "^4.0.0",
"@types/react-text-mask": "^5.4.8",
"@types/text-mask-addons": "^3.8.1",
"@uniswap/sdk-core": "^4.0.1",
"@uniswap/sdk-core": "^4.0.6",
"@uniswap/widgets": "^2.51.2",
"@usedapp/core": "^1.2.6",
"@web3-onboard/coinbase": "^2.2.4",
Expand Down
Loading

0 comments on commit 294e0f4

Please sign in to comment.