From 342fb0e2cfedbe885fa93180319e38da1255aac0 Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Mon, 23 Dec 2024 00:08:09 +0300 Subject: [PATCH] fix(client): no block prompt on fcc10 (#57692) --- client/src/redux/donation-saga.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/client/src/redux/donation-saga.js b/client/src/redux/donation-saga.js index 6b227ab44e2..9e058f08776 100644 --- a/client/src/redux/donation-saga.js +++ b/client/src/redux/donation-saga.js @@ -45,13 +45,18 @@ const updateCardErrorMessage = i18next.t('donate.error-3'); function* showDonateModalSaga() { let shouldRequestDonation = yield select(shouldRequestDonationSelector); + const recentlyClaimedBlock = yield select(recentlyClaimedBlockSelector); const MODAL_SHOWN_KEY = 'modalShownTimestamp'; const modalShownTimestamp = sessionStorage.getItem(MODAL_SHOWN_KEY); const isModalRecentlyShown = Date.now() - modalShownTimestamp < 20000; - - if (shouldRequestDonation || isModalRecentlyShown) { + if ( + shouldRequestDonation && + recentlyClaimedBlock && + recentlyClaimedBlock.superBlock == 'full-stack-developer' + ) { + yield put(preventBlockDonationRequests()); + } else if (shouldRequestDonation || isModalRecentlyShown) { yield delay(200); - const recentlyClaimedBlock = yield select(recentlyClaimedBlockSelector); yield put(openDonationModal()); sessionStorage.setItem(MODAL_SHOWN_KEY, Date.now()); yield take(appTypes.closeDonationModal);