Skip to content

feat(walletkit): Move to in-app browser approach for payments + fixes#350

Merged
ignaciosantise merged 7 commits intodevelopfrom
feat/inapp-browser-payment
Feb 13, 2026
Merged

feat(walletkit): Move to in-app browser approach for payments + fixes#350
ignaciosantise merged 7 commits intodevelopfrom
feat/inapp-browser-payment

Conversation

@ignaciosantise
Copy link
Collaborator

@ignaciosantise ignaciosantise commented Feb 13, 2026

This pull request refactors the data collection flow in the WalletKit example app, replacing the in-app WebView approach with an in-app browser flow for improved reliability and platform compatibility. The main changes include introducing a new browser-based data collection handler, updating the deep link handling logic to support one-shot interceptors, and removing the old WebView-based implementation.

Key changes:

Data Collection Flow Refactor

  • Replaced the WebView-based data collection modal with a new browser-based handler, WCPCollectDataBrowser, which opens the data collection form in an in-app browser and listens for a callback deep link to determine completion. (wcp_collect_data_browser.dart added, wcp_collect_data_webview.dart removed) [1] [2]
  • Updated the WalletKitService to use the new browser-based flow throughout the data collection process, removing all references to the previous WebView and related modals. (walletkit_service.dart) [1] [2] [3]

Deep Link Handling

  • Added a oneShotInterceptor to DeepLinkHandler, allowing temporary interception of a single deep link (used for browser callback handling), and updated the deep link processing logic to check this interceptor before normal processing. (deep_link_handler.dart) [1] [2]

These changes streamline the user experience for data collection, improve cross-platform compatibility, and simplify the codebase by removing the need for complex WebView management.

ignaciosantise and others added 4 commits February 10, 2026 17:34
- Change resizeToAvoidBottomInset to false and manually apply keyboard inset
  padding to content only, preventing layout jumps when switching fields
- Add bottom padding based on keyboard height to ensure bottom form fields
  remain scrollable and reachable without full-scaffold resize
- Remove step indicator pills from webview header for cleaner UI
- Remove stepper parameter from WCPCollectDataWebView widget
- Remove stepper state from payment details bottom sheet for consistency

Fixes whitespace glitches when switching between form fields (DOB to Full Name)
and glitchy behavior when opening Place of Birth country dropdown.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…port JS

On iOS, use JS-based keyboard stabilization via the VisualViewport API
instead of Flutter's resizeToAvoidBottomInset, which triggers WKWebView's
double scroll adjustment bug (Flutter #45482, #98090). The injected script
tracks keyboard inset, adds body padding so content scrolls above the
keyboard, and keeps the focused input visible without jitter. On Android
the default Flutter resize behavior is preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Opens payment data-collection form in SFSafariViewController (iOS) /
Chrome Custom Tabs (Android) instead of embedded WebView to avoid
WKWebView keyboard issues.

Uses platform-specific callback strategies:
- Android: custom URL scheme (wcflutterwallet://) via Chrome Custom Tabs
- iOS: universal link redirect via SFSafariVC

Includes test HTML form for local development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ssal

When user closes the in-app browser without submitting the form, the
AppLifecycleListener detects the app resumption and completes the
completer with a cancellation error, preventing indefinite hangs and
interceptor state leaks.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 13, 2026 17:41
Copy link
Contributor

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 fixes keyboard handling issues in the WalletKit payment flow and simplifies the UI by removing step indicators. The main architectural change is the introduction of a browser-based data collection flow alongside the existing webview approach, with new lifecycle management to handle browser dismissals.

Changes:

  • Updated native library dependencies (YttriumWrapper and related packages) to newer versions for iOS and Android
  • Removed the payment flow start screen widget that displayed step indicators
  • Added a new browser-based data collection implementation with deep link callback handling and AppLifecycleListener for browser dismissal detection
  • Enhanced webview keyboard handling with iOS-specific JavaScript to manage keyboard insets and prevent layout glitches
  • Removed step indicator (stepper) parameters from webview and bottom sheet components

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/walletconnect_pay/ios/walletconnect_pay.podspec Updated YttriumWrapper dependency to 0.10.37
packages/walletconnect_pay/android/build.gradle Updated yttrium-wcpay dependency to 0.10.38
packages/reown_yttrium_utils/ios/reown_yttrium_utils.podspec Updated YttriumUtilsWrapper dependency to 0.10.37
packages/reown_yttrium_utils/android/build.gradle Updated yttrium-utils dependency to 0.10.38
packages/reown_yttrium/ios/reown_yttrium.podspec Updated YttriumWrapper dependency to 0.10.37
packages/reown_yttrium/android/build.gradle Updated yttrium dependency to 0.10.38
packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_information_capture_start.dart Removed entire file containing payment start screen with step indicators
packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_webview.dart Added iOS keyboard handling JavaScript and removed stepper parameter; modified layout to use MediaQuery.removeViewInsets on iOS
packages/reown_walletkit/example/lib/walletconnect_pay/wcp_modals/wcp_information_capture/wcp_collect_data_browser.dart New file implementing in-app browser data collection with AppLifecycleListener for dismissal detection and deep link callback handling
packages/reown_walletkit/example/lib/walletconnect_pay/assets/test_form.html New test HTML form for local testing of data collection flow
packages/reown_walletkit/example/lib/dependencies/walletkit_service.dart Updated to use browser-based data collection by default; removed stepper logic from payment details display
packages/reown_walletkit/example/lib/dependencies/deep_link_handler.dart Added one-shot interceptor mechanism to support browser callback handling
packages/reown_walletkit/example/ios/Podfile.lock Updated iOS pod versions to match podspec changes

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

ignaciosantise and others added 3 commits February 13, 2026 15:02
- Take develop's AppSpacing/context.colors theming in wcp_collect_data_webview.dart
- Keep deletion of wcp_information_capture_start.dart (removed step pills)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… only

The in-app browser handles keyboard and layout natively, making the
custom WebView with JS keyboard fixes unnecessary. Also removes the
local test form that is no longer needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Missed reference in the "back" navigation path of _showPaymentDetails.
Now uses _showCollectDataBrowser consistently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ignaciosantise ignaciosantise changed the title fix(walletkit): Fix payment form keyboard handling and remove step pills feat(walletkit): Move to in-app browser approach for payments + fixes Feb 13, 2026
@ignaciosantise ignaciosantise merged commit 2bce46c into develop Feb 13, 2026
6 checks passed
@ignaciosantise ignaciosantise deleted the feat/inapp-browser-payment branch February 13, 2026 19:26
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant