From 759bf5efe04793fd0fd13be2c7c7fbe85d90c404 Mon Sep 17 00:00:00 2001 From: blaineheffron Date: Wed, 29 May 2024 17:39:56 -0400 Subject: [PATCH] remove bald booleans --- src/contract/assembled_transaction.ts | 4 ++-- src/contract/sent_transaction.ts | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts index 35e2649e1..9e548f5e9 100644 --- a/src/contract/assembled_transaction.ts +++ b/src/contract/assembled_transaction.ts @@ -431,11 +431,11 @@ export class AssembledTransaction { .setSorobanData(sorobanData instanceof SorobanDataBuilder ? sorobanData.build() : sorobanData) .addOperation(Operation.restoreFootprint({})) .setTimeout(options.timeoutInSeconds ?? DEFAULT_TIMEOUT); - await tx.simulate(false); + await tx.simulate({ restore: false }); return tx; } - simulate = async (restore?: boolean): Promise => { + simulate = async ({ restore }: {restore?: boolean} = {}): Promise => { if (!this.raw) { throw new Error( "Transaction has not yet been assembled; " + diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts index 347b8111e..697d129dc 100644 --- a/src/contract/sent_transaction.ts +++ b/src/contract/sent_transaction.ts @@ -66,7 +66,6 @@ export class SentTransaction { }); } - /** * Initialize a `SentTransaction` from an existing `AssembledTransaction` and * a `signTransaction` function. This will also send the transaction to the @@ -80,11 +79,11 @@ export class SentTransaction { updateTimeout: boolean = true, ): Promise> => { const tx = new SentTransaction(signTransaction, assembled); - const sent = await tx.send(updateTimeout); + const sent = await tx.send({ updateTimeout }); return sent; }; - private send = async (updateTimeout: boolean = true): Promise => { + private send = async ({ updateTimeout }: {updateTimeout?: boolean } = { updateTimeout: true }): Promise => { const timeoutInSeconds = this.assembled.options.timeoutInSeconds ?? DEFAULT_TIMEOUT; if(updateTimeout) {