Skip to content

Commit

Permalink
Restrict loading anything with pcash_*
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge committed Jul 4, 2022
1 parent d89dc9e commit 623bda7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Layout/QueryParamContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ export default function QueryParamProvider({ children }: any) {
}, [router.query.to, country, profile, isLoading, isAuthenticated]);

React.useEffect(() => {
const regex = /^pcash_/;
if (
router.query.to &&
!regex.test(router.query.to) &&
country !== undefined &&
country !== "" &&
router.query.to?.toString().toLowerCase() !== "planetcash"
Expand Down

0 comments on commit 623bda7

Please sign in to comment.