From 7ba1d1f3351e58a331e99337afea0fbedb6eb828 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Mar 2024 21:15:30 +0100 Subject: refactor coin selection, report maxEffectiveSpendAmount --- .../taler-wallet-core/src/instructedAmountConversion.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/instructedAmountConversion.ts') diff --git a/packages/taler-wallet-core/src/instructedAmountConversion.ts b/packages/taler-wallet-core/src/instructedAmountConversion.ts index ccad050bf..63ccb8b56 100644 --- a/packages/taler-wallet-core/src/instructedAmountConversion.ts +++ b/packages/taler-wallet-core/src/instructedAmountConversion.ts @@ -31,10 +31,23 @@ import { parsePaytoUri, strcmp, } from "@gnu-taler/taler-util"; -import { CoinInfo } from "./coinSelection.js"; import { DenominationRecord, timestampProtocolFromDb } from "./db.js"; import { getExchangeWireDetailsInTx } from "./exchanges.js"; -import { InternalWalletState, WalletExecutionContext } from "./wallet.js"; +import { WalletExecutionContext } from "./wallet.js"; + +export interface CoinInfo { + id: string; + value: AmountJson; + denomDeposit: AmountJson; + denomWithdraw: AmountJson; + denomRefresh: AmountJson; + totalAvailable: number | undefined; + exchangeWire: AmountJson | undefined; + exchangePurse: AmountJson | undefined; + duration: Duration; + exchangeBaseUrl: string; + maxAge: number; +} /** * If the operation going to be plan subtracts -- cgit v1.2.3