From 3565fc05bca6e55896ff7b5115e6b8021f2a9d4e Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Fri, 15 May 2020 10:10:43 -0300 Subject: [wallet] remove workarounds for fixed core bugs --- .../net/taler/wallet/transactions/Transactions.kt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt') diff --git a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt index cff742f..c3a0c08 100644 --- a/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt +++ b/wallet/src/main/java/net/taler/wallet/transactions/Transactions.kt @@ -46,7 +46,7 @@ abstract class Transaction( val timestamp: Timestamp, val pending: Boolean, val amountRaw: Amount, - val amountEffective: Amount? + val amountEffective: Amount ) { @get:DrawableRes abstract val icon: Int @@ -70,11 +70,11 @@ class TransactionWithdrawal( transactionId: String, timestamp: Timestamp, pending: Boolean, - val exchangeBaseUrl: String = "unknown", // TODO fix in wallet-core + val exchangeBaseUrl: String, val confirmed: Boolean, val bankConfirmationUrl: String?, amountRaw: Amount, - amountEffective: Amount? + amountEffective: Amount ) : Transaction(transactionId, timestamp, pending, amountRaw, amountEffective) { override val icon = R.drawable.transaction_withdrawal override val detailPageLayout = R.layout.fragment_transaction_withdrawal @@ -90,7 +90,7 @@ class TransactionPayment( val info: TransactionInfo, val status: PaymentStatus, amountRaw: Amount, - amountEffective: Amount? + amountEffective: Amount ) : Transaction(transactionId, timestamp, pending, amountRaw, amountEffective) { override val icon = R.drawable.ic_cash_usd_outline override val detailPageLayout = R.layout.fragment_transaction_payment @@ -102,7 +102,7 @@ class TransactionInfo( val orderId: String, val merchant: ContractMerchant, val summary: String, - @get:JsonProperty("description_i18n") + @get:JsonProperty("summary_i18n") val summaryI18n: Map?, val products: List, val fulfillmentUrl: String @@ -118,9 +118,6 @@ enum class PaymentStatus { @JsonProperty("paid") Paid, - @JsonProperty("offered") - Offered, - @JsonProperty("accepted") Accepted } @@ -134,7 +131,7 @@ class TransactionRefund( val info: TransactionInfo, val amountInvalid: Amount, amountRaw: Amount, - amountEffective: Amount? + amountEffective: Amount ) : Transaction(transactionId, timestamp, pending, amountRaw, amountEffective) { override val icon = R.drawable.transaction_refund override val detailPageLayout = R.layout.fragment_transaction_payment @@ -157,7 +154,7 @@ class TransactionTip( val exchangeBaseUrl: String, val merchant: ContractMerchant, amountRaw: Amount, - amountEffective: Amount? + amountEffective: Amount ) : Transaction(transactionId, timestamp, pending, amountRaw, amountEffective) { override val icon = R.drawable.transaction_tip_accepted // TODO different when declined override val detailPageLayout = R.layout.fragment_transaction_payment @@ -174,7 +171,7 @@ class TransactionRefresh( pending: Boolean, val exchangeBaseUrl: String, amountRaw: Amount, - amountEffective: Amount? + amountEffective: Amount ) : Transaction(transactionId, timestamp, pending, amountRaw, amountEffective) { override val icon = R.drawable.transaction_refresh override val detailPageLayout = R.layout.fragment_transaction_payment -- cgit v1.2.3