-
Notifications
You must be signed in to change notification settings - Fork 0
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
add approval workflow #15
Conversation
frontend/src/App.jsx
Outdated
// handle eligibility check | ||
// seting up transaction approval workflow | ||
|
||
const [cc, setCc] = useState('') |
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 is nitpicky but I would recommend renaming this variable to something more explicit. What does cc
stand for? From the context it seems it's a message you are displaying to the user, mostly for error cases, but it's not obvious from its naming
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.
Not nitpicky at all! That variable was just a placeholder to view the workflow and will disappear, it's just a test variable.
Should've commented it properly to mention precisely that, my bad
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.
Check the comment. You can change it on a later PR if you want
Why
Wordle3 requires the player's approval to spend WDT tokens on his/her behalf. This approval workflow requires a UI to function properly.
The workflow should:
How
This PR adds the workflow to number 3, by implementing a basic modal UI with "approve/reject" to approve transactions, processes them and then instanciates a new game.
Demo
Modal appears if approval has not been granted:
Success message and new game instance: