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

chore(release): release/1.47.0 #3104

Merged
merged 27 commits into from
Sep 8, 2023
Merged

chore(release): release/1.47.0 #3104

merged 27 commits into from
Sep 8, 2023

Conversation

alfetopito
Copy link
Collaborator

@alfetopito alfetopito commented Sep 4, 2023

Summary

Release 1.47.0

Big changes

Small changes

Bug fixes

Technical debt

Test plan

✨ NEW FEATURE ✨

  • Load sell and buy token USD values (SWAP/LIMIT/TWAP) * (Mainnet/Gchain/Goerli)
  • Load price impact (SWAP/LIMIT/TWAP) * (Mainnet/Gchain/Goerli)

Regular flow testing

Smart contract wallet (Safe):

  • Just swap
  • Approve + swap
  • Wrap + approve + swap (eth-flow)
  • Wrap/unwrap
  • EthFlow swap
  • EthFlow cancellation
  • Order placement and fill (Limit/Twap)
  • Hard cancel order (Swap/Limit/Twap)

EOA wallet (Metamask):

  • Just swap
  • Approve + swap
  • Wrap + approve + swap (eth-flow)
  • Wrap/unwrap
  • EthFlow swap
  • EthFlow cancellation
  • Order placement and fill (Limit/Twap)
  • Hard cancel order (Swap/Limit/Twap)
  • Soft cancel order (Swap/Limit/Twap)

WalletConnect v1:

  • Wrap/unwrap on SWAP
  • Wrap/unwrap on LIMIT
  • Wrap/unwrap on TWAP
  • Just swap
  • Approve + swap
  • Wrap + approve + swap (eth-flow)
  • EthFlow cancellation
  • Order placement and fill (LIMIT)
  • Hard cancel order (SWAP/LIMIT)
  • Soft cancel order (SWAP/LIMIT)

WalletConnect v2:

  • Wrap/unwrap on SWAP
  • Wrap/unwrap on LIMIT
  • Wrap/unwrap on TWAP
  • Just swap
  • Approve + swap
  • Wrap + approve + swap (eth-flow)
  • EthFlow cancellation
  • Order placement and fill (LIMIT)
  • Hard cancel order (SWAP/LIMIT)
  • Soft cancel order (SWAP/LIMIT)

Account page:

  • add token to Metamask
  • approve token
  • COW balance displaying
  • token search by name/address
  • add token to Metamask
  • favorite token add/remove

Common (WalletConnect/Metamask):

  • network switching
  • network persisting between modules
  • wallet disconnect
  • change wallet
  • balances loading
  • appzi
  • all FAQ pages open

shoom3301 and others added 16 commits August 30, 2023 14:00
* fix: update only current account pending orders

* fix: don't update spot prices when window is not active
* chore: update appData module exports to fix the build warning

Export AppDataUpdater of module apps/cowswap-frontend/src/modules/appData/updater/AppDataInfoUpdater.tsx was reexported through module apps/cowswap-frontend/src/modules/appData/index.ts while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.

* chore: fix useShouldZeroApprove export build warning

* chore: fix build warning with multiple exports of useApproveCallback

* chore: use absolute imports

Co-authored-by: Alexandr Kazachenko <[email protected]>

---------

Co-authored-by: Alexandr Kazachenko <[email protected]>
)

* refactor: remove usd amount calc based ony CowSwap quote

* refactor: move useHigherUSDValue hook to fiatAmount module

* refactor: calculate priceImpact only basing on Coingecko

* chore: fix import

* chore: rename

* chore: remove error field from price impact

* chore: fix build

* chore: fix build
* refactor: remove usd amount calc based ony CowSwap quote

* refactor: move useHigherUSDValue hook to fiatAmount module

* refactor: calculate priceImpact only basing on Coingecko

* refactor: request fiat amounts only when trade is ready

* refactor: deprecate parsePrice

* feat: use native price api for fiat amounts

* feat: module for fiat prices

* chore: remove unused file

* chore: simplify code

* docs: fiat price module diagram

* chore: fix import

* chore: rename

* chore: remove error field from price impact

* chore: fix build

* chore: fix build

* fix: display price impact unknown warning only when fiat amounts are unknown

* chore: rename var

* chore: rename const

* chore: clean up env files

* chore: clean up code

* chore: refactor fetchCurrencyFiatPrice

* fix: fix UnknownImpactWarning displaying conditions

* chore: fix naming

* fix: request USDC native price on demand

* fix: fix calc

* fix: fix errors catching in fetchCurrencyFiatPrice

* chore: additional check for zero

* chore: fix comment

* chore: refactor useFiatValuePriceImpact

* chore: rename getCoingeckoFiatPrice

* chore: rename usdc -> usd

* chore: simplify useUsdPrice

* chore: rename fiat -> usd

