✨ app: support offramp transfer reference - #1201
Conversation
🦋 Changeset detectedLatest commit: ac23132 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe send-funds flow now supports ACH and wire selection, currency-specific transfer references, rail-specific timing and fees, transfer-type guidance, and recovery when saved transfer details are unavailable. ChangesOfframp transfer flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SendAmount
participant QuoteQuery as "ramp quote query"
participant MissingTransferSheet
participant ExternalAccountMutation as "external-account deletion mutation"
participant RecipientCreation
SendAmount->>QuoteQuery: request quote
QuoteQuery-->>SendAmount: return transfer-not-found error
SendAmount->>MissingTransferSheet: open with transfer context
MissingTransferSheet->>ExternalAccountMutation: delete external account
ExternalAccountMutation-->>RecipientCreation: redirect after cache invalidation
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e2e44be5-e518-4faa-835f-4fc362de0789
📒 Files selected for processing (12)
.changeset/common-weeks-laugh.mdsrc/components/send-funds/MissingTransferSheet.tsxsrc/components/send-funds/NewRecipient.tsxsrc/components/send-funds/Review.tsxsrc/components/send-funds/SendAmount.tsxsrc/components/send-funds/TransferTypeSheet.tsxsrc/components/send-funds/recipientForm.tsxsrc/components/shared/ModalSheet.tsxsrc/i18n/es.jsonsrc/i18n/pt.jsonsrc/utils/currencies.tssrc/utils/queryClient.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b64b94b13d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 7283904f-d260-40e5-8248-6873b8e03f7a
📒 Files selected for processing (2)
src/components/send-funds/NewRecipient.tsxsrc/components/send-funds/recipientForm.tsx
| export const wireReference = pipe( | ||
| string(), | ||
| minLength(1, "Required"), | ||
| check( | ||
| (value) => value.split("\n").every((line, index) => index < 4 && line.length <= 35), | ||
| "Up to 4 lines of 35 characters", | ||
| ), |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Reject whitespace-only wire references.
minLength(1) accepts a newline. The line check also accepts empty lines. The required wire field can therefore submit with no reference content.
Require at least one non-whitespace character.
Proposed fix
export const wireReference = pipe(
string(),
minLength(1, "Required"),
+ regex(/\S/, "Required"),
check(
(value) => value.split("\n").every((line, index) => index < 4 && line.length <= 35),
"Up to 4 lines of 35 characters",
),
);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const wireReference = pipe( | |
| string(), | |
| minLength(1, "Required"), | |
| check( | |
| (value) => value.split("\n").every((line, index) => index < 4 && line.length <= 35), | |
| "Up to 4 lines of 35 characters", | |
| ), | |
| export const wireReference = pipe( | |
| string(), | |
| minLength(1, "Required"), | |
| regex(/\S/, "Required"), | |
| check( | |
| (value) => value.split("\n").every((line, index) => index < 4 && line.length <= 35), | |
| "Up to 4 lines of 35 characters", | |
| ), |
Summary by CodeRabbit