harness: wait for withdrawal
This commit is contained in:
parent
b63937703c
commit
013252efde
@ -151,13 +151,15 @@ export async function runMerchantExchangeConfusionTest(t: GlobalTestState) {
|
|||||||
|
|
||||||
// Withdraw digital cash into the wallet.
|
// Withdraw digital cash into the wallet.
|
||||||
|
|
||||||
await withdrawViaBankV2(t, {
|
const wres = await withdrawViaBankV2(t, {
|
||||||
walletClient,
|
walletClient,
|
||||||
bank,
|
bank,
|
||||||
exchange: faultyExchange,
|
exchange: faultyExchange,
|
||||||
amount: "TESTKUDOS:20",
|
amount: "TESTKUDOS:20",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await wres.withdrawalFinishedCond;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =========================================================================
|
* =========================================================================
|
||||||
* Create an order and let the wallet pay under a session ID
|
* Create an order and let the wallet pay under a session ID
|
||||||
|
@ -43,16 +43,18 @@ export async function runPaymentAbortTest(t: GlobalTestState) {
|
|||||||
|
|
||||||
// Withdraw digital cash into the wallet.
|
// Withdraw digital cash into the wallet.
|
||||||
|
|
||||||
await withdrawViaBankV2(t, {
|
const wres = await withdrawViaBankV2(t, {
|
||||||
walletClient,
|
walletClient,
|
||||||
bank,
|
bank,
|
||||||
exchange: faultyExchange,
|
exchange: faultyExchange,
|
||||||
amount: "TESTKUDOS:20",
|
amount: "TESTKUDOS:20",
|
||||||
});
|
});
|
||||||
|
|
||||||
const merchant = faultyMerchant;
|
await wres.withdrawalFinishedCond;
|
||||||
|
|
||||||
const merchantClient = new MerchantApiClient(merchant.makeInstanceBaseUrl());
|
const merchantClient = new MerchantApiClient(
|
||||||
|
faultyMerchant.makeInstanceBaseUrl(),
|
||||||
|
);
|
||||||
|
|
||||||
let orderResp = await merchantClient.createOrder({
|
let orderResp = await merchantClient.createOrder({
|
||||||
order: {
|
order: {
|
||||||
|
@ -50,14 +50,14 @@ export async function runPaymentTransientTest(t: GlobalTestState) {
|
|||||||
|
|
||||||
// Withdraw digital cash into the wallet.
|
// Withdraw digital cash into the wallet.
|
||||||
|
|
||||||
await withdrawViaBankV2(t, {
|
const wres = await withdrawViaBankV2(t, {
|
||||||
walletClient,
|
walletClient,
|
||||||
bank,
|
bank,
|
||||||
exchange: faultyExchange,
|
exchange: faultyExchange,
|
||||||
amount: "TESTKUDOS:20",
|
amount: "TESTKUDOS:20",
|
||||||
});
|
});
|
||||||
|
|
||||||
const merchant = faultyMerchant;
|
await wres.withdrawalFinishedCond;
|
||||||
|
|
||||||
let orderResp = await merchantClient.createOrder({
|
let orderResp = await merchantClient.createOrder({
|
||||||
order: {
|
order: {
|
||||||
|
@ -36,13 +36,15 @@ export async function runStoredBackupsTest(t: GlobalTestState) {
|
|||||||
|
|
||||||
// Withdraw digital cash into the wallet.
|
// Withdraw digital cash into the wallet.
|
||||||
|
|
||||||
await withdrawViaBankV2(t, {
|
const wres = await withdrawViaBankV2(t, {
|
||||||
walletClient,
|
walletClient,
|
||||||
bank,
|
bank,
|
||||||
exchange,
|
exchange,
|
||||||
amount: "TESTKUDOS:20",
|
amount: "TESTKUDOS:20",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await wres;
|
||||||
|
|
||||||
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
|
await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
|
||||||
|
|
||||||
const sb1Resp = await walletClient.call(
|
const sb1Resp = await walletClient.call(
|
||||||
|
Loading…
Reference in New Issue
Block a user