Skip to content

Commit

Permalink
remove bald booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
BlaineHeffron committed May 29, 2024
1 parent 541e663 commit 759bf5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/contract/assembled_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,11 +431,11 @@ export class AssembledTransaction<T> {
.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<this> => {
simulate = async ({ restore }: {restore?: boolean} = {}): Promise<this> => {
if (!this.raw) {
throw new Error(
"Transaction has not yet been assembled; " +
Expand Down
5 changes: 2 additions & 3 deletions src/contract/sent_transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export class SentTransaction<T> {
});
}


/**
* Initialize a `SentTransaction` from an existing `AssembledTransaction` and
* a `signTransaction` function. This will also send the transaction to the
Expand All @@ -80,11 +79,11 @@ export class SentTransaction<T> {
updateTimeout: boolean = true,
): Promise<SentTransaction<U>> => {
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<this> => {
private send = async ({ updateTimeout }: {updateTimeout?: boolean } = { updateTimeout: true }): Promise<this> => {
const timeoutInSeconds =
this.assembled.options.timeoutInSeconds ?? DEFAULT_TIMEOUT;
if(updateTimeout) {
Expand Down

0 comments on commit 759bf5e

Please sign in to comment.