Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

2440/uni merge #2536

Closed
wants to merge 382 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
382 commits
Select commit Hold shift + click to select a range
83b70f3
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 11, 2022
aa97ec0
chore: bump sor to 2.5.10 (#3091)
willpote Jan 11, 2022
711b2ca
chore: import @ethersprojects directly (#3104)
zzmp Jan 12, 2022
f3bcf64
refactor: split chain info from chains (#3105)
zzmp Jan 12, 2022
ac962fb
refactor: separate useActiveWeb3React (#3106)
zzmp Jan 12, 2022
ac2642f
add error reporting component, INTEGRATION ERROR type, and Missing pr…
JFrankfurt Jan 12, 2022
06a8151
Revert "add error reporting component, INTEGRATION ERROR type, and Mi…
JFrankfurt Jan 12, 2022
7aa0f50
feat: mv block number to atom (#3108)
zzmp Jan 13, 2022
8784a76
feat: add multicall to widget (#3112)
zzmp Jan 13, 2022
e68e1af
feat: sort the widget token select (#3114)
zzmp Jan 13, 2022
e5a1cb4
chore: replace microbundle with rollup (#3115)
zzmp Jan 14, 2022
064a73c
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 14, 2022
5d97cbf
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 14, 2022
1b10c88
feat: add survey popup for survey monkey (#3116)
ianlapham Jan 14, 2022
27843f6
update end timestamp for survey (#3121)
ianlapham Jan 14, 2022
1127e74
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 14, 2022
99f6818
refactor: mv token hooks to lib (#3122)
zzmp Jan 14, 2022
850a20f
feat: include native currency in widget select (#3124)
zzmp Jan 18, 2022
d54783a
fix: memoize more swap (#2950)
zzmp Jan 18, 2022
8e3b2cb
feat(widgets): add error reporting component, INTEGRATION ERROR type,…
JFrankfurt Jan 19, 2022
fd81926
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 19, 2022
1efda07
refactor: mv try parse currency amount to lib utils (#3152)
zzmp Jan 19, 2022
5dec0cf
show wrong chain message instead of throwing on incorrect chain conne…
JFrankfurt Jan 19, 2022
c3321ae
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 19, 2022
b77e7de
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 20, 2022
053000e
fix: update address listt (#3159)
ianlapham Jan 20, 2022
034b3e3
feat: Update swap state structure and attach to UI (#3155)
ianlapham Jan 20, 2022
8a37c42
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 21, 2022
567fb01
fix: chain mismatched currencies (#3163)
zzmp Jan 21, 2022
b501974
feat: polish select (#3160)
zzmp Jan 21, 2022
8ac3ed1
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 21, 2022
6404ee6
fix: default tokens on chainId change only (#3169)
zzmp Jan 21, 2022
8d822fd
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 22, 2022
e9407bb
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 22, 2022
6a4f067
Display message if not mainnet (#3151)
willhennessy Jan 23, 2022
b878d76
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 23, 2022
c9642c6
feat: use TickLens on chains where subgraph is not functional (#3149)
Jan 24, 2022
52128a2
chore: reset local tick data state on input change (#3176)
Jan 24, 2022
5236065
refactor: isolate approval callback hooks (#3172)
zzmp Jan 24, 2022
2b69974
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 24, 2022
7f9c56b
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 24, 2022
bbdb5f3
feat: update slippage tolerance to use auto or custom (#3166)
ianlapham Jan 24, 2022
3153db9
feat: add chainId (network) as url parameter (#3057)
tinaszheng Jan 24, 2022
cee4b8c
fix: disable swap button w/o account (#3177)
zzmp Jan 24, 2022
ffe2bd3
fix: track swap approvals (#3183)
zzmp Jan 25, 2022
ffe334c
feat: update summary view with real values (#3179)
zzmp Jan 25, 2022
8d54b01
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 25, 2022
1f89a46
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 25, 2022
c7633d9
refactor: track txs (#3185)
zzmp Jan 25, 2022
8d145b9
feat: pending approval ui (#3186)
zzmp Jan 26, 2022
9fb0d42
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 26, 2022
98e62b4
Revert "chore(i18n): synchronize translations from crowdin [skip ci]"
zzmp Jan 26, 2022
d1e0812
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 26, 2022
779625a
fix: chain parameter should be able to switch chains on initial load …
tinaszheng Jan 26, 2022
ce96873
feat(widgets): use default input/output (#3161)
JFrankfurt Jan 26, 2022
b50d10c
feat: update swap hooks and add swap txn submission (#3187)
ianlapham Jan 27, 2022
5671700
feat: pending tx state (#3189)
zzmp Jan 27, 2022
47aff6f
feat: max slippage ui (#3190)
zzmp Jan 27, 2022
b0265c0
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 27, 2022
a598a15
feat: Make pending txn status functional (#3193)
ianlapham Jan 27, 2022
06536bc
chore: comment out routing tooltip (#3191)
zzmp Jan 27, 2022
043fb95
chore: no default color extraction (#3192)
zzmp Jan 27, 2022
4a8f1d9
feat(widgets): move uniswap protocol branding from header to bottom o…
JFrankfurt Jan 28, 2022
0d0ad63
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 28, 2022
ed24706
feat: format usd prices, add loading states (#3196)
ianlapham Jan 28, 2022
5bf2b81
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 28, 2022
7aecf5d
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Jan 28, 2022
b6a47c7
fix: support networks other than ethereum mainnet for walletlink/coin…
brendanww Jan 31, 2022
c641cec
update button color (#3205)
ianlapham Jan 31, 2022
7055d60
remove survey (#3206)
ianlapham Jan 31, 2022
ab8c1e3
fix: input/output value/balance styles (#3207)
zzmp Jan 31, 2022
c82b4fa
fix: branded footer nits (#3209)
zzmp Jan 31, 2022
4b762ef
feat: slippage warning ux (#3211)
zzmp Feb 1, 2022
14c91f9
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 2, 2022
1c73719
fix: update walletlink-connector to 6.2.11 (#3213)
brendanww Feb 2, 2022
e5be3eb
chore: put back the integrity hashes that were removed by the walletl…
moodysalem Feb 2, 2022
1b78cee
chore: lockfile update only from the walletlink connector update
moodysalem Feb 2, 2022
fc63707
update deadline signature data (#3215)
ianlapham Feb 2, 2022
800b5e0
fix: fix pricing displays (#3214)
ianlapham Feb 2, 2022
e19e849
feat: ux warnings (#3220)
zzmp Feb 2, 2022
d060782
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 2, 2022
05b2711
feat: update widget with client side SOR (#3210)
ianlapham Feb 2, 2022
7b90fe1
update list component (#3221)
ianlapham Feb 2, 2022
921310e
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 3, 2022
8064dd8
feat(widgets): support convenience fee in trades (#3219)
JFrankfurt Feb 3, 2022
6e22389
fix: slippage and price impact ux (#3222)
zzmp Feb 3, 2022
ee32418
Revert "feat(widgets): support convenience fee in trades (#3219)" (#3…
JFrankfurt Feb 3, 2022
5c0246c
feat: outline tooltips (#3230)
zzmp Feb 3, 2022
efa3d55
fix: only show max where appropriate (#3229)
zzmp Feb 3, 2022
43931dd
feat: chain-specific ttls (#3228)
zzmp Feb 3, 2022
a323a5c
feat(widgets): convenience fee (#3231)
JFrankfurt Feb 3, 2022
1c278d5
fix: close summary after confirmation (#3233)
zzmp Feb 3, 2022
2aa1e40
feat: create use best trade hook for widgets (#3226)
ianlapham Feb 4, 2022
781e774
fix: set dialog wrapper with callback (#3240)
zzmp Feb 5, 2022
610f7d3
fix: named imports (webpack 5 compat) (#3242)
zzmp Feb 7, 2022
96a122d
chore: rename web3-react-alpha (#3243)
zzmp Feb 7, 2022
c595ba9
fix: isolate infura (#3241)
zzmp Feb 7, 2022
bb27b7a
feat: widget loading animations polish (#3232)
ianlapham Feb 7, 2022
55b3782
fix(widgets): white accentText color on some buttons (#3238)
JFrankfurt Feb 7, 2022
2efc1fb
fix(widgets): convert widget colors from hex to hsl (#3239)
JFrankfurt Feb 7, 2022
707abd0
feat(widgets): ensure passed locale is supported (#3245)
JFrankfurt Feb 8, 2022
3b3db6f
fix: update widget loading state detection (#3253)
ianlapham Feb 8, 2022
0ec2dd4
fix(widgets): fix broken unsupported network message (#3256)
JFrankfurt Feb 8, 2022
f95275d
feat(widgets): Localize CurrencyAmounts and Prices (#3247)
JFrankfurt Feb 8, 2022
290f4bc
feat: bundle widgets (#3244)
zzmp Feb 8, 2022
c3d6727
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 8, 2022
5bc21be
update summary details (#3254)
ianlapham Feb 8, 2022
58778b5
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 8, 2022
3acd993
chore: bundling nits (#3258)
zzmp Feb 9, 2022
37f273a
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 9, 2022
b5a72cd
fix(widgets): remove extra } in Trade caption (#3262)
JFrankfurt Feb 9, 2022
440ac0c
feat: track google analytics clientIds (#3264)
tinaszheng Feb 9, 2022
8289670
fix: use greaterThan (#3269)
zzmp Feb 9, 2022
c9c5969
fix: tooltip overflow and cursor (#3271)
zzmp Feb 9, 2022
fad55b8
update sig figs (#3270)
ianlapham Feb 9, 2022
da36e63
fix: update max slippage state (#3268)
zzmp Feb 9, 2022
fd16053
chore: add dts to .gitignore (#3273)
zzmp Feb 9, 2022
6630825
feat: connect wallet ux (#3275)
zzmp Feb 10, 2022
e2c013a
chore: clean up old generated assets (#3276)
zzmp Feb 10, 2022
108feac
fix: enable max swap amount (#3278)
zzmp Feb 10, 2022
c30eb89
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 10, 2022
75ecc58
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 10, 2022
b336868
fix: link footer to uniswap.org (#3283)
zzmp Feb 10, 2022
5175cb6
fix: leave intermediate artifacts in watch (#3272)
zzmp Feb 10, 2022
ff16d3f
fix: theme colors (#3274)
zzmp Feb 10, 2022
69ed701
chore: clean up old generated css (#3277)
zzmp Feb 10, 2022
02a7725
fix: retain sig figs in localized nums (#3280)
zzmp Feb 10, 2022
9cb19dd
fix: filter integrator fee (#3281)
zzmp Feb 10, 2022
1af34ae
feat: EtherscanA component (#3284)
zzmp Feb 10, 2022
88712b5
fix: adjust max button for native currencies (#3279)
ianlapham Feb 10, 2022
c5ea01c
fix(widgets): complete etherscan link and stop timer on tx inclusion …
JFrankfurt Feb 10, 2022
92b7ca8
feat: hide balance on blur (#3285)
zzmp Feb 10, 2022
26275ca
fix(widgets): remove trading header (#3263)
JFrankfurt Feb 10, 2022
b5d27e2
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 10, 2022
f47fcc9
feat: focus input on token select (#3286)
zzmp Feb 10, 2022
b4aac94
fix: settings ux (#3282)
zzmp Feb 10, 2022
8404c60
feat: confirm price impact (#3288)
zzmp Feb 11, 2022
636abe3
fix: respond to updated amounts immediately (#3289)
zzmp Feb 11, 2022
01c467b
fix: max button flashing on tabbing (#3291)
zzmp Feb 11, 2022
acbcd37
style: update type sizes (#3292)
zzmp Feb 11, 2022
5fe89b9
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 11, 2022
a7fb7dc
chore: v0.0.11-beta
zzmp Feb 11, 2022
897e7f4
fix: approval action button (#3297)
zzmp Feb 11, 2022
b042d2b
fix: i18n resolution (#3299)
zzmp Feb 11, 2022
59c5989
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 12, 2022
7de63ab
feat: focus and hover hooks (#3287)
zzmp Feb 14, 2022
41ef961
feat: optimize client side SOR for widgets (#3294)
ianlapham Feb 14, 2022
82c3068
fix: ignore stale SOR fetches (#3313)
zzmp Feb 15, 2022
79bdc0c
fix: summary details heights (#3302)
zzmp Feb 16, 2022
da8884d
fix: action prop warning (#3304)
zzmp Feb 16, 2022
0f51991
feat: improved warning ux (#3310)
zzmp Feb 16, 2022
b152b11
fix: token select input handling (#3303)
zzmp Feb 16, 2022
ae664dc
fix: compute insufficient balance and approval off of input (#3312)
zzmp Feb 16, 2022
a60ea70
fix: token select ux (#3321)
zzmp Feb 16, 2022
4c966ca
feat: accept {provider, signer} as ethers provider (#3314)
zzmp Feb 16, 2022
6a602cf
chore: bump to v0.0.12-beta (#3325)
zzmp Feb 16, 2022
30e3018
fix: use a void signer for ethers providers (#3327)
zzmp Feb 17, 2022
1297aa5
chore: bump to v0.0.13-beta (#3328)
zzmp Feb 17, 2022
8018d1b
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 17, 2022
7a3bb8d
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 17, 2022
0e709c2
fix: import fonts through sass only (#3331)
zzmp Feb 17, 2022
90c59f3
fix: return eip1193bridge chainId as hexa (#3332)
zzmp Feb 17, 2022
48b3efc
chore: bump to v0.0.14-beta (#3333)
zzmp Feb 17, 2022
de5f054
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 17, 2022
369f8c9
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 18, 2022
248bc07
fix: lazily instantiate supported router providers (#3348)
zzmp Feb 23, 2022
a33187c
feat: routing tooltip for widget (#3259)
ianlapham Feb 23, 2022
12bc595
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 23, 2022
8ac3b83
fix: slippage input size (#3350)
zzmp Feb 23, 2022
0d852b6
fix: apply user-select to widget, not to constituents (#3345)
zzmp Feb 23, 2022
4fe35ea
fix: max on WebKit (#3349)
zzmp Feb 23, 2022
dfad7b8
chore: nextjs compatibility (#3351)
zzmp Feb 23, 2022
b2a30b9
fix: style nits (#3352)
zzmp Feb 23, 2022
27cdbd0
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 23, 2022
5b5e765
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 24, 2022
1e16ac8
fix: wrap Eip1193Bridge to fix outstanding bugs (#3355)
zzmp Feb 24, 2022
26a44fb
chore: bump to v0.0.15-beta (#3358)
zzmp Feb 24, 2022
c9faafe
chore(i18n): synchronize translations from crowdin [skip ci]
crowdin-bot Feb 25, 2022
ccdf1e7
fix: convert to commonjs (#3373)
zzmp Feb 28, 2022
83c99b8
chore: remove unused exports and unused integration test build env va…
moodysalem Feb 28, 2022
c25d2b8
fix: update walletlink-connector to 6.2.13 (#3315)
straightupjac Feb 28, 2022
fc34912
feat(swap): default 1 native to usdc on the swap page (#3347)
moodysalem Feb 28, 2022
ad08047
fix: use explicit value in Plural tag (#3363)
zzmp Feb 28, 2022
7900f01
Basic merge done, buch of conflicts resolved
Mar 1, 2022
90e5979
Deleted a bunch of files no longer present on upstream uniswap
Mar 4, 2022
c28034e
New env stuff for locales, not sure it's working...
Mar 4, 2022
05eb5cb
Had to disable these 2 eslint rules otherwise
Mar 4, 2022
9eb497b
Bunch of package updates I don't understand yet
Mar 4, 2022
7b69be3
Original file touches to make them moddable
Mar 4, 2022
aa7a392
Updating application/reducer
Mar 4, 2022
51fb0c5
Removed duplicated switch case
Mar 4, 2022
414056f
Updated useActiveWeb3React imports
Mar 4, 2022
6c186f9
Replaced TYPE with ThemedText
Mar 4, 2022
279130c
Assorted linter fixes
Mar 4, 2022
14dbd8e
Assorted import fixes
Mar 4, 2022
5bde1a7
New hooks/Tokens mod
Mar 4, 2022
e5152a0
New mod constants/chainInfo
Mar 4, 2022
b923ee0
Refactored hooks/useContract mod into own folder
Mar 4, 2022
16a8d10
Assorted refactorings
Mar 4, 2022
facde30
Updated constants/tokens
Mar 4, 2022
91a4faf
Re-adding on mod file state/application/hooks removed from original
Mar 4, 2022
5751a87
Sync'd a looooot of MOD files with originals
Mar 4, 2022
731e504
Reviewed a ton of Mod files
Mar 10, 2022
f535a5b
Fixed bug loading IPFS NFT profile image on original files
Mar 10, 2022
60c992c
Updated CurrencyLogoMod with new hook mod useCurrencyLogoURIsMod
Mar 10, 2022
301ba12
IdenticonMod update not quite working yet for some reason
Mar 10, 2022
c42f092
Adjusting StatusIcon import paths
Mar 10, 2022
f725733
Removing CLA workflow to avoid annoying all the contributors
Mar 10, 2022
a9e1950
Anoter round of mods updates. Hopefuly the last one
Mar 10, 2022
7d3d65a
Removed a couple of packages that were not in use anywhere:
Mar 11, 2022
f2d0c3e
Reorganizing imports (just to make my life harder in the future...)
Mar 11, 2022
200a692
Modding FailedNetworkSwitchPopup notification
Mar 11, 2022
108af03
Merging all new scripts from uniswap/main
Mar 11, 2022
fffc31c
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 11, 2022
e0e11e9
Disabling rule-of-hooks because I don't know why it's complaning
Mar 11, 2022
eeec0b8
Fix code style issues with Prettier
lint-action Mar 11, 2022
fbacd62
Guess these typings are no longer needed?
Mar 12, 2022
5c6543f
Fixing unit tests (and disabling some snapshot tests)
Mar 12, 2022
86cef40
Polyfill seems to be needed for some unit tests...
Mar 12, 2022
74cea22
Lingui packages were not in the same version
Mar 14, 2022
5c71889
Added dependency on eslint-plugin-cypress
Mar 14, 2022
1a1c978
Removed direct dependency on eslint as it comes from craco>react-scripts
Mar 14, 2022
725b998
Re-creating yarn.lock
Mar 14, 2022
53fb908
Need to exclude hardhat generated files
Mar 15, 2022
ebe4b63
Fixed cypress reference comment?
Mar 15, 2022
bad2bdf
Using chain specific USDC on start
Mar 15, 2022
9a7e473
Updating, adding and fixing integration tests
Mar 15, 2022
24504df
Syncing local uniswap copy of lint.yml workflow
Mar 16, 2022
24dd3b8
Applying same ESlint rules as uniswap
Mar 16, 2022
151e7da
Ignore linting original uniswap paths
Mar 16, 2022
2083af6
Actually fix cypress missing stuff on eslint
Mar 16, 2022
a868eaa
Updating eslint disable comment to fix warning
Mar 16, 2022
0322a36
Fix tests wrong import
Mar 16, 2022
78e084e
Making eslint command args extra explict. Maybe not needed, will try …
Mar 16, 2022
b9fbd92
Removed unecessary i18n mod and updated lingui.config mod
Mar 16, 2022
fb2e468
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 16, 2022
78c793f
Disabling warning regarding console reassign
Mar 16, 2022
ec405c0
Fix Native token address on activity details
Mar 16, 2022
d42ce84
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 17, 2022
2916b2e
Fixed bug (introduced during this merge) with network label on claim …
Mar 17, 2022
052ece2
Updated useChangeNetworks hook with inner contents of NetworkSelector…
Mar 17, 2022
b671874
Networks menu now opening on hover
Mar 18, 2022
3d33f77
Removed unreacheable component from SwapMod and respective Mod
Mar 18, 2022
7d74d64
Simplified one hook import on SwapMod
Mar 18, 2022
dcb5f3e
Synced connectors mod files
Mar 18, 2022
0fc1af9
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 21, 2022
7bb3f74
Sync'd latest switchToNetwork with Uniswap
Mar 21, 2022
d2c7ded
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 22, 2022
573e360
Updating package lock
Mar 24, 2022
625df57
Merge remote-tracking branch 'origin/develop' into 2440/uni-merge
Mar 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ REACT_APP_PATH_REGEX_ENS="/ipfs"

# Enables mock mode (default = true)
REACT_APP_MOCK=true

# Locales
REACT_APP_LOCALES="locales"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already concerning, why is .env no longer ignored?

3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ REACT_APP_PATH_REGEX_ENS="/ipfs"

# Enables mock mode (default = false)
REACT_APP_MOCK=false

# Locales
REACT_APP_LOCALES="locales"
35 changes: 30 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,50 @@
"jsx": true
}
},
"ignorePatterns": ["node_modules/**/*", ".github/*", "src/components/RateToggle/index.tsx"],
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"src/lib/",
"__fixtures__",
".github/*",
"src/components/RateToggle/index.tsx",
"src/types/v3",
"src/abis/types",
"src/locales/**/*.js",
"src/locales/**/en-US.po",
"src/state/data/generated.ts",
"node_modules",
"coverage",
"build",
"dist",
".DS_Store",
".env.local",
".env.development.local",
".env.test.local",
".env.production.local",
".idea/",
".vscode/",
"package-lock.json",
"yarn.lock"
],
"extends": [
"react-app",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier/@typescript-eslint",
"plugin:cypress/recommended",
"plugin:prettier/recommended",
"plugin:jsx-a11y/recommended"
],
"plugins": ["simple-import-sort", "unused-imports"],
"rules": {
"unused-imports/no-unused-imports": "error",
// "simple-import-sort/imports": "error",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they removed this or we did? tbh i always liked this rule but it can get noisy

// "simple-import-sort/exports": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "off",
Expand All @@ -35,10 +64,6 @@
"error",
{
"paths": [
{
"name": "lodash",
"message": "Please import from 'lodash/module' directly to support tree-shaking."
},
{
"name": "ethers",
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
Expand Down
7 changes: 3 additions & 4 deletions .github/uniswap-original/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
integration-tests:
name: Cypress
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -38,15 +38,14 @@ jobs:
run: yarn install --frozen-lockfile

- run: yarn cypress install

- run: yarn build
env:
CI: false
REACT_APP_NETWORK_URL: "https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_NETWORK_URL: 'https://mainnet.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847'
REACT_APP_SERVICE_WORKER: false

- run: yarn integration-test
env:
CYPRESS_INTEGRATION_TEST_PRIVATE_KEY: ${{ secrets.CYPRESS_INTEGRATION_TEST_PRIVATE_KEY }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}


19 changes: 11 additions & 8 deletions .github/uniswap-original/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name: Lint
on:
push:
branches:
- master
pull_request_target:
- main
pull_request:
branches:
- master
- main

jobs:
run-linters:
name: Run linters
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
runs-on: ubuntu-latest

steps:
Expand All @@ -35,14 +34,18 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run linters
uses: wearerequired/lint-action@b98b0918aa71490373d2eca9e8e39a9bc1cc2517
- name: Run eslint w/ autofix
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }}
uses: wearerequired/lint-action@36c7e6689e80d785d27a22f71d970f3a3b4fcb70
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_extensions: js,jsx,ts,tsx,json
eslint_args: "-c .eslintrc.json"
auto_fix: true

- name: Run eslint
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
run: yarn eslint .
40 changes: 40 additions & 0 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Widgets
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn widgets:build
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,15 @@ jobs:
- name: Run linters
uses: wearerequired/lint-action@v1
with:
eslint: true
prettier: true
github_token: ${{ secrets.github_token }}
eslint: true
eslint_args: "-c .eslintrc.json ."
auto_fix: ${{ github.event_name == 'pull_request' }}
prettier: true

- name: Run eslint
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != github.repository_owner }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird rule, don't run eslint if the owner is opening a PR?

run: yarn eslint .

build:
name: Build apps
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/cla.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
# generated contract types
/src/types/v3
/src/abis/types
/src/lib/locales/**/*.js
/src/lib/locales/**/en-US.po
/src/lib/locales/**/pseudo.po
/src/locales/**/*.js
/src/locales/**/*.ts
/src/locales/**/*.json
/src/locales/**/en-US.po
/src/locales/**/pseudo.po
/src/state/data/generated.ts

# dependencies
Expand All @@ -15,11 +19,10 @@
# testing
/coverage

# production
# builds
/build

# bundle
/dist
/dts

# misc
.DS_Store
Expand Down
7 changes: 4 additions & 3 deletions cosmos.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"staticPath": "public",
"watchDirs": ["src"],
"webpack": {
"configPath": "./cosmos.webpack.config"
}
"configPath": "react-scripts/config/webpack.config",
"overridePath": "cosmos.override.js"
},
"port": 5001
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so cosmos stuff willa lso be run on yarn start? seems bulkier. but ill give it a go later. just a note

}
26 changes: 26 additions & 0 deletions cosmos.override.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { DefinePlugin } = require('webpack')

// Renders the cosmos fixtures in isolation, instead of using public/index.html.
module.exports = (webpackConfig) => ({
...webpackConfig,
plugins: webpackConfig.plugins.map((plugin) => {
if (plugin instanceof HtmlWebpackPlugin) {
return new HtmlWebpackPlugin({
templateContent: '<body></body>',
})
}
if (plugin instanceof DefinePlugin) {
return new DefinePlugin({
...plugin.definitions,
'process.env': {
...plugin.definitions['process.env'],
REACT_APP_IS_WIDGET: true,
REACT_APP_LOCALES: '"../locales"',
},
})
}
return plugin
}),
})
30 changes: 21 additions & 9 deletions cypress-custom/integration/swapMod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,47 @@ describe('Swap (mod)', () => {
beforeEach(() => {
cy.visit('/swap')
})

it('starts with an Native/USDC swap and quotes it', () => {
cy.get('#swap-currency-input .token-amount-input').should('have.value', '1')
cy.get('#swap-currency-input .token-symbol-container').should('contain.text', 'WETH')
cy.get('#swap-currency-output .token-amount-input').should('not.have.value', '')
cy.get('#swap-currency-output .token-symbol-container').should('contain.text', 'USDC')
})

it('can enter an amount into input', () => {
cy.get('#swap-currency-input .token-amount-input')
.clear()
.type('0.001', { delay: 400, force: true })
.should('have.value', '0.001')
})

it('zero swap amount', () => {
cy.get('#swap-currency-input .token-amount-input')
.clear()
.type('0.0', { delay: 400, force: true })
.should('have.value', '0.0')
})

it('invalid swap amount', () => {
cy.get('#swap-currency-input .token-amount-input').type('\\', { delay: 400, force: true }).should('have.value', '')
cy.get('#swap-currency-input .token-amount-input')
.clear()
.type('\\', { delay: 400, force: true })
.should('have.value', '')
})

it.skip('can enter an amount into output', () => {
it('can enter an amount into output', () => {
cy.get('#swap-currency-output .token-amount-input')
.clear()
.type('0.001', { delay: 400, force: true })
.should('have.value', '0.001')
})

it('zero output amount', () => {
cy.get('#swap-currency-output .token-amount-input')
.type('0.0', { delay: 400, force: true })
.should('have.value', '0.0')
cy.get('#swap-currency-output .token-amount-input').clear().type('0.0', { delay: 400 }).should('have.value', '0.0')
})

it.skip('can swap ETH for DAI', () => {
it('can swap Native for DAI', () => {
cy.get('#swap-currency-output .open-currency-select-button').click()
cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').should('be.visible')
cy.get('.token-item-0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735').click({ force: true })
Expand All @@ -55,16 +67,16 @@ describe('Swap (mod)', () => {
cy.get('#confirm-expert-mode').click()
})

it.skip('add a recipient is visible', () => {
it('add a recipient is visible', () => {
cy.get('#add-recipient-button').should('be.visible')
})

it.skip('add a recipient', () => {
it('add a recipient', () => {
cy.get('#add-recipient-button').click()
cy.get('#recipient').should('exist')
})

it.skip('remove recipient', () => {
it('remove recipient', () => {
cy.get('#add-recipient-button').click()
cy.get('#remove-recipient-button').click()
cy.get('#recipient').should('not.exist')
Expand Down
2 changes: 1 addition & 1 deletion cypress-custom/support/commands.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="cypress" />
/// <reference types="Cypress" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? 🤔


declare namespace Cypress {
interface Chainable<Subject> {
Expand Down
Loading