Skip to content

feat: rename 'Recipient Address' -> 'Receive Address' - #11210

Merged
gomesalexandre merged 6 commits into
developfrom
feat_destination_address_receive_vernacular
Dec 1, 2025
Merged

feat: rename 'Recipient Address' -> 'Receive Address'#11210
gomesalexandre merged 6 commits into
developfrom
feat_destination_address_receive_vernacular

Conversation

@gomesalexandre

@gomesalexandre gomesalexandre commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

Description

Does what it says on the box.

Issue (if applicable)

closes #11208

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Low

Testing

  • Ensure "Receive Address" vernacular used across the board

Engineering

  • ^

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)
  • ^

Screenshots (if applicable)

https://jam.dev/c/4c54d45a-a2cb-49c6-b7d4-eb3d67b21bcd

Summary by CodeRabbit

  • Localization

    • Renamed trade UI labels and related placeholders/tooltips/aria labels from "Recipient address" to "Receive address" across supported languages.
  • Chores

    • Removed legacy/custom recipient-address prompts and descriptive copy to simplify the trade flow and reduce UI options.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Nov 27, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This PR standardizes terminology from "recipient address" to "receive address" across the codebase: translation keys were removed/renamed, components/hook names and props were renamed, imports/usages updated, and limit-order API param renamed from recipientAddressreceiveAddress.

Changes

Cohort / File(s) Summary
Translations (removed keys)
src/assets/translations/de/main.json, src/assets/translations/es/main.json, src/assets/translations/fr/main.json, src/assets/translations/ja/main.json, src/assets/translations/pt/main.json, src/assets/translations/ru/main.json, src/assets/translations/tr/main.json, src/assets/translations/uk/main.json, src/assets/translations/zh/main.json
Removed trade keys: recipientAddress, customRecipientAddress, customRecipientAddressDescription, thisIsYourCustomRecipientAddress, enterCustomRecipientAddress.
English translations (renames)
src/assets/translations/en/main.json
Renamed trade keys: recipientAddressreceiveAddress and customRecipientAddress*customReceiveAddress* with updated label texts.
Shared input component
src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
Renamed component/types from Recipient* → Receive*; replaced SharedRecipientAddress usage with SharedTradeReceiveAddress; updated props, handlers, state names, and translation keys to "receive".
Receive address row component
src/components/ReceiveAddressRow.tsx
Renamed RecipientAddressRowReceiveAddressRow; prop recipientAddressreceiveAddress; updated types, displayed value, explorer link, and translation key to trade.receiveAddress.
Trade input / Confirm components
src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx, src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
Renamed RecipientAddressReceiveAddress; swapped shared component to SharedTradeReceiveAddress; prop recipientAddressDescriptionreceiveAddressDescription.
Trade confirm components
src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx, src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
Replaced RecipientAddressRow imports/usages with ReceiveAddressRow; pass receiveAddress prop.
Limit order hook & input
src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx, src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
Renamed hook and types: useLimitOrderRecipientAddressuseLimitOrderReceiveAddress; return shape and local identifiers changed from recipient* → receive*; limitOrderQuoteParams field recipientAddressreceiveAddress.
Fiat ramps usage
src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
Replaced SharedRecipientAddress import/usage with SharedTradeReceiveAddress.
API param update
src/state/apis/limit-orders/limitOrderApi.ts
Renamed LimitOrderQuoteParams field recipientAddressreceiveAddress; query and limitOrderQuoteRequest.receiver now use receiveAddress.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to focus during review:
    • Ensure all runtime references to translation keys match the new English keys or have fallbacks for removed keys in non-English files.
    • Confirm all consumer imports/usages of renamed components, hooks, props, and types were updated (search for residual recipientAddress identifiers).
    • Verify limit-order API param rename is backward-compatible where used (call sites and types).
    • Check accessibility labels and explorer link constructions for consistent prop renames.

Possibly related PRs

Suggested reviewers

  • NeOMakinG

Poem

🐰 I hopped through keys with nimble paws,

