Skip to content

feat(rn_cli_wallet): skip select option for single payment option without collectData#397

Merged
ignaciosantise merged 2 commits intomainfrom
feat/skip-single-payment-option
Feb 27, 2026
Merged

feat(rn_cli_wallet): skip select option for single payment option without collectData#397
ignaciosantise merged 2 commits intomainfrom
feat/skip-single-payment-option

Conversation

@ignaciosantise
Copy link
Collaborator

Summary

When a payment starts with only one payment option that doesn't require additional information collection (collectData), the app now skips the select option screen and goes directly to the review screen. This eliminates an unnecessary step when there's no actual choice to be made, improving the payment UX.

Changes

  • Added detection logic in PaymentOptionsModal to identify single payment options without collectData
  • When detected, the app auto-selects the option, fetches its payment actions, and navigates directly to the review screen
  • Other flows remain unchanged: multiple options, or single options with collectData requirements still show the select option screen

Testing

  • Single option without collectData: Should navigate loading → review (skipping selectOption)
  • Single option with collectData: Should navigate loading → selectOption → collectData → review (unchanged)
  • Multiple options: Should navigate loading → selectOption → review (unchanged)

Copilot AI review requested due to automatic review settings February 27, 2026 13:47
@vercel
Copy link

vercel bot commented Feb 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-examples Ready Ready Preview, Comment Feb 27, 2026 3:48pm

Request Review

@claude
Copy link

claude bot commented Feb 27, 2026

Claude finished @ignaciosantise's task in 1m 26s —— View job


Code Review

  • Gather context
  • Read changed files
  • Run breaking changes analysis
  • Post review findings

✅ No issues found

The change is clean and well-scoped. A few observations:

  • The goBack navigation from review → selectOption (line 113) is safe here — the pre-existing showBackButton logic at line 255 already guards against showing the back button when paymentOptionsCount === 1, so users can't navigate back to a skipped screen.
  • Calling fetchPaymentActions then immediately setStep('review') is intentional and consistent with the onSelectOption pattern elsewhere — the ReviewPaymentView receives isLoadingActions to handle the async state.
  • No breaking changes detected.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the payment flow UX by automatically skipping the payment option selection screen when only a single payment option exists that doesn't require additional data collection. This streamlines the user experience by eliminating an unnecessary selection step.

Changes:

  • Added conditional logic to detect single payment options without data collection requirements
  • Implemented auto-selection and direct navigation to review screen for qualifying payment flows
  • Preserved existing behavior for multi-option scenarios and options requiring data collection

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ignaciosantise ignaciosantise merged commit 45cafcf into main Feb 27, 2026
6 checks passed
@ignaciosantise ignaciosantise deleted the feat/skip-single-payment-option branch February 27, 2026 16:56
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.

2 participants