mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
include fees with lightning payments
This commit is contained in:
1 parent
b9e5a2f3c2
commit
a96e028bb5
2 files changed
+38
-12
No files matched your search
@@ -355,6 +355,7 @@ export function AIProviderConfigDialog({
|
||||
const [paymentMethod, setPaymentMethod] = useState<'stripe' | 'lightning'>('stripe');
|
||||
const [lightningInvoice, setLightningInvoice] = useState<string | null>(null);
|
||||
const [lightningPaymentId, setLightningPaymentId] = useState<string | null>(null);
|
||||
const [lightningTotal, setLightningTotal] = useState<number>(10);
|
||||
const [refreshingPayments, setRefreshingPayments] = useState<Set<string>>(new Set());
|
||||
const [giftcardAmount, setGiftcardAmount] = useState<number>(10);
|
||||
const [giftcardQuantity, setGiftcardQuantity] = useState<number>(1);
|
||||
@@ -452,6 +453,7 @@ export function AIProviderConfigDialog({
|
||||
} else if (payment.method === 'lightning') {
|
||||
setLightningInvoice(payment.url);
|
||||
setLightningPaymentId(payment.id);
|
||||
setLightningTotal(payment.total);
|
||||
}
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
@@ -632,6 +634,7 @@ export function AIProviderConfigDialog({
|
||||
} else if (paymentPreview.method === 'lightning') {
|
||||
setLightningInvoice(paymentPreview.url);
|
||||
setLightningPaymentId(paymentPreview.id);
|
||||
setLightningTotal(paymentPreview.total);
|
||||
}
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
@@ -1238,6 +1241,7 @@ export function AIProviderConfigDialog({
|
||||
if (payment.method === 'lightning') {
|
||||
setLightningInvoice(payment.url);
|
||||
setLightningPaymentId(payment.id);
|
||||
setLightningTotal(payment.total);
|
||||
} else {
|
||||
window.open(payment.url, '_blank');
|
||||
}
|
||||
@@ -1512,7 +1516,7 @@ export function AIProviderConfigDialog({
|
||||
<div className="flex-1 overflow-y-auto px-1 -mx-1">
|
||||
<LightningPayment
|
||||
invoice={lightningInvoice}
|
||||
amount={amount}
|
||||
amount={lightningTotal}
|
||||
paymentId={lightningPaymentId!}
|
||||
provider={provider}
|
||||
onClose={() => {
|
||||
|
||||
Reference in new issue
Block a user