"recipient" swapped for "receive" because,
Components renamed, translations refined,
Props aligned and hooks redesigned,
A little rabbit's tidy applause. 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: renaming 'Recipient Address' to 'Receive Address' throughout the codebase.
Linked Issues check ✅ Passed All acceptance criteria from issue #11208 are met: translation keys, components, props, and UI text have been systematically renamed from 'Recipient Address' to 'Receive Address' across all files.
Out of Scope Changes check ✅ Passed All changes are directly aligned with the objective to rename 'Recipient Address' to 'Receive Address'; no unrelated modifications were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat_destination_address_receive_vernacular

📜 Recent 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.

📥 Commits

Reviewing files that changed from the base of the PR and between fa5d7b2 and f1c1231.

📒 Files selected for processing (4)
  • src/assets/translations/en/main.json (1 hunks)
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (8 hunks)
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (12 hunks)
  • src/state/apis/limit-orders/limitOrderApi.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{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 run yarn lint --fix and yarn type-check after making changes
Avoid let variable assignments - prefer const with inline IIFE switch statements or extract to functions for conditional logic

Files:

  • src/state/apis/limit-orders/limitOrderApi.ts
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.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 in useMemo and callbacks in useCallback where 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 using useColorModeValue hook
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() from react-polyglot
Use useFeatureFlag('FlagName') hook to access feature flag values in components
Prefer type over interface for type definitions
Use strict typing - avoid any
Use Nominal types for domain identifiers (e.g., WalletId, AccountId)
Import types from @shapeshiftoss/caip for chain/account/asset IDs
Use useAppSelector for Redux state
Use useAppDispatch for Redux actions
Memoize expensive computations with useMemo
Memoize callbacks with useCallback

**/*.{ts,tsx}: Use Result<T, E> pattern for error handling in swappers and APIs; ALWAYS use Ok() and Err() from @sniptt/monads; AVOID throwing within swapper API implementations
ALWAYS use custom error classes from @shapeshiftoss/errors with meaningful error codes for internationalization and relevant details in error objects
ALWAYS wrap async op...

Files:

  • src/state/apis/limit-orders/limitOrderApi.ts
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
src/state/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

src/state/**/*.{ts,tsx}: Use createDeepEqualOutputSelector from @/state/selector-utils for deep equality checks
Use createCachedSelector from re-reselect for parameterized selectors

Files:

  • src/state/apis/limit-orders/limitOrderApi.ts
**/*.{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
Use handle prefix for event handlers with descriptive names in camelCase
Use descriptive boolean variable names with is, has, can, should prefixes
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 like data, item, obj, and single-letter variable names except in loops
Avoid abbreviations in names unless they are widely understood
Avoid generic function names like fn, func, or callback

Files:

  • src/state/apis/limit-orders/limitOrderApi.ts
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.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 use useErrorToast hook for displaying errors with translated error messages and handle different error types appropriately

Use PascalCase for React component names and match the component name to the file name

Files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)

**/*.{jsx,tsx}: ALWAYS use useMemo for expensive computations, object/array creations, and filtered data
ALWAYS use useMemo for derived values and computed properties
ALWAYS use useMemo for conditional values and simple transformations
ALWAYS use useCallback for event handlers and functions passed as props
ALWAYS use useCallback for any function that could be passed as a prop or dependency
ALWAYS include all dependencies in useEffect, useMemo, useCallback dependency arrays
NEVER use // eslint-disable-next-line react-hooks/exhaustive-deps unless 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 with memo for performance optimization

Files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)

Ensure TypeScript types are explicit and proper; avoid use of any type

Files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
src/assets/translations/en/main.json

📄 CodeRabbit inference engine (CLAUDE.md)

Add English copy to src/assets/translations/en/main.json (find appropriate section)

Files:

  • src/assets/translations/en/main.json
