[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: address another
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: address another DB FIXME |
Date: |
Sat, 15 Oct 2022 16:25:48 +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 d98d49aa5 wallet-core: address another DB FIXME
d98d49aa5 is described below
commit d98d49aa58d59e6d428e5d024ba3f6ea0352ae2a
Author: Florian Dold <florian@dold.me>
AuthorDate: Sat Oct 15 16:25:44 2022 +0200
wallet-core: address another DB FIXME
---
packages/taler-wallet-core/src/db.ts | 4 +---
packages/taler-wallet-core/src/operations/withdraw.ts | 12 ++++++++----
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/packages/taler-wallet-core/src/db.ts
b/packages/taler-wallet-core/src/db.ts
index dd21aa037..4b031ace3 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -609,8 +609,6 @@ export interface PlanchetRecord {
coinEvHash: string;
- maxAge: number;
-
ageCommitmentProof?: AgeCommitmentProof;
}
@@ -719,7 +717,7 @@ export interface CoinRecord {
/**
* Maximum age of purchases that can be made with this coin.
*
- * FIXME: Not used for indexing, isn't it redundant?
+ * (Used for indexing, redundant with {@link ageCommitmentProof}).
*/
maxAge: number;
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts
b/packages/taler-wallet-core/src/operations/withdraw.ts
index 1520dfc0a..1113fb87a 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -433,7 +433,6 @@ async function processPlanchetGenerate(
planchetStatus: PlanchetStatus.Pending,
withdrawSig: r.withdrawSig,
withdrawalGroupId: withdrawalGroup.withdrawalGroupId,
- maxAge: withdrawalGroup.restrictAge ?? AgeRestriction.AGE_UNRESTRICTED,
ageCommitmentProof: r.ageCommitmentProof,
lastError: undefined,
};
@@ -746,7 +745,7 @@ async function processPlanchetVerifyAndStoreCoin(
reservePub: withdrawalGroup.reservePub,
withdrawalGroupId: withdrawalGroup.withdrawalGroupId,
},
- maxAge: planchet.maxAge,
+ maxAge: withdrawalGroup.restrictAge ?? AgeRestriction.AGE_UNRESTRICTED,
ageCommitmentProof: planchet.ageCommitmentProof,
spendAllocation: undefined,
};
@@ -1360,7 +1359,10 @@ export async function getWithdrawalDetailsForUri(
.runReadOnly(async (tx) => {
const exchangeRecords = await tx.exchanges.iter().toArray();
for (const r of exchangeRecords) {
- const exchangeDetails = await ws.exchangeOps.getExchangeDetails(tx,
r.baseUrl);
+ const exchangeDetails = await ws.exchangeOps.getExchangeDetails(
+ tx,
+ r.baseUrl,
+ );
const denominations = await tx.denominations.indexes.byExchangeBaseUrl
.iter(r.baseUrl)
.toArray();
@@ -1372,7 +1374,9 @@ export async function getWithdrawalDetailsForUri(
exchanges.push({
exchangeBaseUrl: exchangeDetails.exchangeBaseUrl,
currency: exchangeDetails.currency,
- paytoUris: exchangeDetails.wireInfo.accounts.map((x) =>
x.payto_uri),
+ paytoUris: exchangeDetails.wireInfo.accounts.map(
+ (x) => x.payto_uri,
+ ),
tosStatus: getExchangeTosStatus(exchangeDetails),
});
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.