wallet-core: make bank access API URL optional in runIntegrationTest

This commit is contained in:
Florian Dold 2022-09-12 14:09:28 +02:00
parent dbabb7b8d2
commit fc413bb5ec
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 4 additions and 4 deletions

View File

@ -874,7 +874,7 @@ export const codecForTestPayArgs = (): Codec<TestPayArgs> =>
export interface IntegrationTestArgs { export interface IntegrationTestArgs {
exchangeBaseUrl: string; exchangeBaseUrl: string;
bankBaseUrl: string; bankBaseUrl: string;
bankAccessApiBaseUrl: string; bankAccessApiBaseUrl?: string;
merchantBaseUrl: string; merchantBaseUrl: string;
merchantAuthToken?: string; merchantAuthToken?: string;
amountToWithdraw: string; amountToWithdraw: string;
@ -889,7 +889,7 @@ export const codecForIntegrationTestArgs = (): Codec<IntegrationTestArgs> =>
.property("merchantAuthToken", codecOptional(codecForString())) .property("merchantAuthToken", codecOptional(codecForString()))
.property("amountToSpend", codecForAmountString()) .property("amountToSpend", codecForAmountString())
.property("amountToWithdraw", codecForAmountString()) .property("amountToWithdraw", codecForAmountString())
.property("bankAccessApiBaseUrl", codecForAmountString()) .property("bankAccessApiBaseUrl", codecOptional(codecForAmountString()))
.build("IntegrationTestArgs"); .build("IntegrationTestArgs");
export interface AddExchangeRequest { export interface AddExchangeRequest {

View File

@ -353,7 +353,7 @@ export async function runIntegrationTest(
await withdrawTestBalance(ws, { await withdrawTestBalance(ws, {
amount: args.amountToWithdraw, amount: args.amountToWithdraw,
bankBaseUrl: args.bankBaseUrl, bankBaseUrl: args.bankBaseUrl,
bankAccessApiBaseUrl: args.bankAccessApiBaseUrl, bankAccessApiBaseUrl: args.bankAccessApiBaseUrl ?? args.bankBaseUrl,
exchangeBaseUrl: args.exchangeBaseUrl, exchangeBaseUrl: args.exchangeBaseUrl,
}); });
await ws.runUntilDone(); await ws.runUntilDone();
@ -382,7 +382,7 @@ export async function runIntegrationTest(
await withdrawTestBalance(ws, { await withdrawTestBalance(ws, {
amount: Amounts.stringify(withdrawAmountTwo), amount: Amounts.stringify(withdrawAmountTwo),
bankBaseUrl: args.bankBaseUrl, bankBaseUrl: args.bankBaseUrl,
bankAccessApiBaseUrl: args.bankAccessApiBaseUrl, bankAccessApiBaseUrl: args.bankAccessApiBaseUrl ?? args.bankBaseUrl,
exchangeBaseUrl: args.exchangeBaseUrl, exchangeBaseUrl: args.exchangeBaseUrl,
}); });