diff options
Diffstat (limited to 'packages/taler-wallet-core/src/coinSelection.ts')
-rw-r--r-- | packages/taler-wallet-core/src/coinSelection.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/coinSelection.ts b/packages/taler-wallet-core/src/coinSelection.ts index 50965fd6c..672d0ee79 100644 --- a/packages/taler-wallet-core/src/coinSelection.ts +++ b/packages/taler-wallet-core/src/coinSelection.ts @@ -185,6 +185,10 @@ export async function selectPayCoins( ): Promise<SelectPayCoinsResult> { const { contractTermsAmount, depositFeeLimit, wireFeeLimit } = req; + if (logger.shouldLogTrace()) { + logger.trace(`selecting coins for ${j2s(req)}`); + } + return await wex.db.runReadOnlyTx( [ "coinAvailability", @@ -207,6 +211,8 @@ export async function selectPayCoins( }, ); + logger.trace(`wire fees per exchange: ${j2s(wireFeesPerExchange)}`); + const coinRes: SelectedCoin[] = []; const currency = contractTermsAmount.currency; @@ -274,6 +280,10 @@ export async function selectPayCoins( tally, ); + if (logger.shouldLogTrace()) { + logger.trace(`coin selection: ${j2s(coinSel)}`); + } + return { type: "success", coinSel, @@ -766,6 +776,7 @@ async function selectPayCandidates( if (!wire) { continue; } + wfPerExchange[exchange.baseUrl] = wire.wireFee; } // 3. exchange is trusted in the exchange list or auditor list |