diff options
Diffstat (limited to 'wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt')
-rw-r--r-- | wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt b/wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt index 69c68d1..84851ba 100644 --- a/wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt +++ b/wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt @@ -23,12 +23,11 @@ import kotlinx.serialization.Serializable import net.taler.lib.common.Amount import net.taler.lib.common.TalerUri.parseWithdrawUri import net.taler.lib.common.Timestamp -import net.taler.lib.common.Version import net.taler.lib.common.Version.VersionMatchResult +import net.taler.lib.crypto.Crypto +import net.taler.lib.crypto.CryptoFactory import net.taler.lib.wallet.Db import net.taler.lib.wallet.DbFactory -import net.taler.lib.wallet.crypto.Crypto -import net.taler.lib.wallet.crypto.CryptoFactory import net.taler.lib.wallet.crypto.Signature import net.taler.lib.wallet.exchange.DenominationRecord import net.taler.lib.wallet.exchange.DenominationSelectionInfo @@ -36,7 +35,6 @@ import net.taler.lib.wallet.exchange.DenominationStatus.Unverified import net.taler.lib.wallet.exchange.DenominationStatus.VerifiedBad import net.taler.lib.wallet.exchange.DenominationStatus.VerifiedGood import net.taler.lib.wallet.exchange.Exchange -import net.taler.lib.wallet.exchange.ExchangeListItem import net.taler.lib.wallet.exchange.ExchangeRecord import net.taler.lib.wallet.exchange.ExchangeWireInfo import net.taler.lib.wallet.exchange.SelectedDenomination @@ -46,7 +44,9 @@ internal class Withdraw( private val httpClient: HttpClient = getDefaultHttpClient(), private val db: Db = DbFactory().openDb(), private val crypto: Crypto = CryptoFactory.getCrypto(), - private val signature: Signature = Signature(crypto), + private val signature: Signature = Signature( + crypto + ), private val exchange: Exchange = Exchange(crypto, signature, httpClient, db = db) ) { @@ -270,37 +270,3 @@ internal class Withdraw( } } - -data class WithdrawalDetailsForUri( - /** - * The amount that the user wants to withdraw - */ - val amount: Amount, - - /** - * Exchange suggested by the wallet - */ - val defaultExchangeBaseUrl: String?, - - /** - * A list of exchanges that can be used for this withdrawal - */ - val possibleExchanges: List<ExchangeListItem> -) - -data class WithdrawalDetails( - /** - * Did the user accept the current version of the exchange's terms of service? - */ - val tosAccepted: Boolean, - - /** - * Amount that will be transferred to the exchange. - */ - val amountRaw: Amount, - - /** - * Amount that will be added to the user's wallet balance. - */ - val amountEffective: Amount -) |