Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsource147 committed Aug 22, 2024
1 parent af9f413 commit 9340537
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
7 changes: 5 additions & 2 deletions tests/escrow_metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -41,7 +42,9 @@ describe("Escrow metadata", () => {
null,
tokenDecimal,
web3.Keypair.generate(),
null,
{
commitment: "confirmed",
},
TOKEN_PROGRAM_ID
);

Expand Down
7 changes: 5 additions & 2 deletions tests/locker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -42,7 +43,9 @@ describe("Full flow", () => {
null,
tokenDecimal,
web3.Keypair.generate(),
null,
{
commitment: "confirmed",
},
TOKEN_PROGRAM_ID
);

Expand Down
1 change: 1 addition & 0 deletions tests/locker_utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Locker>(LockerIDL, LOCKER_PROGRAM_ID, provider);
return program;
}
Expand Down
5 changes: 4 additions & 1 deletion tests/update_recipient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { claimToken, createEscrowMetadata, createLockerProgram, createVestingPla


const provider = anchor.AnchorProvider.env();
provider.opts.commitment = 'confirmed';

describe("Update recipient", () => {
const tokenDecimal = 8;
Expand All @@ -42,7 +43,9 @@ describe("Update recipient", () => {
null,
tokenDecimal,
web3.Keypair.generate(),
null,
{
commitment: "confirmed",
},
TOKEN_PROGRAM_ID
);

Expand Down

0 comments on commit 9340537

Please sign in to comment.