Skip to content

Commit f7a01f3

Browse files
committed
fix deploy blocker
1 parent e51f63c commit f7a01f3

6 files changed

Lines changed: 15 additions & 0 deletions

File tree

modules/hybrid-app/android/src/main/java/com/expensify/reactnativehybridapp/ReactNativeHybridApp.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,8 @@ class ReactNativeHybridApp(reactContext: ReactApplicationContext) :
3636
override fun sendAuthToken(authToken: String?) {
3737
Log.d(NAME, "`sendAuthToken` should never be called in standalone `New Expensify` app")
3838
}
39+
40+
override fun allowSendingThroughLinking() {
41+
Log.d(NAME, "`allowSendingThroughLinking` should never be called in standalone `New Expensify` app")
42+
}
3943
}

modules/hybrid-app/src/NativeReactNativeHybridApp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export interface Spec extends TurboModule {
99
completeOnboarding: (status: boolean) => void;
1010
switchAccount: (newDotCurrentAccountEmail: string, authToken: string, policyID: string, accountID: string) => void;
1111
sendAuthToken: (authToken: string) => void;
12+
allowSendingThroughLinking: () => void;
1213
}
1314

1415
export default TurboModuleRegistry.getEnforcing<Spec>('ReactNativeHybridApp');

modules/hybrid-app/src/index.native.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const HybridAppModule: HybridAppModuleType = {
2020
sendAuthToken({authToken}) {
2121
ReactNativeHybridApp.sendAuthToken(authToken);
2222
},
23+
allowSendingThroughLinking() {
24+
ReactNativeHybridApp.allowSendingThroughLinking();
25+
}
2326
};
2427

2528
export default HybridAppModule;

modules/hybrid-app/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ const HybridAppModule: HybridAppModuleType = {
2424
// eslint-disable-next-line no-console
2525
console.warn('HybridAppModule: `sendAuthToken` should never be called on web');
2626
},
27+
allowSendingThroughLinking() {
28+
// eslint-disable-next-line no-console
29+
console.warn('HybridAppModule: `allowSendingThroughLinking` should never be called on web');
30+
}
2731
};
2832

2933
export default HybridAppModule;

modules/hybrid-app/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ type HybridAppModuleType = {
55
completeOnboarding: (args: {status: boolean}) => void;
66
switchAccount: (args: {newDotCurrentAccountEmail: string; authToken: string; policyID: string; accountID: string}) => void;
77
sendAuthToken: (args: {authToken: string}) => void;
8+
allowSendingThroughLinking: () => void;
89
};
910

1011
export default HybridAppModuleType;

src/HybridAppHandler.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import HybridAppModule from '@expensify/react-native-hybrid-app';
12
import {findFocusedRoute} from '@react-navigation/native';
23
import {useContext, useEffect, useState} from 'react';
34
import {Linking} from 'react-native';
@@ -33,6 +34,7 @@ function HybridAppHandler({url, hybridAppSettings}: AppProps) {
3334
const listener = Linking.addEventListener('url', (state) => {
3435
handleHybridUrlNavigation(state.url as Route);
3536
});
37+
HybridAppModule.allowSendingThroughLinking();
3638

3739
return () => {
3840
listener.remove();

0 commit comments

Comments
 (0)