fix: getConfirmationTime() was removed upstream
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user