-
-
Notifications
You must be signed in to change notification settings - Fork 639
fix(issue-2282): make params optional in confirmPayment method to sol… #2287
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
base: main
Are you sure you want to change the base?
Conversation
| return | ||
| } | ||
|
|
||
| let params = arguments["params"] as? NSDictionary |
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.
I think if you use NSNull() as fallback then you can revert the NSDictionary? => NSDictionary change in the other file and make it "survive" the next sync
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.
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.
@jonasbark , I didn't think that if this PR should be applied, we would be protected from regression, because the library won't compile if we don't make
flutter_stripe/packages/stripe_ios/ios/stripe_ios/Sources/stripe_ios/Stripe Sdk/StripeSdkImpl.swift
Line 822 in 903f367
| params: NSDictionary, |
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.
I think Stripe wants us to use the confirmplatformpayment method in this case so I prefer we use that one instead of fixing something here
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.
@pgiacomo69 I think this dirty trick will work in stripeplugin.swift
let params = (arguments["params"] as? NSDictionary) ?? (NSNull() as Any as! NSDictionary)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.
Thank you @remonh87! I (or my colleague Luan, that commented the issue) wil check it tomorrow!
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.
@pgiacomo69 did you try it out?
…irmPayment method

Solve the issue #2282.
@remonh87, @jonasbark I'm aware that we shouldn't change code from StripeSDK, because it belongs to React Native SDK that we import in this project, but how should are we supposed to solve it?
Should I PR on Stripe repository for a rollback of
flutter_stripe/packages/stripe_ios/ios/stripe_ios/Sources/stripe_ios/Stripe Sdk/StripeSdkImpl.swift
Line 822 in 903f367