Fix setting rawMetadata as registry metadata (#1446)
This commit is contained in:
@@ -26,7 +26,7 @@ export function metadataExpand (definition: MetadataDef, isPartial = false): Cha
|
||||
return cached;
|
||||
}
|
||||
|
||||
const { chain, genesisHash, icon, metaCalls, rawMetadata, specVersion, ss58Format, tokenDecimals, tokenSymbol, types, userExtensions } = definition;
|
||||
const { chain, genesisHash, icon, metaCalls, specVersion, ss58Format, tokenDecimals, tokenSymbol, types, userExtensions } = definition;
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
if (!isPartial) {
|
||||
@@ -41,8 +41,8 @@ export function metadataExpand (definition: MetadataDef, isPartial = false): Cha
|
||||
|
||||
const hasMetadata = !!metaCalls && !isPartial;
|
||||
|
||||
if (hasMetadata || !!rawMetadata) {
|
||||
registry.setMetadata(new Metadata(registry, hasMetadata ? base64Decode(metaCalls) : rawMetadata), undefined, userExtensions);
|
||||
if (hasMetadata) {
|
||||
registry.setMetadata(new Metadata(registry, base64Decode(metaCalls)), undefined, userExtensions);
|
||||
}
|
||||
|
||||
const isUnknown = genesisHash === '0x';
|
||||
|
||||
Reference in New Issue
Block a user