Skip to content

Commit a593cb4

Browse files
authored
Merge c06d0d7 into e1e2541
2 parents e1e2541 + c06d0d7 commit a593cb4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/p2p/src/pages/buy-sell/no-ads/no-ads.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { Button, Icon, Text } from '@deriv/components';
66
import { routes } from '@deriv/shared';
77
import { Localize } from 'Components/i18next';
88
import { useModalManagerContext } from 'Components/modal-manager/modal-manager-context';
9+
import { document_status_codes, identity_status_codes } from 'Constants/account-status-codes';
910
import { useStores } from 'Stores';
1011
import './no-ads.scss';
1112

@@ -21,6 +22,10 @@ const NoAds = ({ is_ads_page = false }) => {
2122
currency => currency.text.toLowerCase() === selected_local_currency?.toLowerCase() && currency.is_default
2223
).length;
2324

25+
const is_poi_poa_verified =
26+
general_store.poi_status === identity_status_codes.VERIFIED &&
27+
(!general_store.p2p_poa_required || general_store.poa_status === document_status_codes.VERIFIED);
28+
2429
const onClickButton = () => {
2530
if (!is_ads_page) handleTabClick(2);
2631
if (is_buy && !is_ads_page) setCreateSellAdFromNoAds(true);
@@ -49,7 +54,7 @@ const NoAds = ({ is_ads_page = false }) => {
4954
primary
5055
large
5156
onClick={() => {
52-
if (general_store.is_advertiser) {
57+
if (general_store.is_advertiser || !is_poi_poa_verified) {
5358
onClickButton();
5459
} else {
5560
showModal({

0 commit comments

Comments
 (0)