Skip to content

feat: dedupe logic across deposit/withdraw#1121

Merged
0xeye merged 1 commit intorelease/04-01-26from
feat/dedupe-deposit
Apr 1, 2026
Merged

feat: dedupe logic across deposit/withdraw#1121
0xeye merged 1 commit intorelease/04-01-26from
feat/dedupe-deposit

Conversation

@0xeye
Copy link
Copy Markdown
Collaborator

@0xeye 0xeye commented Mar 18, 2026

Reduce duplicated logic, pull out into shared components / hooks.

Fixes transports failure where it will continually ping bad rpc.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 18, 2026

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

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment Mar 31, 2026 6:33am

Request Review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 18, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 8f6d168.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

@rossgalloway
Copy link
Copy Markdown
Collaborator

rossgalloway commented Mar 19, 2026

Two issues surfaced while reviewing this branch:

  1. src/config/wagmi.ts: enabling ranking across the added public RPC pool can let a faster public endpoint outrank a configured VITE_RPC_URI_FOR_<chain> override. In fork, Tenderly, or other custom-RPC setups that means reads can silently fall back to live chain state even while the override is healthy.
  2. src/components/pages/vaults/components/widget/shared/usePriceImpactAcceptance.ts: the remembered-key acceptance logic recreates the A -> B -> A price-impact confirmation bug, where returning to a previously accepted quote re-checks the warning and re-enables the CTA without a fresh confirmation.

On the second point, this is the same regression class being addressed on top of #1120 in #1124 (Fix price impact confirmation resets).

Follow-up for the RPC-ranking issue is now open as #1126 (Fix RPC override precedence), targeting feat/dedupe-deposit so that fix can merge independently of the broader refactor.

