-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for offchain proposal cancel (#76)
* feat: add support for offchain basic proposal creation * fix: set voting delay and period when available * fix: get discussion from payload * chore: remove unused variable/import * refactor: extract value to constant * fix: get correct block number on proposal creation * fix: add support for only members proposal validation * fix: fetch voting power for proposal creation * refactor: improve readability * refactor: improve code * fix: remove debug value * fix: fix timestamp mismatch when using voting delay/period * chore: fix import order * fix: address comparison should not depend on case * fix: add try/catch to fetch call * feat: add vote type selector to proposal editor * Update apps/ui/src/networks/offchain/actions.ts Co-authored-by: Wiktor Tkaczyński <[email protected]> * Update apps/ui/src/networks/offchain/actions.ts Co-authored-by: Wiktor Tkaczyński <[email protected]> * refactor: remove redundant else * fix: fix casing * refactor: rename for consistency * fix: show choices selector * refactor: DRY types name * fix: rename duplicate type * fix: fix tests * feat: add support for offchain proposal cancel * fix: add choices customization * fix: fix botched merge * fix: add choices customization * fix: add support for choices reordering * refactor: extract vote types/choices to its own component * fix(ui): implement spacing from design system * fix(ui): show error message on empty choices * fix: validate choices through JSON validation * fix(ui): add support for dark theme * refactor: code cleanup * chore: code cleanup * refactor: refactoring * refactor: remove unused value * refactor: rename constant to reflect its type * Update apps/ui/src/components/EditorVote.vue Co-authored-by: Wiktor Tkaczyński <[email protected]> * fix: display voting type/choices depending on network support * fix(ui): fix for small screen * fix: fix missing item-key for draggable component * refactor: * chore: fix strictMode warning * fix(ui): UI fixes to conform to figma * fix(ui): remove uneeded import * fix(ui): reset choices when changing vote type * refactor: split EditorVote type into 2 * refactor: extract to UiSelector component * fix(ui): increase border radius * fix(ui): default to 3 empty choices for other voting type * fix(ui): use same placeholder for errored input * fix(ui): default to 2 empty choices * fix(ui): do not show error for empty choices * fix(ui): add illustration image for voting type * fix(ui): add animation to draggable * fix(ux): add validation to choices * fix(ui): keep same styling as existing form imput * refactor: remove unused props * fix(ui): add margin * chore: fix tests * fix: fix function return signature * chore: remove debug output * fix: function should return signature envelope * chore: update changeset * chore: remove unused import * fix: use dedicated set of permission for offchain proposal deletion * fix: fix typing * chore: fix import order * chore: add unit tests for offchain eth-sig proposal cancel * chore: add integration test for offchain eth-sig cancel * fix: remove false assumption that controller is also admin --------- Co-authored-by: Wiktor Tkaczyński <[email protected]>
- Loading branch information
Showing
17 changed files
with
177 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@snapshot-labs/sx": patch | ||
--- | ||
|
||
add cancel proposal support to OffchainEthereumSig |
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
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 |
---|---|---|
|
@@ -54,6 +54,7 @@ const PROPOSAL_FRAGMENT = gql` | |
name | ||
network | ||
admins | ||
moderators | ||
symbol | ||
} | ||
type | ||
|
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
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
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
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
43 changes: 43 additions & 0 deletions
43
packages/sx.js/test/unit/clients/offchain/ethereum-sig/__snapshots__/index.test.ts.snap
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