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 | 20 |
1 files changed, 10 insertions, 10 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 84851ba..d8e83da 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 @@ -47,7 +47,7 @@ internal class Withdraw( private val signature: Signature = Signature( crypto ), - private val exchange: Exchange = Exchange(crypto, signature, httpClient, db = db) + private val exchange: Exchange = Exchange(crypto, signature, httpClient, db = db), ) { data class BankDetails( @@ -58,7 +58,7 @@ internal class Withdraw( val suggestedExchange: String?, val confirmTransferUrl: String?, val wireTypes: List<String>, - val extractedStatusUrl: String + val extractedStatusUrl: String, ) @Serializable @@ -75,7 +75,7 @@ internal class Withdraw( @SerialName("suggested_exchange") val suggestedExchange: String?, @SerialName("confirm_transfer_url") - val confirmTransferUrl: String? + val confirmTransferUrl: String?, ) { fun toBankDetails(extractedStatusUrl: String) = BankDetails( amount = amount, @@ -85,7 +85,7 @@ internal class Withdraw( senderPaytoUri = senderPaytoUri, suggestedExchange = suggestedExchange, transferDone = transferDone, - wireTypes = wireTypes + wireTypes = wireTypes, ) } @@ -135,7 +135,7 @@ internal class Withdraw( * Number of currently offered denominations. */ // TODO what is this needed for? - val numOfferedDenoms: Int + val numOfferedDenoms: Int, ) { init { check(exchange.details != null) @@ -167,7 +167,7 @@ internal class Withdraw( internal suspend fun getWithdrawalDetails( exchangeBaseUrl: String, - amount: Amount + amount: Amount, ): WithdrawalDetails { val exchange = exchange.updateFromUrl(exchangeBaseUrl) check(exchange.details != null) @@ -182,7 +182,7 @@ internal class Withdraw( withdrawFee = selectedDenominations.totalWithdrawCost - selectedDenominations.totalCoinValue, overhead = amount - selectedDenominations.totalWithdrawCost, earliestDepositExpiration = selectedDenominations.getEarliestDepositExpiry(), - numOfferedDenoms = possibleDenominations.size + numOfferedDenoms = possibleDenominations.size, ) } @@ -192,7 +192,7 @@ internal class Withdraw( */ internal suspend fun selectDenominations( exchange: ExchangeRecord, - amount: Amount + amount: Amount, ): DenominationSelectionInfo { val exchangeDetails = exchange.details ?: throw Error("Exchange $exchange details not available.") @@ -234,7 +234,7 @@ internal class Withdraw( */ fun getDenominationSelection( amount: Amount, - denoms: List<DenominationRecord> + denoms: List<DenominationRecord>, ): DenominationSelectionInfo { val selectedDenominations = ArrayList<SelectedDenomination>() var totalCoinValue = Amount.zero(amount.currency) @@ -265,7 +265,7 @@ internal class Withdraw( return DenominationSelectionInfo( selectedDenominations = selectedDenominations, totalCoinValue = totalCoinValue, - totalWithdrawCost = totalWithdrawCost + totalWithdrawCost = totalWithdrawCost, ) } |