chore: remove deprecated thorchain lending and savers, extract runepool - #12511
Conversation
Remove the sunset THORChain lending feature wholesale and the savers
vaults surface, extracting RUNEPool (still live on-chain) onto its own
provider/resolver with savers -> runepool vernacular throughout.
- delete src/pages/Lending, lib/utils/thorchain/lending, all
THORCHAIN_LENDING*/SAVERS_VAULTS* flags, /lending routes and nav
- move shared useGetEstimatedFeesQuery/useIsSweepNeededQuery hooks from
pages/Lending/hooks to src/hooks/queries
- replace resolvers/thorchainsavers + ThorchainSaversManager with
RUNE-only resolvers/runepool + RunePoolManager (no approve/sweep/
savers-quote paths - RUNE is native non-UTXO)
- rename DefiProvider.ThorchainSavers -> DefiProvider.RunePool
('RUNEPool') with opportunities persist migration bump to 7
- keep TCY-claim savers introspection helpers in
lib/utils/thorchain/savers.ts
- migrate defi.modals.saversVaults -> defi.modals.runePool translations
across all 10 locales, trim dead lending keys
- fix PositionTable infinite spinner on empty search results
- fix RUNEPool status view-position navigating to the desktop-redirected
/wallet/earn
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 115 files, which is 15 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (115)
You can disable this status message by setting the 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. Comment |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Description
Removes the sunset THORChain defi dead code and renames the surviving rails to what they actually serve:
src/pages/Lending,lib/utils/thorchain/lending, allTHORCHAIN_LENDING*flags,/lendingroutes + nav entries, and the lending-onlyuseQuoteEstimatedFeesQuery. The shareduseGetEstimatedFeesQuery/useIsSweepNeededQueryhooks (used by TCY, LP, Sweep) moved frompages/Lending/hookstosrc/hooks/queries(git renames, byte-identical).SAVERS_VAULTS*flags, thethorchainsaversresolvers, savers quote hooks,balance.ts, and the savers-only paths (ERC-20 approve, UTXO sweep, dust, quotes) in the manager components.RUNEPOOLENABLED=1, ~2.85M RUNE deposited) and previously rode the savers rails. New RUNE-onlyresolvers/runepool+RunePoolManager(depositPOOL+, withdrawpool-:<bps>— memos byte-equivalent to the previous RUNE branches).DefiProvider.ThorchainSavers→DefiProvider.RunePool('RUNEPool'), with the opportunities persist migration bumped to 7 to purge the old serialized provider string.lib/utils/thorchain/savers.ts.defi.modals.saversVaults→defi.modals.runePoolmigrated across all 10 locales (values copied, no new strings); deadlending.*/navBar keys removed;pools.haltedDepositTitleadded for the LP pool page.PositionTable); RUNEPool status "View Position" now goes to the account page instead of the desktop-redirected/wallet/earn.Notes for reviewers:
provider: "RUNEPool"where they previously said"THORChain Savers"— dashboards keyed on the old string will need their filters updated.supportsETH(wallet)(savers-era leftover that wrongly gated non-ETH wallets on a native RUNE MsgDeposit).Issue (if applicable)
closes #
Risk
High — this rewrites the components that construct and broadcast RUNEPool deposit/withdraw transactions (native THORChain
MsgDeposit). The memos anduseSendThorTxplumbing are unchanged and byte-equivalent to the previousisRunePoolbranches, but the surrounding components are new files. TCY claim and THORChain LP flows share touched utilities (useSendThorTxaction union, dust-threshold constant relocation, moved fee/sweep hooks) and should be regression-checked.THORChain RUNEPool deposits/withdrawals (MsgDeposit), TCY claims (shared savers introspection + dust constants), THORChain LP (shared
useSendThorTx/ mimir hooks), removed: THORChain lending + savers vaults surfaces.Testing
Engineering
en/main.json, all 10 locales parse and are structurally consistent, and no removed key is still referenced.pnpm run type-check/pnpm run lintto be confirmed in CI.Operations
Regression QA (preview env, wallet with a THORChain account):
/lendingno longer appears in nav and old links 404 gracefully.Screenshots (if applicable)
🤖 Generated with Claude Code