-
Notifications
You must be signed in to change notification settings - Fork 279
Infinite: Update to new API spec, final touchups #5916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fb5284e to
eb5b925
Compare
8696a2d to
fd06d7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd06d7a4eb
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fd06d7a to
f9c6477
Compare
f9c6477 to
0b987ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b987ef1bf
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0b987ef to
83e4a8e
Compare
aeb7411 to
c4c130c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4c130cba9
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c4c130c to
2c0b096
Compare
swansontec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a few small things.
Pass onComplete/onClose directly to onPress, dropping the handler wrappers. Per PR comment: #5916 (comment)
Extract runOnce helper for concurrency logic in onComplete callback. Per PR comment: #5916 (comment)
Use explicit error type annotation in catch handlers. Change formData type from any to unknown. Per PR comments: - #5916 (comment) - #5916 (comment) - #5916 (comment)
Use explicit error type annotation in catch handlers. Change formData type from any to unknown. Per PR comments: - #5916 (comment) - #5916 (comment) - #5916 (comment)
f77cd7b to
a57c037
Compare
Pass onComplete/onClose directly to onPress, dropping the handler wrappers. Per PR comment: #5916 (comment)
Extract runOnce helper for concurrency logic in onComplete callback. Per PR comment: #5916 (comment)
Use explicit error type annotation in catch handlers. Change formData type from any to unknown. Per PR comments: - #5916 (comment) - #5916 (comment) - #5916 (comment)
a57c037 to
1f9504b
Compare
Use explicit error type annotation in catch handlers. Change formData type from any to unknown. Per PR comments: - #5916 (comment) - #5916 (comment) - #5916 (comment)
ccf3d09 to
fd57cc9
Compare
| // Status changed but not yet active - navigate back and re-show | ||
| // pending scene with updated status. This ensures the UI reflects | ||
| // the new status and starts polling if appropriate (e.g. IN_REVIEW). | ||
| navigationFlow.goBack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra goBack causes unexpected navigation from root screen
High Severity
The navigationFlow.goBack() call at line 331 is redundant and problematic. When openKycWebView completes, the navigation has already returned to the root screen (because rampPending was replaced by the webview via navigation.replace(), then the webview closed via goBack()). Calling goBack() again attempts to navigate back from root, which could unexpectedly exit the entire ramp flow or navigate to an unintended screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this extra goBack Cursor noticed a real concern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not valid, though it's true the code is a bit convoluted. Just added a comment
swansontec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good, except that Cursor found one extra thing. Not sure if it's real or not.
| // Status changed but not yet active - navigate back and re-show | ||
| // pending scene with updated status. This ensures the UI reflects | ||
| // the new status and starts polling if appropriate (e.g. IN_REVIEW). | ||
| navigationFlow.goBack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this extra goBack Cursor noticed a real concern?
`/customer` endpoint changed `personalInfo` -> `individualData`
Previously only gave the option to go back to the `RampSelectOptionScene` when the KYC was incomplete.
fd57cc9 to
cb1bc05
Compare
TODO: Replace the entire instructional scene with a country selection list instead of a modal in the event there is no region selected. Excess instruction manuals and modals should be avoided and this is a place it can easily be avoided.
"Account Name" confusing. Renamed to "Account Nickname"
cb1bc05 to
3da81c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| const isKycIncomplete = | ||
| initialStatus === 'PENDING' || | ||
| initialStatus === 'NEED_ACTIONS' || | ||
| initialStatus === 'DRAFT' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Status change from IN_REVIEW to incomplete causes error
Low Severity
The isKycIncomplete flag is computed once based on initialStatus and determines whether to show the "Complete KYC" button and whether to reject on non-approved statuses. If a user starts with IN_REVIEW status (where isKycIncomplete is false) and the backend later requests additional information (changing to NEED_ACTIONS), the workflow rejects with an error instead of allowing the user to tap "Complete KYC". The status check at lines 303-308 only keeps the flow alive for incomplete statuses if the initial status was incomplete.
More surprise API changes from Infinite, integrate to allow KYC form submission on Edge's side:
/customerendpoint changedpersonalInfo->individualDataProperly pre-populate nationality
Add extended form input (DOB, SSN, etc) and supporting UI
Fix draft/pending KYC workflow (going back on incomplete web form KYC) to allow revisiting the KYC url.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneRequirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Aligns ramp flows with Infinite’s latest API and improves KYC/banking UX with validation, prefills, and better pending handling.
personalInfo→individualData, includephone,dateOfBirth,taxIdentificationNumber,nationality; addDRAFTKYC statusRampKycFormScene: Addsphone,dateOfBirth(with date picker), andssnfields with formatting/validation; improved field navigation and errorsinitialFirstName/LastName, sets default account nickname, reorganized sections; DevTestScene prepopulates from vaultFilledTextInputgainshideCharacterCount; new form field types (phone,date,ssn) with defaultsgetPersonalInfoand new strings/placeholdersWritten by Cursor Bugbot for commit 3da81c8. This will update automatically on new commits. Configure here.