Skip to content

Commit

Permalink
Fixed sync param in webClientTestUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Garcia committed Nov 4, 2024
1 parent b9e9f2d commit e6b971f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/web-client/test/webClientTestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ interface MintTransactionResult {
export const mintTransaction = async (
targetAccountId: string,
faucetAccountId: string,
sync = true
sync: boolean = true
): Promise<MintTransactionResult> => {
return await testingPage.evaluate(
async (_targetAccountId, _faucetAccountId) => {
async (_targetAccountId, _faucetAccountId, _sync) => {
const client = window.client;

await new Promise((r) => setTimeout(r, 20000));
Expand All @@ -31,7 +31,7 @@ export const mintTransaction = async (
BigInt(1000)
);

if (sync) {
if (_sync) {
await new Promise((r) => setTimeout(r, 20000)); // TODO: Replace this with loop of sync -> check uncommitted transactions -> sleep
await client.sync_state();
}
Expand All @@ -53,7 +53,8 @@ export const mintTransaction = async (
};
},
targetAccountId,
faucetAccountId
faucetAccountId,
sync
);
};

Expand Down

0 comments on commit e6b971f

Please sign in to comment.