store: say how late money is credited or alerted

This commit is contained in:
shum committed 2026-10-22 16:34:16 +00:00
1 parent 2ae70f7136
commit 98e3fb4520
4 files changed
+4 -4

No files matched your search

@@ -225,7 +225,7 @@ lateSupportOf = \case
latePayment :: InvoiceId -> RegistrationId -> IO ()
latePayment (InvoiceId invText) (RegistrationId rid) =
logInfo ("names: invoice " <> invText <> " received money after registration " <> rid <> " closed; it stays unpaid, and its confirmed money is credited to its balance")
logInfo ("names: invoice " <> invText <> " received money after registration " <> rid <> " closed; it stays unpaid, and its money is credited to its balance once confirmed, else alerted")
holdNotSpent :: InvoiceId -> RegistrationId -> RegistrationId -> IO ()
holdNotSpent (InvoiceId invText) (RegistrationId holder) (RegistrationId source) =
@@ -417,7 +417,7 @@ lateReason env@PollerEnv {peStore, peProviders} LateAlert {laPending, laState =
where
unconfirmed = "refund by hand only a transaction confirmed on chain that BTCPay no longer monitors; one still Processing there waits"
highSpeed = "the invoice was made under HighSpeed, so its money is never credited by itself; refund by hand only a transaction confirmed on chain"
noConfirmation = "the Monero plugin shows no confirmation of this money (the invoice's settled-confirmation threshold is 0 or not given), so it is never credited by itself; refund by hand only a transaction confirmed on chain"
noConfirmation = "the Monero plugin shows no confirmation of this money, so it is never credited by itself; refund by hand only a transaction confirmed on chain"
rateRead = "confirmed, the credit waits on the rate read; do not refund; fix the rate read"
cardWaits = "confirmed, the credit waits on the poller's credit pass; do not refund; check the service log"
rateFloor current = "confirmed; the coin's price fell by more than half since the invoice (" <> fromMaybe "?" lsInvoiceRate <> ", " <> current <> "); it is never credited by itself; refund by hand only a transaction confirmed on chain"
@@ -569,7 +569,7 @@ testXmrLate = withLate $ \l@Late {lStore = st} -> do
lateWaitOf st "xmrnone" `shouldReturn` Just LWSupport
now <- getCurrentTime
alertsAt l (Right stubRate) (pastWindow now 60)
>>= (`shouldSatisfy` logged "ERROR" "invoice inv-xmrnone of order xmrnone: 320950000000 piconero received, 0 piconero confirmed, 0 piconero credited; the Monero plugin shows no confirmation")
>>= (`shouldSatisfy` logged "ERROR" "invoice inv-xmrnone of order xmrnone: 320950000000 piconero received, 0 piconero confirmed, 0 piconero credited; the Monero plugin shows no confirmation of this money, so it is never credited by itself; refund by hand only a transaction confirmed on chain")
-- balances with late credits
+1 -1
View File
@@ -1092,7 +1092,7 @@ testOneLateAlert = withOrders $ \ctx@Ctx {cStore = st, cWeb} -> do
setSignals (cStub ctx) [(ref, SigClosed paid)]
logs <- readWith poller
refunds logs `shouldBe` 1
logs `shouldSatisfy` T.isInfixOf "it stays unpaid, and its confirmed money is credited to its balance"
logs `shouldSatisfy` T.isInfixOf "it stays unpaid, and its money is credited to its balance once confirmed, else alerted"
restarted <- newPoller
refunds <$> readWith restarted `shouldReturn` 0
(nrPhase &&& nrLive) <$> invoiceRegistration ctx inv `shouldReturn` (PUnpaid, False)