diff options
author | Torsten Grote <t@grobox.de> | 2020-08-17 09:29:54 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2020-08-17 09:29:54 -0300 |
commit | dade0470c7e378c72ac2f2fd2a623416dadbff10 (patch) | |
tree | 083449814b1ad1320677e115f42f9a76125ccd76 /wallet/src/commonMain/kotlin/net/taler/lib/wallet/operations/Withdraw.kt | |
parent | a307a498dc8a42df129e8eaff591e9144ed96298 (diff) | |
download | wallet-kotlin-dade0470c7e378c72ac2f2fd2a623416dadbff10.tar.gz wallet-kotlin-dade0470c7e378c72ac2f2fd2a623416dadbff10.tar.bz2 wallet-kotlin-dade0470c7e378c72ac2f2fd2a623416dadbff10.zip |
Provide a blocking API for iOS (until Kotlin 1.4 is out)
and put base crypto into dedicated package (to be split out later).
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 -) |