refactor(wallet): remove self-custodial fee-grant and allowance UI#3213
refactor(wallet): remove self-custodial fee-grant and allowance UI#3213baktun14 wants to merge 3 commits into
Conversation
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.
|
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 (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR removes custodial fee-grant and auto-top-up features: deletes related UI, hooks, services, query keys, types, and utilities; removes fee-granter injection from custodial wallet signing; simplifies settings layout and route guards. ChangesCustodial Authorization Feature Removal
Deletions: All authorization UI components and pages, auto-top-up components and container, data hooks and query implementations for grants/allowances, AutoTopUpMessageService, grant/allowance types and utility helpers, address utils, and associated test suites were removed across the codebase as part of this change set. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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.61% 64.24% -0.37%
==========================================
Files 1106 1001 -105
Lines 27260 24602 -2658
Branches 6636 6047 -589
==========================================
- Hits 17613 15806 -1807
+ Misses 8445 7678 -767
+ Partials 1202 1118 -84
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
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