diff options
author | Florian Dold <florian@dold.me> | 2023-09-08 13:33:21 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-08 13:33:21 +0200 |
commit | 4898f50db777a68cd2ddd0c1e323ef55033f4af7 (patch) | |
tree | 82b241ffc35413c6653d781e381f3d47f7ffd544 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | 2ae952cdfa8f38a650be8e4438c21bace2f24c19 (diff) | |
download | wallet-core-4898f50db777a68cd2ddd0c1e323ef55033f4af7.tar.xz |
wallet-core: more DB cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 3c4ef207a..75adbc860 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -134,11 +134,7 @@ export function getTotalRefreshCost( const resultingAmount = Amounts.add( Amounts.zeroOfCurrency(withdrawAmount.currency), ...withdrawDenoms.selectedDenoms.map( - (d) => - Amounts.mult( - DenominationRecord.getValue(denomMap[d.denomPubHash]), - d.count, - ).amount, + (d) => Amounts.mult(denomMap[d.denomPubHash].value, d.count).amount, ), ).amount; const totalCost = Amounts.sub(amountLeft, resultingAmount).amount; @@ -1200,11 +1196,7 @@ export async function autoRefresh( if (AbsoluteTime.isExpired(executeThreshold)) { refreshCoins.push({ coinPub: coin.coinPub, - amount: Amounts.stringify({ - value: denom.amountVal, - fraction: denom.amountFrac, - currency: denom.currency, - }), + amount: denom.value, }); } else { const checkThreshold = getAutoRefreshCheckThreshold(denom); |