Skip to content

Commit

Permalink
fix(a3p): handle Execution Fee while checking user's balance
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Lopes committed Nov 5, 2024
1 parent 60fb999 commit 6c15b9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion a3p-integration/proposals/z:acceptance/test-lib/psm-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ const extractBalance = (balances, targetDenom) => {
* @param {number} actualBalance
* @param {number} expectedBalance
*/
const tryISTBalances = async (t, actualBalance, expectedBalance) => {
export const tryISTBalances = async (t, actualBalance, expectedBalance) => {
const firstTry = await t.try(
(tt, actual, expected) => {
tt.deepEqual(actual, expected);
Expand Down
10 changes: 5 additions & 5 deletions a3p-integration/proposals/z:acceptance/vaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ import {
verifyPushedPrice,
getPriceFeedRoundId,
} from './test-lib/price-feed.js';
import { tryISTBalances } from './test-lib/psm-lib.js';

const VAULT_MANAGER = 'manager0';

const scale6 = x => x * 1_000_000;

test.serial('open new vault', async t => {
await bankSend(USER1ADDR, `20000000${ATOM_DENOM}`);

Expand All @@ -42,11 +45,8 @@ test.serial('open new vault', async t => {
const istBalanceAfter = await getISTBalance(USER1ADDR);
const activeVaultsAfter = await agopsVaults(USER1ADDR);

t.is(
istBalanceBefore + 5,
istBalanceAfter,
'The IST balance should increase by the minted amount',
);
await tryISTBalances(t, scale6(istBalanceAfter), scale6(istBalanceBefore + 5));

t.is(
activeVaultsAfter.length,
activeVaultsBefore.length + 1,
Expand Down

0 comments on commit 6c15b9c

Please sign in to comment.