Skip to content

Commit 014557c

Browse files
authored
Merge pull request #38596 from jayeshmangwani/TS-quick-fix-EnablePayments
[NO QA] Fix @ts-expect-error warning
2 parents e34f10e + b95b8df commit 014557c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/pages/EnablePayments/OnfidoStep.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {withOnyx} from 'react-native-onyx';
33
import type {OnyxEntry} from 'react-native-onyx';
44
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
55
import HeaderWithBackButton from '@components/HeaderWithBackButton';
6-
// @ts-expect-error TODO: Remove this once Onfido (https://github.com/Expensify/App/issues/25136) is migrated to TypeScript.
76
import Onfido from '@components/Onfido';
7+
import type {OnfidoData} from '@components/Onfido/types';
88
import useLocalize from '@hooks/useLocalize';
99
import Growl from '@libs/Growl';
1010
import Navigation from '@libs/Navigation/Navigation';
@@ -45,8 +45,7 @@ function OnfidoStep({walletOnfidoData = DEFAULT_WALLET_ONFIDO_DATA}: OnfidoStepP
4545
}, [translate]);
4646

4747
const verifyIdentity = useCallback(
48-
// @ts-expect-error TODO: Remove this once Onfido (https://github.com/Expensify/App/issues/25136) is migrated to TypeScript.
49-
(data) => {
48+
(data: OnfidoData) => {
5049
BankAccounts.verifyIdentity({
5150
onfidoData: JSON.stringify({
5251
...data,
@@ -66,7 +65,7 @@ function OnfidoStep({walletOnfidoData = DEFAULT_WALLET_ONFIDO_DATA}: OnfidoStepP
6665
<FullPageOfflineBlockingView>
6766
{shouldShowOnfido ? (
6867
<Onfido
69-
sdkToken={walletOnfidoData.sdkToken}
68+
sdkToken={walletOnfidoData.sdkToken ?? ''}
7069
onUserExit={goBack}
7170
onError={reportError}
7271
onSuccess={verifyIdentity}

0 commit comments

Comments
 (0)