feat: remove commitment option from requestAirdrop

This commit is contained in:
Justin Starry
2020-06-11 00:10:25 +08:00
committed by Michael Vines
parent a9a19e2363
commit 24bb060292
6 changed files with 45 additions and 176 deletions

View File

@ -1703,10 +1703,11 @@ export class Connection {
async requestAirdrop(
to: PublicKey,
amount: number,
commitment: ?Commitment,
): Promise<TransactionSignature> {
const args = this._argsWithCommitment([to.toBase58(), amount], commitment);
const unsafeRes = await this._rpcRequest('requestAirdrop', args);
const unsafeRes = await this._rpcRequest('requestAirdrop', [
to.toBase58(),
amount,
]);
const res = RequestAirdropRpcResult(unsafeRes);
if (res.error) {
throw new Error(