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

[Android] Prevent crashes with null check for saved call (Fixes #368) #420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kentwilliams-stripe
Copy link

Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for capacitor-community-stripe ready!

Name Link
🔨 Latest commit 475d31d
🔍 Latest deploy log https://app.netlify.com/sites/capacitor-community-stripe/deploys/67883909760247000828eeb6
😎 Deploy Preview https://deploy-preview-420--capacitor-community-stripe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@yankostadinov
Copy link

this should remove the errors for "callback resolve is not a method"

@kentwilliams-stripe kentwilliams-stripe marked this pull request as ready for review January 17, 2025 00:46
@rdlabo
Copy link
Member

rdlabo commented Jan 22, 2025

Thanks for creating pull request.

Is it a Stripe Android SDK spec that onVerificationCompleted and onVerificationCancelled are called multiple times? If so, call.resolve should be removed. ( But in that case, I think you should modify the Stripe Android SDK )

If we accept this change, I will make to be deprecate the following

const result = await StripeIdentity.present();

And it should be recommended that the result be obtained only on events. But did you eventually reproduce the problem? I am at a loss to get pull requests for problems that can't reproduce.

@rdlabo
Copy link
Member

rdlabo commented Jan 22, 2025

Another idea is to provide an argument to initialize with ignoreNativeError: boolean. And maintain documentation.

For plugin users, errors are important information to distinguish between successful and unsuccessful implementations. I would not want to inadvertently respond to errors that cannot be reproduced.

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.

4 participants