🧠 Learnings (11)
📓 Common learnings
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: 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: 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-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/state/apis/limit-orders/limitOrderApi.ts
📚 Learning: 2025-08-08T11:40:55.734Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10234
File: src/components/MultiHopTrade/components/TradeConfirm/TradeConfirm.tsx:41-41
Timestamp: 2025-08-08T11:40:55.734Z
Learning: In MultiHopTrade confirm flow (src/components/MultiHopTrade/components/TradeConfirm/TradeConfirm.tsx and related hooks), there is only one active trade per flow. Because of this, persistent (module/Redux) dedupe for QuotesReceived in useTrackTradeQuotes is not necessary; the existing ref-based dedupe is acceptable.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.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/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
📚 Learning: 2025-07-29T15:04:28.083Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10139
File: src/components/MultiHopTrade/components/TradeConfirm/components/ExpandableStepperSteps.tsx:109-115
Timestamp: 2025-07-29T15:04:28.083Z
Learning: In src/components/MultiHopTrade/components/TradeConfirm/components/ExpandableStepperSteps.tsx, the component is used under an umbrella that 100% of the time contains the quote, making the type assertion `activeTradeQuote?.steps[currentHopIndex] as TradeQuoteStep` safe. Adding conditional returns before hooks would violate React's Rules of Hooks.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.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/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
📚 Learning: 2025-11-24T21:20:17.804Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/error-handling.mdc:0-0
Timestamp: 2025-11-24T21:20:17.804Z
Learning: Applies to **/swapper{s,}/**/*.{ts,tsx} : ALWAYS use `makeSwapErrorRight` for swapper errors with `TradeQuoteError` enum for error codes and provide detailed error information

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
📚 Learning: 2025-09-12T11:56:19.437Z
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.

Applied to files:

  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.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 src/assets/translations/en/main.json : Add English copy to `src/assets/translations/en/main.json` (find appropriate section)

Applied to files:

  • src/assets/translations/en/main.json
📚 Learning: 2025-10-21T23:21:22.304Z
Learnt from: premiumjibles
Repo: shapeshift/web PR: 10759
File: src/components/Modals/Send/hooks/useFormSend/useFormSend.tsx:41-50
Timestamp: 2025-10-21T23:21:22.304Z
Learning: In the shapeshift/web repository, the translation workflow follows an "English-first" approach: English translations in src/assets/translations/en/main.json are updated first in PRs, and translations for the other supported languages (de, es, fr, id, ja, ko, pt, ru, tr, uk, zh) are updated "after the fact" in follow-up work. Temporary mismatches between English and other language translation keys/formats during active development are expected and acceptable.
<!--

Applied to files:

  • src/assets/translations/en/main.json
🧬 Code graph analysis (2)
src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (1)
src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx (1)
  • useLimitOrderReceiveAddress (25-135)
src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (2)
src/components/Text/Text.tsx (2)
  • TextPropTypes (8-11)
  • Text (19-83)
src/components/Modals/Send/AddressInput/AddressInput.tsx (1)
  • AddressInput (61-400)
⏰ 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 (15)
src/assets/translations/en/main.json (2)

755-761: Translation keys properly added for "Receive Address" terminology.

The changes align well with the PR objective to rename from "Recipient Address" to "Receive Address" vernacular. Key naming follows camelCase convention, English copy is grammatically sound, and the placement in the trade section is appropriate for address-related form fields.

As per coding guidelines, the English copy has been appropriately added to the translation file in the correct section.


755-761: Verify complete removal of legacy recipientAddress keys.

The AI summary mentions that old keys (recipientAddress and customRecipientAddress*) were removed to prevent duplicate/conflicting translations. Since the provided code only shows added/modified lines, please confirm in your local changes that:

  1. All instances of the old recipientAddress key have been deleted
  2. All instances of the old customRecipientAddress* keys have been deleted
  3. No stale recipientAddress entries remain elsewhere in the file

This ensures a clean migration without translation key collisions.

src/state/apis/limit-orders/limitOrderApi.ts (2)

54-62: LGTM - API parameter renamed consistently.

The LimitOrderQuoteParams type correctly renames recipientAddress to receiveAddress, aligning with the PR's terminology standardization.


132-196: LGTM - Receive address properly threaded through quote request.

All usages of receiveAddress are updated consistently: destructuring (line 141), mapping to the receiver field in limitOrderQuoteRequest (line 166), and dependency tracking (lines 205, 213).

src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (5)

23-23: LGTM - Hook import updated.

Import correctly renamed from useLimitOrderRecipientAddress to useLimitOrderReceiveAddress.


147-152: LGTM - Hook return values renamed consistently.

