Skip to content

Conversation

@cowdan
Copy link
Contributor

@cowdan cowdan commented Jul 3, 2025

Summary by CodeRabbit

  • New Features

    • Added a collapsible banner for proxy account information and display of account proxy in the bridge module.
    • Introduced Morpho Lending hook and support for eip155 chain names in wallet integration.
    • Displayed bridging data on the order page and updated the FAQs list of supported networks.
    • Enhanced token details and /tokens page.
  • Bug Fixes

    • Improved quote update logic and priority balance updates in trade.
    • Fixed refund transaction detection, quote updates after confirmation, and progress bar behavior.
    • Addressed gas estimation for hooks and limit price handling in explorer.
    • Restricted bridging to Swap context only.
    • Fixed input amount validation for buy orders.
  • Chores

    • Updated multiple package versions and dependencies across applications and libraries.

shoom3301 and others added 5 commits July 2, 2025 20:59
* fix(quote): update quote when expired

* fix(quote): update quote when expired

* fix(quote): stop polling when trade is not ready

* fix: do not update quote when wallet is not connected
* feat: use `eip155` chain names adding chain parameter to walllet

* fix: missing property
@vercel
Copy link

vercel bot commented Jul 3, 2025

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

Name Status Preview Updated (UTC)
cowfi ✅ Ready (Inspect) Visit Preview Jul 4, 2025 0:49am
explorer-dev ✅ Ready (Inspect) Visit Preview Jul 4, 2025 0:49am
swap-dev ✅ Ready (Inspect) Visit Preview Jul 4, 2025 0:49am
3 Skipped Deployments
Name Status Preview Updated (UTC)
cosmos ⬜️ Ignored (Inspect) Visit Preview Jul 4, 2025 0:49am
sdk-tools ⬜️ Ignored (Inspect) Visit Preview Jul 4, 2025 0:49am
widget-configurator ⬜️ Ignored (Inspect) Visit Preview Jul 4, 2025 0:49am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 3, 2025

