refactor(wallet): remove self-custodial fee-grant and allowance UI#3213
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (39)
💤 Files with no reviewable changes (32)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR removes custodial authorization and auto-top-up code: deletes related UI, hooks, services, query keys, types, utilities, and tests; removes fee-granter injection from custodial wallet signing; simplifies Settings layout and route guards. ChangesCustodial Authorization Feature Removal
Deletions (summary): multiple authorization UI components/pages, auto-top-up components/containers, hooks and queries for grants/allowances, AutoTopUpMessageService, grant/allowance types and helpers, address utilities, and associated tests were removed across the codebase. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3213 +/- ##
==========================================
- Coverage 64.81% 64.48% -0.34%
==========================================
Files 1101 996 -105
Lines 26975 24317 -2658
Branches 6545 5950 -595
==========================================
- Hits 17485 15680 -1805
+ Misses 8311 7542 -769
+ Partials 1179 1095 -84
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
Closes CON-256 Removes the user-facing fee-grant / deployment-grant management surface that only applied to the Keplr / Leap self-custodial signing path: - /settings/authorizations page + Authorizations / Grant / Allowance components and their tests - useAllowance default-fee-granter hook and the granter: feeGranter field passed to userWallet.sign(...) in WalletProvider - Auto Top Up Fieldset on /settings (custodial_auto_topup flag), including useAutoTopUpLimits / useAutoTopUpService and the auto-top-up-message service that built MsgGrant / MsgGrantAllowance bundles for the user's wallet - Underlying grant / allowance query hooks and TransactionMessageData helpers (getGrantMsg, getRevokeDepositMsg, getGrantBasicAllowanceMsg, getRevokeAllowanceMsg) plus their query keys and types - AUTHORIZATIONS tab + Tabs shell in SettingsLayout, the custodial_auto_topup feature flag entry, the settingsAuthorizations URL helper, and the /settings/authorizations entry from SELF_CUSTODY_ROUTES Managed-wallet fee grants are still issued server-side by apps/api's ManagedUserWalletService from a funding master wallet, and managed signing flows through txHttpService.signAndBroadcastTx unchanged. The shared @akashnetwork/http-sdk authz service is preserved for that backend path.
Knip flagged apps/deploy-web/src/utils/address.ts as unused after the authorizations UI removal — the only consumer was Authorizations.tsx.
Covers the simplified single-tab layout to keep patch coverage above the deploy-web 50% bar after the authorizations tab removal.
958126d to
397c9f1
Compare
Why
Closes CON-256
The fee-grant / deployment-grant management surface in deploy-web (the
/settings/authorizationspage, theuseAllowancedefault-fee-granter picker, and the Auto Top Up Fieldset on/settings) only applies to the self-custodial Keplr / Leap signing path. As part of the migration to Auth0 / managed-wallet-only flows, this UI is being retired.Managed-wallet fee grants are still issued server-side by
apps/api'sManagedUserWalletServicefrom a funding master wallet, and managed signing flows throughtxHttpService.signAndBroadcastTxunchanged. The shared@akashnetwork/http-sdkauthz service is preserved for that backend path.What
/settings/authorizationspage +components/authorizations/(Authorizations, DeploymentGrantTable, FeeGrantTable, GrantModal, AllowanceModal, GranteeRow, AllowanceGrantedRow, AllowanceIssuedRow) and their specs./settings(AutoTopUpSetting,AutoTopUpSettingContainer,useAutoTopUpLimits,useAutoTopUpService,auto-top-up-message.service).useAllowanceand thegranter: feeGranterfield from the self-custodialuserWallet.sign(...)call inWalletProvider.getGrantMsg,getRevokeDepositMsg,getGrantBasicAllowanceMsg,getRevokeAllowanceMsgfromTransactionMessageDataand their associated query hooks (useGrantsQuery,useExactDeploymentGrantsQuery,useExactFeeAllowanceQuery), types, utils, and query keys.AUTHORIZATIONStab + Tabs shell inSettingsLayout(single-tab UI now), thecustodial_auto_topupfeature flag entry, thesettingsAuthorizationsURL helper, and the/settings/authorizationsentry fromSELF_CUSTODY_ROUTES.Net: 36 files changed, 9 insertions / 3,607 deletions.
Summary by CodeRabbit