Skip to content

Commit

Permalink
fix: resbumit document missing redirection (deriv-com#13558)
Browse files Browse the repository at this point in the history
  • Loading branch information
lubega-deriv authored Feb 14, 2024
1 parent a362440 commit ec7c427
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,14 @@ const AddedMT5AccountsList: React.FC<TProps> = ({ account }) => {
{t('Verification failed.')}{' '}
<a
onClick={() =>
show(<VerificationFailedModal />, {
defaultRootId: 'wallets_modal_root',
})
show(
<VerificationFailedModal
selectedJurisdiction={account.landing_company_short}
/>,
{
defaultRootId: 'wallets_modal_root',
}
)
}
>
{t('Why?')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import React, { FC } from 'react';
import { THooks } from '../../../../types';
import { ModalWrapper } from '../../../../components/Base';
import { VerificationFailed } from '../../screens';

const VerificationFailedModal: FC = () => {
type TVerificationFailedModalProps = {
selectedJurisdiction: THooks.MT5AccountsList['landing_company_short'];
};

const VerificationFailedModal: FC<TVerificationFailedModalProps> = ({ selectedJurisdiction }) => {
return (
<ModalWrapper hideCloseButton>
<VerificationFailed />
<VerificationFailed selectedJurisdiction={selectedJurisdiction} />
</ModalWrapper>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react';
import React, { FC } from 'react';
import { THooks } from '../../../../types';
import { usePOA, usePOI } from '@deriv/api';
import { WalletButton, WalletText } from '../../../../components/Base';
import { useModal } from '../../../../components/ModalProvider';
import { Verification } from '../../flows/Verification';
import './VerificationFailed.scss';

const getDocumentTitle = (isPOIFailed?: boolean, isPOAFailed?: boolean) => {
Expand All @@ -10,8 +12,12 @@ const getDocumentTitle = (isPOIFailed?: boolean, isPOAFailed?: boolean) => {
return 'proof of address';
};

const VerificationFailed = () => {
const { hide } = useModal();
type TVerificationFailedProps = {
selectedJurisdiction: THooks.MT5AccountsList['landing_company_short'];
};

const VerificationFailed: FC<TVerificationFailedProps> = ({ selectedJurisdiction }) => {
const { hide, show } = useModal();
const { data: poiStatus } = usePOI();
const { data: poaStatus } = usePOA();

Expand Down Expand Up @@ -45,7 +51,12 @@ const VerificationFailed = () => {
<WalletButton onClick={() => hide()} size='lg' variant='outlined'>
Maybe later
</WalletButton>
<WalletButton size='lg'>Resubmit documents</WalletButton>
<WalletButton
onClick={() => show(<Verification selectedJurisdiction={selectedJurisdiction} />)}
size='lg'
>
Resubmit documents
</WalletButton>
</div>
</div>
);
Expand Down

0 comments on commit ec7c427

Please sign in to comment.