From 01106c1bb102425be9ae2c8a1b02b9693d8cc270 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 14 Jul 2022 10:23:44 +0200 Subject: [PATCH] Simulate: Don't require wallet signature --- ts/src/provider.ts | 4 +++- ts/src/utils/rpc.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/src/provider.ts b/ts/src/provider.ts index ed499720..f455d9c3 100644 --- a/ts/src/provider.ts +++ b/ts/src/provider.ts @@ -229,7 +229,9 @@ export class AnchorProvider implements Provider { ) ).blockhash; - tx = await this.wallet.signTransaction(tx); + // Don't ask the wallet to sign + //tx = await this.wallet.signTransaction(tx); + const result = await simulateTransaction( this.connection, tx, diff --git a/ts/src/utils/rpc.ts b/ts/src/utils/rpc.ts index 46f8defb..79013b71 100644 --- a/ts/src/utils/rpc.ts +++ b/ts/src/utils/rpc.ts @@ -151,7 +151,7 @@ export async function simulateTransaction( }; } - if (signers) { + if (signers && signers.length > 0) { config.sigVerify = true; }