commit 1ecd9e8781610b5de5eea474ce399405f25edb24
parent e0c21a8694ba1f18b5940fc9ce776cd233610418
Author: Florian Dold <florian@dold.me>
Date: Mon, 19 Feb 2024 23:56:42 +0100
wallet-core: fix completely bogus computation of pendingIncoming
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/taler-wallet-core/src/balance.ts b/packages/taler-wallet-core/src/balance.ts
@@ -74,13 +74,13 @@ import {
WalletDbReadOnlyTransaction,
WithdrawalGroupStatus,
} from "./db.js";
-import { InternalWalletState } from "./internal-wallet-state.js";
-import { assertUnreachable } from "./util/assertUnreachable.js";
-import { checkLogicInvariant } from "./util/invariants.js";
import {
getExchangeScopeInfo,
getExchangeWireDetailsInTx,
} from "./exchanges.js";
+import { InternalWalletState } from "./internal-wallet-state.js";
+import { assertUnreachable } from "./util/assertUnreachable.js";
+import { checkLogicInvariant } from "./util/invariants.js";
/**
* Logger.
@@ -193,7 +193,7 @@ class BalancesStore {
amount: AmountLike,
): Promise<void> {
const b = await this.initBalance(currency, exchangeBaseUrl);
- b.pendingIncoming = Amounts.add(b.available, amount).amount;
+ b.pendingIncoming = Amounts.add(b.pendingIncoming, amount).amount;
}
async setFlagIncomingAml(