Inject index properly into ReferendumInfo (with unwrap) (#718)
* Inject inject properly into ReferendumInfo (with unwrap) * Use unwrapOr * Fix type import
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
import BlockNumber from './BlockNumber';
|
||||
import { Codec } from '../types';
|
||||
|
||||
import Struct from '../codec/Struct';
|
||||
import BlockNumber from './BlockNumber';
|
||||
import Proposal from './Proposal';
|
||||
import VoteThreshold from './VoteThreshold';
|
||||
|
||||
@@ -20,7 +22,7 @@ type ReferendumInfoValue = {
|
||||
* Info regarding an ongoing referendum
|
||||
*/
|
||||
export default class ReferendumInfo extends Struct {
|
||||
constructor (value?: ReferendumInfoValue | Uint8Array) {
|
||||
constructor (value?: ReferendumInfoValue | Uint8Array | Map<string, Codec>) {
|
||||
super({
|
||||
end: BlockNumber,
|
||||
proposal: Proposal,
|
||||
|
||||
Reference in New Issue
Block a user