fix: getConfirmationTime() was removed upstream

This commit is contained in:
Michael Vines
2019-02-17 16:09:55 -08:00
parent 6b73d7d17c
commit 5b9665098a
3 changed files with 0 additions and 38 deletions

View File

@ -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<number> {
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
*/