Skip to content

preview: mirror fork PR #7711#7712

Draft
github-actions[bot] wants to merge 3 commits into
developfrom
cf-preview/pr-7711
Draft

preview: mirror fork PR #7711#7712
github-actions[bot] wants to merge 3 commits into
developfrom
cf-preview/pr-7711

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This PR mirrors fork PR #7711 for Cloudflare Pages preview builds.

Source PR: #7711
Source fork branch: tenderdeve/cowswap:fix/7429-bridge-quote-loading-price-impact
Mirrored SHA: d790ffde4649

Do not merge this PR. Close the source PR to clean up this mirror.

When the destination token is changed in swap-and-bridge mode, the
price impact briefly rendered a huge/scary value derived from the
previous quote while the new bridge quote was still being fetched.

`PriceImpactIndicator` already received the `loading` flag but rendered
the (stale) percentage *and* the spinner side by side. Gate the
percentage on `!priceImpactLoading` so only the spinner shows while a
fresh quote is being computed, matching the rest of the bridge-quote
loading UX.

Closes #7429
@github-actions github-actions Bot added the DONT_MERGE Indicates the PR should not be merged. Probably a WIP or PoC. label Jun 23, 2026
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cowfi Ready Ready Preview Jun 23, 2026 3:26pm
storybook Ready Ready Preview Jun 23, 2026 3:26pm
widget-configurator Ready Ready Preview Jun 23, 2026 3:26pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
cosmos Ignored Ignored Jun 23, 2026 3:26pm
sdk-tools Ignored Ignored Preview Jun 23, 2026 3:26pm

Request Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying explorer-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: d790ffd
Status: ✅  Deploy successful!
Preview URL: https://34b9ad7e.explorer-dev-dxz.pages.dev
Branch Preview URL: https://cf-preview-pr-7711.explorer-dev-dxz.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying swap-dev with  Cloudflare Pages  Cloudflare Pages

Latest commit: d790ffd
Status: ✅  Deploy successful!
Preview URL: https://3dd7895f.swap-dev-5u6.pages.dev
Branch Preview URL: https://cf-preview-pr-7711.swap-dev-5u6.pages.dev

View logs

tenderdeve and others added 2 commits June 23, 2026 17:53
The previous fix only stopped \`PriceImpactIndicator\` from rendering a
stale percentage during USD-loading. The reporter still saw a scary
value on same-chain quote refreshes: when the destination token
changes, the trade form keeps the previous \`outputCurrencyAmount\` until
the new quote lands, and during that window \`useFiatValuePriceImpact\`
happily divides the new input USD by the old output USD, producing a
huge nonsense %.

Pull \`isLoading\` / \`hasParamsChanged\` out of \`useTradeQuote()\` and
fold them into the price-impact loading flag. While that combined flag
is true, return \`{ priceImpact: undefined, isLoading: true }\` so every
consumer falls back to the loading state (spinner) instead of rendering
the stale value.

Closes #7429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DONT_MERGE Indicates the PR should not be merged. Probably a WIP or PoC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants