mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-09 22:28:41 +00:00
ios, android: show a pending badge purchase only on the profile that made it, and keep the buyer's alert
This commit is contained in:
@@ -237,7 +237,7 @@ data BadgeServiceErrorCode
|
||||
| BSEPaymentNotEntitled
|
||||
| BSEPaymentPending
|
||||
| BSEProviderUnavailable
|
||||
| BSEProviderNotConfigured
|
||||
| BSEProviderNotConfigured -- no verifier deployed: a dev service, not the store failing to answer
|
||||
| BSERateLimited
|
||||
| BSECodeInvalid
|
||||
| BSECodeUsed
|
||||
@@ -283,8 +283,9 @@ data BadgeState = BadgeState
|
||||
}
|
||||
deriving (Show)
|
||||
|
||||
-- | A store purchase this profile started or presented, neither credited nor closed. Neither
|
||||
-- reference is a secret: Apple's is the transaction id, Google's is a hash of the token.
|
||||
-- | One of a profile's open store purchases, neither credited nor closed. The app matches invoiceId
|
||||
-- against the transactions its store still holds; transactionRef is set once a receipt arrived.
|
||||
-- Neither reference is a secret: Apple's is the transaction id, Google's is a hash of the token.
|
||||
data BadgeStorePurchase = BadgeStorePurchase
|
||||
{ invoiceId :: Maybe Text,
|
||||
transactionRef :: Maybe Text
|
||||
|
||||
@@ -985,12 +985,14 @@ CREATE TABLE badge_code_redemptions(
|
||||
CREATE TABLE badge_store_receipts(
|
||||
badge_store_receipt_id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
|
||||
provider TEXT NOT NULL,
|
||||
transaction_ref TEXT NOT NULL,
|
||||
invoice_id TEXT UNIQUE,
|
||||
provider TEXT,
|
||||
transaction_ref TEXT,
|
||||
purchase_key BLOB NOT NULL,
|
||||
purchase_priv_key BLOB NOT NULL,
|
||||
master_key BLOB NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
closed_at TEXT,
|
||||
UNIQUE(provider, transaction_ref)
|
||||
) STRICT;
|
||||
CREATE INDEX contact_profiles_index ON contact_profiles(
|
||||
|
||||
Reference in New Issue
Block a user