Skip to content

Commit

Permalink
Ignore unknown fields (#108)
Browse files Browse the repository at this point in the history
Merging to prioritize updates with consumers
  • Loading branch information
grod220 authored Oct 31, 2024
1 parent 6c4b5bd commit bee7a5f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @penumbra-labs/registry

## 12.0.0

### Major Changes

- Forward compatible Metadata deserialization

## 11.5.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion npm/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
Expand Down
2 changes: 1 addition & 1 deletion npm/src/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) }));
}
Expand Down

0 comments on commit bee7a5f

Please sign in to comment.