Skip to content

Commit

Permalink
Fix setting rawMetadata as registry metadata (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul authored Aug 14, 2024
1 parent 5666ab2 commit 03d8fb9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/extension-chains/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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';
Expand Down

0 comments on commit 03d8fb9

Please sign in to comment.