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

View File

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