aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-02-28 01:25:22 +0100
committerFlorian Dold <florian@dold.me>2024-02-28 01:25:26 +0100
commit8b88540037d6f5a6d2d8fa583c6a7d46e7fd6e04 (patch)
tree94413ac186308edfeed02c780f08855bd789ade9
parent5154aca23446d617882f85038231198824010c47 (diff)
harness: payto receiver-name is mandatory
-rw-r--r--packages/taler-harness/src/harness/harness.ts24
-rw-r--r--packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts13
-rw-r--r--packages/taler-wallet-core/src/dbless.ts2
3 files changed, 22 insertions, 17 deletions
diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts
index 2199824e4..9418a3256 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -592,7 +592,7 @@ class BankServiceBase {
protected globalTestState: GlobalTestState,
protected bankConfig: BankConfig,
protected configFile: string,
- ) { }
+ ) {}
}
export interface HarnessExchangeBankAccount {
@@ -612,7 +612,8 @@ export interface HarnessExchangeBankAccount {
*/
export class FakebankService
extends BankServiceBase
- implements BankServiceHandle {
+ implements BankServiceHandle
+{
proc: ProcessWrapper | undefined;
http = createPlatformHttpLib({ enableThrottling: false });
@@ -742,7 +743,8 @@ export class FakebankService
*/
export class LibeufinBankService
extends BankServiceBase
- implements BankServiceHandle {
+ implements BankServiceHandle
+{
proc: ProcessWrapper | undefined;
http = createPlatformHttpLib({ enableThrottling: false });
@@ -1208,7 +1210,7 @@ export class ExchangeService implements ExchangeServiceInterface {
private exchangeConfig: ExchangeConfig,
private configFilename: string,
private keyPair: EddsaKeyPair,
- ) { }
+ ) {}
get name() {
return this.exchangeConfig.name;
@@ -1564,7 +1566,7 @@ export class MerchantService implements MerchantServiceInterface {
private globalState: GlobalTestState,
private merchantConfig: MerchantConfig,
private configFilename: string,
- ) { }
+ ) {}
private currentTimetravelOffsetMs: number | undefined;
@@ -2023,7 +2025,7 @@ export class WalletClient {
return client.call(operation, payload);
}
- constructor(private args: WalletClientArgs) { }
+ constructor(private args: WalletClientArgs) {}
async connect(): Promise<void> {
const waiter = this.waiter;
@@ -2091,9 +2093,11 @@ export class WalletCli {
? `--crypto-worker=${cliOpts.cryptoWorkerType}`
: "";
const logName = `wallet-${self.name}`;
- const command = `taler-wallet-cli ${self.timetravelArg ?? ""
- } ${cryptoWorkerArg} --no-throttle -LTRACE --skip-defaults --wallet-db '${self.dbfile
- }' api '${op}' ${shellWrap(JSON.stringify(payload))}`;
+ const command = `taler-wallet-cli ${
+ self.timetravelArg ?? ""
+ } ${cryptoWorkerArg} --no-throttle -LTRACE --skip-defaults --wallet-db '${
+ self.dbfile
+ }' api '${op}' ${shellWrap(JSON.stringify(payload))}`;
const resp = await sh(self.globalTestState, logName, command);
logger.info("--- wallet core response ---");
logger.info(resp);
@@ -2212,7 +2216,7 @@ export function generateRandomPayto(label: string): string {
return `payto://iban/SANDBOXX/${generateRandomTestIban(
label,
)}?receiver-name=${label}`;
- return `payto://x-taler-bank/localhost/${label}`;
+ return `payto://x-taler-bank/localhost/${label}?receiver-name=${label}`;
}
function waitMs(ms: number): Promise<void> {
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts
index afce2f776..1dc955649 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-fakebank.ts
@@ -17,16 +17,16 @@
/**
* Imports.
*/
+import { AmountString, URL } from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import {
+ ExchangeService,
+ FakebankService,
GlobalTestState,
WalletCli,
setupDb,
- ExchangeService,
- FakebankService,
} from "../harness/harness.js";
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
-import { AmountString, URL } from "@gnu-taler/taler-util";
/**
* Run test for basic, bank-integrated withdrawal.
@@ -58,7 +58,8 @@ export async function runWithdrawalFakebankTest(t: GlobalTestState) {
"/accounts/exchange/taler-wire-gateway/",
bank.baseUrl,
).href,
- accountPaytoUri: "payto://x-taler-bank/localhost/exchange",
+ accountPaytoUri:
+ "payto://x-taler-bank/localhost/exchange?receiver-name=Exchange",
});
await bank.createExchangeAccount("exchange", "x");
diff --git a/packages/taler-wallet-core/src/dbless.ts b/packages/taler-wallet-core/src/dbless.ts
index c230a0504..2d067a1dc 100644
--- a/packages/taler-wallet-core/src/dbless.ts
+++ b/packages/taler-wallet-core/src/dbless.ts
@@ -241,7 +241,7 @@ export async function depositCoin(args: {
}): Promise<void> {
const { coin, http, cryptoApi } = args;
const depositPayto =
- args.depositPayto ?? "payto://x-taler-bank/localhost/foo";
+ args.depositPayto ?? "payto://x-taler-bank/localhost/foo?receiver-name=foo";
const wireSalt = args.wireSalt ?? encodeCrock(getRandomBytes(16));
const timestampNow = AbsoluteTime.toProtocolTimestamp(AbsoluteTime.now());
const contractTermsHash =