From e4ccd042dd0c280a53c593f0e911da17d8ecd238 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Sat, 21 Jun 2025 13:52:02 +0200 Subject: [PATCH] Version 2.5.7 --- .env | 4 +-- .../metadata/android/en-US/changelogs/434.txt | 1 + .../metadata/android/fr-FR/changelogs/434.txt | 1 + src/screens/Invoice/Invoice.tsx | 26 +++++++++---------- 4 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/434.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/434.txt diff --git a/.env b/.env index 65b65ed8..3ec994bc 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -APP_VERSION=2.5.6 +APP_VERSION=2.5.7 -APP_BUILD_NUMBER=433 \ No newline at end of file +APP_BUILD_NUMBER=434 \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/changelogs/434.txt b/fastlane/metadata/android/en-US/changelogs/434.txt new file mode 100644 index 00000000..7bd29bee --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/434.txt @@ -0,0 +1 @@ +- Minor improvements and optimizations \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/changelogs/434.txt b/fastlane/metadata/android/fr-FR/changelogs/434.txt new file mode 100644 index 00000000..59408cff --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/434.txt @@ -0,0 +1 @@ +- Améliorations et optimisations mineures \ No newline at end of file diff --git a/src/screens/Invoice/Invoice.tsx b/src/screens/Invoice/Invoice.tsx index b37828f7..9cf98b1e 100644 --- a/src/screens/Invoice/Invoice.tsx +++ b/src/screens/Invoice/Invoice.tsx @@ -148,8 +148,7 @@ export type InvoiceType = { input: Input; paymentDetails: PaymentDetail[]; device?: Device; - // paymentMethod: "lightning" | "onchain"; - redirectUrl: `http://${string}`; + redirectAfterPaid?: `http://${string}`; amlInfoStatus?: AmlInfoStatus; }; @@ -213,7 +212,8 @@ export const Invoice = () => { const [amlDecision, setAmlDescision] = useState(true); const [invoiceFiatAmount, setInvoiceFiatAmount] = useState(0); const [isInvalidInvoice, setIsInvalidInvoice] = useState(false); - const [redirectUrl, setRedirectUrl] = useState<`http://${string}`>(); + const [redirectAfterPaid, setRedirectAfterPaid] = + useState<`http://${string}`>(); const [readingNfcData, setReadingNfcData] = useState[0]>(); @@ -535,11 +535,11 @@ export const Invoice = () => { (p) => p.paidAt )?.network; - if (getInvoiceData.redirectUrl) { - setRedirectUrl( - getInvoiceData.redirectUrl.includes("://") - ? getInvoiceData.redirectUrl - : `http://${getInvoiceData.redirectUrl}` + if (getInvoiceData.redirectAfterPaid) { + setRedirectAfterPaid( + getInvoiceData.redirectAfterPaid.includes("://") + ? getInvoiceData.redirectAfterPaid + : `http://${getInvoiceData.redirectAfterPaid}` ); } @@ -687,12 +687,12 @@ export const Invoice = () => { } navigate("/"); }; - } else if (redirectUrl) { + } else if (redirectAfterPaid) { return () => { - void Linking.openURL(redirectUrl); + void Linking.openURL(redirectAfterPaid); }; } - }, [isExternalInvoice, navigate, redirectUrl, toTerminalTimeout]); + }, [isExternalInvoice, navigate, redirectAfterPaid, toTerminalTimeout]); const alreadyPaidAmount = useMemo( () => onChainTxs?.reduce((result, o) => result + (o.amount || 0), 0) || 0, @@ -1137,11 +1137,11 @@ export const Invoice = () => { )} - {status === "settled" && redirectUrl && isInitialPaid && ( + {status === "settled" && redirectAfterPaid && isInitialPaid && (