All destructured values updated: isReceiveAddressEntryActive, renderedReceiveAddress, and receiveAddress.


192-214: LGTM - Receive address integrated into quote params.

The receiveAddress is correctly included in limitOrderQuoteParams (line 205) and its dependency array (line 213).


378-423: LGTM - Validation logic updated.

The validation switch correctly checks !receiveAddress (line 394) and includes it in the dependency array (line 417).


543-596: LGTM - Footer rendering and dependencies updated.

The isReceiveAddressEntryActive flag is used in button disable logic (line 562), renderedReceiveAddress is rendered (line 575), and both are included in dependencies (lines 591, 593).

src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (6)

45-105: LGTM - Types and component renamed consistently.

ManualReceiveAddressLabelsProps type and ManualReceiveAddressLabels component properly renamed. Translation keys updated to use trade.receiveAddress and trade.receiveAddressDescription.


107-139: LGTM - Public component and props renamed.

SharedTradeReceiveAddressProps type and SharedTradeReceiveAddress component properly renamed. The customReceiveAddressDescription prop follows the new naming convention.


153-181: LGTM - State and translation keys updated.

State variable isReceiveAddressEditing and computed value isCustomReceiveAddress renamed consistently. Translation keys correctly reference trade.customReceiveAddress and trade.receiveAddress.


214-231: LGTM - Event handlers updated.

handleEditReceiveAddressClick and all state setters correctly reference isReceiveAddressEditing. Comments appropriately updated to reference "custom receive address."


265-309: LGTM - Manual address entry form updated.

Conditional rendering uses isReceiveAddressEditing, component reference updated to ManualReceiveAddressLabels, and placeholder translation key updated to trade.enterCustomReceiveAddress.


312-349: LGTM - Address summary display updated.

All references updated: customReceiveAddressDescription prop, receiveAddressTranslation variable, isCustomReceiveAddress check, translation keys trade.thisIsYourCustomReceiveAddress and trade.customReceiveAddressDescription, aria-label "Edit receive address", and handleEditReceiveAddressClick handler.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread src/assets/translations/de/main.json
Comment thread src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx Outdated
@gomesalexandre
gomesalexandre marked this pull request as ready for review November 27, 2025 12:22
@gomesalexandre
gomesalexandre requested a review from a team as a code owner November 27, 2025 12:22

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx (1)

16-16: ReceiveAddressRow integration preserves prior summary behaviour

The summary now uses ReceiveAddressRow with the correct receiveAddress prop and explorer link, maintaining the previous behaviour under the new naming. Non-blocking: if you later want to refine UX when no receive address is available, consider conditionally omitting this row instead of rendering it with an empty string.

Also applies to: 168-171

src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (1)

153-153: Consider renaming internal variables for consistency.

Several internal variables still use "recipient" terminology:

  • isRecipientAddressEditing (line 153)
  • isCustomRecipientAddress (line 177)
  • recipientAddressTranslation (line 178)
  • handleEditRecipientAddressClick (line 214)

Since the PR focuses on UI vernacular, these internal names don't affect users. However, renaming them would improve code consistency and reduce cognitive load for future maintainers.

Also applies to: 177-180, 214-214

📜 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 58342ca and fa9589d.

📒 Files selected for processing (19)
  • src/assets/translations/de/main.json (0 hunks)
  • src/assets/translations/en/main.json (1 hunks)
  • src/assets/translations/es/main.json (0 hunks)
  • src/assets/translations/fr/main.json (0 hunks)
  • src/assets/translations/ja/main.json (0 hunks)
  • src/assets/translations/pt/main.json (0 hunks)
  • src/assets/translations/ru/main.json (0 hunks)
  • src/assets/translations/tr/main.json (0 hunks)
  • src/assets/translations/uk/main.json (0 hunks)
  • src/assets/translations/zh/main.json (0 hunks)
  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx (2 hunks)
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (8 hunks)
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx (5 hunks)
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (9 hunks)
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx (2 hunks)
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx (2 hunks)
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx (2 hunks)
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx (2 hunks)
  • src/components/ReceiveAddressRow.tsx (1 hunks)
