diff options
author | Florian Dold <florian@dold.me> | 2023-04-23 23:08:37 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-04-23 23:08:37 +0200 |
commit | b81ea1b4b75c6f326d331c5c23d94e807b895563 (patch) | |
tree | 0cf6d1dddafe1b10d7515b3d785acbdbc8da4bf6 /packages/taler-harness/src/harness/harness.ts | |
parent | eff3920bd5a2bff58d66ac72ba8bd2c1577f452f (diff) | |
download | wallet-core-b81ea1b4b75c6f326d331c5c23d94e807b895563.tar.xz |
harness: adjust to merchant API breaking changes, remove test that doesn't belong
Diffstat (limited to 'packages/taler-harness/src/harness/harness.ts')
-rw-r--r-- | packages/taler-harness/src/harness/harness.ts | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 8b74c9e9f..b6e80cfb7 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -1884,7 +1884,9 @@ export class MerchantService implements MerchantServiceInterface { const body: MerchantInstanceConfig = { auth, - payto_uris: instanceConfig.paytoUris, + accounts: instanceConfig.paytoUris.map((x) => ({ + payto_uri: x, + })), id: instanceConfig.id, name: instanceConfig.name, address: instanceConfig.address ?? {}, @@ -1930,6 +1932,7 @@ export interface MerchantAuthConfiguration { token?: string; } +// FIXME: Why do we need this? Describe / fix! export interface PartialMerchantInstanceConfig { auth?: MerchantAuthConfiguration; id: string; @@ -1944,11 +1947,42 @@ export interface PartialMerchantInstanceConfig { defaultPayDelay?: TalerProtocolDuration; } +// FIXME: Move all these types into merchant-api-types.ts! + +type FacadeCredentials = NoFacadeCredentials | BasicAuthFacadeCredentials; +interface NoFacadeCredentials { + type: "none"; +} +interface BasicAuthFacadeCredentials { + type: "basic"; + + // Username to use to authenticate + username: string; + + // Password to use to authenticate + password: string; +} + +interface MerchantBankAccount { + // The payto:// URI where the wallet will send coins. + payto_uri: string; + + // Optional base URL for a facade where the + // merchant backend can see incoming wire + // transfers to reconcile its accounting + // with that of the exchange. Used by + // taler-merchant-wirewatch. + credit_facade_url?: string; + + // Credentials for accessing the credit facade. + credit_facade_credentials?: FacadeCredentials; +} + export interface MerchantInstanceConfig { + accounts: MerchantBankAccount[]; auth: MerchantAuthConfiguration; id: string; name: string; - payto_uris: string[]; address: unknown; jurisdiction: unknown; default_max_wire_fee: string; |