File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
android/src/oldarch/java/com/reactnativestripesdk Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1818import com .facebook .react .bridge .ReactContextBaseJavaModule ;
1919import com .facebook .react .bridge .ReactMethod ;
2020import com .facebook .react .bridge .ReadableMap ;
21+ import com .facebook .react .modules .core .DeviceEventManagerModule ;
2122import com .facebook .react .turbomodule .core .interfaces .TurboModule ;
2223import javax .annotation .Nonnull ;
2324
@@ -33,8 +34,14 @@ public NativeOnrampSdkModuleSpec(ReactApplicationContext reactContext) {
3334 return NAME ;
3435 }
3536
37+ private void invoke (String eventName , Object params ) {
38+ getReactApplicationContext ()
39+ .getJSModule (DeviceEventManagerModule .RCTDeviceEventEmitter .class )
40+ .emit (eventName , params );
41+ }
42+
3643 protected final void emitOnCheckoutClientSecretRequested (ReadableMap value ) {
37- mEventEmitterCallback . invoke ("onCheckoutClientSecretRequested" , value );
44+ invoke ("onCheckoutClientSecretRequested" , value );
3845 }
3946
4047 @ ReactMethod
You can’t perform that action at this time.
0 commit comments