@0xeye 0xeye force-pushed the feat/dedupe-deposit branch from dbd95a3 to 8f6d168 Compare March 31, 2026 06:31
@0xeye 0xeye merged commit 962790b into release/04-01-26 Apr 1, 2026
7 checks passed
@0xeye 0xeye deleted the feat/dedupe-deposit branch April 1, 2026 19:46
0xeye added a commit that referenced this pull request Apr 1, 2026
0xeye added a commit that referenced this pull request Apr 1, 2026
0xeye added a commit that referenced this pull request Apr 1, 2026
rossgalloway added a commit that referenced this pull request Apr 3, 2026
* feat: reduce useEffect usage (#1120)

* feat: initial

* feat: round two

* feat: round three

* chore: update CLAUDE.md

* fix: price impact confirmation resets (#1124)

Replace remembered confirmation keys with keyed resettable state in the deposit and withdraw widgets.

This preserves the high-price-impact warning behavior without reintroducing a reset effect, so a user returning from quote B back to quote A must acknowledge the warning again.

---------

Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>

* feat: add Tenderly virtual testnet workflow (#1135)

* fix warning not showing correctly (#1117)

* fix TVL chart (#1118)

* update strategy APY fallback behavior (#1119)

* update modals for TGE (#1122)

* update modals for TGE

* update messaging

* update modal language

* Fix vault chain selection (#1123)

Keep the vault list aligned with the selected chain filter and\nmake chain switching behave consistently across the page.\n\n- apply selected-chain filtering to holdings in both V2 and V3\n  vault filters so other-chain rows do not leak into the list\n- reuse a single-chain selection helper for the top selector and\n  row chips so switching chains cannot drift into mixed states\n- add focused tests for selected-chain matching and single-chain\n  selection behavior

* Fix reflected XSS in /api/vault/meta endpoint (#1129)

Add strict allowlist validation for chainId and address query parameters
before they are interpolated into HTML. chainId must be numeric and
address must match the 0x-prefixed 40-char hex pattern, otherwise the
request is rejected with a 400. This prevents attackers from breaking
out of meta tag attribute contexts to inject arbitrary HTML/scripts.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add strategy-level KAT rewards APR display (#1128)

* Add strategy-level KAT rewards APR display

- Schema: make estimated apr/apy optional (Kong hydration may set
  only apr for strategy-addressed rows), add katRewardsAPR component
- Selector: fall back to estimated.apr for katana strategies when
  estimated.apy is missing, extract katRewardsAPR from estimated type
- Strategy UI: show sword emoji indicator when strategy has KAT rewards
- Tests: cover katana strategy APR fallback and non-katana isolation

* fix: make KAT rewards additive on top of oracle APY with tooltip breakdown

- Selector: estimatedAPY now always falls through to oracle.apy for
  Katana strategies instead of using estimated.apr (which is KAT rewards)
- UI: strategy row shows combined APY (oracle + KAT rewards)
- UI: hover tooltip breaks down Base APY and KAT Rewards APR
- Tooltip follows existing pattern (rounded-lg border surface-secondary)
- Tests updated to reflect additive behavior

* fix: remove sword emoji from KAT rewards tooltip

* style: fix biome formatting

* fix kong selector

---------

Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>
Co-authored-by: Ross <therossgalloway@gmail.com>
Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>

* init tenderly testnets

* add tenderly control panel

* create tenderly script

* refine tenderly vnet script defaults

* refine tenderly control panel state

* simplify tenderly control panel

* harden tenderly vnet script

* fix simulate wrapper typing

* fix cooldown to use block time

* gate tenderly admin routes and validate config

* use request IP for tenderly admin access

* fix tenderly approval and ens config

* fix tenderly loopback and env bootstrap

* treat failed tenderly reverts as errors

* fix tenderly chain identity mapping

* fix tenderly snapshot reset and localhost forks

* keep codex agent log local

* update gitignore

* separate canonical and execution chain lists

* fix localhost aliasing and explorer defaults

* keep canonical chains in wagmi config

* preserve mainnet wagmi transport

* fix tenderly execution boundary leaks

* Fix locked yvUSD historical PPS and APY normalization (#1133)

* update locked APY and PPS timeseries values to reflect actual conditions

* review fix

* Fix yvUSD historical PPS handling

Preserve missing historical PPS values instead of collapsing them to zero.\n\n- Keep weekly and monthly PPS lookbacks nullable in Kong vault APR data\n- Reuse yvUSD chart-derived historical APY in portfolio blending\n- Align portfolio and chart history so partial snapshot PPS data does\n  not produce bogus locked APY values

* fix tenderly wagmi chain exposure

* fix biome import ordering

* update env.example

---------

Co-authored-by: murderteeth <89237203+murderteeth@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: juniordevbot[bot] <170848020+juniordevbot[bot]@users.noreply.github.com>
Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>

* chore: init

* Add vault docs links and yvUSD API row to More Info (#1111)

* add link to API

* add docs link to more info

* chore(deps): bump the minor-updates group across 1 directory with 7 updates (#1132)

Bumps the minor-updates group with 7 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.90.21` | `5.95.0` |
| [framer-motion](https://github.com/motiondivision/motion) | `12.34.0` | `12.38.0` |
| [graphql](https://github.com/graphql/graphql-js) | `16.12.0` | `16.13.1` |
| [viem](https://github.com/wevm/viem) | `2.46.1` | `2.47.6` |
| [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.1.18` | `4.2.2` |
| [lint-staged](https://github.com/lint-staged/lint-staged) | `16.2.7` | `16.4.0` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.1.18` | `4.2.2` |



Updates `@tanstack/react-query` from 5.90.21 to 5.95.0
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/react-query@5.95.0/packages/react-query)

Updates `framer-motion` from 12.34.0 to 12.38.0
- [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md)
- [Commits](motiondivision/motion@v12.34.0...v12.38.0)

Updates `graphql` from 16.12.0 to 16.13.1
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](graphql/graphql-js@v16.12.0...v16.13.1)

Updates `viem` from 2.46.1 to 2.47.6
- [Release notes](https://github.com/wevm/viem/releases)
- [Commits](https://github.com/wevm/viem/compare/viem@2.46.1...viem@2.47.6)

Updates `@tailwindcss/postcss` from 4.1.18 to 4.2.2
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/@tailwindcss-postcss)

Updates `lint-staged` from 16.2.7 to 16.4.0
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v16.2.7...v16.4.0)

Updates `tailwindcss` from 4.1.18 to 4.2.2
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.95.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: framer-motion
  dependency-version: 12.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: graphql
  dependency-version: 16.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: viem
  dependency-version: 2.47.6
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.2.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: lint-staged
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
- dependency-name: tailwindcss
  dependency-version: 4.2.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 20.19.10 to 25.3.0 (#1081)

* chore(deps-dev): bump @types/node from 20.19.10 to 25.3.0

* chore(deps-dev): update bun.lock for @types/node bump

---------

Co-authored-by: Ross <therossgalloway@gmail.com>

* feat: partial dedupe in deposit/withdraw (#1121)

* chore: fix font fallbacks to prevent horrible font rendering on some computers (#1141)

* chore: update tenderly scripts (#1145)

* chore: rebase merge (#1152)

* Update deposit success v2 (#1155)

* Start wallet balance refresh before deposit success screen shows

The balance refresh (refreshWalletBalances + refetchVaultUserData) now
fires via onStepSuccess when the deposit tx is confirmed on-chain, before
the success screen and confetti appear.

Previously, with deferSuccessEffectsUntilConfettiEnd=true (the default),
onAllComplete fired only after the confetti animation ended (~2-3s after
the tx confirmed). The async RPC balance fetch therefore started late,
and the resulting re-renders hit the user just as they were interacting
with the UI after dismissing the overlay.

With this change, the RPC fetch starts at tx confirmation. By the time
confetti ends and the user dismisses the overlay, the balances are
already updated or the re-renders are well underway in the background.

Cross-chain deposits are handled separately in onAllComplete (as before)
since the TransactionOverlay does not emit onStepSuccess for the
cross-chain path — the source-chain tokens change immediately, so a
refresh there is still appropriate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* confetti after fetch

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove font fallback debug route (#1156)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>
Co-authored-by: murderteeth <89237203+murderteeth@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: juniordevbot[bot] <170848020+juniordevbot[bot]@users.noreply.github.com>
Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants