Add identity names to derive.accounts.info (#1673)

This commit is contained in:
Jaco Greeff
2019-12-15 12:16:17 +01:00
committed by GitHub
parent 0b83a61600
commit c4e553ad80
3 changed files with 46 additions and 7 deletions
+9
View File
@@ -8,6 +8,7 @@ import { isString, isU8a, u8aToU8a } from '@polkadot/util';
import Enum from '../codec/Enum';
import { createType } from '../codec/create/createType';
import Bytes from './Bytes';
function decodeDataU8a (registry: Registry, value: Uint8Array): [any, number | undefined] {
if (!value.length) {
@@ -61,6 +62,14 @@ export default class Data extends Enum {
}, ...decodeData(registry, value));
}
get asRaw (): Bytes {
return this.raw as Bytes;
}
get isRaw (): boolean {
return this.index === 1;
}
/**
* @description The encoded length
*/