Skip to content

Commit

Permalink
Ameerul /Bug 86546 P2P clients (Not POI verified clients) are not tem…
Browse files Browse the repository at this point in the history
…p. banned when we block temporary until 14th of next month or any further dates. (binary-com#7444)

* chore: revert

* chore: added comment
  • Loading branch information
ameerul-deriv authored and Carol Sachdeva committed Feb 9, 2023
1 parent c54caf5 commit 6ec86c0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/p2p/src/stores/general-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
);
Expand Down

0 comments on commit 6ec86c0

Please sign in to comment.