chore: remove undocumented validatorExit method

This commit is contained in:
Michael Vines 2021-03-03 14:42:10 -08:00
parent 872f7117c3
commit 81253c9956
4 changed files with 0 additions and 27 deletions

1
web3.js/module.d.ts vendored
View File

@ -527,7 +527,6 @@ declare module '@solana/web3.js' {
removeSignatureListener(id: number): Promise<void>;
onRootChange(callback: RootChangeCallback): number;
removeRootChangeListener(id: number): Promise<void>;
validatorExit(): Promise<boolean>;
getMinimumBalanceForRentExemption(
dataLength: number,
commitment?: Commitment,

View File

@ -531,7 +531,6 @@ declare module '@solana/web3.js' {
removeSignatureListener(id: number): Promise<void>;
onRootChange(callback: RootChangeCallback): number;
removeRootChangeListener(id: number): Promise<void>;
validatorExit(): Promise<boolean>;
getMinimumBalanceForRentExemption(
dataLength: number,
commitment: ?Commitment,

View File

@ -2682,18 +2682,6 @@ export class Connection {
return await this.sendRawTransaction(wireTransaction, options);
}
/**
* @private
*/
async validatorExit(): Promise<boolean> {
const unsafeRes = await this._rpcRequest('validatorExit', []);
const res = create(unsafeRes, jsonRpcResult(boolean()));
if (res.error) {
throw new Error('validator exit failed: ' + res.error.message);
}
return res.result;
}
/**
* Send a transaction that has already been signed and serialized into the
* wire format

View File

@ -258,19 +258,6 @@ describe('Connection', () => {
}
});
if (!process.env.TEST_LIVE) {
it('validatorExit', async () => {
await mockRpcResponse({
method: 'validatorExit',
params: [],
value: false,
});
const result = await connection.validatorExit();
expect(result).to.eq(false);
});
}
it('get balance', async () => {
const account = new Account();