Skip to content
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

Refactor Wordle hooks #18

Merged
merged 2 commits into from
Nov 7, 2024

Commits on Nov 7, 2024

  1. Refactor Wordle hooks

    ## Why
    Wordle3 hooks were using a local account strucutre that had to
    destructure the account into `account.address` in order to separate
    address and private key which is not what will happen in production.
    ## How
    By refactoring the hooks' argument to stop destructuring the account as
    `WagmiProvider` passes the correct data structure to work as intended.
    rccsousa committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    e6c342a View commit details
    Browse the repository at this point in the history
  2. fix constant network pinging (#19)

    ## Why
    The `useEffect` hook was constantly pinging the network while looking
    for changes in `playerGuesses` which lead excessive network requests.
    ## How
    By changing the `useEffect` to watch only for address changes and
    shifting the `playerGuess` update to `handleTryGuess`, which makes more
    sense.
    rccsousa authored Nov 7, 2024
    Configuration menu
    Copy the full SHA
    dccfcd7 View commit details
    Browse the repository at this point in the history