snapshot-labs / sx-monorepo

Snapshot X monorepo
https://docs.snapshotx.xyz
MIT License
11 stars 10 forks source link

feat: prevent already voted message to show when changing accounts. #415

Closed Sekhmet closed 2 weeks ago

Sekhmet commented 2 weeks ago

Summary

Now changing account will reset both votes and pending votes.

pendingVotes are now also part of useAccount composable to collocate them with regular votes and allow for easier reset when account changes.

Closes: https://github.com/snapshot-labs/sx-monorepo/issues/412

How to test

  1. Go to some proposal you already voted.
  2. Change account by clicking Change account.
  3. Message disappears.
  4. Go to new proposal you haven't voted.
  5. Vote.
  6. Change account by clicking Change account.
  7. Message disappears.