Skip to content

Commit

Permalink
Remove unnecessary await
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBCarter committed Dec 17, 2024
1 parent f7e7129 commit 46ec0ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"--run",
"--inspect-brk",
"--no-file-parallelism",
"packages/modules/packages/diviner/packages/boundwitness/packages/memory/src/spec/Diviner.spec.ts"
"packages/modules/packages/diviner/packages/payloadpointer/packages/memory/src/spec/Diviner.payloadPointer.timestamp.spec.ts"
],
"sourceMaps": true,
"resolveSourceMapLocations": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { unitTestSigningAccount } from '../Account/index.ts'
import { getNewPayloads } from '../Payload/index.ts'

export const getNewBlock = async (...payloads: Payload[]): Promise<BoundWitness> => {
return (await (await new BoundWitnessBuilder().witness(await unitTestSigningAccount()).payloads(payloads)).build())[0]
return (await (new BoundWitnessBuilder().witness(await unitTestSigningAccount()).payloads(payloads)).build())[0]
}

export const getNewBlockWithPayloads = async (numPayloads = 1) => {
Expand All @@ -28,7 +28,7 @@ export const getNewBlocksWithPayloads = async (numBoundWitnesses = 1, numPayload
.fill(0)
.map(async () => {
return (
await (await new BoundWitnessBuilder().witness(await unitTestSigningAccount()).payloads(await getNewPayloads(numPayloads))).build()
await (new BoundWitnessBuilder().witness(await unitTestSigningAccount()).payloads(await getNewPayloads(numPayloads))).build()
)[0]
}),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { unitTestSigningAccount } from '../Account/index.ts'
import { getNewPayloads } from '../Payload/index.ts'

export const getNewBoundWitness = async (signers?: AccountInstance[], payloads?: Payload[]): Promise<[BoundWitness, Payload[], ModuleError[]]> => {
return await (await new BoundWitnessBuilder().payloads(payloads ?? (await getNewPayloads(1))))
return await (new BoundWitnessBuilder().payloads(payloads ?? (await getNewPayloads(1))))
.witnesses(signers ?? [await unitTestSigningAccount()])
.build()
}
Expand Down

0 comments on commit 46ec0ae

Please sign in to comment.