|
@@ -346,16 +346,14 @@ export class AccountClient<
|
|
): Promise<TransactionInstruction> {
|
|
): Promise<TransactionInstruction> {
|
|
const size = this.size;
|
|
const size = this.size;
|
|
|
|
|
|
- // @ts-expect-error
|
|
|
|
- if (this._provider.wallet === undefined) {
|
|
|
|
|
|
+ if (this._provider.publicKey === undefined) {
|
|
throw new Error(
|
|
throw new Error(
|
|
- "This function requires the Provider interface implementor to have a 'wallet' field."
|
|
|
|
|
|
+ "This function requires the Provider interface implementor to have a 'publicKey' field."
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
return SystemProgram.createAccount({
|
|
return SystemProgram.createAccount({
|
|
- // @ts-expect-error
|
|
|
|
- fromPubkey: this._provider.wallet.publicKey,
|
|
|
|
|
|
+ fromPubkey: this._provider.publicKey,
|
|
newAccountPubkey: signer.publicKey,
|
|
newAccountPubkey: signer.publicKey,
|
|
space: sizeOverride ?? size,
|
|
space: sizeOverride ?? size,
|
|
lamports:
|
|
lamports:
|