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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user