From 055373f3fbe8d2727adc9d7594cb2e3be17f333e Mon Sep 17 00:00:00 2001 From: ameerul-deriv <103412909+ameerul-deriv@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:59:32 +0800 Subject: [PATCH] Ameerul /Bug 86546 P2P clients (Not POI verified clients) are not temp. banned when we block temporary until 14th of next month or any further dates. (#7444) * chore: revert * chore: added comment --- packages/p2p/src/stores/general-store.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/p2p/src/stores/general-store.js b/packages/p2p/src/stores/general-store.js index 2794fb8e7c6c..f6e161fc46af 100644 --- a/packages/p2p/src/stores/general-store.js +++ b/packages/p2p/src/stores/general-store.js @@ -404,9 +404,8 @@ export default class GeneralStore extends BaseStore { const server_time = this.props.server_time.get(); const blocked_until_moment = toMoment(blocked_until); - this.user_blocked_timeout = setTimeout(() => { - this.setUserBlockedUntil(null); - }, blocked_until_moment.diff(server_time)); + // Need isAfter instead of setTimeout as setTimeout has a max delay of 24.8 days + if (server_time.isAfter(blocked_until_moment)) this.setUserBlockedUntil(null); } } );