We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3391af commit 781e66dCopy full SHA for 781e66d
app/src/main/java/to/bitkit/data/CacheStore.kt
@@ -38,6 +38,11 @@ class CacheStore @Inject constructor(
38
}
39
40
suspend fun addPaidOrder(orderId: String, txId: String) {
41
+ if (orderId in store.data.first().paidOrders) {
42
+ Logger.debug("Order $orderId already added")
43
+ return
44
+ }
45
+
46
store.updateData {
47
val newEntry = mapOf(orderId to txId)
48
val updatedOrders = newEntry + it.paidOrders
0 commit comments