mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +01:00
Handling unlikely state transition from paid to invalid
Ref: https://github.com/btcpayserver/btcpayserver/issues/216
This commit is contained in:
@@ -30,6 +30,7 @@ function onDataCallback(jsonData) {
|
|||||||
newStatus === "paid") {
|
newStatus === "paid") {
|
||||||
if ($(".modal-dialog").hasClass("expired")) {
|
if ($(".modal-dialog").hasClass("expired")) {
|
||||||
$(".modal-dialog").removeClass("expired");
|
$(".modal-dialog").removeClass("expired");
|
||||||
|
$("#expired").removeClass("active");
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".modal-dialog").addClass("paid");
|
$(".modal-dialog").addClass("paid");
|
||||||
@@ -39,6 +40,11 @@ function onDataCallback(jsonData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (newStatus === "expired" || newStatus === "invalid") { //TODO: different state if the invoice is invalid (failed to confirm after timeout)
|
if (newStatus === "expired" || newStatus === "invalid") { //TODO: different state if the invoice is invalid (failed to confirm after timeout)
|
||||||
|
if ($(".modal-dialog").hasClass("paid")) {
|
||||||
|
$(".modal-dialog").removeClass("paid");
|
||||||
|
$("#paid").removeClass("active");
|
||||||
|
}
|
||||||
|
|
||||||
$(".timer-row").removeClass("expiring-soon");
|
$(".timer-row").removeClass("expiring-soon");
|
||||||
$(".timer-row__spinner").html("");
|
$(".timer-row__spinner").html("");
|
||||||
$("#emailAddressView").removeClass("active");
|
$("#emailAddressView").removeClass("active");
|
||||||
|
|||||||
Reference in New Issue
Block a user