mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-06-29 00:57:08 -04:00
tests wait for less mining
This commit is contained in:
parent
e0e800a472
commit
f9559f2a13
1 changed files with 3 additions and 4 deletions
|
@ -71,7 +71,6 @@ beforeAll(async () => {
|
||||||
|
|
||||||
// create client connected to alice's internal wallet
|
// create client connected to alice's internal wallet
|
||||||
aliceWallet = await monerojs.connectToWalletRpc(aliceWalletUrl, aliceWalletUsername, aliceWalletPassword);
|
aliceWallet = await monerojs.connectToWalletRpc(aliceWalletUrl, aliceWalletUsername, aliceWalletPassword);
|
||||||
await aliceWallet.startSyncing(WALLET_SYNC_PERIOD);
|
|
||||||
|
|
||||||
// debug tools
|
// debug tools
|
||||||
//for (let offer of await alice.getMyOffers("BUY")) await alice.removeOffer(offer.getId());
|
//for (let offer of await alice.getMyOffers("BUY")) await alice.removeOffer(offer.getId());
|
||||||
|
@ -179,7 +178,7 @@ test("Can post and remove an offer", async () => {
|
||||||
|
|
||||||
// wait for alice to have unlocked balance to post offer
|
// wait for alice to have unlocked balance to post offer
|
||||||
let tradeAmount: bigint = BigInt("250000000000");
|
let tradeAmount: bigint = BigInt("250000000000");
|
||||||
await waitForUnlockedBalance(tradeAmount, alice);
|
await waitForUnlockedBalance(tradeAmount * BigInt("5"), alice);
|
||||||
|
|
||||||
// get unlocked balance before reserving funds for offer
|
// get unlocked balance before reserving funds for offer
|
||||||
let unlockedBalanceBefore: bigint = BigInt((await alice.getBalances()).getUnlockedBalance());
|
let unlockedBalanceBefore: bigint = BigInt((await alice.getBalances()).getUnlockedBalance());
|
||||||
|
@ -201,7 +200,7 @@ test("Invalidates offers when reserved funds are spent", async () => {
|
||||||
|
|
||||||
// wait for alice and bob to have unlocked balance for trade
|
// wait for alice and bob to have unlocked balance for trade
|
||||||
let tradeAmount: bigint = BigInt("250000000000");
|
let tradeAmount: bigint = BigInt("250000000000");
|
||||||
await waitForUnlockedBalance(tradeAmount, alice, bob);
|
await waitForUnlockedBalance(tradeAmount * BigInt("5"), alice);
|
||||||
|
|
||||||
// get frozen key images before posting offer
|
// get frozen key images before posting offer
|
||||||
let frozenKeyImagesBefore = [];
|
let frozenKeyImagesBefore = [];
|
||||||
|
@ -254,7 +253,7 @@ test("Can complete a trade", async () => {
|
||||||
|
|
||||||
// wait for alice and bob to have unlocked balance for trade
|
// wait for alice and bob to have unlocked balance for trade
|
||||||
let tradeAmount: bigint = BigInt("250000000000");
|
let tradeAmount: bigint = BigInt("250000000000");
|
||||||
await waitForUnlockedBalance(tradeAmount, alice, bob);
|
await waitForUnlockedBalance(tradeAmount * BigInt("5"), alice, bob);
|
||||||
|
|
||||||
// create bob's ethereum payment account
|
// create bob's ethereum payment account
|
||||||
let testAccount = TEST_CRYPTO_ACCOUNTS[0];
|
let testAccount = TEST_CRYPTO_ACCOUNTS[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue