From f63034752dd4b79d848ae76ca0650ed2a916b76f Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 29 Sep 2020 10:55:23 -0700 Subject: [PATCH] fix: support new 'feature-set' field in getVersion RPC method --- web3.js/module.d.ts | 1 + web3.js/module.flow.js | 1 + web3.js/src/connection.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index c2e903c687..f4acad1932 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -212,6 +212,7 @@ declare module '@solana/web3.js' { export type Version = { 'solana-core': string; + 'feature-set'?: number; }; export type VoteAccountInfo = { diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index d253737190..cf03e04522 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -226,6 +226,7 @@ declare module '@solana/web3.js' { declare export type Version = { 'solana-core': string, + 'feature-set': ?number, }; declare export type VoteAccountInfo = { diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 8224fb4221..210d6dce72 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -350,8 +350,9 @@ const SignatureStatusResult = struct({err: TransactionErrorResult}); * @typedef {Object} Version * @property {string} solana-core Version of solana-core */ -const Version = struct({ +const Version = struct.pick({ 'solana-core': 'string', + 'feature-set': 'number?', }); type SimulatedTransactionResponse = {