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

2440/uni merge #374

Merged
merged 388 commits into from
Apr 14, 2022
Merged

2440/uni merge #374

merged 388 commits into from
Apr 14, 2022

Conversation

W3stside
Copy link
Contributor

@W3stside W3stside commented Apr 5, 2022

Summary

(recreating from gnosis/cowswap#2529)

Closes gnosis/cowswap#2440

Merge with latest from original UNI code

PR deployment URL https://pr2536--gpswapui.review.gnosisdev.com/

TO DOs

List of things that I know we should look at. There might be more...

  • Network switcher: On hover effect
  • Network switcher: No longer disabled for unsupported wallets
  • connectors file might need to be updated
  • useCurrency file might need to be updated
  • AdvancedSwapDropdow file has been removed from original but we still have the mod
  • UrlWarning file has been removed from original but we still have the mod -- we do want to keep it. Older merge
  • Native currency on activity details has no icon because it's not tagged as native currency (eeee... address)
  • Probably will need to fix integration tests...
  • Locale/plurals are all screwed
  • There's a component unreacheable on SwapMod
  • Need to re-do useChangeNetworks based on changes from NetworkSelectorMod
  • WETH/wxDAI -> USDC pair is pre-selected, but:
    • Price for USDC is not loaded
    • USDC is not selected on gchain
  • ESlist on CI
  • Loading balances via Wallet Connect is broken for some mobile wallets (MM, imToken, Token Pocket, Pillar, Argent). Worked flawlessly with Coinbase mobile wallet though
  • Identicon looking weird, need to be revisited - incoming [Uni Merge] Style fixes pt. 1 #380
  • Network switcher: Styles - incoming [Uni Merge] Style fixes pt. 1 #380
  • Widget command not starting - probably need to adjust the paths in the /lib/ files
  • Added app Suspense Loader from Uni. We might want to customize it
  • ErrorBoundary WIDGET and minor HTML changes we may want to apply
  • ListUpdatePopup file has been removed from original but we still have the mod
  • Need to understand and fix whatever rules-of-hooks is broken on SwapMod. Temporarily disabled the rule
  • Wallet connect wallet images no longer shown

To Test

TEST EVERYTHING!!

JFrankfurt and others added 30 commits January 12, 2022 14:24
* feat: mv block number to atom

* fix: add block updater

* fix: fast forward dep
* feat: mv block number to atom

* fix: add block updater

* fix: fast forward dep

* refactor: mv multicall to lib

* feat: add multicall to widget

* chore: update widget deps

* nit: pluralize updaters

* chore: minimize deps
* refactor: mv token list utils to lib

* refactor: mv balance hooks to lib

* feat: interactive token select
* refactor: mv gas estimate chains out of component

* chore: replace microbundle with rollup

* chore: use ts rollup config

* chore: rename lib to widgets

* chore: add rollup doc comment

* feat: rollup typings

* fix: retain tsconfig decl dir
* add survey popup for survey monkey

* update useEffect and add 24 hour window

* upate % logic

* update logic to show after duration

* update timestamp conditional

* small changes
* refactor: mv useNativeCurrency to lib/hooks

* refactor: mv useCurrency logic to lib/hooks
* fix: token image for chains / natives

* feat: include native currency in select

- Updates widgets swap state to use Currency (and deals with downstream updates)
- Refactors logoURI code to a new lib/hooks/useCurrencyLogoURIs
- Adds native currency to useQueryTokenList

NB: This does not build because tests must be updated to use Currency (they currently use mock tokens)

* test: update fixtures to use real currency

* fix: data uri color extraction

* fix: token img state

* fix: use new array
* fix: memoize derived swap info

* fix: memoize current block timestamp

* fix: memoize price impact

* fix: memoize debounced value updates

* fix: nits
… and Missing provider error (#3110)

* add error reporting component, INTEGRATION ERROR type, and Missing provider error

* rename reporter to generator

* pr feedback

* refactor provider check

* add chainId, convenienceFee, and width errors

* pr feedback and convenienceFeeRecipient address enforcement

* fix imports for utils
* refactor: mv settings state to own file

* chore: add default exports

* refactor: update swap state to match biz logic

* feat: copy biz logic to widgets

* Hook up UI to updated swap state

* fix: decimal inputs

* fix max slippage

* fix error in settings

* fix: typing errors

* revert: useBestTrade changes

* fix: use client side trade for widgets

* fix: exhaustive deps

* chore: add router-sdk

* fix: gate old web3 on widget env

* fix building errors

* update trade imports

* update hook naming for swap amount and currencies

* small changes

Co-authored-by: Zach Pomerantz <[email protected]>
* feat: filter selected currency from select

* test: use infura urls

* fix: load native with chain

* fix: use currencyId for key

* feat: switch currencies when selecting other

* fix: resolve merge conflict name
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2022

CLA Assistant Lite:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


0 out of 9 committers have signed the CLA.
@JFrankfurt
@zzmp
@crowdin-bot
@ianlapham
@willhennessy
@justindomingue
@tinaszheng
@brendanww
@moodysalem
You can retrigger the CLA Action by commenting recheckcla in this Pull Request

@W3stside
Copy link
Contributor Author

W3stside commented Apr 5, 2022

ah fucks sake. sorry uni team

@W3stside W3stside requested review from anxolin, nenadV91 and a team April 6, 2022 13:10
@W3stside
Copy link
Contributor Author

W3stside commented Apr 6, 2022

APPROVED

(i manually opened this so cant self review)

@elena-zh
Copy link

elena-zh commented Apr 6, 2022

Issued related to the current PR:
#339
#340
#341
#342
#350
#351
#352

@github-actions
Copy link
Contributor

  • 🔭 GP Swap: CoW Protocol v2 Swap UI

@elena-zh
Copy link

When I press on the 'Buy COW' button, I see that 'Select token' in the From field is missing:
image
image

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

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

Self five!

@W3stside W3stside merged commit 747a97b into develop Apr 14, 2022
@W3stside W3stside deleted the 2440/uni-merge branch April 14, 2022 14:57
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge Uniswap