harness: specify use_stefan in merchant backend

This commit is contained in:
Florian Dold 2023-08-23 14:48:03 +02:00
parent 9be4034cc0
commit d0d19c2e88
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 5 additions and 20 deletions

View File

@ -1958,14 +1958,8 @@ export class MerchantService implements MerchantServiceInterface {
name: instanceConfig.name,
address: instanceConfig.address ?? {},
jurisdiction: instanceConfig.jurisdiction ?? {},
default_max_wire_fee:
instanceConfig.defaultMaxWireFee ??
`${this.merchantConfig.currency}:1.0`,
default_wire_fee_amortization:
instanceConfig.defaultWireFeeAmortization ?? 3,
default_max_deposit_fee:
instanceConfig.defaultMaxDepositFee ??
`${this.merchantConfig.currency}:1.0`,
// FIXME: In some tests, we might want to make this configurable
use_stefan: true,
default_wire_transfer_delay:
instanceConfig.defaultWireTransferDelay ??
Duration.toTalerProtocolDuration(
@ -2007,9 +2001,6 @@ export interface PartialMerchantInstanceConfig {
paytoUris: string[];
address?: unknown;
jurisdiction?: unknown;
defaultMaxWireFee?: string;
defaultMaxDepositFee?: string;
defaultWireFeeAmortization?: number;
defaultWireTransferDelay?: TalerProtocolDuration;
defaultPayDelay?: TalerProtocolDuration;
}
@ -2052,9 +2043,7 @@ export interface MerchantInstanceConfig {
name: string;
address: unknown;
jurisdiction: unknown;
default_max_wire_fee: string;
default_max_deposit_fee: string;
default_wire_fee_amortization: number;
use_stefan: boolean;
default_wire_transfer_delay: TalerProtocolDuration;
default_pay_delay: TalerProtocolDuration;
}

View File

@ -67,12 +67,10 @@ export async function runMerchantInstancesUrlsTest(t: GlobalTestState) {
await clientForDefault.createInstance({
id: "default",
address: {},
default_max_deposit_fee: "TESTKUDOS:1",
default_max_wire_fee: "TESTKUDOS:1",
use_stefan: true,
default_pay_delay: Duration.toTalerProtocolDuration(
Duration.fromSpec({ seconds: 60 }),
),
default_wire_fee_amortization: 1,
default_wire_transfer_delay: Duration.toTalerProtocolDuration(
Duration.fromSpec({ seconds: 60 }),
),
@ -92,12 +90,10 @@ export async function runMerchantInstancesUrlsTest(t: GlobalTestState) {
await clientForDefault.createInstance({
id: "myinst",
address: {},
default_max_deposit_fee: "TESTKUDOS:1",
default_max_wire_fee: "TESTKUDOS:1",
default_pay_delay: Duration.toTalerProtocolDuration(
Duration.fromSpec({ seconds: 60 }),
),
default_wire_fee_amortization: 1,
use_stefan: true,
default_wire_transfer_delay: Duration.toTalerProtocolDuration(
Duration.fromSpec({ seconds: 60 }),
),