diff --git a/npm/CHANGELOG.md b/npm/CHANGELOG.md index 9c836dd..c82d865 100644 --- a/npm/CHANGELOG.md +++ b/npm/CHANGELOG.md @@ -1,5 +1,11 @@ # @penumbra-labs/registry +## 12.0.0 + +### Major Changes + +- Forward compatible Metadata deserialization + ## 11.5.0 ### Minor Changes diff --git a/npm/package.json b/npm/package.json index b094cff..5d52460 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "@penumbra-labs/registry", - "version": "11.5.0", + "version": "12.0.0", "description": "Chain and asset registry for Penumbra", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/npm/src/globals.ts b/npm/src/globals.ts index cc27ca7..836dc12 100644 --- a/npm/src/globals.ts +++ b/npm/src/globals.ts @@ -11,7 +11,7 @@ export class RegistryGlobals { constructor(json: JsonGlobals) { this.rpcs = json.rpcs; this.frontends = json.frontendsV2; - this.stakingAssetId = AssetId.fromJson(json.stakingAssetId); + this.stakingAssetId = AssetId.fromJson(json.stakingAssetId, { ignoreUnknownFields: true }); } async version(): Promise { diff --git a/npm/src/registry.ts b/npm/src/registry.ts index 10c48ab..d8e065f 100644 --- a/npm/src/registry.ts +++ b/npm/src/registry.ts @@ -42,7 +42,7 @@ export class Registry { this.chainId = r.chainId; this.ibcConnections = r.ibcConnections; this.assetById = mapObjectValues(r.assetById, jsonMetadata => - Metadata.fromJson(jsonMetadata as unknown as JsonValue), + Metadata.fromJson(jsonMetadata as unknown as JsonValue, { ignoreUnknownFields: true }), ); this.numeraires = r.numeraires.map(a => new AssetId({ inner: base64ToUint8Array(a) })); }