diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index d57c92a758..e4bea19d92 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -59,7 +59,6 @@ declare module '@solana/web3.js' { ): Promise; getTransactionCount(): Promise; getLastId(): Promise; - getConfirmationTime(): Promise; requestAirdrop( to: PublicKey, amount: number, diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 8d840fb751..6f1cb1c4a0 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -128,11 +128,6 @@ const GetTransactionCountRpcResult = jsonRpcResult('number'); */ const GetLastId = jsonRpcResult('string'); -/** - * Expected JSON RPC response for the "getConfirmationTime" message - */ -const GetConfirmationTimeRpcResult = jsonRpcResult('number'); - /** * Expected JSON RPC response for the "requestAirdrop" message */ @@ -328,19 +323,6 @@ export class Connection { return res.result; } - /** - * Return the current cluster confirmation time in millliseconds - */ - async getConfirmationTime(): Promise { - const unsafeRes = await this._rpcRequest('getConfirmationTime', []); - const res = GetConfirmationTimeRpcResult(unsafeRes); - if (res.error) { - throw new Error(res.error.message); - } - assert(typeof res.result !== 'undefined'); - return Number(res.result); - } - /** * Request an allocation of tokens to the specified account */ diff --git a/web3.js/test/connection.test.js b/web3.js/test/connection.test.js index 8f5bebb08e..d4bda7a193 100644 --- a/web3.js/test/connection.test.js +++ b/web3.js/test/connection.test.js @@ -123,25 +123,6 @@ test('get last Id', async () => { expect(lastId.length).toBeGreaterThanOrEqual(43); }); -test('get confirmation time', async () => { - const connection = new Connection(url); - - mockRpc.push([ - url, - { - method: 'getConfirmationTime', - params: [], - }, - { - error: null, - result: 123, - }, - ]); - - const finality = await connection.getConfirmationTime(); - expect(finality).toBeGreaterThanOrEqual(0); -}); - test('request airdrop', async () => { const account = new Account(); const connection = new Connection(url);