Skip to content
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

[NO QA] Fix @ts-expect-error warning #38596

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading