-
Notifications
You must be signed in to change notification settings - Fork 300
RN Android Codegen Fixes #2148
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
Open
Twigz
wants to merge
1
commit into
0.52.0-crypto-onramp-2-private-beta
Choose a base branch
from
twigz/codegen-fixes
base: 0.52.0-crypto-onramp-2-private-beta
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
RN Android Codegen Fixes #2148
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --- android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpec.java 2025-05-05 16:53:11 | ||
| +++ android/src/oldarch/java/com/reactnativestripesdk/NativeOnrampSdkModuleSpecNew.java 2025-05-05 16:54:44 | ||
| @@ -1,3 +1,6 @@ | ||
| +// This is a modified version of the codegen file. Since old arch does not support mEventEmitterCallback | ||
| +// we implement event emitting with RCTDeviceEventEmitter. | ||
| +// To update this file run ./scripts/old-arch-codegen-android | ||
|
|
||
| /** | ||
| * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). | ||
| @@ -20,6 +23,7 @@ | ||
| import com.facebook.react.bridge.ReactContextBaseJavaModule; | ||
| import com.facebook.react.bridge.ReactMethod; | ||
| import com.facebook.react.bridge.ReadableMap; | ||
| +import com.facebook.react.modules.core.DeviceEventManagerModule; | ||
| import com.facebook.react.turbomodule.core.interfaces.TurboModule; | ||
| import javax.annotation.Nonnull; | ||
| import javax.annotation.Nullable; | ||
| @@ -38,6 +42,16 @@ | ||
| @Override | ||
| public @Nonnull String getName() { | ||
| return NAME; | ||
| + } | ||
| + | ||
| + private void invoke(String eventName, Object params) { | ||
| + getReactApplicationContext() | ||
| + .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) | ||
| + .emit(eventName, params); | ||
| + } | ||
| + | ||
| + private void invoke(String eventName) { | ||
| + invoke(eventName, null); | ||
| } | ||
|
|
||
| protected final void emitOnCheckoutClientSecretRequested(ReadableMap value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Could we get these changes to NativeStripeSdkModuleSpec.java merged in a separate PR to
master? It'll make it easier to merge the beta branch later.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.
@lng-stripe I believe that's addressed by this PR: #2151