Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Turns out this is harder than I thought; this doesn't actually fix the case where you complete the link signup element, because that changes the
PaymentOption
from a.new(..card..)
to.link
, which our regeneration stuff doesn't know how to convert back to a card form. Beyond that, the LinkSignupElement may very well have state (like the link account that was fetched?) that still won't be restored after this PR; this PR only restores form fields.Simulator.Screen.Recording.-.iPhone.16.-.2024-10-04.at.09.30.11.mp4
This PR restore form fields when the Link signup form is incomplete, and it adds a nice test, so I think it's a step in the right direction at least. It saves the input in
intentConfirmParams.linkInlineSignupCustomerInput
and uses it to give initial values to the signup form fields.Simulator.Screen.Recording.-.snapshot.tester.iPhone.12.mini.16.4.-.2024-10-03.at.11.22.09.mp4
Motivation
https://jira.corp.stripe.com/browse/MOBILESDK-2552
Testing
See test.
Changelog
See changelog