💤 Files with no reviewable changes (9)
  • src/assets/translations/de/main.json
  • src/assets/translations/uk/main.json
  • src/assets/translations/ja/main.json
  • src/assets/translations/fr/main.json
  • src/assets/translations/zh/main.json
  • src/assets/translations/ru/main.json
  • src/assets/translations/pt/main.json
  • src/assets/translations/es/main.json
  • src/assets/translations/tr/main.json
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{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 run yarn lint --fix and yarn type-check after making changes
Avoid let variable assignments - prefer const with inline IIFE switch statements or extract to functions for conditional logic

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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 in useMemo and callbacks in useCallback where 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 using useColorModeValue hook
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() from react-polyglot
Use useFeatureFlag('FlagName') hook to access feature flag values in components
Prefer type over interface for type definitions
Use strict typing - avoid any
Use Nominal types for domain identifiers (e.g., WalletId, AccountId)
Import types from @shapeshiftoss/caip for chain/account/asset IDs
Use useAppSelector for Redux state
Use useAppDispatch for Redux actions
Memoize expensive computations with useMemo
Memoize callbacks with useCallback

**/*.{ts,tsx}: Use Result<T, E> pattern for error handling in swappers and APIs; ALWAYS use Ok() and Err() from @sniptt/monads; AVOID throwing within swapper API implementations
ALWAYS use custom error classes from @shapeshiftoss/errors with meaningful error codes for internationalization and relevant details in error objects
ALWAYS wrap async op...

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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 use useErrorToast hook for displaying errors with translated error messages and handle different error types appropriately

Use PascalCase for React component names and match the component name to the file name

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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
Use handle prefix for event handlers with descriptive names in camelCase
Use descriptive boolean variable names with is, has, can, should prefixes
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 like data, item, obj, and single-letter variable names except in loops
Avoid abbreviations in names unless they are widely understood
Avoid generic function names like fn, func, or callback

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)

**/*.{jsx,tsx}: ALWAYS use useMemo for expensive computations, object/array creations, and filtered data
ALWAYS use useMemo for derived values and computed properties
ALWAYS use useMemo for conditional values and simple transformations
ALWAYS use useCallback for event handlers and functions passed as props
ALWAYS use useCallback for any function that could be passed as a prop or dependency
ALWAYS include all dependencies in useEffect, useMemo, useCallback dependency arrays
NEVER use // eslint-disable-next-line react-hooks/exhaustive-deps unless 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 with memo for performance optimization

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/react-best-practices.mdc)

Ensure TypeScript types are explicit and proper; avoid use of any type

Files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/ReceiveAddressRow.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
src/assets/translations/en/main.json

📄 CodeRabbit inference engine (CLAUDE.md)

Add English copy to src/assets/translations/en/main.json (find appropriate section)

Files:

  • src/assets/translations/en/main.json
🧠 Learnings (27)
📓 Common learnings
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: 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: 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: 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.
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-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/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.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/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
📚 Learning: 2025-08-08T11:40:55.734Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10234
File: src/components/MultiHopTrade/components/TradeConfirm/TradeConfirm.tsx:41-41
Timestamp: 2025-08-08T11:40:55.734Z
Learning: In MultiHopTrade confirm flow (src/components/MultiHopTrade/components/TradeConfirm/TradeConfirm.tsx and related hooks), there is only one active trade per flow. Because of this, persistent (module/Redux) dedupe for QuotesReceived in useTrackTradeQuotes is not necessary; the existing ref-based dedupe is acceptable.

Applied to files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx
📚 Learning: 2025-07-29T15:04:28.083Z
Learnt from: NeOMakinG
Repo: shapeshift/web PR: 10139
File: src/components/MultiHopTrade/components/TradeConfirm/components/ExpandableStepperSteps.tsx:109-115
Timestamp: 2025-07-29T15:04:28.083Z
Learning: In src/components/MultiHopTrade/components/TradeConfirm/components/ExpandableStepperSteps.tsx, the component is used under an umbrella that 100% of the time contains the quote, making the type assertion `activeTradeQuote?.steps[currentHopIndex] as TradeQuoteStep` safe. Adding conditional returns before hooks would violate React's Rules of Hooks.

Applied to files:

  • src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.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/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.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/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx
📚 Learning: 2025-08-14T17:56:23.721Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10276
File: src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx:545-566
Timestamp: 2025-08-14T17:56:23.721Z
Learning: gomesalexandre prefers not to extract helper functions for toast rendering patterns in TransactionRow.tsx (src/pages/ThorChainLP/components/ReusableLpStatus/TransactionRow.tsx), considering it over-abstraction even when there's code duplication between deposit and withdraw flows.

Applied to files:

  • src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.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/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx
  • src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx
📚 Learning: 2025-11-24T21:20:30.085Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/naming-conventions.mdc:0-0
Timestamp: 2025-11-24T21:20:30.085Z
Learning: Applies to **/*.{ts,tsx} : Use `use` prefix for custom React hooks with camelCase naming after the prefix

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.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/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.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} : Memoize callbacks with `useCallback`

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
📚 Learning: 2025-08-15T07:51:16.374Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10278
File: src/components/AssetHeader/hooks/useQuickBuy.ts:97-99
Timestamp: 2025-08-15T07:51:16.374Z
Learning: The selectPortfolioUserCurrencyBalanceByAssetId selector in src/state/slices/portfolioSlice/selectors.ts expects a filter object with an assetId property, not a raw AssetId string. The selector signature is (state: ReduxState, filter) where filter should have an assetId property. This pattern is consistent across portfolio selectors that use selectAssetIdParamFromFilter. Passing a filter object like { assetId: someAssetId } is the correct usage pattern.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
📚 Learning: 2025-08-15T07:51:16.374Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10278
File: src/components/AssetHeader/hooks/useQuickBuy.ts:97-99
Timestamp: 2025-08-15T07:51:16.374Z
Learning: The selectPortfolioUserCurrencyBalanceByAssetId selector in src/state/slices/portfolioSlice/selectors.ts accepts a filter object with an assetId property, not a raw AssetId string. The selector signature is (state: ReduxState, filter) where filter is expected to have an assetId property. Passing a filter object like { assetId: someAssetId } is the correct usage pattern.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
📚 Learning: 2025-08-10T21:09:25.643Z
Learnt from: premiumjibles
Repo: shapeshift/web PR: 10215
File: src/components/MultiHopTrade/hooks/useGetTradeRateInput.ts:65-67
Timestamp: 2025-08-10T21:09:25.643Z
Learning: In the MultiHopTrade components, `selectInputBuyAsset` and `selectInputSellAsset` selectors from `tradeInputSlice` always return defined values because they have default values in the initial state (BTC for buyAsset, ETH for sellAsset, with fallback to defaultAsset). Null checks for these assets are unnecessary when using these selectors.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
📚 Learning: 2025-08-15T07:51:16.374Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10278
File: src/components/AssetHeader/hooks/useQuickBuy.ts:97-99
Timestamp: 2025-08-15T07:51:16.374Z
Learning: The selectPortfolioUserCurrencyBalanceByAssetId selector in src/state/slices/portfolioSlice/selectors.ts accepts a filter object with an assetId property (signature: (state, { assetId })), not a raw AssetId string. Passing a filter object like { assetId: someAssetId } is the correct usage pattern.

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.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} : Use `useAppSelector` for Redux state

Applied to files:

  • src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx
📚 Learning: 2025-11-24T21:20:17.804Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/error-handling.mdc:0-0
Timestamp: 2025-11-24T21:20:17.804Z
Learning: Applies to **/swapper{s,}/**/*.{ts,tsx} : ALWAYS use `makeSwapErrorRight` for swapper errors with `TradeQuoteError` enum for error codes and provide detailed error information

Applied to files:

  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
  • src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.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/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.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/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.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/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
📚 Learning: 2025-09-04T10:18:34.140Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10427
File: src/hooks/useActionCenterSubscribers/useSwapActionSubscriber.tsx:40-40
Timestamp: 2025-09-04T10:18:34.140Z
Learning: In the shapeshift/web codebase, src/state/slices/selectors.ts uses wildcard exports (`export * from './[sliceName]/selectors'`) to re-export all selectors from individual slice selector files, making them available through the barrel import. This means selectors like selectTxByFilter from txHistorySlice/selectors are properly accessible via '@/state/slices/selectors' even though they don't appear in explicit named exports.

