diff options
author | Florian Dold <florian@dold.me> | 2020-12-16 17:59:04 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2020-12-16 17:59:04 +0100 |
commit | bafb52edff4d56bcb9e3c3d0a260f507c517b08c (patch) | |
tree | 09b484a8cedc9893f5ea7593a98fadde075eafa3 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | c09c5bbe625566fc61c811160d2ccdab263327fa (diff) | |
download | wallet-core-bafb52edff4d56bcb9e3c3d0a260f507c517b08c.tar.gz wallet-core-bafb52edff4d56bcb9e3c3d0a260f507c517b08c.tar.bz2 wallet-core-bafb52edff4d56bcb9e3c3d0a260f507c517b08c.zip |
don't store reserve history anymore, adjust withdrawal implementation accordingly
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 71cc78fa9..2d80f0a50 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -29,7 +29,7 @@ import { amountToPretty } from "../util/helpers"; import { TransactionHandle } from "../util/query"; import { InternalWalletState, EXCHANGE_COINS_LOCK } from "./state"; import { Logger } from "../util/logging"; -import { getWithdrawDenomList, isWithdrawableDenom } from "./withdraw"; +import { selectWithdrawalDenominations, isWithdrawableDenom } from "./withdraw"; import { updateExchangeFromUrl } from "./exchanges"; import { TalerErrorDetails, @@ -83,7 +83,7 @@ export function getTotalRefreshCost( ): AmountJson { const withdrawAmount = Amounts.sub(amountLeft, refreshedDenom.feeRefresh) .amount; - const withdrawDenoms = getWithdrawDenomList(withdrawAmount, denoms); + const withdrawDenoms = selectWithdrawalDenominations(withdrawAmount, denoms); const resultingAmount = Amounts.add( Amounts.getZero(withdrawAmount.currency), ...withdrawDenoms.selectedDenoms.map( @@ -150,7 +150,7 @@ async function refreshCreateSession( oldDenom.feeRefresh, ).amount; - const newCoinDenoms = getWithdrawDenomList(availableAmount, availableDenoms); + const newCoinDenoms = selectWithdrawalDenominations(availableAmount, availableDenoms); if (newCoinDenoms.selectedDenoms.length === 0) { logger.trace( @@ -478,6 +478,7 @@ async function refreshReveal( oldCoinPub: refreshGroup.oldCoinPubs[coinIndex], }, suspended: false, + coinEvHash: pc.coinEv, }; coins.push(coin); |