make auth token optional

This commit is contained in:
Florian Dold 2021-02-04 18:26:22 +01:00
parent b4d85be1c8
commit 8425d79d48
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -689,7 +689,7 @@ export interface GetExchangeTosResult {
export interface TestPayArgs { export interface TestPayArgs {
merchantBaseUrl: string; merchantBaseUrl: string;
merchantAuthToken: string; merchantAuthToken?: string;
amount: string; amount: string;
summary: string; summary: string;
} }
@ -697,7 +697,7 @@ export interface TestPayArgs {
export const codecForTestPayArgs = (): Codec<TestPayArgs> => export const codecForTestPayArgs = (): Codec<TestPayArgs> =>
buildCodecForObject<TestPayArgs>() buildCodecForObject<TestPayArgs>()
.property("merchantBaseUrl", codecForString()) .property("merchantBaseUrl", codecForString())
.property("merchantAuthToken", codecForString()) .property("merchantAuthToken", codecOptional(codecForString()))
.property("amount", codecForString()) .property("amount", codecForString())
.property("summary", codecForString()) .property("summary", codecForString())
.build("TestPayArgs"); .build("TestPayArgs");
@ -706,7 +706,7 @@ export interface IntegrationTestArgs {
exchangeBaseUrl: string; exchangeBaseUrl: string;
bankBaseUrl: string; bankBaseUrl: string;
merchantBaseUrl: string; merchantBaseUrl: string;
merchantAuthToken: string; merchantAuthToken?: string;
amountToWithdraw: string; amountToWithdraw: string;
amountToSpend: string; amountToSpend: string;
} }
@ -716,7 +716,7 @@ export const codecForIntegrationTestArgs = (): Codec<IntegrationTestArgs> =>
.property("exchangeBaseUrl", codecForString()) .property("exchangeBaseUrl", codecForString())
.property("bankBaseUrl", codecForString()) .property("bankBaseUrl", codecForString())
.property("merchantBaseUrl", codecForString()) .property("merchantBaseUrl", codecForString())
.property("merchantAuthToken", codecForString()) .property("merchantAuthToken", codecOptional(codecForString()))
.property("amountToSpend", codecForAmountString()) .property("amountToSpend", codecForAmountString())
.property("amountToWithdraw", codecForAmountString()) .property("amountToWithdraw", codecForAmountString())
.build("IntegrationTestArgs"); .build("IntegrationTestArgs");