Applied to files:

  • src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx
📚 Learning: 2025-09-12T11:52:39.280Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10461
File: src/plugins/walletConnectToDapps/components/modals/EIP155TransactionConfirmation.tsx:18-21
Timestamp: 2025-09-12T11:52:39.280Z
Learning: In WalletConnect dApps integration, gomesalexandre has implemented intentional routing logic where EIP155TransactionConfirmation is typed for EthSignTransactionCallRequest only, while a separate SendTransactionConfirmation component handles EthSendTransactionCallRequest. The WalletConnectModalManager contains conditional logic to route native send transactions to SendTransactionConfirmation and other transaction types to EIP155TransactionConfirmation, creating a clean separation of concerns between signing and sending flows.

Applied to files:

  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
📚 Learning: 2025-11-03T22:31:30.786Z
Learnt from: gomesalexandre
Repo: shapeshift/web PR: 10985
File: packages/swapper/src/swappers/PortalsSwapper/getPortalsTradeQuote/getPortalsTradeQuote.ts:0-0
Timestamp: 2025-11-03T22:31:30.786Z
Learning: In packages/swapper/src/swappers/PortalsSwapper, the rate and quote files intentionally use different approaches for calculating buyAmountBeforeSlippageCryptoBaseUnit: getPortalsTradeRate.tsx uses minOutputAmount / (1 - buffer) for conservative estimates, while getPortalsTradeQuote.ts uses outputAmount / (1 - buffer) for final quote display. This difference is validated by on-chain simulation testing and is intentional.

Applied to files:

  • src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx
