[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: introduce setCon
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: introduce setConfig request |
Date: |
Wed, 03 Apr 2024 19:19:14 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new c53c6b8b3 wallet-core: introduce setConfig request
c53c6b8b3 is described below
commit c53c6b8b3c0a66f3862883ec1314c6d4bf68af32
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Apr 3 19:18:56 2024 +0200
wallet-core: introduce setConfig request
Currently just an alias for initWallet, behavior might diverge in the
future.
---
packages/taler-wallet-core/src/wallet-api-types.ts | 16 +++++++++++++++-
packages/taler-wallet-core/src/wallet.ts | 3 ++-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts
b/packages/taler-wallet-core/src/wallet-api-types.ts
index 4f4b24b62..0fd0ffbd6 100644
--- a/packages/taler-wallet-core/src/wallet-api-types.ts
+++ b/packages/taler-wallet-core/src/wallet-api-types.ts
@@ -154,6 +154,7 @@ import { PaymentBalanceDetails } from "./balance.js";
export enum WalletApiOperation {
InitWallet = "initWallet",
+ SetConfig = "setConfig",
WithdrawTestkudos = "withdrawTestkudos",
WithdrawTestBalance = "withdrawTestBalance",
PreparePayForUri = "preparePayForUri",
@@ -263,10 +264,11 @@ export enum WalletApiOperation {
// group: Initialization
type EmptyObject = Record<string, never>;
+
/**
* Initialize wallet-core.
*
- * Must be the request before any other operations.
+ * Must be the first request made to wallet-core.
*/
export type InitWalletOp = {
op: WalletApiOperation.InitWallet;
@@ -274,6 +276,17 @@ export type InitWalletOp = {
response: InitResponse;
};
+/**
+ * Change the configuration of wallet-core.
+ *
+ * Currently an alias for the initWallet request.
+ */
+export type SetConfigOp = {
+ op: WalletApiOperation.SetConfig;
+ request: InitRequest;
+ response: InitResponse;
+};
+
export type GetVersionOp = {
op: WalletApiOperation.GetVersion;
request: EmptyObject;
@@ -1147,6 +1160,7 @@ export type ForceRefreshOp = {
export type WalletOperations = {
[WalletApiOperation.InitWallet]: InitWalletOp;
+ [WalletApiOperation.SetConfig]: SetConfigOp;
[WalletApiOperation.GetVersion]: GetVersionOp;
[WalletApiOperation.PreparePayForUri]: PreparePayForUriOp;
[WalletApiOperation.SharePayment]: SharePaymentOp;
diff --git a/packages/taler-wallet-core/src/wallet.ts
b/packages/taler-wallet-core/src/wallet.ts
index eb981e79c..1f91f5ecf 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -186,9 +186,9 @@ import {
timestampProtocolToDb,
} from "./db.js";
import {
+ checkDepositGroup,
createDepositGroup,
generateDepositGroupTxId,
- checkDepositGroup,
} from "./deposits.js";
import { DevExperimentHttpLib, applyDevExperiment } from
"./dev-experiments.js";
import {
@@ -688,6 +688,7 @@ async function dispatchRequestInternal<Op extends
WalletApiOperation>(
await recoverStoredBackup(wex, req);
return {};
}
+ case WalletApiOperation.SetConfig:
case WalletApiOperation.InitWallet: {
const req = codecForInitRequest().decode(payload);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: introduce setConfig request,
gnunet <=