mirror of
https://github.com/Such-Software/wowcheckout.git
synced 2026-10-17 05:51:45 +02:00
Fork xmrcheckout for Wownero (WOW)
Minimal changes from upstream xmrcheckout to support Wownero: - Rate provider: Nonlogs WOW-BTC via Kraken BTC/USD - Subaddress derivation: Wownero network byte overrides (53/63/54) - Payment URI scheme: wownero: - Dockerfile: Wownero binaries from Codeberg - Display text: Monero→Wownero, XMR→WOW throughout UI - Default daemon: 192.168.88.235:34568 - Added wownero-logo.svg File and folder structure kept identical to upstream for easy sync.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
|
||||
type InvoiceStatus =
|
||||
| "pending"
|
||||
| "payment_detected"
|
||||
| "confirmed"
|
||||
| "expired"
|
||||
| "invalid";
|
||||
|
||||
type BtcpayModalBridgeProps = {
|
||||
invoiceId: string;
|
||||
status: InvoiceStatus;
|
||||
};
|
||||
|
||||
const statusMap: Record<InvoiceStatus, string> = {
|
||||
pending: "New",
|
||||
payment_detected: "Processing",
|
||||
confirmed: "Settled",
|
||||
expired: "Expired",
|
||||
invalid: "Invalid",
|
||||
};
|
||||
|
||||
const postToParent = (payload: unknown) => {
|
||||
if (typeof window === "undefined" || !window.parent) {
|
||||
return;
|
||||
}
|
||||
window.parent.postMessage(payload, "*");
|
||||
};
|
||||
|
||||
export default function BtcpayModalBridge({
|
||||
invoiceId,
|
||||
status,
|
||||
}: BtcpayModalBridgeProps) {
|
||||
useEffect(() => {
|
||||
postToParent("loaded");
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
postToParent({
|
||||
invoiceId,
|
||||
status: statusMap[status] ?? "new",
|
||||
});
|
||||
}, [invoiceId, status]);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user