Commit Graph

60 Commits

Author SHA1 Message Date
Maximilian Schneider 3db71073f7
fix import case (#119) 2021-06-25 20:49:48 +01:00
Sebastian Bor dd22e823f0
Governance: support mints with large supply (#120)
* fix: add GenericAccountParser to account validator lookup

* fix: do not use cache for accounts validation

* fix: correct deposit/withdraw actions notifications

* fix: update all actions notifications to show transaction link

* fix: display vote scores for large mint supplies

* fix: accept u64 for approve amount

* fix: check for number type to do coercion

* fix: make deposit and withdraw working with large token amounts

* fix: make new proposal working with large token amounts

* fix: make proposal view working with large token amounts

* fix: fix voter table links and vote weight
2021-06-25 18:39:14 +01:00
Sebastian Bor 988d1f72d4
Governance: actions UI feedback (#118)
* chore: create RealmBadge component

* chore: constrain account type

* feat: create mintFormItem with validator

* feat: validate RegisterRealm form

* fix: use correct link in tx error link

* fix: handle transaction errors

* chore: create ModalFormAction componet

* chore: use ModalFormAction for RegisterRealm

* feat: use ModalFormAction to register governance

* fix: use account validator for governed account input

* feat: use ModalFormAction for AddNewProposal action

* chore: code cleanup
2021-06-19 19:30:23 +01:00
Sebastian Bor 4c4d0bfd9c
Governance: lazy account loading (#117)
* chore: load Realms and Governances using rpc

* fix: use bas64 encoding to get accounts

* chore: load governances on demand

* chore: remove legacy GovernanceVotingRecord

* chore: remove governances from context

* chore: remove proposals from ctx

* fix: ensure updates are also filtered using filters

* chore: use useGovernanceAccountsByFilter for Governances

* chore: use useGovernanceAccountsByFilter for useTokenOwnerRecords

* chore: remove tokenOwnerRecords from ctx

* chore: remove signatory records and proposal instructions from ctx

* chore: remove vote records from ctx

* chore: request realms only to get all realms accounts

* chore: use changeTracker to react to account removals

* chore: update comments
2021-06-17 17:53:01 +01:00
Sebastian Bor 8a60c54467
Governance: MVP UI (#115)
* feat: add Realms view

* feat: create governance form

* wip: create governances

* wip: working create governance

* wip: create governance instruction

* wip: deserialise Governance account

* chore: remove diagnostic code

* feat: show realm governances

* chore: rename index to RealmView

* feat: show realm details

* feat: implement deposit governing tokens

* chore: rename instruction builders to have with prefix

* wip: scaffold withdraw tokens

* feat: working tokens withdrawal

* chore: move accounts and instructions to separate files

* chore: move GOVERNANCE_PROGRAM_SEED to acocunts

* feat: use TokenOwnerRecord to track deposited tokens

* fix: realm actions layout

* chore: cleanup realms

* chore: cleanup home view

* fix: order realms and governances

* wip: createProposal

* feat: use actual values to create proposal

* chore: remove dummy dashboard

* chore: rename Dashboard view to GovernanceDashboard

* chore: rename Proposals view to Governance

* chore: rename Dashboard to Diagnostic view

* chore: rename registerrealm

* feat: Proposal account serialization

* feat: show governance proposals

* wip: wire ProposalView to new accounts

* feat: show signatories, and votes counts

* feat: add proposal creator as the default signatory

* chore: update serialization

* chore: update serialisation

* feat: sign off proposal

* feat: show Yeah/Nay buttons

* chore: rename legacy actions

* chore: rename legacy instruction creators

* feat: implement cast vote

* feat: deserialise vote records

* chore: clenup lints

* feat: implement relinquish vote

* feat: implement CrateProgramGovernance

* wip: InsertInstruction instruction

* wip: executeInstruction

* feat: Add new instructions

* feat: execute instructions

* chore: prune legacy governance code

* chore:  rename GovernanceContextProvider

* chore: use Record for SignatoryRecord

* chore: Use Record for TokenOwnerRecords

* chore: rename diagnostics to DevTools

* chore: setup dev tools to create artefacts

* fix: execute button states

* feat: implement removeInstruction

* fix: withdraw vote / release token fix

* fix: disable add proposal when not enough tokens

* feat: implement CancelProposal

* feat: support council mints

* fix: single mint proposals

* feat: display vote results

* fix: sundries

* chore: prune legacy code

* chore: move proposal components to view

* feat: add pre canned Upgrade program instruction

* feat: add pre canned MintTo instruction

* feat: show council token badge

* chore: set primary buttons

* feat: show governance avatars

* fix: add error message when trying to withdraw tokens with staked proposals

* feat: implement FinalizeVote

* feat: add timeout badge while proposal is in voting state

* fix: set isBeyondSlot to false when status resolved
2021-06-15 11:15:11 -05:00
Jordan Prince 5cb88d4844 Fixes for governance 2021-05-06 15:58:31 -05:00
bartosz-lipinski b5b2be7931 fix: build issues 2021-04-30 19:27:52 -05:00
Sebastian Bor 39b1fa63ef
Governance: devnet program api update (#101)
* chore: use single create instruction to create governance

* chore: remove yes/no dump accounts

* chore: remove single value enums

* chore: remove token from proposal account

* chore: remove governance program account from createEmptyGovernanceVotingRecord

* chore: remove number_of_extra_accounts from Execute

* chore: update program id
2021-04-29 18:30:29 -05:00
bartosz-lipinski 3891bdcc47 Merge remote-tracking branch 'origin/main' into feature/m 2021-04-27 22:30:30 -05:00
Sebastian.Bor 3b5e84b8b7 chore: rename proposals to governance 2021-04-24 13:46:36 +01:00