Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eth-r committed Aug 3, 2023
1 parent b437347 commit 0e0608f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cross-chain/solana/tests/helpers/tbtcHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,30 @@ 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<Tbtc>,
authority,
minter
): Promise<anchor.web3.PublicKey> {
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,
})
Expand Down

0 comments on commit 0e0608f

Please sign in to comment.