📚 Learning: 2025-11-24T21:20:44.637Z
Learnt from: CR
Repo: shapeshift/web PR: 0
File: .cursor/rules/react-best-practices.mdc:0-0
Timestamp: 2025-11-24T21:20:44.637Z
Learning: Applies to **/*.{jsx,tsx} : ALWAYS use `useCallback` for any function that could be passed as a prop or dependency

Applied to files:

  • src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.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 src/assets/translations/en/main.json : Add English copy to `src/assets/translations/en/main.json` (find appropriate section)

Applied to files:

  • src/assets/translations/en/main.json
🧬 Code graph analysis (7)
src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx (1)
src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (1)
  • SharedTradeReceiveAddress (124-350)
src/components/ReceiveAddressRow.tsx (2)
src/components/Text/Text.tsx (2)
  • Text (19-83)
  • RawText (15-17)
src/lib/utils/index.ts (1)
  • middleEllipsis (82-83)
src/components/MultiHopTrade/components/TradeConfirm/components/TradeConfirmSummary.tsx (1)
src/components/ReceiveAddressRow.tsx (1)
  • ReceiveAddressRow (14-38)
src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx (1)
src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx (1)
  • ReceiveAddress (16-92)
src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx (1)
src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (1)
  • SharedTradeReceiveAddress (124-350)
src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (1)
src/components/Modals/Send/AddressInput/AddressInput.tsx (1)
  • AddressInput (61-400)
src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (1)
src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx (1)
  • useLimitOrderReceiveAddress (25-135)
🔇 Additional comments (16)
src/components/MultiHopTrade/components/FiatRamps/FiatRampTradeFooter.tsx (1)

11-11: Receive address footer component rename is consistent

Switching to SharedTradeReceiveAddress with the same prop set keeps the Fiat ramp footer behaviour unchanged while aligning with the new “receive address” vernacular.

Also applies to: 229-242

src/components/MultiHopTrade/components/TradeInput/components/ConfirmSummary.tsx (1)

17-17: ReceiveAddress usage matches the new API and copy

The switch from RecipientAddress to ReceiveAddress correctly wires shouldForceManualAddressEntry, receiveAddressDescription, and manualAddressEntryDescription, preserving the existing THOR/Taproot manual-entry behaviour under the updated naming.

Also applies to: 384-392

src/assets/translations/en/main.json (1)

755-761: Receive-address translation keys are consistent with the new terminology

The new trade.receiveAddress, customReceiveAddress*, and receiveAddressDescription strings read well and align with the updated ReceiveAddress components, with no leftover “recipient” wording in this section.

Also applies to: 833-835

src/components/MultiHopTrade/components/TradeConfirm/TradeConfirmFooter.tsx (1)

21-21: Confirm footer now correctly uses ReceiveAddressRow

The footer’s execution summary correctly swaps to ReceiveAddressRow, passing buyAsset.explorerAddressLink and the new receiveAddress prop, so behaviour stays intact while matching the updated receive-address naming.

Also applies to: 276-279

src/components/ReceiveAddressRow.tsx (1)

9-38: ReceiveAddressRow rename and props look correct

The component’s new ReceiveAddressRowProps and receiveAddress prop, together with the trade.receiveAddress label, cleanly implement the “Receive address” terminology without changing behaviour.

src/components/MultiHopTrade/components/TradeInput/components/ReceiveAddress.tsx (1)

3-4: ReceiveAddress component correctly forwards props to SharedTradeReceiveAddress

Renaming to ReceiveAddress with ReceiveAddressProps and passing receiveAddressDescription through as customReceiveAddressDescription keeps the existing receive-address editing flow intact while aligning with the new naming scheme.

Also applies to: 10-20, 74-90

src/components/MultiHopTrade/components/LimitOrder/hooks/useLimitOrderReceiveAddress.tsx (1)

5-5: useLimitOrderReceiveAddress hook rename is internally consistent

The hook’s new name, props type, isReceiveAddressEntryActive flag, renderedReceiveAddress JSX, and receiveAddress value all consistently adopt the receive-address terminology while preserving the prior limit-order receive-address behaviour.

Also applies to: 19-30, 86-134

src/components/MultiHopTrade/components/LimitOrder/components/LimitOrderInput.tsx (5)

23-23: LGTM!

Hook import correctly renamed to useLimitOrderReceiveAddress.


147-152: LGTM!

Destructured values correctly renamed to align with the new "receive address" terminology.


394-395: LGTM!

Condition check correctly updated to use receiveAddress.


562-593: LGTM!

Footer content correctly references the renamed variables: isReceiveAddressEntryActive and renderedReceiveAddress.


205-213: The property name recipientAddress is part of the API contract and should remain unchanged.

The type definition for QuoteLimitOrderParams in src/state/apis/limit-orders/limitOrderApi.ts (line 61) requires the property name to be recipientAddress. This property is part of the external API contract used by the limit orders service, where it's passed as receiver to the CowSwap API (line 166). The current code correctly maps the renamed local variable receiveAddress to the required API property name recipientAddress.

src/components/MultiHopTrade/components/SharedTradeInput/SharedTradeReceiveAddress.tsx (4)

45-53: LGTM!

Type and component correctly renamed from ManualRecipientAddressLabels to ManualReceiveAddressLabels.


107-139: LGTM!

Type and component correctly renamed. The prop customReceiveAddressDescription aligns with the new terminology.


269-277: LGTM!

Component reference and placeholder translation key correctly updated.


314-336: LGTM!

All UI text updates are correct:

  • Row label uses customReceiveAddressDescription
  • Tooltip labels use the new translation keys
  • aria-label updated to "Edit receive address"

@premiumjibles
premiumjibles self-requested a review November 30, 2025 21:55

@premiumjibles premiumjibles left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did some analysis to make sure everything looks backwards compatible and all good 👌

Completeness wise I found one spot that looks to have missed some renames. Some variable names in SharedTradeReceiveAddress. All good if that was deliberate and still non blocking.

Apart from that all looks gucci

@gomesalexandre
gomesalexandre enabled auto-merge (squash) December 1, 2025 09:06
@gomesalexandre
gomesalexandre merged commit 4619aa7 into develop Dec 1, 2025
4 checks passed
@gomesalexandre
gomesalexandre deleted the feat_destination_address_receive_vernacular branch December 1, 2025 09:13
gomesalexandre added a commit that referenced this pull request Dec 1, 2025
Resolved conflicts from squash merge of PR #11210:
- Kept new depositAddress translation keys for PR #11216
- Updated variable naming to use receiveAddress convention
- Updated component naming to use Receive instead of Recipient

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make "recipient address" "receive address"

3 participants