-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gating dApp #767
Gating dApp #767
Conversation
✅ Deploy Preview for acre-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
7e94893
to
b50442d
Compare
24a4d7a
to
dd1a535
Compare
dapp/src/hooks/useAccessCode.ts
Outdated
import useLocalStorage from "./useLocalStorage" | ||
|
||
export default function useAccessCode() { | ||
const [accessCode, setAccessCode] = useLocalStorage<string | undefined>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [accessCode, setAccessCode] = useLocalStorage<string | undefined>( | |
const [encodedCode, setAccessCode] = useLocalStorage<string | undefined>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces a gating in dApp. The user must enter access code to access a standalone dApp. The access code entered on the form is checked by a special endpoint
access/verify
. When the code is correct, the dApp should allow the user to see dApp. Otherwise, we will show the right error message.What has been done
VITE_FEATURE_GATING_DAPP_ENABLED
feature flaglocalStorage
UI
Screen.Recording.2024-10-22.at.13.09.04.mov