feat: more trezor address derivation skip#11212
Conversation
📝 WalkthroughWalkthroughThis PR adds Trezor hardware wallet support by conditionally including pubKey in transaction inputs across multiple DeFi features. Each file imports Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
…ations Extends PR #11159 to prevent Trezor Suite prompts in additional locations: - rFOX: stake, unstake, claim, change address, bridge approval (5 operations) - Uniswap V2 LP: add/remove liquidity, approve, getAddress (4 operations) - ThorChain LP: EVM deposits via depositWithExpiry (1 operation) - ThorChain Savers: approval (1 operation) - FOX Farming: stake (1 operation) All changes follow the same pattern: pass `pubKey` parameter when Trezor wallet detected to skip on-device address derivation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
8243023 to
5a05bc0
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.ts (1)
338-347: Remove-liquidity flow now consistently passes Trezor pubKeyThe new
pubKeyfield oncreateBuildCustomTxInputand the explicitadapter.getAddress({ accountNumber, wallet, pubKey })forreceiverAddresskeep the remove-liquidity path aligned with add-liquidity regarding Trezor behavior, so both sender and receiver address derivations should now respect the provided pubKey and avoid Suite prompts. Dependencies correctly includeaccountIdafter this change. If you ever want to DRY this up, you could compute a singletrezorPubKeyvalue in the hook and reuse it in all three places that callfromAccountId(accountId).account, but that’s purely optional and not required for this PR.Also applies to: 349-357, 364-375
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (9)
src/features/defi/providers/fox-farming/hooks/useFoxFarming.ts(2 hunks)src/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx(2 hunks)src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.ts(6 hunks)src/lib/utils/thorchain/hooks/useSendThorTx.tsx(2 hunks)src/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx(2 hunks)src/pages/RFOX/components/Claim/ClaimConfirm.tsx(2 hunks)src/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsx(2 hunks)src/pages/RFOX/components/Stake/hooks/useRfoxStake.tsx(3 hunks)src/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsx(2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,js,jsx}: Never assume a library is available - always check imports/package.json first
Prefer composition over inheritance
Write self-documenting code with clear variable and function names
Keep functions small and focused on a single responsibility
Avoid deep nesting - use early returns instead
Prefer procedural and easy to understand code
Never expose, log, or commit secrets, API keys, or credentials
Validate all inputs, especially user inputs
Handle errors gracefully with meaningful messages
Don't silently catch and ignore exceptions
Log errors appropriately for debugging
Provide fallback behavior when possible
Use appropriate data structures for the task
Never add code comments unless explicitly requested
When modifying code, do not add comments that reference previous implementations or explain what changed. Comments should only describe the current logic and functionality.
Use meaningful names for branches, variables, and functions
Always runyarn lint --fixandyarn type-checkafter making changes
Avoidletvariable assignments - preferconstwith inline IIFE switch statements or extract to functions for conditional logic
Files:
src/features/defi/providers/fox-farming/hooks/useFoxFarming.tssrc/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Avoid useEffect where practical - use it only when necessary and following best practices
Avoid 'any' types - use specific type annotations instead
For default values with user overrides, use computed values (useMemo) instead of useEffect - pattern:userSelected ?? smartDefault ?? fallback
When function parameters are unused due to interface requirements, refactor the interface or implementation to remove them rather than prefixing with underscore
Sanitize data before displaying to prevent XSS
Memoize aggressively - wrap component variables inuseMemoand callbacks inuseCallbackwhere possible
For static JSX icon elements (e.g.,<TbCopy />) that don't depend on state/props, define them as constants outside the component to avoid re-renders instead of using useMemo
Account for light/dark mode usinguseColorModeValuehook
Account for responsive mobile designs in all UI components
When applying styles, use the existing standards and conventions of the codebase
Use Chakra UI components and conventions
All copy/text must use translation keys - never hardcode strings
Use the translation hook:useTranslate()fromreact-polyglot
UseuseFeatureFlag('FlagName')hook to access feature flag values in components
Prefertypeoverinterfacefor type definitions
Use strict typing - avoidany
UseNominaltypes for domain identifiers (e.g.,WalletId,AccountId)
Import types from@shapeshiftoss/caipfor chain/account/asset IDs
UseuseAppSelectorfor Redux state
UseuseAppDispatchfor Redux actions
Memoize expensive computations withuseMemo
Memoize callbacks withuseCallback
**/*.{ts,tsx}: UseResult<T, E>pattern for error handling in swappers and APIs; ALWAYS useOk()andErr()from@sniptt/monads; AVOID throwing within swapper API implementations
ALWAYS use custom error classes from@shapeshiftoss/errorswith meaningful error codes for internationalization and relevant details in error objects
ALWAYS wrap async op...
Files:
src/features/defi/providers/fox-farming/hooks/useFoxFarming.tssrc/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/naming-conventions.mdc)
**/*.{js,jsx,ts,tsx}: Use camelCase for variables, functions, and methods with descriptive names that explain the purpose
Use verb prefixes for functions that perform actions (e.g., fetch, validate, execute, update, calculate)
Use UPPER_SNAKE_CASE for constants and configuration values with descriptive names
Usehandleprefix for event handlers with descriptive names in camelCase
Use descriptive boolean variable names withis,has,can,shouldprefixes
Use named exports for components, functions, and utilities instead of default exports
Use descriptive import names and avoid renaming imports unless necessary
Avoid non-descriptive variable names likedata,item,obj, and single-letter variable names except in loops
Avoid abbreviations in names unless they are widely understood
Avoid generic function names likefn,func, orcallback
Files:
src/features/defi/providers/fox-farming/hooks/useFoxFarming.tssrc/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
**/*.{tsx,jsx}
📄 CodeRabbit inference engine (.cursor/rules/error-handling.mdc)
**/*.{tsx,jsx}: ALWAYS wrap React components in error boundaries and provide user-friendly fallback components with error logging
ALWAYS useuseErrorToasthook for displaying errors with translated error messages and handle different error types appropriatelyUse PascalCase for React component names and match the component name to the file name
Files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
**/*.{jsx,tsx}
📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)
**/*.{jsx,tsx}: ALWAYS useuseMemofor expensive computations, object/array creations, and filtered data
ALWAYS useuseMemofor derived values and computed properties
ALWAYS useuseMemofor conditional values and simple transformations
ALWAYS useuseCallbackfor event handlers and functions passed as props
ALWAYS useuseCallbackfor any function that could be passed as a prop or dependency
ALWAYS include all dependencies inuseEffect,useMemo,useCallbackdependency arrays
NEVER use// eslint-disable-next-line react-hooks/exhaustive-depsunless absolutely necessary, and ALWAYS explain why dependencies are excluded if using eslint disable
ALWAYS use named exports for components; NEVER use default exports for components
KEEP component files under 200 lines when possible; BREAK DOWN large components into smaller, reusable pieces
EXTRACT complex logic into custom hooks
ALWAYS wrap components in error boundaries for production
ALWAYS handle async errors properly in async operations
ALWAYS provide user-friendly error messages in error handling
ALWAYS use virtualization for lists with 100+ items
ALWAYS implement proper key props for list items
ALWAYS lazy load heavy components using React.lazy for code splitting
ALWAYS use Suspense wrapper for lazy loaded components
USE local state for component-level state; LIFT state up when needed across multiple components; USE Context for avoiding prop drilling; USE Redux only for global state shared across multiple places
Wrap components receiving props withmemofor performance optimization
Files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
**/*.tsx
📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)
Ensure TypeScript types are explicit and proper; avoid use of
anytype
Files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
🧠 Learnings (29)
📓 Common learnings
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11170
File: patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch:9-19
Timestamp: 2025-11-25T21:43:10.838Z
Learning: In shapeshift/web, gomesalexandre will not expand PR scope to fix latent bugs in unused API surface (like bitcoinjs-lib patch validation methods) when comprehensive testing proves the actual used code paths work correctly, preferring to avoid costly hdwallet/web verdaccio publish cycles and full regression testing for conceptual issues with zero runtime impact.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10461
File: src/plugins/walletConnectToDapps/utils/tenderly/index.ts:0-0
Timestamp: 2025-09-12T11:56:19.437Z
Learning: gomesalexandre rejected verbose try/catch error handling for address validation in Tenderly integration (PR #10461), calling the approach "ugly" but still implemented safety measures in commit ad7e424b89, preferring cleaner safety implementations over defensive programming patterns.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10461
File: src/plugins/walletConnectToDapps/components/modals/EIP712MessageDisplay.tsx:21-24
Timestamp: 2025-09-12T13:16:27.004Z
Learning: gomesalexandre declined to add error boundaries to WalletConnect modals in PR #10461, stating "no error boundaries in this pr ser", consistent with his preference to keep PR scope focused and defer tangential improvements to separate efforts.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10418
File: src/plugins/walletConnectToDapps/components/header/WalletConnectToDappsHeaderButton.tsx:0-0
Timestamp: 2025-09-08T22:00:48.005Z
Learning: gomesalexandre dismissed an aria-label accessibility suggestion with "meh" in PR #10418 for WalletConnectToDappsHeaderButton.tsx, consistent with the team's pattern of deferring minor a11y improvements to follow-up PRs rather than expanding feature PR scope.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10569
File: src/plugins/walletConnectToDapps/components/WalletConnectSigningModal/WalletConnectModalSigningFooter.tsx:121-129
Timestamp: 2025-09-17T22:40:30.149Z
Learning: gomesalexandre maintains strict scope discipline even for style/UI PRs in shapeshift/web, declining functionally correct UX improvements (like keeping Cancel button enabled during gas simulation loading) when they fall outside the PR's stated styling objectives, demonstrating his consistent pattern of deferring valid but tangential improvements to separate efforts.
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10231
File: src/components/AssetSearch/components/AssetList.tsx:2-2
Timestamp: 2025-08-08T15:00:49.887Z
Learning: Project shapeshift/web: NeOMakinG prefers avoiding minor a11y/UI nitpicks (e.g., adding aria-hidden to decorative icons in empty states like src/components/AssetSearch/components/AssetList.tsx) within feature PRs; defer such suggestions to a follow-up instead of blocking the PR.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10751
File: src/Routes/RoutesCommon.tsx:190-190
Timestamp: 2025-10-13T11:55:57.439Z
Learning: In the shapeshift/web codebase, there are multiple independent claim systems: Arbitrum bridge claims (removed in PR #10751), RFOX claims (in src/pages/RFOX/components/Claim/), and TCY claims (in src/pages/TCY/). Each has its own routes, components, and logic. When reviewing claim-related changes, distinguish which system is being modified and avoid suggesting changes to unrelated claim systems.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10879
File: src/context/WalletProvider/WalletConnectV2/components/WalletConnectDirectRow.tsx:64-81
Timestamp: 2025-10-22T22:11:22.918Z
Learning: In early WalletConnect POC/features behind a flag, gomesalexandre prioritizes connection correctness/stability over UX polish; minimal safety guards (like preventing concurrent connects) are preferred, while visuals will be wired later by reallybeard.
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10323
File: src/components/ButtonWalletPredicate/ButtonWalletPredicate.tsx:7-7
Timestamp: 2025-08-27T09:47:06.275Z
Learning: In shapeshift/web project, NeOMakinG consistently prefers to defer UI/UX improvements and refactoring work (like the Drawer.Close hack fix in ButtonWalletPredicate.tsx) to follow-up PRs rather than expanding the scope of feature PRs, even when the improvements would enhance robustness.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10566
File: src/hooks/useLedgerAccountGuard/useLedgerAccountGuard.tsx:4-4
Timestamp: 2025-09-23T10:36:13.916Z
Learning: gomesalexandre dismisses suggestions to expand PR scope beyond the current migration when the PR is already systematically implementing the desired pattern (like KeyManager.Ledger migration) within focused boundaries, preferring to keep scope contained rather than doing comprehensive codebase-wide cleanups.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10206
File: src/config.ts:127-128
Timestamp: 2025-08-07T11:20:44.614Z
Learning: gomesalexandre prefers required environment variables without default values in the config file (src/config.ts). They want explicit configuration and fail-fast behavior when environment variables are missing, rather than having fallback defaults.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10461
File: src/plugins/walletConnectToDapps/components/modals/ContractInteractionBreakdown.tsx:0-0
Timestamp: 2025-09-13T16:45:18.813Z
Learning: gomesalexandre prefers aggressively deleting unused/obsolete code files ("ramboing") rather than fixing technical issues in code that won't be used, demonstrating his preference for keeping codebases clean and PR scope focused.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10458
File: src/plugins/walletConnectToDapps/types.ts:7-7
Timestamp: 2025-09-10T15:34:29.604Z
Learning: gomesalexandre is comfortable relying on transitive dependencies (like abitype through ethers/viem) rather than explicitly declaring them in package.json, preferring to avoid package.json bloat when the transitive dependency approach works reliably in practice.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10503
File: .env:56-56
Timestamp: 2025-09-16T13:17:02.938Z
Learning: gomesalexandre prefers to enable feature flags globally in the base .env file when the intent is to activate features everywhere, even when there are known issues like crashes, demonstrating his preference for intentional global feature rollouts over cautious per-environment enablement.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10249
File: src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx:447-503
Timestamp: 2025-08-13T17:07:10.763Z
Learning: gomesalexandre prefers relying on TypeScript's type system for validation rather than adding defensive runtime null checks when types are properly defined. They favor a TypeScript-first approach over defensive programming with runtime validations.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/hooks/useActionCenterSubscribers/useThorchainLpDepositActionSubscriber.tsx:61-66
Timestamp: 2025-08-14T17:51:47.556Z
Learning: gomesalexandre is not concerned about structured logging and prefers to keep console.error usage as-is rather than implementing structured logging patterns, even when project guidelines suggest otherwise.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10413
File: src/components/Modals/FiatRamps/fiatRampProviders/onramper/utils.ts:29-55
Timestamp: 2025-09-02T14:26:19.028Z
Learning: gomesalexandre prefers to keep preparatory/reference code simple until it's actively consumed, rather than implementing comprehensive error handling, validation, and robustness improvements upfront. They prefer to add these improvements when the code is actually being used in production.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx:396-402
Timestamp: 2025-08-14T17:55:57.490Z
Learning: gomesalexandre is comfortable with functions/variables that return undefined or true (tri-state) when only the truthy case matters, preferring to rely on JavaScript's truthy/falsy behavior rather than explicitly returning boolean values.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10783
File: src/context/ModalStackProvider/useModalRegistration.ts:30-41
Timestamp: 2025-10-16T11:14:40.657Z
Learning: gomesalexandre prefers to add lint rules (like typescript-eslint/strict-boolean-expressions for truthiness checks on numbers) to catch common issues project-wide rather than relying on code review to catch them.
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10206
File: src/lib/moralis.ts:47-85
Timestamp: 2025-08-07T11:22:16.983Z
Learning: gomesalexandre prefers console.error over structured logging for Moralis API integration debugging, as they find it more conventional and prefer to examine XHR requests directly rather than rely on structured logs for troubleshooting.
📚 Learning: 2025-08-22T13:02:58.824Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10323
File: src/pages/RFOX/hooks/useRfoxRewardDistributionActionSubscriber.tsx:33-41
Timestamp: 2025-08-22T13:02:58.824Z
Learning: In src/pages/RFOX/hooks/useRfoxRewardDistributionActionSubscriber.tsx, NeOMakinG declined optimizing useMemo dependencies to depend on lifetimeRewardDistributionsQuery.data instead of the entire query object, indicating indifference toward this type of performance optimization.
Applied to files:
src/features/defi/providers/fox-farming/hooks/useFoxFarming.tssrc/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-11-24T21:20:04.979Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: Applies to **/*.{ts,tsx} : Import types from `shapeshiftoss/caip` for chain/account/asset IDs
Applied to files:
src/features/defi/providers/fox-farming/hooks/useFoxFarming.tssrc/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-10-13T11:55:57.439Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10751
File: src/Routes/RoutesCommon.tsx:190-190
Timestamp: 2025-10-13T11:55:57.439Z
Learning: In the shapeshift/web codebase, there are multiple independent claim systems: Arbitrum bridge claims (removed in PR #10751), RFOX claims (in src/pages/RFOX/components/Claim/), and TCY claims (in src/pages/TCY/). Each has its own routes, components, and logic. When reviewing claim-related changes, distinguish which system is being modified and avoid suggesting changes to unrelated claim systems.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-08-22T12:58:26.590Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10323
File: src/components/Layout/Header/ActionCenter/components/GenericTransactionActionCard.tsx:108-111
Timestamp: 2025-08-22T12:58:26.590Z
Learning: In the RFOX GenericTransactionDisplayType flow in src/components/Layout/Header/ActionCenter/components/GenericTransactionActionCard.tsx, the txHash is always guaranteed to be present according to NeOMakinG, so defensive null checks for txLink are not needed in this context.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-11-20T12:00:45.005Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11078
File: src/setupVitest.ts:11-15
Timestamp: 2025-11-20T12:00:45.005Z
Learning: In shapeshift/web, src/setupVitest.ts must redirect 'ethers' to 'ethers5' for shapeshiftoss/hdwallet-trezor (and -trezor-connect), same as ledger and shapeshift-multichain. Removing 'trezor' from the regex causes CI/Vitest failures due to ethers v6 vs v5 API differences.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-08-08T11:41:36.971Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10234
File: src/components/MultiHopTrade/hooks/useGetTradeQuotes/hooks/useTrackTradeQuotes.ts:88-109
Timestamp: 2025-08-08T11:41:36.971Z
Learning: In MultiHopTrade Confirm flow (src/components/MultiHopTrade/components/TradeConfirm/TradeConfirm.tsx), the Confirm route does not remount; navigating away goes to the swapper input page. Therefore, persistent deduplication across remounts for quote tracking is unnecessary; a ref-based single-mount dedupe is sufficient.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-09-04T12:16:47.748Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10430
File: src/components/Layout/Header/NavBar/PopoverWallet.tsx:72-94
Timestamp: 2025-09-04T12:16:47.748Z
Learning: gomesalexandre declined to add error boundaries to the PopoverWallet component in src/components/Layout/Header/NavBar/PopoverWallet.tsx, stating he didn't touch this component and preferring not to expand the scope of the PR with error boundary additions.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx
📚 Learning: 2025-10-07T03:44:27.350Z
Learnt from: 0xApotheosis
Repo: shapeshift/web PR: 10760
File: src/components/ManageHiddenAssets/ManageHiddenAssetsList.tsx:78-84
Timestamp: 2025-10-07T03:44:27.350Z
Learning: In the ShapeShift web codebase, the following are stable references and do not need to be included in useCallback/useMemo dependency arrays:
- `navigate` from `useBrowserRouter()` hook
- Modal control objects (like `walletDrawer`) from `useModal()` hook (including their `isOpen`, `close`, and `open` methods)
- These are backed by stable context providers
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-09-04T17:29:59.479Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10380
File: src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx:28-33
Timestamp: 2025-09-04T17:29:59.479Z
Learning: In shapeshift/web, the useGetPopularAssetsQuery function in src/components/TradeAssetSearch/hooks/useGetPopularAssetsQuery.tsx intentionally uses primaryAssets[assetId] instead of falling back to assets[assetId]. The design distributes primary assets across chains by iterating through their related assets and adding the primary asset to each related asset's chain. This ensures primary assets appear in all chains where they have related assets, supporting the grouped asset system.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-08-05T23:36:13.214Z
Learnt from: premiumjibles
Repo: shapeshift/web PR: 10187
File: src/state/slices/preferencesSlice/selectors.ts:21-25
Timestamp: 2025-08-05T23:36:13.214Z
Learning: The AssetId type from 'shapeshiftoss/caip' package is a string type alias, so it can be used directly as a return type for cache key resolvers in re-reselect selectors without needing explicit string conversion.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-11-05T23:37:30.632Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10912
File: src/context/WalletProvider/NewWalletViews/NewWalletViewsSwitch.tsx:290-290
Timestamp: 2025-11-05T23:37:30.632Z
Learning: In the ShapeShift web codebase, `isMobile` imported from '@/lib/globals' is a module-level constant (defined as `export const isMobile = Boolean(window?.isShapeShiftMobile)`) that is evaluated once at module load time. It is a stable reference that does not need to be included in useCallback/useMemo/useEffect dependency arrays.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-11-19T16:59:50.569Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 11012
File: src/context/WalletProvider/Vultisig/components/Connect.tsx:24-59
Timestamp: 2025-11-19T16:59:50.569Z
Learning: In src/context/WalletProvider/*/components/Connect.tsx files across the ShapeShift web codebase, the established pattern for handling null/undefined adapter from getAdapter() is to simply check `if (adapter) { ... }` without an else clause. All wallet Connect components (Coinbase, Keplr, Phantom, Ledger, MetaMask, WalletConnectV2, KeepKey, Vultisig) follow this pattern—they reset loading state after the if block but do not show error messages when adapter is null. This is an intentional design decision and should be maintained for consistency.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-07-29T10:27:23.424Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10128
File: .cursor/rules/react-best-practices.mdc:8-14
Timestamp: 2025-07-29T10:27:23.424Z
Learning: The ShapeShift team practices aggressive memoization in React components as documented in .cursor/rules/react-best-practices.mdc. They use useMemo for all transformations, derived values, and conditional values, and useCallback for all event handlers and functions that could be passed as props. This approach was adopted after experiencing performance issues ("had hard time") and is their current established practice, though they acknowledge it may evolve in the future.
Applied to files:
src/pages/RFOX/components/Claim/ClaimConfirm.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-08-14T17:54:32.563Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/pages/ThorChainLP/components/ReusableLpStatus/ReusableLpStatus.tsx:97-108
Timestamp: 2025-08-14T17:54:32.563Z
Learning: In ReusableLpStatus component (src/pages/ThorChainLP/components/ReusableLpStatus/ReusableLpStatus.tsx), the txAssets dependency is stable from first render because poolAsset, baseAsset, actionSide, and action are all defined first render, making the current txAssetsStatuses initialization pattern safe without needing useEffect synchronization.
Applied to files:
src/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx
📚 Learning: 2025-08-05T22:41:35.473Z
Learnt from: premiumjibles
Repo: shapeshift/web PR: 10187
File: src/pages/Assets/Asset.tsx:1-1
Timestamp: 2025-08-05T22:41:35.473Z
Learning: In the shapeshift/web codebase, component imports use direct file paths like '@/components/ComponentName/ComponentName' rather than barrel exports. The AssetAccountDetails component should be imported as '@/components/AssetAccountDetails/AssetAccountDetails', not from a directory index.
Applied to files:
src/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-08-11T09:46:41.060Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10219
File: src/components/MultiHopTrade/components/TradeInput/TradeInput.tsx:167-172
Timestamp: 2025-08-11T09:46:41.060Z
Learning: In the shapeshift/web repository, the display cache logic for trade quotes (using `selectUserAvailableTradeQuotes` and `selectUserUnavailableTradeQuotes`) is intentionally kept the same between `TradeInput.tsx` and `TradeQuotes.tsx` components. The `hasQuotes` computation in `TradeInput.tsx` uses these display cache selectors by design, matching the pattern used in `TradeQuotes.tsx`.
Applied to files:
src/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsxsrc/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsx
📚 Learning: 2025-11-24T21:20:57.909Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-11-24T21:20:57.909Z
Learning: Applies to packages/swapper/src/swappers/*/utils/constants.ts : Define supported chain IDs for each swapper in utils/constants.ts with both 'sell' and 'buy' properties following the pattern: SupportedChainIds type
Applied to files:
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-10-15T15:57:39.956Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10810
File: src/plugins/walletConnectToDapps/utils/tenderly/index.ts:212-0
Timestamp: 2025-10-15T15:57:39.956Z
Learning: gomesalexandre uses discriminated union patterns (e.g., `isEIP1559 ? { max_fee_per_gas, max_priority_fee_per_gas } : { gas_price }`) in WalletConnect flows without additional validation guards, trusting that the runtime data structure ensures mutual exclusivity between EIP-1559 and legacy gas pricing fields.
Applied to files:
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-10-23T14:27:19.073Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10857
File: src/plugins/walletConnectToDapps/eventsManager/useWalletConnectEventsHandler.ts:101-104
Timestamp: 2025-10-23T14:27:19.073Z
Learning: In WalletConnect wallet_switchEthereumChain and wallet_addEthereumChain requests, the chainId parameter is always present as per the protocol spec. Type guards checking for missing chainId in these handlers (like `if (!evmNetworkIdHex) return`) are solely for TypeScript compiler satisfaction, not real runtime edge cases.
Applied to files:
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.ts
📚 Learning: 2025-11-24T21:20:04.979Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T21:20:04.979Z
Learning: Each wallet has unique `walletId` (e.g., `metamask:0x123`, `ledger:ABC`)
Applied to files:
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.tssrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx
📚 Learning: 2025-10-21T17:11:18.087Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10871
File: src/components/Modals/Send/hooks/useSendDetails/useSendDetails.tsx:426-428
Timestamp: 2025-10-21T17:11:18.087Z
Learning: In src/components/Modals/Send/hooks/useSendDetails/useSendDetails.tsx, within the handleInputChange function, use .toFixed() without arguments (not .toString()) when converting BigNumber amounts for input field synchronization. This avoids exponential notation in the input while preserving precision for presentational components like <Amount.Crypto /> and <Amount.Fiat /> to format appropriately.
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsxsrc/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
📚 Learning: 2025-11-24T21:20:57.909Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-11-24T21:20:57.909Z
Learning: Applies to packages/swapper/src/swappers/*/*.ts : Reuse executeEvmTransaction utility for EVM-based swappers instead of implementing custom transaction execution
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-08-22T15:07:18.021Z
Learnt from: kaladinlight
Repo: shapeshift/web PR: 10326
File: src/hooks/useActionCenterSubscribers/useThorchainLpActionSubscriber.tsx:37-41
Timestamp: 2025-08-22T15:07:18.021Z
Learning: In src/hooks/useActionCenterSubscribers/useThorchainLpActionSubscriber.tsx, kaladinlight prefers not to await the upsertBasePortfolio call in the Base chain handling block, indicating intentional fire-and-forget behavior for Base portfolio upserts in the THORChain LP completion flow.
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-11-24T21:20:57.909Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-11-24T21:20:57.909Z
Learning: Applies to packages/swapper/src/swappers/*/*.ts : Implement filterBuyAssetsBySellAssetId method to filter assets by supported chain IDs in the buy property
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-10-01T07:42:40.195Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10596
File: src/components/Layout/Header/NavBar/WalletConnectedMenu.tsx:77-99
Timestamp: 2025-10-01T07:42:40.195Z
Learning: In WalletConnectedMenu.tsx's handleReconnectWallet handler, gomesalexandre prefers throwing an error for unsupported wallet types in the default case rather than gracefully handling with a fallback. His reasoning: "if we have a problem here, we have bigger problems" - only supported wallets (KeepKey, Ledger, MetaMask, Coinbase, Phantom) should reach the reconnect flow when disconnected/locked, so encountering an unsupported type indicates a larger architectural issue that should be surfaced explicitly rather than masked with graceful degradation.
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsxsrc/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx
📚 Learning: 2025-11-24T21:20:57.909Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/swapper.mdc:0-0
Timestamp: 2025-11-24T21:20:57.909Z
Learning: Applies to packages/swapper/src/swappers/*/*.ts : Implement filterAssetIdsBySellable method to filter assets by supported chain IDs in the sell property
Applied to files:
src/lib/utils/thorchain/hooks/useSendThorTx.tsx
📚 Learning: 2025-08-22T13:16:12.721Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10323
File: src/pages/RFOX/hooks/useRfoxRewardDistributionActionSubscriber.tsx:104-105
Timestamp: 2025-08-22T13:16:12.721Z
Learning: In src/pages/RFOX/hooks/useRfoxRewardDistributionActionSubscriber.tsx, the guard `if (!actions[actionId]) return` before upserting completed reward distributions is intentional product behavior. NeOMakinG confirmed that the system should only show completion notifications for reward distributions that were previously seen in a pending state, not for distributions the user missed during the pending phase.
Applied to files:
src/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsxsrc/pages/RFOX/components/Stake/hooks/useRfoxStake.tsx
📚 Learning: 2025-08-29T07:07:49.332Z
Learnt from: premiumjibles
Repo: shapeshift/web PR: 10386
File: src/components/MultiHopTrade/components/VerifyAddresses/VerifyAddresses.tsx:272-294
Timestamp: 2025-08-29T07:07:49.332Z
Learning: In UTXO sell address verification flow in VerifyAddresses.tsx, the user wants address verification to be marked as "verified/complete" before starting the change address fetch, not after. The verification step and change address fetch should be treated as separate sequential operations in the UI flow.
Applied to files:
src/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx
🧬 Code graph analysis (1)
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.ts (1)
src/lib/utils/evm/index.ts (1)
buildAndBroadcast(98-112)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Call / Static
🔇 Additional comments (10)
src/features/defi/providers/fox-farming/hooks/useFoxFarming.ts (1)
6-6: LGTM! Trezor pubKey handling implemented consistently.The Trezor-specific pubKey derivation is correctly added to all three transaction paths (stake, unstake, claimRewards) with proper dependency array updates. The conditional logic ensures pubKey is only populated when both the wallet is Trezor and farmingAccountId exists.
Also applies to: 84-87, 110-110, 133-136, 159-159, 317-318, 336-336
src/features/defi/providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Approve.tsx (1)
5-5: LGTM! Trezor pubKey handling correctly integrated.The pubKey is conditionally included when the wallet is Trezor and accountId is present, following the established pattern across the codebase.
Also applies to: 169-169
src/lib/utils/thorchain/hooks/useSendThorTx.tsx (1)
5-5: LGTM! Trezor pubKey handling for EVM custom transactions.The pubKey is correctly added for EvmCustomTx transaction types when using Trezor wallets, consistent with the pattern established across other transaction builders.
Also applies to: 353-353
src/pages/RFOX/components/Stake/hooks/useRfoxStake.tsx (1)
5-5: LGTM! Trezor pubKey handling for RFOX staking.Both the stake mutation and approval mutation correctly include pubKey when using Trezor wallets, maintaining consistency with the pattern used throughout the codebase.
Also applies to: 235-238, 350-353
src/pages/RFOX/components/ChangeAddress/ChangeAddressConfirm.tsx (1)
16-16: LGTM! Trezor pubKey handling for RFOX change address.The change address transaction correctly includes pubKey when using Trezor wallets, following the established pattern.
Also applies to: 174-177
src/pages/RFOX/components/Unstake/hooks/useRfoxUnstake.tsx (1)
5-5: LGTM! Trezor pubKey handling for RFOX unstaking.The unstake transaction correctly includes pubKey when using Trezor wallets, maintaining consistency with the staking flow.
Also applies to: 166-169
src/pages/RFOX/components/Claim/ClaimConfirm.tsx (1)
16-16: LGTM! Trezor pubKey handling for RFOX claims.The claim transaction correctly includes pubKey when using Trezor wallets, following the established pattern across RFOX flows.
Also applies to: 175-178
src/pages/RFOX/components/Stake/Bridge/hooks/useRfoxBridgeApproval.tsx (1)
2-2: LGTM! Trezor pubKey handling for bridge approval.The bridge approval transaction correctly includes pubKey when using Trezor wallets, maintaining consistency with other approval flows in the codebase.
Also applies to: 97-100
src/features/defi/providers/univ2/hooks/useUniV2LiquidityPool.ts (2)
11-11: Trezor pubKey wiring for addLiquidity looks correctImporting
isTrezorand conditionally addingpubKeytocreateBuildCustomTxInput(gated onisTrezor(wallet) && accountId) ensures the EVM adapter will have the account-derived pubKey available when building/signing, which should prevent extra Trezor Suite prompts. Updating theaddLiquiditydependencies to includeaccountIdis also correct given the new usage. Please just double‑check in manual testing that theaccountIdpassed into this hook is always the expected Ethereum account for this pool so the derived pubKey matches the wallet path.Also applies to: 211-220, 233-245
626-637: Approve-asset path Trezor handling matches other flowsThe conditional spread
...(isTrezor(wallet) && accountId && { pubKey: fromAccountId(accountId).account })insidebuildCustomTxInputis a clean way to addpubKeyonly for Trezor wallets with an accountId, and it’s consistent with the add/remove flows. IncludingaccountIdin theapproveAssetdependencies is also necessary and correct. This should ensure ERC-20 approvals no longer trigger separate Trezor Suite address-derivation prompts.Also applies to: 642-642
NeOMakinG
left a comment
There was a problem hiding this comment.
https://jam.dev/c/4441441e-116e-49d5-a4af-b1ca0772e7c7
Didn't test runepool but looks good overall for other features, leaving runepool for ops
Description
Adds derivation skip in a few missing places for Trezor:
Issue (if applicable)
N/A, spotted in release
Risk
Testing
Engineering
Operations
Not anymore! We're live.
Screenshots (if applicable)
https://jam.dev/c/c5c17841-0d33-4783-8762-a1a4c6a81419
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.