Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { swrConfiguration } from "lib/swr";
import * as React from "react";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaView } from "react-native-safe-area-context";
import Toast from "react-native-toast-message";
import { SWRConfig } from "swr";
import ToastManager from "toastify-react-native";
import { toastConfig } from "~/components/ToastConfig";
import { NotificationProvider } from "~/context/Notification";
import { UserInactivityProvider } from "~/context/UserInactivity";
Expand Down Expand Up @@ -125,12 +125,11 @@ export default Sentry.wrap(function RootLayout() {
<Slot />
</SessionProvider>
</UserInactivityProvider>
<ToastManager
<Toast
config={toastConfig}
position="bottom"
bottomOffset={140}
topOffset={140}
useModal={false}
/>
</BottomSheetModalProvider>
</GestureHandlerRootView>
Expand Down
2 changes: 1 addition & 1 deletion components/CreateInvoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as Clipboard from "expo-clipboard";
import { router } from "expo-router";
import React from "react";
import { Share, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import { DualCurrencyInput } from "~/components/DualCurrencyInput";
import { CopyIcon, ShareIcon } from "~/components/Icons";
Expand Down
11 changes: 6 additions & 5 deletions components/ToastConfig.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Link } from "expo-router";
import { View } from "react-native";
import { type ToastConfig } from "react-native-toast-message";
import { CheckCircleIcon, XCircleIcon } from "~/components/Icons";
import { Button } from "./ui/button";
import { Text } from "./ui/text";

export const toastConfig = {
success: ({ text1, text2 }: { text1: string; text2: string }) => (
export const toastConfig: ToastConfig = {
success: ({ text1, text2 }) => (
<View className="bg-foreground rounded-xl px-6 py-3 mx-6">
<View className="flex flex-row gap-2 justify-center items-center">
<CheckCircleIcon className="text-background" width={16} height={16} />
Expand All @@ -14,7 +15,7 @@ export const toastConfig = {
{text2 && <Text className="text-background text-center">{text2}</Text>}
</View>
),
info: ({ text1, text2 }: { text1: string; text2: string }) => (
info: ({ text1, text2, hide }) => (
<View className="bg-yellow-500 rounded-full px-6 py-3 mx-6">
<View className="flex flex-row gap-2 justify-center items-center">
<XCircleIcon className="text-background" width={16} height={16} />
Expand All @@ -23,7 +24,7 @@ export const toastConfig = {
{text2 && <Text className="text-background text-center">{text2}</Text>}
</View>
),
error: ({ text1, text2 }: { text1: string; text2: string }) => (
error: ({ text1, text2, hide }) => (
<View className="bg-destructive rounded-xl px-6 py-3 mx-6">
<View className="flex flex-row gap-2 justify-center items-center">
<XCircleIcon className="text-background" width={16} height={16} />
Expand All @@ -32,7 +33,7 @@ export const toastConfig = {
{text2 && <Text className="text-background text-center">{text2}</Text>}
</View>
),
connectionError: ({ text1 }: { text1: string }) => {
connectionError: ({ text1, text2, hide }) => {
return (
<View className="bg-foreground rounded-xl px-6 py-3 mx-6 flex flex-col gap-2">
<View className="flex flex-row gap-2 justify-center items-center">
Expand Down
2 changes: 1 addition & 1 deletion components/WalletSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@gorhom/bottom-sheet";
import React, { useCallback, useMemo, useRef } from "react";
import { FlatList, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import { ChevronDownIcon, WalletIcon } from "~/components/Icons";
import { Text } from "~/components/ui/text";
import { DEFAULT_WALLET_NAME } from "~/lib/constants";
Expand Down
2 changes: 1 addition & 1 deletion lib/errorToast.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";

export function errorToast(error: Error | unknown) {
Toast.show({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
"react-native-safe-area-context": "^5.6.1",
"react-native-screens": "~4.16.0",
"react-native-svg": "15.12.1",
"react-native-toast-message": "^2.3.3",
"react-native-url-polyfill": "^2.0.0",
"react-native-webview": "13.15.0",
"react-native-worklets": "0.5.1",
"swr": "^2.2.5",
"tailwind-merge": "^2.3.0",
"text-encoding": "^0.7.0",
"toastify-react-native": "^7.2.3",
"yarn": "^1.22.22",
"zustand": "^5.0.6"
},
Expand Down
2 changes: 1 addition & 1 deletion pages/Transaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Link, useLocalSearchParams } from "expo-router";
import { nip19 } from "nostr-tools";
import React from "react";
import { Pressable, ScrollView, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import { LinkIcon } from "~/components/Icons";
import AcceptedTransactionIcon from "~/components/icons/AcceptedTransaction";
import FailedTransactionIcon from "~/components/icons/FailedTransaction";
Expand Down
2 changes: 1 addition & 1 deletion pages/receive/Receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Clipboard from "expo-clipboard";
import { router } from "expo-router";
import React from "react";
import { Share, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import { CreateInvoice } from "~/components/CreateInvoice";
import { AddressIcon, EditIcon, ScanIcon, ShareIcon } from "~/components/Icons";
import RedeemIcon from "~/components/icons/RedeemIcon";
Expand Down
2 changes: 1 addition & 1 deletion pages/send/LNURLPay.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router, useLocalSearchParams } from "expo-router";
import React, { useEffect } from "react";
import { View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import { DualCurrencyInput } from "~/components/DualCurrencyInput";
import Loading from "~/components/Loading";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/FiatCurrency.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router } from "expo-router";
import React, { useEffect, useState } from "react";
import { FlatList, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import { CountryFlag } from "~/components/Flag";
import Loading from "~/components/Loading";
import Screen from "~/components/Screen";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

import Constants from "expo-constants";
import React from "react";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import AlbyBanner from "~/components/AlbyBanner";
import Screen from "~/components/Screen";
import { Text } from "~/components/ui/text";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/Wallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FlatList, TouchableOpacity, View } from "react-native";
import { SettingsIcon, WalletIcon } from "~/components/Icons";
import { Button } from "~/components/ui/button";

import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import NWCIcon from "~/components/icons/NWCIcon";
import Screen from "~/components/Screen";
import { Text } from "~/components/ui/text";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/address-book/NewAddressBookEntry.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router } from "expo-router";
import React from "react";
import { View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import Screen from "~/components/Screen";
import { Button } from "~/components/ui/button";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/wallets/EditWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Clipboard from "expo-clipboard";
import { Link, router, useLocalSearchParams } from "expo-router";
import React, { useState } from "react";
import { Alert as RNAlert, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import Alert from "~/components/Alert";
import ConnectionInfoModal from "~/components/ConnectionInfoModal";
import {
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/wallets/LightningAddress.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router, useLocalSearchParams } from "expo-router";
import React from "react";
import { View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import Alert from "~/components/Alert";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import { AlertCircleIcon } from "~/components/Icons";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/wallets/RenameWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { router, useLocalSearchParams } from "expo-router";
import React from "react";
import { View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import Screen from "~/components/Screen";
import { Button } from "~/components/ui/button";
Expand Down
2 changes: 1 addition & 1 deletion pages/settings/wallets/SetupWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { router, useLocalSearchParams } from "expo-router";
import { useAppStore } from "lib/state/appStore";
import React from "react";
import { Modal, TouchableOpacity, View } from "react-native";
import { Toast } from "toastify-react-native";
import Toast from "react-native-toast-message";
import Alert from "~/components/Alert";
import DismissableKeyboardView from "~/components/DismissableKeyboardView";
import {
Expand Down
49 changes: 6 additions & 43 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3823,15 +3823,6 @@ cliui@^6.0.0:
strip-ansi "^6.0.0"
wrap-ansi "^6.2.0"

cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"

cliui@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
Expand Down Expand Up @@ -8472,7 +8463,7 @@ prompts@^2.0.1, prompts@^2.2.1, prompts@^2.3.2:
kleur "^3.0.3"
sisteransi "^1.0.5"

prop-types@^15.7.2, prop-types@^15.8.0, prop-types@^15.8.1:
prop-types@^15.8.0, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
Expand Down Expand Up @@ -8689,21 +8680,18 @@ react-native-svg@15.12.1:
css-tree "^1.1.3"
warn-once "0.1.1"

react-native-toast-message@^2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/react-native-toast-message/-/react-native-toast-message-2.3.3.tgz#e301508d386a9902ff6b4559ecc6674f8cfdf97a"
integrity sha512-4IIUHwUPvKHu4gjD0Vj2aGQzqPATiblL1ey8tOqsxOWRPGGu52iIbL8M/mCz4uyqecvPdIcMY38AfwRuUADfQQ==

react-native-url-polyfill@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/react-native-url-polyfill/-/react-native-url-polyfill-2.0.0.tgz#db714520a2985cff1d50ab2e66279b9f91ffd589"
integrity sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA==
dependencies:
whatwg-url-without-unicode "8.0.0-3"

react-native-vector-icons@*:
version "10.3.0"
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-10.3.0.tgz#de440f2627a2ed1079ce3b99d5b9d4f86894df28"
integrity sha512-IFQ0RE57819hOUdFvgK4FowM5aMXg7C7XKsuGLevqXkkIJatc3QopN0wYrb2IrzUgmdpfP+QVIbI3S6h7M0btw==
dependencies:
prop-types "^15.7.2"
yargs "^16.1.1"

react-native-webview@13.15.0:
version "13.15.0"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.15.0.tgz#b6d2f8d8dd65897db76659ddd8198d2c74ec5a79"
Expand Down Expand Up @@ -10004,13 +9992,6 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"

toastify-react-native@^7.2.3:
version "7.2.3"
resolved "https://registry.yarnpkg.com/toastify-react-native/-/toastify-react-native-7.2.3.tgz#281871a46c5ab98cd1b308e795560b5add707c4d"
integrity sha512-ngmpTKlTo0IRddwSsNWK+YKbB2veqotHy7Zpil4eksoLAlq0RPSgdVOk5QDEDUONJQ4r7ljGYeRW68KBztirsg==
dependencies:
react-native-vector-icons "*"

toidentifier@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
Expand Down Expand Up @@ -10768,11 +10749,6 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^20.2.2:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==

yargs-parser@^21.1.1:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
Expand All @@ -10795,19 +10771,6 @@ yargs@^15.3.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@^16.1.1:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.0"
y18n "^5.0.5"
yargs-parser "^20.2.2"

yargs@^17.3.1, yargs@^17.6.2:
version "17.7.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
Expand Down
Loading