mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-13 17:28:49 +00:00
core: credit store receipts from a standard work queue
This commit is contained in:
@@ -109,8 +109,8 @@ final class BadgeStore: ObservableObject {
|
||||
// kept for this run only: StoreKit lists no deferred purchase, and a declined one delivers nothing
|
||||
// by invoice id, so a pending purchase shows only under the profile whose record it names
|
||||
@Published private var waitingForApproval: Set<String> = []
|
||||
// set when the first sweep has returned, which is after every transaction the store holds was handed
|
||||
// to core - until then a purchase made while the app was not running is unknown
|
||||
// set once presentUnfinished has read the store: until then, an Ask to Buy approved while the app was
|
||||
// closed, or a purchase it died before handing over, are both unknown, so canBuy refuses to buy again
|
||||
@Published private var reconciledOnce = false
|
||||
// purchases the user started this run, by transaction: the store is not relied on to echo the invoice back
|
||||
private var awaitedTransactions: Set<UInt64> = []
|
||||
|
||||
+2
-2
@@ -156,8 +156,8 @@ object BadgeStore {
|
||||
private val buying = mutableStateOf(false)
|
||||
// by invoice id, so a pending purchase shows only under the profile whose record it names
|
||||
private val waitingForApproval = mutableStateOf<Set<String>>(emptySet())
|
||||
// set when the first sweep has returned or failed, which is after every purchase the store holds was handed
|
||||
// to core - until then a purchase made while the app was not running is unknown
|
||||
// set once presentUnfinished has read the store, or failed to: until then, a slow payment completed while
|
||||
// the app was closed, or a purchase it died before handing over, are both unknown, so canBuy refuses
|
||||
private val reconciledOnce = mutableStateOf(false)
|
||||
// purchases the user started this run, by token: the store is not relied on to echo the invoice back
|
||||
private val awaitedTransactions = mutableSetOf<String>()
|
||||
|
||||
Reference in New Issue
Block a user