Override for Vote type (not a struct, not caught) (#1794)

* Override for Vote type (not a struct, not caught)

* Generate simple Vote object (first, Struct to be done)

* Comment for hex type (string)

* Expand conviction (like we should on enum)

* Cool, use conviction def for input

* aye is required

* Remove FIXMEs
This commit is contained in:
Jaco Greeff
2020-02-02 19:17:33 +01:00
committed by GitHub
parent f499946f1f
commit b3d592357f
6 changed files with 21 additions and 7 deletions
+2 -2
View File
@@ -456,7 +456,7 @@ declare module '@polkadot/api/types/submittable' {
* - One DB change, one DB entry.
* # </weight>
**/
vote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
vote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | { aye: boolean; conviction?: number | ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') } | boolean | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact
* the proposal; otherwise it is a vote to keep the status quo.
@@ -465,7 +465,7 @@ declare module '@polkadot/api/types/submittable' {
* - One DB change, one DB entry.
* # </weight>
**/
proxyVote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
proxyVote: AugmentedSubmittable<(refIndex: Compact<ReferendumIndex> | AnyNumber | Uint8Array, vote: Vote | { aye: boolean; conviction?: number | ('None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x') } | boolean | string | Uint8Array) => SubmittableExtrinsic<ApiType>>;
/**
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
* referendum.