VecFixed now take sub, align ext with UInt (#1909)

* Allow nested definitions for fixed arrays

* Comment nested test

* Don't import U8aFixed + u8
This commit is contained in:
Jaco Greeff
2020-02-20 21:36:12 +01:00
committed by GitHub
parent dd0a31803f
commit 1c1bfb295d
9 changed files with 62 additions and 39 deletions
@@ -2,7 +2,7 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { Registry, TypeDef, TypeDefInfo, TypeDefExtVecFixed } from '@polkadot/types/types';
import { Registry, TypeDef, TypeDefInfo } from '@polkadot/types/types';
import { getTypeDef } from '@polkadot/types/create';
@@ -20,10 +20,8 @@ function extractTypes (types: string[]): any[] {
case TypeDefInfo.Compact:
case TypeDefInfo.Option:
case TypeDefInfo.Vec:
return extractTypes([(decoded.sub as TypeDef).type]);
case TypeDefInfo.VecFixed:
return extractTypes([(decoded.ext as TypeDefExtVecFixed).type]);
return extractTypes([(decoded.sub as TypeDef).type]);
case TypeDefInfo.BTreeMap:
case TypeDefInfo.BTreeSet: