From 0e0608f028e799bfc8ec0d67fdb8710623a2beca Mon Sep 17 00:00:00 2001 From: Promethea Raschke Date: Thu, 3 Aug 2023 13:26:58 +0100 Subject: [PATCH] Fix test errors --- cross-chain/solana/tests/helpers/tbtcHelpers.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cross-chain/solana/tests/helpers/tbtcHelpers.ts b/cross-chain/solana/tests/helpers/tbtcHelpers.ts index 70b57bc9a..a0918c1d1 100644 --- a/cross-chain/solana/tests/helpers/tbtcHelpers.ts +++ b/cross-chain/solana/tests/helpers/tbtcHelpers.ts @@ -101,7 +101,15 @@ export async function checkState( let mintState = await spl.getMint(program.provider.connection, tbtcMint); expect(mintState.supply).to.equal(BigInt(expectedTokensSupply)); - } + + const [guardians,] = getGuardiansPDA(program); + let guardiansState = await program.account.guardians.fetch(guardians); + expect(guardiansState.keys).has.length(expectedGuardians); + + const [minters,] = getMintersPDA(program); + let mintersState = await program.account.minters.fetch(minters); + expect(mintersState.keys).has.length(expectedMinters); +} export async function addMinter( program: Program, @@ -109,12 +117,14 @@ export async function addMinter( minter ): Promise { const [config,] = getConfigPDA(program); + const [minters,] = getMintersPDA(program); const [minterInfoPDA, _] = getMinterPDA(program, minter); await program.methods .addMinter() .accounts({ config, authority: authority.publicKey, + minters, minter, minterInfo: minterInfoPDA, })