"""

Walkthrough

This update implements version bumps across multiple applications and libraries, introduces and propagates the eip155Label property for chain information, and refines trade quote polling logic by adding a useIsQuoteUpdatePossible hook. It also updates wallet chain switching to use eip155Label, enhances validation handling, and adds or amends changelog entries throughout the codebase.

Changes

File(s) Change Summary
.release-please-manifest.json Incremented versions for multiple apps and libraries.
apps/cow-fi/CHANGELOG.md, apps/cow-fi/package.json Added changelog entry and bumped version to 1.24.0.
apps/cowswap-frontend/CHANGELOG.md, apps/cowswap-frontend/package.json Added changelog entry and bumped version to 1.111.1.
apps/cowswap-frontend/src/modules/tokensList/utils/mapChainInfo.ts Added eip155Label to returned chain info object.
apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx Used new useIsQuoteUpdatePossible hook to control rendering of quote polling progress.
apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetUpdaters.tsx Integrated useIsQuoteUpdatePossible and updated logic for quote updater component.
apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts Introduced new hook to determine if quote update is allowed.
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidation.ts Refactored to use new validations hook; removed debounce logic.
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts Added new hook to retrieve and debounce trade form validations.
apps/cowswap-frontend/src/modules/tradeFormValidation/index.ts Exported new validations hook.
apps/cowswap-frontend/src/modules/tradeFormValidation/services/validateTradeForm.ts Refactored to return all validation errors as an array instead of short-circuiting.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/usePollQuoteCallback.ts Updated hook signature to accept isQuoteUpdatePossible and use it in early exit.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteManager.ts Minor formatting update to function signature.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.test.tsx Updated tests to pass new boolean parameter to polling hook.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts Added isQuoteUpdatePossible parameter, switched to useLayoutEffect, and added quote expiration check.
apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx Added isQuoteUpdatePossible prop and passed it to polling hook.
apps/cowswap-frontend/src/modules/tradeQuote/utils/quoteDeadline.ts Early return for PriceQuality.FAST in quote expiration logic.
apps/explorer/CHANGELOG.md, apps/explorer/package.json Added changelog entry and bumped version to 2.48.2.
libs/balances-and-allowances/CHANGELOG.md, libs/balances-and-allowances/package.json Added changelog entry and bumped version to 1.5.0.
libs/common-const/CHANGELOG.md, libs/common-const/package.json Added changelog entry and bumped version to 1.21.0.
libs/common-const/src/chainInfo.ts Added eip155Label to BaseChainInfo and mapping function.
libs/common-hooks/CHANGELOG.md, libs/common-hooks/package.json Added changelog entry and bumped version to 1.9.1.
libs/common-utils/CHANGELOG.md, libs/common-utils/package.json Added changelog entry and bumped version to 1.17.1.
libs/core/CHANGELOG.md, libs/core/package.json Added changelog entry and bumped version to 1.7.4.
libs/hook-dapp-lib/CHANGELOG.md, libs/hook-dapp-lib/package.json Added changelog entry and bumped version to 1.8.0.
libs/multicall/CHANGELOG.md, libs/multicall/package.json Added changelog entry and bumped version to 1.2.0.
libs/tokens/CHANGELOG.md, libs/tokens/package.json Added changelog entry and bumped version to 1.22.0.
libs/types/CHANGELOG.md, libs/types/package.json Added changelog entry and bumped version to 1.8.0.
libs/ui/CHANGELOG.md, libs/ui/package.json Added changelog entry and bumped version to 1.25.0.
libs/wallet/CHANGELOG.md, libs/wallet/package.json Added changelog entry and bumped version to 1.13.0.
libs/wallet/src/web3-react/utils/switchChain.ts Updated to use eip155Label for chain name and dynamic RPC URLs from chain objects.
package.json Bumped @cowprotocol/cow-sdk dependency version.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TradeWidgetForm
    participant useIsQuoteUpdatePossible
    participant TradeQuoteUpdater
    participant useTradeQuotePolling

    User->>TradeWidgetForm: Interacts with trade form
    TradeWidgetForm->>useIsQuoteUpdatePossible: Check if quote update is possible
    useIsQuoteUpdatePossible-->>TradeWidgetForm: Return boolean flag
    TradeWidgetForm->>TradeQuoteUpdater: Render with isQuoteUpdatePossible
    TradeQuoteUpdater->>useTradeQuotePolling: Poll quote if allowed
    useTradeQuotePolling-->>TradeQuoteUpdater: Handle polling, expiration, etc.
Loading
sequenceDiagram
    participant Wallet
    participant switchChain
    participant chainInfo
    participant eip155Label

    Wallet->>switchChain: Request chain switch
    switchChain->>chainInfo: Retrieve chain info
    chainInfo-->>switchChain: Provide eip155Label and RPC URLs
    switchChain->>Wallet: Use eip155Label as chainName, set up RPC
Loading

Possibly related PRs

  • #5916: Adds and propagates the eip155Label property in chain info and updates wallet chain switching logic, directly related to these changes.
  • #5914: Introduces and utilizes the useIsQuoteUpdatePossible hook and modifies trade quote polling and updater logic, matching this PR's approach.
  • #5787: Enhances the explorer app's order details page to display bridging data, which is also addressed in this update.

Suggested labels

RELEASE

Suggested reviewers

  • alfetopito
  • elena-zh

Poem

A hop, a skip, a version jump—
Chains now labeled, wallets pump!
Quotes update when they’re able,
With validations on the table.
Changelogs bloom, dependencies grow,
The rabbit’s code is set to go!
🐇✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 34391c2 and 5ecf1b1.

📒 Files selected for processing (3)
  • .release-please-manifest.json (1 hunks)
  • apps/cowswap-frontend/CHANGELOG.md (1 hunks)
  • apps/cowswap-frontend/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/cowswap-frontend/package.json
  • apps/cowswap-frontend/CHANGELOG.md
  • .release-please-manifest.json
⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: Vercel pre-prod (staging) / build_and_deploy
  • GitHub Check: Vercel pre-prod (barn) / build_and_deploy
  • GitHub Check: IPFS
  • GitHub Check: Setup
  • GitHub Check: Cypress

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@socket-security
Copy link

socket-security bot commented Jul 3, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​cowprotocol/​cow-sdk@​6.0.0-RC.69 ⏵ 6.0.0-RC.7082 -1810098 -299 -1100

View full report

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (9)
libs/ui/package.json (1)

3-3: UI package version update ok

The shift to 1.25.0 aligns with the new UI features. Confirm that the related STORYBOOK / docs site reflects the new banner & proxy components under this version.

libs/core/package.json (1)

3-3: Core bumped to 1.7.4

Given this is a bug-fix release, consider labelling it 1.7.4 in the root changelog summary so consumers quickly spot the fix. Otherwise, all good.

libs/tokens/CHANGELOG.md (1)

3-9: Minor wording nitpick

Consider re-phrasing the feature line for consistency with previous entries (they usually start with a verb):

-* **bridge:** display account proxy
+* **bridge:** Display account proxy

Capitalising the verb keeps style uniform across the document.

libs/multicall/CHANGELOG.md (1)

3-9: Consistent feature description

Same stylistic nitpick as in libs/tokens – capitalise the first verb for consistency.

-* **bridge:** display account proxy
+* **bridge:** Display account proxy
apps/cowswap-frontend/src/modules/tradeFormValidation/index.ts (1)

3-3: Barrel export may unintentionally shadow the singular hook

Exporting both useGetTradeFormValidation and useGetTradeFormValidations from the same barrel is fine, but the almost-identical names can easily be confused in imports and auto-completion.
Consider renaming one of them (e.g. useGetFirstTradeFormValidation) or adding JSDoc in the individual files clarifying the distinction to avoid future mix-ups.

apps/cow-fi/CHANGELOG.md (1)

3-12: Minor nit: truncated commit subject

The first bullet point cuts off with “swap w…”. If the commit message was truncated by mistake, expand it so the changelog remains self-contained.

apps/cowswap-frontend/src/modules/tokensList/utils/mapChainInfo.ts (1)

12-13: Hard-coding only Sepolia as testnet

isTestnet is true solely for SEPOLIA, overlooking other testnets you already support (e.g. Goerli, Holesky).
If intentional, add a comment; otherwise consider a helper like isTestChain(chainId).

apps/cowswap-frontend/CHANGELOG.md (2)

10-11: Fix typos & align bullet-style with the rest of the file

  • wallletwallet
  • Prepend the usual scope prefix (**wallet:**) for consistency.
-* use `eip155` chain names adding chain parameter to walllet ([#5916](https://github.com/cowprotocol/cowswap/issues/5916)) ([318c1bc](https://github.com/cowprotocol/cowswap/commit/318c1bcbb7528fdd3abf233068cebfff371dbea9))
+* **wallet:** use `eip155` chain names, adding chain parameter to wallet ([#5916](https://github.com/cowprotocol/cowswap/issues/5916)) ([318c1bc](https://github.com/cowprotocol/cowswap/commit/318c1bcbb7528fdd3abf233068cebfff371dbea9))

16-17: Minor typo: “udpate” → “update”

-* **limit-orders:** udpate quote when back from confirm ([#5922](https://github.com/cowprotocol/cowswap/issues/5922)) ([f3d721e](https://github.com/cowprotocol/cowswap/commit/f3d721eda45506f77ae3564f447994e87d9cd445))
+* **limit-orders:** update quote when back from confirm ([#5922](https://github.com/cowprotocol/cowswap/issues/5922)) ([f3d721e](https://github.com/cowprotocol/cowswap/commit/f3d721eda45506f77ae3564f447994e87d9cd445))
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4390bb and 4cf9524.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (46)
  • .release-please-manifest.json (1 hunks)
  • apps/cow-fi/CHANGELOG.md (1 hunks)
  • apps/cow-fi/package.json (1 hunks)
  • apps/cowswap-frontend/CHANGELOG.md (1 hunks)
  • apps/cowswap-frontend/package.json (1 hunks)
  • apps/cowswap-frontend/src/modules/tokensList/utils/mapChainInfo.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx (3 hunks)
  • apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetUpdaters.tsx (3 hunks)
  • apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidation.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeFormValidation/index.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeFormValidation/services/validateTradeForm.ts (3 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/hooks/usePollQuoteCallback.ts (3 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteManager.ts (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.test.tsx (2 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts (5 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx (1 hunks)
  • apps/cowswap-frontend/src/modules/tradeQuote/utils/quoteDeadline.ts (2 hunks)
  • apps/explorer/CHANGELOG.md (1 hunks)
  • apps/explorer/package.json (1 hunks)
  • libs/balances-and-allowances/CHANGELOG.md (1 hunks)
  • libs/balances-and-allowances/package.json (1 hunks)
  • libs/common-const/CHANGELOG.md (1 hunks)
  • libs/common-const/package.json (1 hunks)
  • libs/common-const/src/chainInfo.ts (3 hunks)
  • libs/common-hooks/CHANGELOG.md (1 hunks)
  • libs/common-hooks/package.json (1 hunks)
  • libs/common-utils/CHANGELOG.md (1 hunks)
  • libs/common-utils/package.json (1 hunks)
  • libs/core/CHANGELOG.md (1 hunks)
  • libs/core/package.json (1 hunks)
  • libs/hook-dapp-lib/CHANGELOG.md (1 hunks)
  • libs/hook-dapp-lib/package.json (1 hunks)
  • libs/multicall/CHANGELOG.md (1 hunks)
  • libs/multicall/package.json (1 hunks)
  • libs/tokens/CHANGELOG.md (1 hunks)
  • libs/tokens/package.json (1 hunks)
  • libs/types/CHANGELOG.md (1 hunks)
  • libs/types/package.json (1 hunks)
  • libs/ui/CHANGELOG.md (1 hunks)
  • libs/ui/package.json (1 hunks)
  • libs/wallet/CHANGELOG.md (1 hunks)
  • libs/wallet/package.json (1 hunks)
  • libs/wallet/src/web3-react/utils/switchChain.ts (3 hunks)
  • package.json (2 hunks)
🧰 Additional context used
🧠 Learnings (26)
apps/cowswap-frontend/package.json (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.test.tsx (2)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/balances-and-allowances/CHANGELOG.md (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/common-hooks/CHANGELOG.md (2)
Learnt from: fairlighteth
PR: cowprotocol/cowswap#5780
File: CONTRIBUTING.md:121-121
Timestamp: 2025-06-02T12:52:34.606Z
Learning: React 19.0.0 was released on December 5, 2024, introducing new features like Actions, Server Components, and hooks such as useActionState and useOptimistic.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
apps/cowswap-frontend/src/modules/tradeFormValidation/index.ts (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/common-const/CHANGELOG.md (1)
Learnt from: cowdan
PR: cowprotocol/cowswap#5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
libs/common-utils/CHANGELOG.md (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/hook-dapp-lib/CHANGELOG.md (2)
Learnt from: fairlighteth
PR: cowprotocol/cowswap#5780
File: CONTRIBUTING.md:121-121
Timestamp: 2025-06-02T12:52:34.606Z
Learning: React 19.0.0 was released on December 5, 2024, introducing new features like Actions, Server Components, and hooks such as useActionState and useOptimistic.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/wallet/CHANGELOG.md (1)
Learnt from: cowdan
PR: cowprotocol/cowswap#5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
apps/cow-fi/CHANGELOG.md (1)
Learnt from: cowdan
PR: cowprotocol/cowswap#5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
apps/cowswap-frontend/src/modules/tradeQuote/utils/quoteDeadline.ts (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
libs/ui/CHANGELOG.md (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
libs/tokens/CHANGELOG.md (1)
Learnt from: cowdan
PR: cowprotocol/cowswap#5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
libs/core/CHANGELOG.md (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx (3)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
Learnt from: fairlighteth
PR: cowprotocol/cowswap#5782
File: apps/cow-fi/app/(learn)/learn/topics/page.tsx:1-1
Timestamp: 2025-06-05T08:31:01.284Z
Learning: Next.js App Router official documentation states that Client Components marked with 'use client' should NOT be declared as async functions, as this can lead to infinite loops or application hangs. The recommended pattern for async operations in Client Components is to use useEffect hooks. Server Components (without 'use client') can be async, which might be a source of confusion.
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidation.ts (2)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetUpdaters.tsx (3)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5549
File: apps/cowswap-frontend/src/modules/tradeFlow/services/safeBundleFlow/safeBundleEthFlow.ts:152-152
Timestamp: 2025-04-02T09:58:29.374Z
Learning: In the `safeBundleEthFlow` function, `account` is guaranteed to be truthy based on the type system (`PostOrderParams` defines it as a required string) and the context in which the function is called, so additional runtime checks are unnecessary.
libs/wallet/src/web3-react/utils/switchChain.ts (1)
Learnt from: cowdan
PR: cowprotocol/cowswap#5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/usePollQuoteCallback.ts (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteManager.ts (2)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
apps/cowswap-frontend/CHANGELOG.md (2)

undefined

<retrieved_learning>
Learnt from: shoom3301
PR: #5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
</retrieved_learning>

<retrieved_learning>
Learnt from: cowdan
PR: #5715
File: libs/common-const/src/tokens.ts:539-555
Timestamp: 2025-05-26T12:39:29.009Z
Learning: The team accepts using NATIVE_CURRENCY_ADDRESS as a temporary placeholder for COW token contract addresses on new networks (Polygon, Avalanche) until actual COW contracts are deployed.
</retrieved_learning>

apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts (3)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
Learnt from: alfetopito
PR: cowprotocol/cowswap#5532
File: libs/common-hooks/src/useOnScroll.tsx:22-38
Timestamp: 2025-03-25T10:03:35.157Z
Learning: In React useEffect hooks, refs (RefObjects) should generally be included in dependency arrays even though changes to ref.current don't trigger effects. This is because the ref object itself could change between renders (especially in custom hooks where refs are passed as parameters), and it follows React's best practice of including all external values used in the effect.
apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx (2)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5859
File: apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts:76-82
Timestamp: 2025-06-23T07:03:50.760Z
Learning: In the useTradeQuotePolling hook, there are two useLayoutEffect hooks that work together: one resets the counter to 0 when the confirmation modal closes, and another automatically triggers pollQuote(false, true) whenever the counter reaches 0. This creates an intentional chain reaction for immediate quote updates.
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
.release-please-manifest.json (1)
Learnt from: shoom3301
PR: cowprotocol/cowswap#5443
File: apps/cowswap-frontend/src/modules/swap/containers/ConfirmSwapModalSetup/index.tsx:71-71
Timestamp: 2025-02-20T15:59:33.749Z
Learning: The swap module in apps/cowswap-frontend/src/modules/swap/ is marked for deletion in PR #5444 as part of the swap widget unification effort.
🧬 Code Graph Analysis (7)
apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts (1)
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts (1)
  • useGetTradeFormValidations (10-14)
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidation.ts (1)
apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts (1)
  • useGetTradeFormValidations (10-14)
apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetUpdaters.tsx (2)
apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts (1)
  • useIsQuoteUpdatePossible (12-16)
apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx (1)
  • TradeQuoteUpdater (12-20)
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteManager.ts (1)
apps/cowswap-frontend/src/modules/tradeQuote/state/tradeQuoteInputAtom.ts (1)
  • SellTokenAddress (5-5)
apps/cowswap-frontend/src/modules/tradeFormValidation/services/validateTradeForm.ts (2)
apps/cowswap-frontend/src/modules/tradeFormValidation/types.ts (1)
  • TradeFormValidationContext (63-63)
libs/common-utils/src/legacyAddressUtils.ts (1)
  • isAddress (11-17)
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts (2)
apps/cowswap-frontend/src/modules/tradeQuote/hooks/usePollQuoteCallback.ts (1)
  • usePollQuoteCallback (18-82)
apps/cowswap-frontend/src/modules/tradeQuote/utils/quoteDeadline.ts (1)
  • isQuoteExpired (16-39)
apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx (2)
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuote.ts (1)
  • useTradeQuote (14-29)
apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts (1)
  • useTradeQuotePolling (23-137)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Cypress
  • GitHub Check: Setup
🔇 Additional comments (55)
libs/common-utils/package.json (1)

3-3: Patch version bump is reasonable—double-check downstream alignment.

The version field is now 1.17.1. Please verify:

  1. CHANGELOG entry exists for 1.17.1 and matches this fix.
  2. Any workspace root package-lock.json / yarn lockfile is updated.
  3. Dependent internal packages reference ^1.17.1 (or compatible) where needed.

This prevents publish/CI mismatches.

apps/cow-fi/package.json (1)

3-3: Version bump LGTM – verify ancillary artifacts

The increment to 1.24.0 is consistent with the monorepo manifest.
Please double-check that:

  1. CHANGELOG.md for apps/cow-fi includes the new entry.
  2. Any lockfile (package-lock.json / pnpm-lock.yaml / yarn.lock) has been regenerated.
libs/types/package.json (1)

3-3: Bump to 1.8.0 acknowledged

No issues spotted with the metadata. Ensure downstream packages that pin @cowprotocol/types are updated if they require the new bridging types.

libs/tokens/package.json (1)

3-3: Tokens package at 1.22.0

Looks correct. Make sure any generated token docs (if applicable) are rebuilt so published artifacts reference the new version.

libs/common-hooks/package.json (1)

3-3: Patch bump looks good.

Nothing else changed in this manifest; changelog already reflects the bug-fix.

apps/explorer/package.json (1)

3-3: Explorer version bumped correctly.

Just make sure the deploy pipeline tags and Docker images follow the same 2.48.2 tag to avoid drift.

libs/balances-and-allowances/package.json (1)

3-3: Minor version bump acknowledged.

Remember to update any peer-dependency ranges (e.g. @cowprotocol/multicall) if they rely on the new feature set.

package.json (2)

341-341: Trivial JSON tail change.

Looks like only a formatting newline; no action required.


79-79: SDK RC upgrade – verify breaking-change surface across modules

6.0.0-RC.70 is still a pre-release and is imported directly in multiple places—ensure no API or type changes slip through:

• libs/types/src/common.ts
• libs/balances-and-allowances (updaters/hooks/state)
• libs/widget-lib (flexibleConfig.ts, types.ts)
• libs/ui/src/pure/NetworkLogo/index.tsx
• libs/wallet (api/types.ts, web3-react utils, updater, connection)
• libs/tokens/src/types.ts

Please run a full type‐check (tsc --noEmit) and smoke-test these modules against v6.0.0-RC.70, and review the RC changelog for any breaking changes before merging.

libs/hook-dapp-lib/CHANGELOG.md (1)

3-9: Changelog entry present & well-formatted.

No typos, date is ISO-8601, links resolve.

libs/core/CHANGELOG.md (1)

3-9: Changelog entry looks correct.

Version/date format, semantic version bump, and issue/commit references are all in order. No further action needed.

libs/common-hooks/CHANGELOG.md (1)

3-9: Changelog entry LGTM.

Patch bump, scope tag, and linked issue/commit are consistent with conventions. 👍

libs/multicall/package.json (1)

3-3: Confirm dependency alignment after version bump.

"version": "1.2.0" is fine, but ensure any sibling packages that depend on @cowprotocol/multicall have their version ranges updated (if they pin to ^1.1.x).
A quick grep in the repo for "@cowprotocol/multicall" will catch mismatches.

libs/wallet/package.json (1)

3-3: Check peer-/dev-dependency ranges for the wallet bump.

Bumping to 1.13.0 is OK; just verify no other packages are still pegged to <1.13.0 which could cause resolution conflicts in workspaces.

libs/common-const/package.json (1)

3-3: Version bump acknowledged.

No immediate concerns. Ensure changelog entry and release workflow include this 1.21.0 tag.

apps/cowswap-frontend/package.json (1)

3-3: Version bump looks fine – double-check ancillary release artifacts

The new 1.111.0 version aligns with the manifest summary. Please verify:

  1. A matching entry exists in apps/cowswap-frontend/CHANGELOG.md.
  2. .release-please-manifest.json reflects the same bump.
  3. No other workspace/project references still pin 1.110.x.

If all three are in sync, nothing else to do.

apps/explorer/CHANGELOG.md (1)

3-9: Changelog entry LGTM

• Correct semantic version increment (2.48.2)
• Links & commit hashes are well-formed
• Categorisation under “Bug Fixes” is consistent with repo standards

No further action required.

libs/hook-dapp-lib/package.json (1)

3-3: Ensure downstream libraries consume 1.8.0

The bump to 1.8.0 is clean. Run a quick search for @cowprotocol/[email protected] in the monorepo to avoid stale lockfile or peer-dep references.

libs/wallet/CHANGELOG.md (1)

3-9: LGTM! Well-formatted changelog entry.

The new version entry follows proper semantic versioning and changelog conventions. The feature description is clear and includes appropriate issue/commit references.

libs/types/CHANGELOG.md (1)

3-9: LGTM! Properly formatted changelog entry.

The version entry follows semantic versioning conventions and includes clear feature description with appropriate references.

apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.test.tsx (1)

97-97: LGTM! Test updates correctly reflect hook signature changes.

The addition of explicit parameters (false, true) to the useTradeQuotePolling hook calls properly aligns with the updated hook signature that now requires the isQuoteUpdatePossible parameter.

Also applies to: 117-117

libs/common-const/CHANGELOG.md (1)

3-9: LGTM! Consistent changelog entry across coordinated changes.

The version entry properly documents the eip155 chain names feature implementation and maintains consistency with related changes in other libraries.

libs/common-utils/CHANGELOG.md (1)

3-9: LGTM! Correct semantic versioning for bug fix.

The patch version increment and changelog format are appropriate for a bug fix. The entry includes clear description and proper issue/commit references.

libs/balances-and-allowances/CHANGELOG.md (1)

3-14: Changelog entry LGTM

Version bump, feature & bug-fix bullets follow the existing formatting conventions.
No issues spotted.

libs/ui/CHANGELOG.md (1)

3-12: Changelog entry LGTM

Consistent formatting and links; no issues detected.

apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuoteManager.ts (1)

27-27: LGTM: Clean formatting improvement

The consolidation of the function signature into a single line improves readability without affecting functionality.

apps/cowswap-frontend/src/modules/tradeQuote/utils/quoteDeadline.ts (2)

2-2: LGTM: Proper import addition

The PriceQuality import is correctly added to support the new conditional logic.


17-18: LGTM: Logical enhancement for FAST price quality

The addition of the PriceQuality.FAST condition to skip expiration checks is a sensible optimization that recognizes different expiration semantics for fast quotes.

libs/wallet/src/web3-react/utils/switchChain.ts (3)

2-11: LGTM: Clean import organization

The addition of specific chain object imports is well-organized and sets up the foundation for using dynamic RPC URLs.


27-34: LGTM: Improved maintainability with dynamic RPC URLs

Replacing hardcoded RPC URLs with dynamic values from chain objects improves maintainability and ensures consistency across the codebase.


53-53: LGTM: Alignment with eip155Label standard

The switch from info.label to info.eip155Label aligns with the broader codebase update to use EIP-155 chain naming standards.

apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidations.ts (1)

1-14: LGTM: Clean and well-structured hook implementation

The hook is properly implemented with:

  • Correct use of jotai for state management
  • Appropriate debouncing to prevent excessive re-renders
  • Clear return type annotation
  • Reasonable 200ms debounce delay

This follows React best practices and integrates well with the broader trade form validation system.

apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetUpdaters.tsx (3)

9-9: LGTM: Proper hook import

The import for useIsQuoteUpdatePossible is correctly added to support the new quote update logic.


35-35: LGTM: Clean hook integration

The hook is properly called at the component level to determine quote update feasibility.


49-52: LGTM: Improved component control flow

The refactoring to always render TradeQuoteUpdater while controlling its behavior through the isQuoteUpdatePossible prop is a good architectural improvement. The boolean logic correctly combines the validation state with the polling disable flag.

apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx (3)

38-38: Import looks good.

The import of useIsQuoteUpdatePossible is correctly placed and follows the established module structure.


115-115: Hook usage is correct.

The hook is called at the top level as expected for React hooks, and the variable name is descriptive.


205-205: Conditional rendering logic is well-implemented.

The addition of isQuoteUpdatePossible to the existing conditions (!isPriceStatic && !showDropdown) ensures the QuotePollingProgress component only renders when quote updates are actually possible, improving UX by preventing misleading progress indicators.

apps/cowswap-frontend/src/modules/trade/hooks/useIsQuoteUpdatePossible.ts (2)

3-10: Well-defined blocking states.

The NO_UPDATE_STATES array covers the appropriate scenarios where quote updates should be blocked:

  • CurrencyNotSupported and NetworkNotSupported - Invalid configurations
  • BrowserOffline - Network unavailable
  • CurrencyNotSet and InputAmountNotSet - Missing required inputs
  • WrapUnwrapFlow - Different flow that doesn't need quote polling

The selection is logical and comprehensive.


12-16: Hook implementation is correct and efficient.

The hook correctly:

  • Uses the debounced validations from useGetTradeFormValidations
  • Defaults to true when validations are null (allowing updates when validation state is unknown)
  • Uses Array.includes() with some() for efficient checking
  • Has a clear return type and follows React hook conventions

The logic is sound and the implementation is concise.

apps/cowswap-frontend/src/modules/tradeFormValidation/hooks/useGetTradeFormValidation.ts (2)

1-1: Import change is appropriate.

The import of useGetTradeFormValidations replaces the previous direct atom usage, which is consistent with the refactoring to centralize validation logic.


6-8: Refactored implementation maintains backward compatibility.

The hook now delegates to useGetTradeFormValidations and returns the first validation from the array, which:

  • Maintains the same API for existing consumers
  • Removes code duplication by leveraging the new centralized hook
  • Simplifies the implementation while preserving functionality

The logic is correct and the refactoring improves maintainability.

apps/cowswap-frontend/src/modules/tradeQuote/hooks/usePollQuoteCallback.ts (3)

20-20: Parameter addition is well-documented.

The new isQuoteUpdatePossible parameter is appropriately typed as boolean and positioned logically after the existing isConfirmOpen parameter.


41-41: Early exit condition is correctly implemented.

Adding !isQuoteUpdatePossible to the early exit condition ensures that quote polling is prevented when updates aren't possible, which:

  • Improves performance by avoiding unnecessary work
  • Maintains consistency with the UI state (when QuotePollingProgress is hidden)
  • Follows the same pattern as other validation checks in the condition

The placement as the first condition is logical since it's a high-level gate.


79-79: Dependency array correctly updated.

The addition of isQuoteUpdatePossible to the dependency array ensures the callback is recreated when the quote update possibility changes, which is necessary for proper hook behavior.

libs/common-const/src/chainInfo.ts (3)

25-25: Interface extension is well-designed.

The addition of eip155Label as a readonly string property is consistent with the existing interface design and follows the naming convention used for other label properties.


39-48: Type definition properly updated.

The Pick type correctly includes the new eip155Label property, maintaining type safety and ensuring the mapping function returns the expected interface shape.


60-60: Implementation correctly maps the new property.

The mapping of eip155Label: chainInfo.eip155Label follows the established pattern and correctly propagates the property from the input to the output.

apps/cowswap-frontend/src/modules/tradeQuote/updaters/TradeQuoteUpdater/index.tsx (1)

7-15: LGTM! Clean integration of isQuoteUpdatePossible prop.

The changes properly extend the component interface and pass the new prop to the polling hook as expected.

.release-please-manifest.json (1)

1-29: Version bumps aligned with feature rollout.

The manifest updates track version increments for multiple packages, reflecting the changes described in the AI summary including the new eip155Label property and quote polling enhancements.

apps/cowswap-frontend/src/modules/tradeFormValidation/services/validateTradeForm.ts (1)

12-135: Good refactor to collect all validation errors.

The change from returning a single validation to collecting all applicable validations provides better user feedback by showing all issues at once rather than one at a time.

apps/cowswap-frontend/src/modules/tradeQuote/hooks/useTradeQuotePolling.ts (4)

2-2: Consider the performance impact of switching from useEffect to useLayoutEffect.

All effects in this hook have been changed to useLayoutEffect. Since useLayoutEffect runs synchronously before browser paint, this could potentially impact performance, especially with multiple intervals running. Was this change necessary for all effects, or only specific ones that need synchronous execution?

Also applies to: 50-50, 64-64, 79-79, 88-88, 99-99, 120-120


117-134: Good addition of quote expiration monitoring.

The new effect that checks for quote expiration every 2 seconds and triggers immediate updates is a valuable enhancement for keeping quotes fresh.


7-8: Clean time constant definition with ms.macro.

Using ms.macro for the QUOTE_VALIDATION_INTERVAL constant improves readability and maintainability.

Also applies to: 21-21


23-23: Proper integration of isQuoteUpdatePossible parameter.

The new parameter is correctly added to the function signature and properly passed to the usePollQuoteCallback hook.

Also applies to: 43-43

},
id: chainId,
label: info.label,
eip155Label: info.eip155Label,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Provide a fallback for eip155Label to stay backward-compatible

Older network objects shipped before this field was introduced may not have eip155Label yet.
Returning undefined is harmless for consumers that treat it as optional, but several recent callers (e.g. wallet switchChain) pass it directly to the provider where an empty string can violate EIP-3085.

-    eip155Label: info.eip155Label,
+    // Fallback keeps legacy networks working until all entries are migrated.
+    eip155Label: info.eip155Label ?? info.label,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
eip155Label: info.eip155Label,
// Fallback keeps legacy networks working until all entries are migrated.
eip155Label: info.eip155Label ?? info.label,
🤖 Prompt for AI Agents
In apps/cowswap-frontend/src/modules/tokensList/utils/mapChainInfo.ts at line
24, the eip155Label property may be undefined for older network objects, which
can cause issues when passed directly to providers expecting a non-empty string.
To fix this, provide a fallback value such as an empty string or a default label
when info.eip155Label is undefined, ensuring backward compatibility and
preventing violations of EIP-3085.

Comment on lines 119 to 132
if (isNativeIn) {
return TradeFormValidation.SellNativeToken
validations.push(TradeFormValidation.SellNativeToken)
}

if (approvalRequired) {
if (isBundlingSupported) {
return TradeFormValidation.ApproveAndSwap
validations.push(TradeFormValidation.ApproveAndSwap)
}
return TradeFormValidation.ApproveRequired
validations.push(TradeFormValidation.ApproveRequired)
}

if (isNativeIn) {
return TradeFormValidation.SellNativeToken
validations.push(TradeFormValidation.SellNativeToken)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Remove duplicate SellNativeToken validation.

The SellNativeToken validation is added twice - once at lines 119-122 and again at lines 130-132. This will result in duplicate validation messages.

Remove the duplicate check:

-  if (isNativeIn) {
-    validations.push(TradeFormValidation.SellNativeToken)
-  }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (isNativeIn) {
return TradeFormValidation.SellNativeToken
validations.push(TradeFormValidation.SellNativeToken)
}
if (approvalRequired) {
if (isBundlingSupported) {
return TradeFormValidation.ApproveAndSwap
validations.push(TradeFormValidation.ApproveAndSwap)
}
return TradeFormValidation.ApproveRequired
validations.push(TradeFormValidation.ApproveRequired)
}
if (isNativeIn) {
return TradeFormValidation.SellNativeToken
validations.push(TradeFormValidation.SellNativeToken)
}
if (isNativeIn) {
validations.push(TradeFormValidation.SellNativeToken)
}
if (approvalRequired) {
if (isBundlingSupported) {
validations.push(TradeFormValidation.ApproveAndSwap)
}
validations.push(TradeFormValidation.ApproveRequired)
}
🤖 Prompt for AI Agents
In
apps/cowswap-frontend/src/modules/tradeFormValidation/services/validateTradeForm.ts
between lines 119 and 132, the validation TradeFormValidation.SellNativeToken is
pushed twice to the validations array. Remove the second occurrence at lines
130-132 to avoid duplicate validation messages.

@alfetopito alfetopito merged commit e34b5a9 into develop Jul 4, 2025
26 of 27 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2025
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.

4 participants