[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated (eca6e4163 -> 464d55b9d)
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated (eca6e4163 -> 464d55b9d) |
Date: |
Wed, 08 Jan 2025 19:58:43 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a change to branch master
in repository wallet-core.
from eca6e4163 update gana forms
new 397c8a6d8 wallet-core: fix handling of internal withdrawal transactions
new 464d55b9d bump version to 0.14.4
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
packages/aml-backoffice-ui/package.json | 2 +-
packages/anastasis-cli/package.json | 2 +-
packages/anastasis-core/package.json | 2 +-
packages/anastasis-webui/package.json | 2 +-
packages/auditor-backoffice-ui/package.json | 2 +-
packages/bank-ui/package.json | 2 +-
packages/challenger-ui/package.json | 2 +-
packages/idb-bridge/package.json | 2 +-
packages/kyc-ui/package.json | 2 +-
packages/merchant-backend-ui/package.json | 2 +-
packages/merchant-backoffice-ui/package.json | 2 +-
packages/pogen/package.json | 2 +-
packages/taler-harness/debian/changelog | 6 ++
packages/taler-harness/package.json | 2 +-
.../src/integrationtests/test-wallet-balance.ts | 5 +-
.../src/integrationtests/test-wallettesting.ts | 51 +++------------
.../src/integrationtests/testrunner.ts | 25 +++++++-
packages/taler-util/package.json | 2 +-
packages/taler-wallet-cli/debian/changelog | 6 ++
packages/taler-wallet-cli/package.json | 2 +-
packages/taler-wallet-core/package.json | 2 +-
packages/taler-wallet-core/src/withdraw.ts | 72 +++++++++++++---------
packages/taler-wallet-embedded/package.json | 2 +-
.../taler-wallet-webextension/manifest-common.json | 4 +-
packages/taler-wallet-webextension/package.json | 2 +-
packages/web-util/package.json | 2 +-
26 files changed, 111 insertions(+), 96 deletions(-)
diff --git a/packages/aml-backoffice-ui/package.json
b/packages/aml-backoffice-ui/package.json
index a67fad3db..87b7e0b26 100644
--- a/packages/aml-backoffice-ui/package.json
+++ b/packages/aml-backoffice-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/aml-backoffice-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"author": "sebasjm",
"license": "AGPL-3.0-OR-LATER",
"description": "Back-office SPA for GNU Taler Exchange.",
diff --git a/packages/anastasis-cli/package.json
b/packages/anastasis-cli/package.json
index 5ca3c2b95..72bf88056 100644
--- a/packages/anastasis-cli/package.json
+++ b/packages/anastasis-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/anastasis-cli",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"engines": {
"node": ">=0.18.0"
diff --git a/packages/anastasis-core/package.json
b/packages/anastasis-core/package.json
index 13ad02697..f81e34869 100644
--- a/packages/anastasis-core/package.json
+++ b/packages/anastasis-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/anastasis-core",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"main": "./lib/index.js",
"module": "./lib/index.js",
diff --git a/packages/anastasis-webui/package.json
b/packages/anastasis-webui/package.json
index 323e26131..39e98ca1d 100644
--- a/packages/anastasis-webui/package.json
+++ b/packages/anastasis-webui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/anastasis-webui",
- "version": "0.14.3",
+ "version": "0.14.4",
"license": "MIT",
"type": "module",
"scripts": {
diff --git a/packages/auditor-backoffice-ui/package.json
b/packages/auditor-backoffice-ui/package.json
index 70349147c..2c40e43d5 100644
--- a/packages/auditor-backoffice-ui/package.json
+++ b/packages/auditor-backoffice-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/auditor-backoffice-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"license": "AGPL-3.0-or-later",
"type": "module",
"scripts": {
diff --git a/packages/bank-ui/package.json b/packages/bank-ui/package.json
index 158f38376..02f1dc8a3 100644
--- a/packages/bank-ui/package.json
+++ b/packages/bank-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/bank-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"license": "AGPL-3.0-OR-LATER",
"type": "module",
"scripts": {
diff --git a/packages/challenger-ui/package.json
b/packages/challenger-ui/package.json
index c1073af24..ce38875dc 100644
--- a/packages/challenger-ui/package.json
+++ b/packages/challenger-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/challenger-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"author": "sebasjm",
"license": "AGPL-3.0-OR-LATER",
"description": "UI for GNU Challenger.",
diff --git a/packages/idb-bridge/package.json b/packages/idb-bridge/package.json
index ecb34dc60..0a2a14fcc 100644
--- a/packages/idb-bridge/package.json
+++ b/packages/idb-bridge/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/idb-bridge",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "IndexedDB implementation that uses SQLite3 as storage",
"main": "./dist/idb-bridge.js",
"module": "./lib/index.js",
diff --git a/packages/kyc-ui/package.json b/packages/kyc-ui/package.json
index 48ce0b610..1b4a9b78a 100644
--- a/packages/kyc-ui/package.json
+++ b/packages/kyc-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/kyc-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"author": "sebasjm",
"license": "AGPL-3.0-OR-LATER",
"description": "UI for GNU Exchange KYC.",
diff --git a/packages/merchant-backend-ui/package.json
b/packages/merchant-backend-ui/package.json
index 4af0decc7..4e2d6ffa2 100644
--- a/packages/merchant-backend-ui/package.json
+++ b/packages/merchant-backend-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/merchant-backend-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"license": "AGPL-3.0-or-later",
"scripts": {
"compile": "tsc && ./build.mjs",
diff --git a/packages/merchant-backoffice-ui/package.json
b/packages/merchant-backoffice-ui/package.json
index f7ec1d1ac..c07975874 100644
--- a/packages/merchant-backoffice-ui/package.json
+++ b/packages/merchant-backoffice-ui/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@gnu-taler/merchant-backoffice-ui",
- "version": "0.14.3",
+ "version": "0.14.4",
"license": "AGPL-3.0-or-later",
"type": "module",
"scripts": {
diff --git a/packages/pogen/package.json b/packages/pogen/package.json
index 94d10a05c..493a2daeb 100644
--- a/packages/pogen/package.json
+++ b/packages/pogen/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/pogen",
- "version": "0.14.3",
+ "version": "0.14.4",
"bin": {
"pogen": "bin/pogen"
},
diff --git a/packages/taler-harness/debian/changelog
b/packages/taler-harness/debian/changelog
index 750e41787..3073117e4 100644
--- a/packages/taler-harness/debian/changelog
+++ b/packages/taler-harness/debian/changelog
@@ -1,3 +1,9 @@
+taler-harness (0.14.4) unstable; urgency=low
+
+ * Release 0.14.4
+
+ -- Florian Dold <dold@taler.net> Wed, 08 Jan 2025 19:58:21 +0100
+
taler-harness (0.14.3) unstable; urgency=low
* Release 0.14.3
diff --git a/packages/taler-harness/package.json
b/packages/taler-harness/package.json
index 4a7a21a6c..283ea76ae 100644
--- a/packages/taler-harness/package.json
+++ b/packages/taler-harness/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-harness",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"engines": {
"node": ">=0.12.0"
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts
b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts
index 53f7b6aff..eb3690a3b 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-balance.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-balance.ts
@@ -140,7 +140,7 @@ async function createMyEnvironment(
exchange2.addOfferedCoins(defaultCoinConfig);
- await exchange.enableAccount("payto://void/foo");
+ await exchange.enableAccount("payto://void/foo?receiver-name=Foo");
await exchange2.start();
@@ -152,8 +152,7 @@ async function createMyEnvironment(
await merchant.addInstanceWithWireAccount({
id: "default",
name: "Default Instance",
- //paytoUris: [getTestHarnessPaytoForLabel("merchant-default")],
- paytoUris: [`payto://void/merchant-default`],
+ paytoUris: [`payto://void/merchant-default?receiver-name=Merchant`],
defaultWireTransferDelay: Duration.toTalerProtocolDuration(
Duration.fromSpec({ minutes: 1 }),
),
diff --git a/packages/taler-harness/src/integrationtests/test-wallettesting.ts
b/packages/taler-harness/src/integrationtests/test-wallettesting.ts
index 5e2459a4d..0d1a7282c 100644
--- a/packages/taler-harness/src/integrationtests/test-wallettesting.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallettesting.ts
@@ -24,56 +24,19 @@
*/
import { AmountString, Amounts, CoinStatus } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
-import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
-import {
- SimpleTestEnvironmentNg3,
- createSimpleTestkudosEnvironmentV3,
- createWalletDaemonWithClient,
-} from "../harness/environments.js";
+import { createSimpleTestkudosEnvironmentV3 } from
"../harness/environments.js";
import { GlobalTestState, setupDb } from "../harness/harness.js";
const merchantAuthToken = "secret-token:sandbox";
-/**
- * Run a test case with a simple TESTKUDOS Taler environment, consisting
- * of one exchange, one bank and one merchant.
- */
-export async function createMyEnvironment(
- t: GlobalTestState,
- coinConfig: CoinConfig[] = defaultCoinConfig.map((x) => x("TESTKUDOS")),
-): Promise<SimpleTestEnvironmentNg3> {
- const db = await setupDb(t);
-
- const { bankClient, bank, exchange, merchant, exchangeBankAccount } =
- await createSimpleTestkudosEnvironmentV3(t, coinConfig, {});
-
- console.log("setup done!");
-
- const { walletClient, walletService } = await createWalletDaemonWithClient(
- t,
- {
- name: "w1",
- },
- );
-
- return {
- commonDb: db,
- exchange,
- merchant,
- walletClient,
- walletService,
- bank,
- bankClient,
- exchangeBankAccount,
- };
-}
-
/**
* Run test for basic, bank-integrated withdrawal.
*/
export async function runWallettestingTest(t: GlobalTestState) {
- const { walletClient, bankClient, exchange, merchant } =
- await createMyEnvironment(t);
+ const db = await setupDb(t);
+
+ const { bankClient, walletClient, exchange, merchant } =
+ await createSimpleTestkudosEnvironmentV3(t, undefined, {});
await walletClient.call(WalletApiOperation.RunIntegrationTest, {
amountToSpend: "TESTKUDOS:5" as AmountString,
@@ -183,12 +146,16 @@ export async function runWallettestingTest(t:
GlobalTestState) {
});
await walletClient.call(WalletApiOperation.ClearDb, {});
+ t.logStep("cleared-before-integration-test");
await walletClient.call(WalletApiOperation.RunIntegrationTestV2, {
corebankApiBaseUrl: bankClient.baseUrl,
exchangeBaseUrl: exchange.baseUrl,
merchantAuthToken: merchantAuthToken,
merchantBaseUrl: merchant.makeInstanceBaseUrl(),
});
+ t.logStep("after-integration-test");
+
+ console.log("end of test");
}
runWallettestingTest.suites = ["wallet"];
diff --git a/packages/taler-harness/src/integrationtests/testrunner.ts
b/packages/taler-harness/src/integrationtests/testrunner.ts
index 1a5c32764..7becdb0c6 100644
--- a/packages/taler-harness/src/integrationtests/testrunner.ts
+++ b/packages/taler-harness/src/integrationtests/testrunner.ts
@@ -412,6 +412,8 @@ export async function runTests(spec: TestRunSpec) {
suites = new Set(spec.suiteSpec.split(",").map((x) => x.trim()));
}
+ const filteredTests: TestMainFunction[] = [];
+
for (const [n, testCase] of allTests.entries()) {
const testName = getTestName(testCase);
if (spec.includePattern && !minimatch(testName, spec.includePattern)) {
@@ -429,7 +431,15 @@ export async function runTests(spec: TestRunSpec) {
continue;
}
}
+ filteredTests.push(testCase);
+ }
+
+ console.log(`selected ${filteredTests.length} tests`);
+ let numFailed = 0;
+
+ for (const [n, testCase] of filteredTests.entries()) {
+ const testName = getTestName(testCase);
if (spec.dryRun) {
console.log(`dry run: would run test ${testName}`);
continue;
@@ -476,10 +486,17 @@ export async function runTests(spec: TestRunSpec) {
? Math.max(testCase.timeoutMs, defaultTimeout)
: defaultTimeout;
+ let progressText = `${n + 1} of ${filteredTests.length}`;
+ if (numFailed > 0) {
+ progressText = progressText + `, failed ${numFailed}`;
+ }
+
if (spec.noTimeout) {
- console.log(`running ${testName}, no timeout`);
+ console.log(`running ${testName} (${progressText}), no timeout`);
} else {
- console.log(`running ${testName} with timeout ${testTimeoutMs}ms`);
+ console.log(
+ `running ${testName} (${progressText}) with timeout
${testTimeoutMs}ms`,
+ );
}
const token = spec.noTimeout
@@ -546,6 +563,10 @@ export async function runTests(spec: TestRunSpec) {
}
}
+ if (result.status === "fail") {
+ numFailed++;
+ }
+
harnessLogStream.close();
const stepsFile = `${testDir}/steps.txt`;
diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json
index 06a3d4792..d04e395f8 100644
--- a/packages/taler-util/package.json
+++ b/packages/taler-util/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-util",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "Generic helper functionality for GNU Taler",
"type": "module",
"types": "./lib/index.node.d.ts",
diff --git a/packages/taler-wallet-cli/debian/changelog
b/packages/taler-wallet-cli/debian/changelog
index eb2eff506..ccd740703 100644
--- a/packages/taler-wallet-cli/debian/changelog
+++ b/packages/taler-wallet-cli/debian/changelog
@@ -1,3 +1,9 @@
+taler-wallet-cli (0.14.4) unstable; urgency=low
+
+ * Release 0.14.4
+
+ -- Florian Dold <dold@taler.net> Wed, 08 Jan 2025 19:58:21 +0100
+
taler-wallet-cli (0.14.3) unstable; urgency=low
* Release 0.14.3
diff --git a/packages/taler-wallet-cli/package.json
b/packages/taler-wallet-cli/package.json
index 718651030..ad0400f37 100644
--- a/packages/taler-wallet-cli/package.json
+++ b/packages/taler-wallet-cli/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-wallet-cli",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"engines": {
"node": ">=0.18.0"
diff --git a/packages/taler-wallet-core/package.json
b/packages/taler-wallet-core/package.json
index 108f8bae1..ee8f8f7b5 100644
--- a/packages/taler-wallet-core/package.json
+++ b/packages/taler-wallet-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-wallet-core",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"engines": {
"node": ">=0.18.0"
diff --git a/packages/taler-wallet-core/src/withdraw.ts
b/packages/taler-wallet-core/src/withdraw.ts
index 41b7d55b6..ad438c954 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -272,8 +272,11 @@ function buildTransactionForManualWithdraw(
ort: OperationRetryRecord | undefined,
kycDetails: TxKycDetails | undefined,
): TransactionWithdrawal {
- if (wg.wgInfo.withdrawalType !== WithdrawalRecordType.BankManual)
- throw Error("");
+ if (wg.wgInfo.withdrawalType !== WithdrawalRecordType.BankManual) {
+ throw Error(
+ `unexpected withdrawal type (got ${wg.wgInfo.withdrawalType}, expected
${WithdrawalRecordType.BankManual}`,
+ );
+ }
const plainPaytoUris =
exchangeDetails?.wireInfo?.accounts.map((x) => x.payto_uri) ?? [];
@@ -390,29 +393,33 @@ export class WithdrawTransactionContext implements
TransactionContext {
}
const ort = await tx.operationRetries.get(this.taskId);
- if (
- withdrawalGroupRecord.wgInfo.withdrawalType ===
- WithdrawalRecordType.BankIntegrated
- ) {
- return buildTransactionForBankIntegratedWithdraw(
- withdrawalGroupRecord,
- scopes,
- ort,
- kycDetails,
- );
- }
- if (!exchangeDetails) {
- logger.warn(
- `transaction ${this.transactionId} is a manual withdrawal, but no
exchange wire details found`,
- );
+
+ switch (withdrawalGroupRecord.wgInfo.withdrawalType) {
+ case WithdrawalRecordType.BankIntegrated:
+ return buildTransactionForBankIntegratedWithdraw(
+ withdrawalGroupRecord,
+ scopes,
+ ort,
+ kycDetails,
+ );
+ case WithdrawalRecordType.BankManual:
+ if (!exchangeDetails) {
+ logger.warn(
+ `transaction ${this.transactionId} is a manual withdrawal, but no
exchange wire details found`,
+ );
+ }
+ return buildTransactionForManualWithdraw(
+ withdrawalGroupRecord,
+ exchangeDetails,
+ scopes,
+ ort,
+ kycDetails,
+ );
}
- return buildTransactionForManualWithdraw(
- withdrawalGroupRecord,
- exchangeDetails,
- scopes,
- ort,
- kycDetails,
+ logger.warn(
+ `not returning withdrawal transaction details, withdrawal type is
${withdrawalGroupRecord.wgInfo.withdrawalType}`,
);
+ return undefined;
}
/**
@@ -428,15 +435,24 @@ export class WithdrawTransactionContext implements
TransactionContext {
return;
}
- if (
- // !wgRecord.instructedAmount ||
- // !wgRecord.denomsSel ||
- !wgRecord.exchangeBaseUrl
- ) {
+ if (!wgRecord.exchangeBaseUrl) {
// withdrawal group is in preparation, nothing to update
return;
}
+ switch (wgRecord.wgInfo.withdrawalType) {
+ case WithdrawalRecordType.BankManual:
+ case WithdrawalRecordType.BankIntegrated:
+ break;
+ case WithdrawalRecordType.PeerPullCredit:
+ case WithdrawalRecordType.PeerPushCredit:
+ case WithdrawalRecordType.Recoup:
+ // These withdrawal transactions are internal/hidden.
+ return;
+ default:
+ assertUnreachable(wgRecord.wgInfo);
+ }
+
let currency: string | undefined;
if (wgRecord.rawWithdrawalAmount) {
currency = Amounts.currencyOf(wgRecord.rawWithdrawalAmount);
diff --git a/packages/taler-wallet-embedded/package.json
b/packages/taler-wallet-embedded/package.json
index 5b895aa35..eae5817dd 100644
--- a/packages/taler-wallet-embedded/package.json
+++ b/packages/taler-wallet-embedded/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-wallet-embedded",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "",
"engines": {
"node": ">=0.18.0"
diff --git a/packages/taler-wallet-webextension/manifest-common.json
b/packages/taler-wallet-webextension/manifest-common.json
index c3f3d7099..195367e22 100644
--- a/packages/taler-wallet-webextension/manifest-common.json
+++ b/packages/taler-wallet-webextension/manifest-common.json
@@ -2,7 +2,7 @@
"name": "GNU Taler Wallet (git)",
"description": "Privacy preserving and transparent payments",
"author": "GNU Taler Developers",
- "version": "0.14.3",
+ "version": "0.14.4",
"icons": {
"16": "static/img/taler-logo-16.png",
"19": "static/img/taler-logo-19.png",
@@ -14,5 +14,5 @@
"256": "static/img/taler-logo-256.png",
"512": "static/img/taler-logo-512.png"
},
- "version_name": "0.14.3"
+ "version_name": "0.14.4"
}
diff --git a/packages/taler-wallet-webextension/package.json
b/packages/taler-wallet-webextension/package.json
index 1e1ea2345..4686977dd 100644
--- a/packages/taler-wallet-webextension/package.json
+++ b/packages/taler-wallet-webextension/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/taler-wallet-webextension",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "GNU Taler Wallet browser extension",
"main": "./build/index.js",
"types": "./build/index.d.ts",
diff --git a/packages/web-util/package.json b/packages/web-util/package.json
index 9b81b6574..6ab8808e5 100644
--- a/packages/web-util/package.json
+++ b/packages/web-util/package.json
@@ -1,6 +1,6 @@
{
"name": "@gnu-taler/web-util",
- "version": "0.14.3",
+ "version": "0.14.4",
"description": "Generic helper functionality for GNU Taler Web Apps",
"type": "module",
"types": "./lib/index.node.d.ts",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (eca6e4163 -> 464d55b9d),
gnunet <=