Skip to content
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

fix: convert from array to dictionary #1325

Closed

Conversation

jorger5
Copy link

@jorger5 jorger5 commented Jul 20, 2023

This fixes #1321 where Flutter would expect a Map<String,dynamic>? while iOS was sending an empty array.

This resulted in type 'List<dynamic>' is not a subtype of type 'Map<String, dynamic>?' exception.

@jorger5 jorger5 force-pushed the fix/1321-confirm-payment-ios-error branch from c00c0f5 to 12d7b4c Compare July 20, 2023 12:54
Copy link

@ShrijeetHz ShrijeetHz left a comment

Choose a reason for hiding this comment

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

All good

@jorger5 jorger5 requested a review from ShrijeetHz July 20, 2023 13:26
Copy link
Contributor

@EliaTolin EliaTolin left a comment

Choose a reason for hiding this comment

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

It's good!

@jonasbark
Copy link
Member

We are syncing the file from here:
https://github.com/stripe/stripe-react-native/blob/master/ios/StripeSdk.swift#L207

So, to ensure that the fix isn't overwritten each sync, we'd need to adjust one layer above:
https://github.com/flutter-stripe/flutter_stripe/blob/main/packages/stripe_ios/ios/Classes/StripePlugin.swift#L198

@EliaTolin
Copy link
Contributor

We are syncing the file from here: https://github.com/stripe/stripe-react-native/blob/master/ios/StripeSdk.swift#L207

So, to ensure that the fix isn't overwritten each sync, we'd need to adjust one layer above: https://github.com/flutter-stripe/flutter_stripe/blob/main/packages/stripe_ios/ios/Classes/StripePlugin.swift#L198

Do you suggest then to transform the result to map above?

@EliaTolin
Copy link
Contributor

@jonasbark I think it is very important to fix the problem, Stripe does not currently work on iOS. See the issue #1321

@jonasbark
Copy link
Member

We are syncing the file from here: https://github.com/stripe/stripe-react-native/blob/master/ios/StripeSdk.swift#L207
So, to ensure that the fix isn't overwritten each sync, we'd need to adjust one layer above: https://github.com/flutter-stripe/flutter_stripe/blob/main/packages/stripe_ios/ios/Classes/StripePlugin.swift#L198

Do you suggest then to transform the result to map above?

Yes - as in leave the source code as it is, but check for the result in the layer above. E.g. if result == [] => return [:]

@EliaTolin
Copy link
Contributor

Move to #1333.

@jorger5
Copy link
Author

jorger5 commented Jul 25, 2023

Closing as it was moved to #1333

@jorger5 jorger5 closed this Jul 25, 2023
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.

After confirm payment it throw a exception
4 participants