Skip to content

Commit

Permalink
Merge pull request #115 from CityOfZion/CU-86a5my04u
Browse files Browse the repository at this point in the history
CU-86a5my04u-BS Lib - Add maxAttemps customizable for waitForAccountT…
  • Loading branch information
thiagocbalducci authored Nov 19, 2024
2 parents 82be131 + ac1ff8f commit 8b32525
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@cityofzion/blockchain-service",
"comment": "Add maxAttemps customizable on waitForAccountTransaction",
"type": "patch"
}
],
"packageName": "@cityofzion/blockchain-service"
}
5 changes: 2 additions & 3 deletions packages/blockchain-service/src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,9 @@ export async function waitForTransaction<BSName extends string = string>(
export async function waitForAccountTransaction<BSName extends string = string>(
service: BlockchainService<BSName>,
txId: string,
account: Account<BSName>
account: Account<BSName>,
maxAttempts = 10
): Promise<boolean> {
const maxAttempts = 10

let attempts = 1

do {
Expand Down

0 comments on commit 8b32525

Please sign in to comment.