* chore: rename fiat -> usd globally

* chore: simplify useTradeUsdAmounts

* chore: coingecko fetch rate limitter and backOff

* chore: fix imports
* feat: generate the analyze bundle for vite

* chore: add command analyze-bundle to root package.json

---------

Co-authored-by: Alfetopito <[email protected]>
* fix(trade): clean form amounts after wrap/unwrap

* chore: fix test
)

* chore: manually split large libs into their own chunks

* chore: remove sentry vite plugin

It was meant for source maps, but when it's turned on Vercel builds always fail

* chore: include elliptic into @MetaMask chunk

* chore: add viem to @safe-global chunk
@vercel
Copy link

vercel bot commented Sep 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
swap-dev ✅ Ready (Inspect) Visit Preview Sep 8, 2023 2:26pm

🌃 Cosmos ↗︎

@alfetopito alfetopito self-assigned this Sep 4, 2023
@alfetopito alfetopito added the RELEASE Included in the release that is being closed label Sep 4, 2023
@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
rollup-plugin-visualizer 5.9.2 filesystem +0 537 kB btd

@anxolin
Copy link
Contributor

anxolin commented Sep 4, 2023

I can do "WalletConnect v2" tests

@alfetopito
Copy link
Collaborator Author

I'll start with new feature tests.
Would be good to someone test it too for sanity.

@alfetopito
Copy link
Collaborator Author

I'll start with new feature tests. Would be good to someone test it too for sanity.

| PROD | BARN | This PR |

Goerli

In this img we can see the amount of requests to the quote endpoint

Screenshot 2023-09-04 at 14 15 48

Gnosis Chain

The highest deviation happened on Gnosis chain.
I assume this is due to shallow pools, as sometimes we either got a no liquidity response from the backend or high % differences.

Different pairs/amount have a more uniform amount across the versions.

Screenshot 2023-09-04 at 14 12 08
Screenshot 2023-09-04 at 14 10 29
Screenshot 2023-09-04 at 14 09 50
Screenshot 2023-09-04 at 14 08 55
Screenshot 2023-09-04 at 14 23 33

Mainnet

Little deviation, mostly good

Screenshot 2023-09-04 at 14 25 10

When getting throttled by coingecko, only the new PR is able to present an estimation.
The other versions hanged estimating it

Screenshot 2023-09-04 at 14 27 12

When no longer throttled, we can see the values are slightly different

Screenshot 2023-09-04 at 14 28 10

@alfetopito
Copy link
Collaborator Author

I'll start now Smart contract wallet (Safe) on gnosis chain

@alfetopito
Copy link
Collaborator Author

I found a few issues with Safe app on Gnosis chain #3105

Moving on to EOA wallet (Metamask)

@alfetopito
Copy link
Collaborator Author

Done with EOA wallet (Metamask)

Nothing new to report.

Will start with Account page

@alfetopito
Copy link
Collaborator Author

Done with Account page

Found one app crashing issue. Reported on Major section #3105

@alfetopito
Copy link
Collaborator Author

Will now test Common (WalletConnect/Metamask)

@alfetopito
Copy link
Collaborator Author

Done with Common (WalletConnect/Metamask) with some issues, reported on #3105

Nothing major.

Will now test WalletConnect v1

@alfetopito
Copy link
Collaborator Author

Done testing, nothing new

* chore: remove duplicated file

* chore: work with strings for the price to avoid JS number finicky-ness

* chore: do not try to calculate prices when it's < 1 USDC atom

* chore: only number without integer part are too small

* test: fix unit tests

* feat: add new static fromNumber to FractionUtils

* feat: create CurrencyAmounts from Fraction instances

* chore: use Fraction rather than string or number to store prices

* chore: it can be equal to 1 usdc atom

* test: fix unit tests
* chore: allow enough balance check to return unknown state

* chore: allow undefined in the getPriceQuality fn

* chore: refactor repetitive code

* chore: add nit to simplify expresssion

Co-authored-by: Leandro <[email protected]>

* chore: move logic to private function

* chore: don't allow to check quotes with same sellToken and buyToken

* chore: add private function

* fix: add mapping for error in the buttons map

---------

Co-authored-by: Leandro <[email protected]>
anxolin and others added 2 commits September 7, 2023 05:21
* chore: uipdate query time to 30s

* chore: do not clear intervals because of a change in the update function

* fix: make sure we invoke the latest update function

* chore: reduce the times the update function is recreated

* Remove ref from dependencies

Co-authored-by: Leandro <[email protected]>

* chore: remove unecesary log

---------

Co-authored-by: Leandro <[email protected]>
@alfetopito alfetopito merged commit 375cac7 into main Sep 8, 2023
@alfetopito alfetopito deleted the release/1.47.0 branch September 8, 2023 14:42
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
RELEASE Included in the release that is being closed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants