feat: 7702 delegation, atomic swaps#7157
Merged
DanielSinclair merged 16 commits intodevelopfrom Feb 26, 2026
Merged
Conversation
* chore: update viem to 2.38.0 * chore: install delegation, stores sdk chore: install storesjs/stores chore: delegation sdk upgrade chore: upgrade delegation sdk, storesjs chore: swaps, delegation sdk chore: upgrade sdk chore: upgrade delegation sdk to 0.2.2 chore: upgrade stores to 0.8.7 remove * feat: add delegation experimental flag Co-Authored-By: derHowie <derhowiedesigns@gmail.com> * feat: delegation remote flag * feat: configure delegation client with dependencies logger service fix: add selected current address, chains * note: chains issue * fix: RainbowError safe logger proxy fix: RainbowError safe logger proxy chore: logger DebugContext for `delegation` --------- Co-authored-by: derHowie <derhowiedesigns@gmail.com>
* feat: limit approvals based on approvalAmount quote gating fix: perps estimation fix: avoid convertAmountToRawAmount * fix: delegation flag dependent finite approvals * fix: break early on delegation disable * Revert "fix: break early on delegation disable" This reverts commit e3bec1f.
* refactor: estimateTransactionsGasLimit multi-call estimate consolidation * refactor: simulateTransactions metadata client wrapper fix: req transaction type fix: pass individual transaction in transactions * feat: delegation simulation response * feat: delegated tx simulation with smart routing fix: pass next nonce * refactor: prepareSimulationTransaction to early break if delegation disable * Revert "refactor: prepareSimulationTransaction to early break if delegation disable" This reverts commit ef05dff.
* refactor: viem Hex type for toHex casting * refactor: adopt viem Hash over TxHash type * feat: atomic swaps feature flag * feat: atomic swaps remote flag * feat: atomic rap action signaling * feat: add prepare functions for atomic rap execution Add prepare functions (prepareUnlock, prepareSwap, prepareCrosschainSwap) that return BatchCall objects and transaction builders for atomic execution via the delegation SDK. Integrate atomic path in walletExecuteRap using typePrepareAction switch pattern. refactor: return transaction data instead of builder function Change prepare functions to return `transaction: Omit<NewTransaction, 'hash'>` instead of a builder function. The hash is merged in after execution, making the code simpler and more explicit about what data is available at each stage. refactor: extract buildUnlockTransaction function Move transaction building logic to buildUnlockTransaction for consistency with buildSwapTransaction and buildCrosschainSwapTransaction. refactor: add PrepareActionResult type fix: approval param, nonce alignment style: build new transaction return type refactor: add optional hash param to build transaction functions fix: hash return value fix: swap quote hex values in prepare fix: batch transaction value passing for native tokens fix: use referrer default for prepare fills fix: hash * fix: use delegation feature flag/preference * refactor: atomic execution switch logic * fix: pass nonce for transaction consistency * refactor: split atomic, sequential execute code paths * Revert "refactor: split atomic, sequential execute code paths" This reverts commit e2da7b2. * fix: block speed up/cancel for delegation transactions Adds a `delegation` boolean to `RainbowTransaction` to identify type 4 (EIP-7702) txs. Guards `SpeedUpAndCancelSheet` and the resubmit action in transaction details so delegation txs can't be resubmitted — they rely on a signed authorization that can't be re-signed after the fact. fix: minimal post-execution delegation metadata for toasts fix: batch, delegation transaction types
* feat: add revoke delegation panel - Add RevokeDelegationPanel component for revoking delegations - Add delegationStatus service for checking delegation state - Use SDK executeRevokeDelegation for revocation fix: add chain parameter to publicClient in RevokeDelegationPanel feat: add revoke delegation panel - Add RevokeDelegationPanel component for revoking delegations - Add delegationStatus service for checking delegation state - Use SDK executeRevokeDelegation for revocation fix: add chain parameter to publicClient in RevokeDelegationPanel fix: use ethers signer and provider fix: hash fix: revoke, status state mangement Co-Authored-By: derHowie <derhowiedesigns@gmail.com> * fix: pass nonce for transaction consistency * feat: revoke reason, ui types * feat: add gas fee display to RevokeDelegationPanel - Add useGas hook integration for real-time gas fee polling - Display gas fee with $0.01 floor for very small amounts - Adjust panel padding and improve gas fee UI - Import GasFee and LegacyGasFee entities fix: gas bar revoke color * chore: expand revoke reasons, messaging specificity Support all backend alert reasons refactor: remove SETTINGS_REVOKE fix: empty delegations array handling fix: default fix: string, hold to disable * fix: chain label name * feat: useShouldRevoke checking * fix: hold to revoke button colors fix: colors * fix: gas threshold formatting * fix: optional contractAddress for simulation * fix: revoke checking for owned wallets only * refactor: revoking status * refactor: extract timeout magic number to REVOKE_SUCCESS_DELAY_MS constant * refactor: extract RevokeDelegationPanel into focused components refactor: move derived state booleans above buttonLabel and handleButtonPress * Revert "refactor: extract RevokeDelegationPanel into focused components" This reverts commit ee611147b3927d3c40511a8ea2546b2216bc0199. --------- Co-authored-by: derHowie <derhowiedesigns@gmail.com>
* feat: ViewWalletDelegations settings menu fix: gradients, border colors refactor: adopt getDelegations fix: chain label fix: patch for local state update on enable fix: revoke, status state management fix: reactive delegations list feat: Edit Smart Wallet drop-down, UI placeholder fix: edit smart wallet naming fix: manage smart wallet for address title chore: expand revoke reasons, messaging specificity Support all backend alert reasons refactor: remove SETTINGS_REVOKE * fix: disable delegation settings when delegation disable fix: delegation flag fix: replace undefined showDelegationSettings with delegationEnabled * chore: i18n ViewWalletDelegations strings
* feat: add delegation status label to wallet switcher - Display "Delegated" (green) or "Not Delegated" (red) labels for owned wallets - Check delegation on both mainnet and Base chains - Use SDK getIsDelegated for checking delegation status - Only visible in TESTFLIGHT/DEV builds fix: ChangeWalletSheet fix: use opacity helper instead of colors.alpha in AddressRow - Replace colors.alpha() with opacity() for delegation badge border - Matches existing usage pattern in the same file * feat: display transaction type label on swap/bridge toast Show "Type 4" (new delegation + action) or "Type 2" (already delegated) on the toast for swap and bridge transactions when using atomic swaps. - Add txType field to RainbowTransaction - Check delegation status before executing to determine type - Create transaction with txType for delegate path - Display type label as bottom line in swap toast fix: already delegated patch fix: getIsDelegated * feat: reset delegation store refactor: improve resetDelegationCache call with ts-expect-error - Remove unnecessary 'as any' cast - Add explanatory comment about SDK type definition bug - Actual implementation expects Record<string, never>, not Signer & Provider - Linter optimized to no-arg call which works correctly fix: add type assertion for resetDelegationCache in dev settings - SDK expects Record<string, never> but type definitions incorrectly require Signer & Provider - Use 'as any' for dev-only cache reset functionality refactor: remove unused checkKeychainIntegrity import * refactor: wallet list delegation badge ChangeWalletSheet.tsx: Removed checkDelegationStatuses useEffect and delegationStatusByAddress state. This was imperative async fetching for all wallets at the parent level, only checking mainnet/base. Replaced by reactive hooks in each component. Removed isDelegated from AddressItem — delegation status is no longer passed as props. AddressRow.tsx: Calls useDelegations (reactive, all chains) and useDelegationPreference (reactive enabled/disabled) per address. Tri-state badge: red "Disabled" / green "Delegated" / gray "Not Delegated". PinnedWalletsGrid.tsx: Added small DelegationBadge component (wraps just the icon) so hooks can be called per-address inside the .map(). Same two hooks, same tri-state logic. Simplified draggableItems memo — no longer needs isDelegated tracking. WalletList.tsx: Removed isDelegated from memo dep tracking. en_US.json: Added "disabled" i18n key. fix: replace getIsDelegated with getDelegations API - getIsDelegated is not exported from @rainbow-me/delegation SDK - Use getDelegations() and filter by chainId + DelegationStatus - Simplify error handling with single try/catch per address * fix: IS_TEST_FLIGHT * patch: only label first-party delegations * feat: smart wallet fee label and explainer on review panel * feat: 7702 debug labels on swap button * feat: simulate, trigger revoke types fix: dev section revoke uses optional contractAddress * chore: i18n for dev settigns * fix: gate transaction type label behind dev/testflight
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
🧪 Flashlight Performance Report (AWS Device Farm) 🔀 Commit: 7d90805
|
christianbaroni
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes APP-####
What changed (plus any additional context for devs)
Screen recordings / screenshots
What to test