diff options
author | Torsten Grote <t@grobox.de> | 2022-11-17 13:53:48 -0300 |
---|---|---|
committer | Torsten Grote <t@grobox.de> | 2023-01-03 08:25:05 -0300 |
commit | 02ad9bde3e671a3566d68a6b968efe288e67d910 (patch) | |
tree | 9ff3cfc86c31def600fbdad0bba9bf103e65368f /merchant-terminal/src/main/java/net | |
parent | ec0738e633076e2d601a624eb8c4b06b6ebf22d8 (diff) | |
download | taler-android-02ad9bde3e671a3566d68a6b968efe288e67d910.tar.gz taler-android-02ad9bde3e671a3566d68a6b968efe288e67d910.tar.bz2 taler-android-02ad9bde3e671a3566d68a6b968efe288e67d910.zip |
Adapt to new seconds based time format
Diffstat (limited to 'merchant-terminal/src/main/java/net')
-rw-r--r-- | merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt | 2 | ||||
-rw-r--r-- | merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt index 9860dbd..2d4d32c 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/order/Order.kt @@ -117,7 +117,7 @@ data class Order(val id: Int, val currency: String, val availableCategories: Map } fun toContractTerms(): ContractTerms { - val deadline = Timestamp(now() + HOURS.toMillis(1)) + val deadline = Timestamp.fromMillis(now() + HOURS.toMillis(1)) return ContractTerms( summary = summary, summaryI18n = summaryI18n, diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt index d703a31..02f66fa 100644 --- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt +++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/PaymentManager.kt @@ -26,7 +26,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.isActive import kotlinx.coroutines.launch -import net.taler.common.Duration +import net.taler.common.RelativeTime import net.taler.common.assertUiThread import net.taler.merchantlib.CheckPaymentResponse import net.taler.merchantlib.MerchantApi @@ -74,7 +74,7 @@ class PaymentManager( mPayment.value = Payment(order, order.summary, configManager.currency!!) val request = PostOrderRequest( contractTerms = order.toContractTerms(), - refundDelay = Duration(HOURS.toMillis(1)) + refundDelay = RelativeTime.fromMillis(HOURS.toMillis(1)) ) api.postOrder(merchantConfig, request).handle(::onNetworkError) { orderResponse -> assertUiThread() |