mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-06 05:37:47 +00:00
fix compilation
This commit is contained in:
@@ -5490,8 +5490,8 @@ creditStoreReceipt userId HeldStoreReceipt {receiptId, stash = stash@BadgeStash
|
||||
defer failure retryAfter = do
|
||||
ri <- asks $ badgeRetryInterval . config
|
||||
now <- badgeNow
|
||||
let (wait, retryDelay') = storeReceiptRetry ri failure retryAfter retryDelay
|
||||
withStore' $ \db -> deferStoreReceipt db receiptId (wait `addUTCTime` now) retryDelay' failure
|
||||
let (delay, retryDelay') = storeReceiptRetry ri failure retryAfter retryDelay
|
||||
withStore' $ \db -> deferStoreReceipt db receiptId (delay `addUTCTime` now) retryDelay' failure
|
||||
|
||||
-- | The service's retryAfter when given; otherwise a failure that can clear grows its own delay, and any
|
||||
-- other waits a day. Unlike a renewal, an answered internal grows too: a buyer is watching the purchase.
|
||||
|
||||
@@ -150,7 +150,7 @@ holdStoreReceipt db g User {userId} invoiceId_ txRef@StoreTransactionRef {provid
|
||||
where
|
||||
paymentJSON = safeDecodeUtf8 . LB.toStrict $ J.encode payment
|
||||
insertReceipt = do
|
||||
(purchaseKey, purchasePrivKey) <- atomically $ C.generateKeyPair g
|
||||
(purchaseKey, purchasePrivKey) <- atomically (C.generateKeyPair g) :: IO C.KeyPairEd25519
|
||||
BadgeMasterKey mk <- generateMasterKey g
|
||||
-- an invoice id another record holds is not repeated: this record is then keyed by its transaction alone
|
||||
invoiceId' <- fmap join . forM invoiceId_ $ \invoiceId -> do
|
||||
@@ -186,7 +186,7 @@ getStoreReceipt db StoreTransactionRef {provider, transactionRef} =
|
||||
-- | The record made when Buy is tapped, before any receipt: the store echoes its invoice id.
|
||||
createBadgeStoreReceipt :: DB.Connection -> TVar ChaChaDRG -> User -> Text -> UTCTime -> IO ()
|
||||
createBadgeStoreReceipt db g User {userId} invoiceId now = do
|
||||
(purchaseKey, purchasePrivKey) <- atomically $ C.generateKeyPair g
|
||||
(purchaseKey, purchasePrivKey) <- atomically (C.generateKeyPair g) :: IO C.KeyPairEd25519
|
||||
BadgeMasterKey mk <- generateMasterKey g
|
||||
DB.execute
|
||||
db
|
||||
|
||||
Reference in New Issue
Block a user