From bed1d386c95306b73987b0c611eb9d01e35b44ee Mon Sep 17 00:00:00 2001 From: Vitalii Koval Date: Wed, 18 Dec 2024 14:17:31 +0400 Subject: [PATCH] fix tests --- .../tests/rolesPermissions.test.ts | 32 +++++++++---------- .../tests/vaultUserOperations/deposit.test.ts | 6 ++-- tests/integration/vault.ts | 8 +++-- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/tests/integration/tests/rolesPermissions.test.ts b/tests/integration/tests/rolesPermissions.test.ts index 26e2172..7979184 100644 --- a/tests/integration/tests/rolesPermissions.test.ts +++ b/tests/integration/tests/rolesPermissions.test.ts @@ -259,7 +259,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountantOne, signer: accountantAdmin.publicKey, - underlyingMint: sharesMintOne, + mint: sharesMintOne, }) .signers([accountantAdmin]) .rpc(); @@ -269,7 +269,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountantOne, signer: accountantAdmin.publicKey, - underlyingMint: underlyingMint, + mint: underlyingMint, }) .signers([accountantAdmin]) .rpc(); @@ -912,7 +912,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -1260,7 +1260,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -1423,7 +1423,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -2061,7 +2061,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -2409,7 +2409,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -2565,7 +2565,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -3374,7 +3374,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -3537,7 +3537,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -4218,7 +4218,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -4564,7 +4564,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -4692,7 +4692,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -5328,7 +5328,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -5680,7 +5680,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); @@ -5827,7 +5827,7 @@ describe("Roles and Permissions Tests", () => { .accounts({ accountant: accountant, signer: accountantAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([accountantAdmin]) .rpc(); diff --git a/tests/integration/tests/vaultUserOperations/deposit.test.ts b/tests/integration/tests/vaultUserOperations/deposit.test.ts index 5763eae..903e6d6 100644 --- a/tests/integration/tests/vaultUserOperations/deposit.test.ts +++ b/tests/integration/tests/vaultUserOperations/deposit.test.ts @@ -292,7 +292,7 @@ describe("Vault User Operations: Deposit Tests", () => { .accounts({ accountant: accountantOne, signer: generalAdmin.publicKey, - underlyingMint: sharesMintOne, + mint: sharesMintOne, }) .signers([generalAdmin]) .rpc(); @@ -302,7 +302,7 @@ describe("Vault User Operations: Deposit Tests", () => { .accounts({ accountant: accountantOne, signer: generalAdmin.publicKey, - underlyingMint: underlyingMint, + mint: underlyingMint, }) .signers([generalAdmin]) .rpc(); @@ -820,7 +820,7 @@ describe("Vault User Operations: Deposit Tests", () => { .accounts({ accountant: accountant, signer: generalAdmin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([generalAdmin]) .rpc(); diff --git a/tests/integration/vault.ts b/tests/integration/vault.ts index 0aed44c..00ed5d3 100644 --- a/tests/integration/vault.ts +++ b/tests/integration/vault.ts @@ -296,7 +296,7 @@ describe("tokenized_vault", () => { console.log("Accountant inited"); - await accountantProgram.methods.setFee(new BN(500)) + await accountantProgram.methods.setPerformanceFee(new BN(500)) .accounts({ accountant: accountant, signer: admin.publicKey, @@ -382,7 +382,7 @@ describe("tokenized_vault", () => { .accounts({ accountant: accountant, signer: admin.publicKey, - underlyingMint: sharesMint, + mint: sharesMint, }) .signers([admin]) .rpc(); @@ -391,7 +391,7 @@ describe("tokenized_vault", () => { .accounts({ accountant: accountant, signer: admin.publicKey, - underlyingMint: underlyingMint, + mint: underlyingMint, }) .signers([admin]) .rpc(); @@ -540,6 +540,7 @@ describe("tokenized_vault", () => { .accounts({ vault, underlyingMint, + accountant, // strategy, user: user.publicKey, userTokenAccount, @@ -1105,6 +1106,7 @@ describe("tokenized_vault", () => { await vaultProgram.methods.deposit(new BN(100)) .accounts({ vault, + accountant, underlyingMint, user: user.publicKey, userTokenAccount,