Skip to content

Commit

Permalink
Merge pull request #38596 from jayeshmangwani/TS-quick-fix-EnablePaym…
Browse files Browse the repository at this point in the history
…ents

[NO QA] Fix @ts-expect-error warning
  • Loading branch information
Beamanator authored Mar 19, 2024
2 parents e34f10e + b95b8df commit 014557c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/EnablePayments/OnfidoStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {withOnyx} from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
// @ts-expect-error TODO: Remove this once Onfido (https://github.com/Expensify/App/issues/25136) is migrated to TypeScript.
import Onfido from '@components/Onfido';
import type {OnfidoData} from '@components/Onfido/types';
import useLocalize from '@hooks/useLocalize';
import Growl from '@libs/Growl';
import Navigation from '@libs/Navigation/Navigation';
Expand Down Expand Up @@ -45,8 +45,7 @@ function OnfidoStep({walletOnfidoData = DEFAULT_WALLET_ONFIDO_DATA}: OnfidoStepP
}, [translate]);

const verifyIdentity = useCallback(
// @ts-expect-error TODO: Remove this once Onfido (https://github.com/Expensify/App/issues/25136) is migrated to TypeScript.
(data) => {
(data: OnfidoData) => {
BankAccounts.verifyIdentity({
onfidoData: JSON.stringify({
...data,
Expand All @@ -66,7 +65,7 @@ function OnfidoStep({walletOnfidoData = DEFAULT_WALLET_ONFIDO_DATA}: OnfidoStepP
<FullPageOfflineBlockingView>
{shouldShowOnfido ? (
<Onfido
sdkToken={walletOnfidoData.sdkToken}
sdkToken={walletOnfidoData.sdkToken ?? ''}
onUserExit={goBack}
onError={reportError}
onSuccess={verifyIdentity}
Expand Down

0 comments on commit 014557c

Please sign in to comment.