diff options
author | Florian Dold <florian@dold.me> | 2022-08-09 15:00:45 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-08-16 17:55:12 +0200 |
commit | ac8f116780a860c8f4acfdf5553bf90d76afe236 (patch) | |
tree | 38abecb5ad3a3660161909ee9ca229d4ce08eb4a /packages/taler-wallet-core/src/operations/balance.ts | |
parent | fb8372dfbf27b7b4e8b2fe4f81aa2ba18bfcf638 (diff) | |
download | wallet-core-ac8f116780a860c8f4acfdf5553bf90d76afe236.tar.xz |
implement peer to peer push payments
Diffstat (limited to 'packages/taler-wallet-core/src/operations/balance.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/balance.ts | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/packages/taler-wallet-core/src/operations/balance.ts b/packages/taler-wallet-core/src/operations/balance.ts index c26eb0cfc..4590f5051 100644 --- a/packages/taler-wallet-core/src/operations/balance.ts +++ b/packages/taler-wallet-core/src/operations/balance.ts @@ -41,7 +41,6 @@ interface WalletBalance { export async function getBalancesInsideTransaction( ws: InternalWalletState, tx: GetReadOnlyAccess<{ - reserves: typeof WalletStoresV1.reserves; coins: typeof WalletStoresV1.coins; refreshGroups: typeof WalletStoresV1.refreshGroups; withdrawalGroups: typeof WalletStoresV1.withdrawalGroups; @@ -65,17 +64,6 @@ export async function getBalancesInsideTransaction( return balanceStore[currency]; }; - // Initialize balance to zero, even if we didn't start withdrawing yet. - await tx.reserves.iter().forEach((r) => { - const b = initBalance(r.currency); - if (!r.initialWithdrawalStarted) { - b.pendingIncoming = Amounts.add( - b.pendingIncoming, - r.initialDenomSel.totalCoinValue, - ).amount; - } - }); - await tx.coins.iter().forEach((c) => { // Only count fresh coins, as dormant coins will // already be in a refresh session. @@ -154,7 +142,6 @@ export async function getBalances( .mktx((x) => ({ coins: x.coins, refreshGroups: x.refreshGroups, - reserves: x.reserves, purchases: x.purchases, withdrawalGroups: x.withdrawalGroups, })) |