[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: fixme in wire status
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: fixme in wire status |
Date: |
Mon, 24 Apr 2023 17:14:29 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new e4bf114f6 fixme in wire status
e4bf114f6 is described below
commit e4bf114f60a7a76f43714183a4149406ade33d44
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Apr 24 12:13:55 2023 -0300
fixme in wire status
---
packages/taler-wallet-core/src/operations/deposits.ts | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts
b/packages/taler-wallet-core/src/operations/deposits.ts
index 051cbc176..14d1f9e3f 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -441,7 +441,7 @@ export async function processDepositGroup(
let updatedTxStatus: DepositElementStatus | undefined = undefined;
type ValueOf<T> = T[keyof T];
- let newWiredTransaction:
+ let newWiredCoin:
| {
id: string;
value: ValueOf<NonNullable<DepositGroupRecord["trackingState"]>>;
@@ -484,7 +484,7 @@ export async function processDepositGroup(
const raw = Amounts.parseOrThrow(track.coin_contribution);
const wireFee = Amounts.parseOrThrow(fee.wireFee);
- newWiredTransaction = {
+ newWiredCoin = {
value: {
amountRaw: Amounts.stringify(raw),
wireFee: Amounts.stringify(wireFee),
@@ -513,13 +513,20 @@ export async function processDepositGroup(
if (updatedTxStatus !== undefined) {
dg.transactionPerCoin[i] = updatedTxStatus;
}
- if (newWiredTransaction) {
+ if (newWiredCoin) {
+ /**
+ * FIXME: if there is a new wire information from the exchange
+ * it should add up to the previous tracking states.
+ *
+ * This may loose information by overriding prev state.
+ *
+ * And: add checks to integration tests
+ */
if (!dg.trackingState) {
dg.trackingState = {};
}
- dg.trackingState[newWiredTransaction.id] =
- newWiredTransaction.value;
+ dg.trackingState[newWiredCoin.id] = newWiredCoin.value;
}
await tx.depositGroups.put(dg);
});
--
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: fixme in wire status,
gnunet <=