forked from Uniswap/interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from helix-bridge/jay/fix-cors
Fix CORS
- Loading branch information
Showing
7 changed files
with
138 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy staging | ||
name: Deploy production | ||
|
||
on: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
import { useEffect } from 'react' | ||
import { ApplicationModal, setOpenModal } from 'state/application/reducer' | ||
import { useAppDispatch } from 'state/hooks' | ||
// import { useEffect } from 'react' | ||
// import { ApplicationModal, setOpenModal } from 'state/application/reducer' | ||
// import { useAppDispatch } from 'state/hooks' | ||
|
||
export default function useAccountRiskCheck(account: string | null | undefined) { | ||
const dispatch = useAppDispatch() | ||
// const dispatch = useAppDispatch() | ||
|
||
useEffect(() => { | ||
if (!account) { | ||
return | ||
} | ||
// useEffect(() => { | ||
// if (!account) { | ||
// return | ||
// } | ||
|
||
// TODO: add back local browser cacheing (revisit 11/13/2023) | ||
const headers = new Headers({ 'Content-Type': 'application/json' }) | ||
fetch('https://interface.gateway.uniswap.org/v1/screen', { | ||
method: 'POST', | ||
headers, | ||
body: JSON.stringify({ address: account }), | ||
}) | ||
.then((res) => res.json()) | ||
.then((data) => { | ||
if (data.block) { | ||
dispatch(setOpenModal(ApplicationModal.BLOCKED_ACCOUNT)) | ||
} | ||
}) | ||
.catch(() => { | ||
dispatch(setOpenModal(null)) | ||
}) | ||
}, [account, dispatch]) | ||
// // TODO: add back local browser cacheing (revisit 11/13/2023) | ||
// const headers = new Headers({ 'Content-Type': 'application/json' }) | ||
// fetch('https://interface.gateway.uniswap.org/v1/screen', { | ||
// method: 'POST', | ||
// headers, | ||
// body: JSON.stringify({ address: account }), | ||
// }) | ||
// .then((res) => res.json()) | ||
// .then((data) => { | ||
// if (data.block) { | ||
// dispatch(setOpenModal(ApplicationModal.BLOCKED_ACCOUNT)) | ||
// } | ||
// }) | ||
// .catch(() => { | ||
// dispatch(setOpenModal(null)) | ||
// }) | ||
// }, [account, dispatch]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters