diff options
author | Florian Dold <florian@dold.me> | 2022-09-15 20:16:42 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-16 16:31:16 +0200 |
commit | b7f7b956028566c689d802258937deb081d5dc60 (patch) | |
tree | 26b955114d22ed11d2591d710505bf24b3ee76cc /packages/taler-wallet-core/src/util/coinSelection.ts | |
parent | 5d0837913901a2947c66209d64855b324824757d (diff) | |
download | wallet-core-b7f7b956028566c689d802258937deb081d5dc60.tar.xz |
wallet-core: towards faster coin selection
Diffstat (limited to 'packages/taler-wallet-core/src/util/coinSelection.ts')
-rw-r--r-- | packages/taler-wallet-core/src/util/coinSelection.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/util/coinSelection.ts b/packages/taler-wallet-core/src/util/coinSelection.ts index 97e25abd3..9622b3a76 100644 --- a/packages/taler-wallet-core/src/util/coinSelection.ts +++ b/packages/taler-wallet-core/src/util/coinSelection.ts @@ -97,7 +97,7 @@ export interface SelectPayCoinRequest { requiredMinimumAge?: number; } -interface CoinSelectionTally { +export interface CoinSelectionTally { /** * Amount that still needs to be paid. * May increase during the computation when fees need to be covered. @@ -125,7 +125,7 @@ interface CoinSelectionTally { /** * Account for the fees of spending a coin. */ -function tallyFees( +export function tallyFees( tally: CoinSelectionTally, wireFeesPerExchange: Record<string, AmountJson>, wireFeeAmortization: number, @@ -204,7 +204,7 @@ function tallyFees( * * This function is only exported for the sake of unit tests. */ -export function selectPayCoins( +export function selectPayCoinsLegacy( req: SelectPayCoinRequest, ): PayCoinSelection | undefined { const { |