diff --git a/tests/escrow_metadata.ts b/tests/escrow_metadata.ts index 5e19bbf..c3d37ee 100644 --- a/tests/escrow_metadata.ts +++ b/tests/escrow_metadata.ts @@ -16,7 +16,8 @@ import { import { claimToken, createEscrowMetadata, createLockerProgram, createVestingPlan } from "./locker_utils"; -const provider = anchor.AnchorProvider.env(); +let provider = anchor.AnchorProvider.env(); +provider.opts.commitment = 'confirmed'; describe("Escrow metadata", () => { const tokenDecimal = 8; @@ -41,7 +42,9 @@ describe("Escrow metadata", () => { null, tokenDecimal, web3.Keypair.generate(), - null, + { + commitment: "confirmed", + }, TOKEN_PROGRAM_ID ); diff --git a/tests/locker.ts b/tests/locker.ts index 996ecd0..6a4e53c 100644 --- a/tests/locker.ts +++ b/tests/locker.ts @@ -16,7 +16,8 @@ import { import { claimToken, createLockerProgram, createVestingPlan } from "./locker_utils"; -const provider = anchor.AnchorProvider.env(); +let provider = anchor.AnchorProvider.env(); +provider.opts.commitment = 'confirmed'; describe("Full flow", () => { const tokenDecimal = 8; @@ -42,7 +43,9 @@ describe("Full flow", () => { null, tokenDecimal, web3.Keypair.generate(), - null, + { + commitment: "confirmed", + }, TOKEN_PROGRAM_ID ); diff --git a/tests/locker_utils/index.ts b/tests/locker_utils/index.ts index 4823027..7de3f15 100644 --- a/tests/locker_utils/index.ts +++ b/tests/locker_utils/index.ts @@ -16,6 +16,7 @@ export function createLockerProgram( const provider = new AnchorProvider(AnchorProvider.env().connection, wallet, { maxRetries: 3, }); + provider.opts.commitment = 'confirmed'; const program = new Program(LockerIDL, LOCKER_PROGRAM_ID, provider); return program; } diff --git a/tests/update_recipient.ts b/tests/update_recipient.ts index ac39b47..5136562 100644 --- a/tests/update_recipient.ts +++ b/tests/update_recipient.ts @@ -18,6 +18,7 @@ import { claimToken, createEscrowMetadata, createLockerProgram, createVestingPla const provider = anchor.AnchorProvider.env(); +provider.opts.commitment = 'confirmed'; describe("Update recipient", () => { const tokenDecimal = 8; @@ -42,7 +43,9 @@ describe("Update recipient", () => { null, tokenDecimal, web3.Keypair.generate(), - null, + { + commitment: "confirmed", + }, TOKEN_PROGRAM_ID );