Skip to content

Commit

Permalink
fix: lnurl success action links
Browse files Browse the repository at this point in the history
  • Loading branch information
reneaaron committed Sep 27, 2024
1 parent 24c92e0 commit cc4d25f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pages/send/PaymentSuccess.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Link, router, useLocalSearchParams } from "expo-router";
import { router, useLocalSearchParams } from "expo-router";
import { View } from "react-native";
import { Paid } from "~/animations/Paid";
import { Button } from "~/components/ui/button";
import { Text } from "~/components/ui/text";
import Screen from "~/components/Screen";
import { useGetFiatAmount } from "~/hooks/useGetFiatAmount";
import { LNURLPaymentSuccessAction } from "lib/lnurl";
import { openURL } from "expo-linking";
import { Receiver } from "~/components/Receiver";

export function PaymentSuccess() {
Expand Down Expand Up @@ -49,15 +50,15 @@ export function PaymentSuccess() {
}
{lnurlSuccessAction.tag == "url" &&
<>
<Text className="text-foreground text-center text-2xl font-medium2">
{lnurlSuccessAction.description}
</Text>
{lnurlSuccessAction.description &&
<Text className="text-foreground text-center text-2xl font-medium2">
{lnurlSuccessAction.description}
</Text>
}
{lnurlSuccessAction.url &&
<Link href={lnurlSuccessAction.url}>
<Button variant="secondary">
<Text>Open Link</Text>
</Button>
</Link>
<Button variant="secondary" onPress={() => openURL(lnurlSuccessAction.url ?? "")}>
<Text>Open Link</Text>
</Button>
}
</>
}
Expand Down

0 comments on commit cc4d25f

Please sign in to comment.