diff --git a/.yarn/cache/react-native-toast-message-npm-2.2.0-c76c7088d0-5d4e18eb6b.zip b/.yarn/cache/react-native-toast-message-npm-2.2.0-c76c7088d0-5d4e18eb6b.zip
deleted file mode 100644
index 67b2eb048..000000000
Binary files a/.yarn/cache/react-native-toast-message-npm-2.2.0-c76c7088d0-5d4e18eb6b.zip and /dev/null differ
diff --git a/app/package.json b/app/package.json
index 1deda7c1d..7fffafd38 100644
--- a/app/package.json
+++ b/app/package.json
@@ -124,7 +124,6 @@
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-tab-view": "^3.5.2",
- "react-native-toast-message": "^2.2.0",
"react-native-typewriter": "^0.7.0",
"react-native-unistyles": "^2.9.1",
"react-native-web": "~0.19.12",
diff --git a/app/src/app/(nav)/[account]/swap.tsx b/app/src/app/(nav)/[account]/swap.tsx
index af26dda31..7d298868f 100644
--- a/app/src/app/(nav)/[account]/swap.tsx
+++ b/app/src/app/(nav)/[account]/swap.tsx
@@ -24,7 +24,7 @@ import { getSwapOperations } from '~/util/swap/syncswap/swap';
import Decimal from 'decimal.js';
import { ampli } from '~/lib/ampli';
import { SwapToTokenItem } from '#/swap/SwapToTokenItem';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { estimateSwap } from '~/util/swap/syncswap/estimate';
import { ScreenSkeleton } from '#/skeleton/ScreenSkeleton';
import { graphql } from 'relay-runtime';
diff --git a/app/src/app/(sheet)/link.tsx b/app/src/app/(sheet)/link.tsx
index 9305713b3..ea8d392f2 100644
--- a/app/src/app/(sheet)/link.tsx
+++ b/app/src/app/(sheet)/link.tsx
@@ -4,7 +4,7 @@ import { materialCommunityIcon } from '@theme/icons';
import { View } from 'react-native';
import { Text } from 'react-native-paper';
import { Button } from '#/Button';
-import { showSuccess } from '#/provider/SnackbarProvider';
+import { showSuccess } from '#/Snackbar';
import { z } from 'zod';
import { useLocalParams } from '~/hooks/useLocalParams';
import { createStyles, useStyles } from '@theme/styles';
diff --git a/app/src/app/(sheet)/select/address.tsx b/app/src/app/(sheet)/select/address.tsx
index d221584cc..9df573831 100644
--- a/app/src/app/(sheet)/select/address.tsx
+++ b/app/src/app/(sheet)/select/address.tsx
@@ -21,7 +21,7 @@ import { ADDRESS_SELECTED } from '~/hooks/useSelectAddress';
import { zChain, zArray, zUAddress, zAddress } from '~/lib/zod';
import * as Clipboard from 'expo-clipboard';
import { isAddress } from 'viem';
-import { showWarning } from '#/provider/SnackbarProvider';
+import { showWarning } from '#/Snackbar';
import { BottomSheetScrollView } from '@gorhom/bottom-sheet';
import { graphql } from 'relay-runtime';
import { useLazyQuery } from '~/api';
diff --git a/app/src/app/(sheet)/sessions/connect/[id].tsx b/app/src/app/(sheet)/sessions/connect/[id].tsx
index 7adc8f616..153581a6c 100644
--- a/app/src/app/(sheet)/sessions/connect/[id].tsx
+++ b/app/src/app/(sheet)/sessions/connect/[id].tsx
@@ -7,7 +7,7 @@ import { Actions } from '#/layout/Actions';
import { Sheet } from '#/sheet/Sheet';
import { AccountsList } from '#/walletconnect/AccountsList';
import { DappHeader } from '#/walletconnect/DappHeader';
-import { hideSnackbar, showError, showSuccess } from '#/provider/SnackbarProvider';
+import { hideSnackbar, showError, showSuccess } from '#/Snackbar';
import {
sessionChains,
supportedNamespaces,
@@ -91,7 +91,7 @@ export default function ConnectSessionSheet() {
}),
});
- showSuccess(`Connected with ${dapp}`, { visibilityTime: 2000 });
+ showSuccess(`Connected with ${dapp}`, { duration: 2000 });
} catch (error) {
showError(`Failed to connect to ${dapp}: ${(error as Error).message}`, { event: { error } });
}
diff --git a/app/src/app/(sheet)/wc.tsx b/app/src/app/(sheet)/wc.tsx
index 78b5e9a2f..4787f2297 100644
--- a/app/src/app/(sheet)/wc.tsx
+++ b/app/src/app/(sheet)/wc.tsx
@@ -8,7 +8,7 @@ import { Sheet } from '#/sheet/Sheet';
import { useLocalParams } from '~/hooks/useLocalParams';
import { useWalletConnectWithoutWatching } from '~/lib/wc';
import { zWalletConnectUri } from '~/lib/wc/uri';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { useRouter } from 'expo-router';
export const WalletConnectUriScreenParams = z.object({ uri: zWalletConnectUri() });
diff --git a/app/src/app/_layout.tsx b/app/src/app/_layout.tsx
index 969d31d32..a51e55976 100644
--- a/app/src/app/_layout.tsx
+++ b/app/src/app/_layout.tsx
@@ -13,7 +13,7 @@ import { WalletConnectListeners } from '#/walletconnect/WalletConnectListeners';
import { AuthGate } from '#/provider/AuthGate';
import { ApiProvider } from '~/api/ApiProvider';
import { NotificationsProvider } from '#/provider/NotificationsProvider';
-import { SnackbarProvider } from '#/provider/SnackbarProvider';
+import { Snackbar } from '#/Snackbar';
import { UpdateProvider } from '#/provider/UpdateProvider';
import { ThemeProvider } from '~/util/theme/ThemeProvider';
import { SafeAreaProvider } from 'react-native-safe-area-context';
@@ -114,7 +114,7 @@ function RootLayout() {
-
+
diff --git a/app/src/app/auth.tsx b/app/src/app/auth.tsx
index ff3b6cfa4..32cec284d 100644
--- a/app/src/app/auth.tsx
+++ b/app/src/app/auth.tsx
@@ -20,7 +20,7 @@ import { useEffect } from 'react';
import AsyncStorage from '@react-native-async-storage/async-storage';
import * as Updates from 'expo-updates';
import { Confirm } from '#/Confirm';
-import { showInfo } from '#/provider/SnackbarProvider';
+import { showInfo } from '#/Snackbar';
const UNLOCKED = new Subject();
const emitAuth = () => UNLOCKED.next(true);
diff --git a/app/src/app/scan.tsx b/app/src/app/scan.tsx
index ef8bd857b..faeb08f5a 100644
--- a/app/src/app/scan.tsx
+++ b/app/src/app/scan.tsx
@@ -7,7 +7,7 @@ import { Actions } from '#/layout/Actions';
import { Address, UAddress, tryAsAddress } from 'lib';
import * as Linking from 'expo-linking';
import useAsyncEffect from 'use-async-effect';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { parseAppLink } from '~/lib/appLink';
import { useFocusEffect, useRouter } from 'expo-router';
import { ScanOverlay } from '#/ScanOverlay';
diff --git a/app/src/components/ScanOverlay.tsx b/app/src/components/ScanOverlay.tsx
index c553bee54..754d99640 100644
--- a/app/src/components/ScanOverlay.tsx
+++ b/app/src/components/ScanOverlay.tsx
@@ -2,7 +2,7 @@ import { BackIcon, ContactsIcon, PasteIcon } from '~/util/theme/icons';
import { IconButton } from 'react-native-paper';
import { StyleSheet, View } from 'react-native';
import * as Clipboard from 'expo-clipboard';
-import { showWarning } from '#/provider/SnackbarProvider';
+import { showWarning } from '#/Snackbar';
import { useSelectAddress } from '~/hooks/useSelectAddress';
import { useRouter } from 'expo-router';
import { createStyles, useStyles } from '@theme/styles';
diff --git a/app/src/components/Snackbar.tsx b/app/src/components/Snackbar.tsx
new file mode 100644
index 000000000..56a361950
--- /dev/null
+++ b/app/src/components/Snackbar.tsx
@@ -0,0 +1,115 @@
+import { createStyles, useStyles } from '@theme/styles';
+import { useEffect } from 'react';
+import { createCallable } from 'react-call';
+import { Snackbar as BaseSnackbar, Text } from 'react-native-paper';
+import { Subject } from 'rxjs';
+import { hapticFeedback } from '~/lib/haptic';
+import { logEvent, LogEventParams } from '~/util/analytics';
+
+const HIDE_SNACKBAR = new Subject();
+
+type SnackbarVariant = 'info' | 'success' | 'warning' | 'error';
+
+export interface SnackbarProps {
+ variant?: SnackbarVariant;
+ message: string;
+ duration?: number;
+ action?: string;
+ event?: Partial | boolean;
+}
+
+export const Snackbar = createCallable(
+ ({ call, variant = 'info', message, duration = 6000, action, event }) => {
+ const { styles } = useStyles(getStylesheet({ variant }));
+
+ useEffect(() => {
+ const sub = HIDE_SNACKBAR.subscribe(() => call.end(false));
+ return () => sub.unsubscribe();
+ }, [call]);
+
+ useEffect(() => {
+ if (variant !== 'info') hapticFeedback(variant);
+ }, [variant]);
+
+ useEffect(() => {
+ if (event && variant !== 'success') {
+ logEvent({
+ level: variant,
+ message,
+ snackbar: true,
+ ...(typeof event === 'object' && event),
+ });
+ }
+ }, [message, variant, event]);
+
+ return (
+ call.end(false)}
+ style={[styles.snackbarBase, styles.snackbar]}
+ {...(action && {
+ action: {
+ label: action,
+ labelStyle: styles.actionLabel,
+ onPress: () => call.end(true),
+ },
+ })}
+ >
+
+ {message}
+
+
+ );
+ },
+);
+
+const getStylesheet = ({ variant }: { variant: SnackbarVariant }) =>
+ createStyles(({ colors }) => {
+ const s = {
+ info: {
+ snackbar: { backgroundColor: colors.inverseSurface },
+ message: { color: colors.inverseOnSurface },
+ actionLabel: { color: colors.inversePrimary },
+ },
+ success: {
+ snackbar: { backgroundColor: colors.successContainer },
+ message: { color: colors.onSuccessContainer },
+ },
+ warning: {
+ snackbar: { backgroundColor: colors.warningContainer },
+ message: { color: colors.onWarningContainer },
+ },
+ error: {
+ snackbar: { backgroundColor: colors.errorContainer },
+ message: { color: colors.onErrorContainer },
+ },
+ }[variant];
+
+ return {
+ actionLabel: {
+ color: colors.primary,
+ },
+ snackbarBase: {
+ maxWidth: 600,
+ },
+ ...s,
+ };
+ });
+
+type ShowOptions = Omit;
+
+export const showInfo = (message: string, options?: ShowOptions) =>
+ Snackbar.call({ variant: 'info', message, ...options });
+
+export const showSuccess = (message: string, options?: ShowOptions) =>
+ Snackbar.call({ variant: 'success', message, ...options });
+
+export const showWarning = (message: string, options?: ShowOptions) =>
+ Snackbar.call({ variant: 'warning', message, ...options });
+
+export const showError = (message: string, options?: ShowOptions) =>
+ Snackbar.call({ variant: 'error', message, ...options });
+
+export const hideSnackbar = () => HIDE_SNACKBAR.next(true);
diff --git a/app/src/components/account/PolicySuggestions.tsx b/app/src/components/account/PolicySuggestions.tsx
index f7381b177..8d277aa98 100644
--- a/app/src/components/account/PolicySuggestions.tsx
+++ b/app/src/components/account/PolicySuggestions.tsx
@@ -1,5 +1,4 @@
import { Chip } from '#/Chip';
-import { showError } from '#/provider/SnackbarProvider';
import { createStyles, useStyles } from '@theme/styles';
import { useRouter } from 'expo-router';
import { asChain } from 'lib';
diff --git a/app/src/components/auth/PasswordSettings.tsx b/app/src/components/auth/PasswordSettings.tsx
index 5409be26b..6decd982d 100644
--- a/app/src/components/auth/PasswordSettings.tsx
+++ b/app/src/components/auth/PasswordSettings.tsx
@@ -11,7 +11,7 @@ import { changeSecureStorePassword } from '~/lib/secure-storage';
import { createStyles, useStyles } from '@theme/styles';
import { Actions } from '#/layout/Actions';
import { Button } from '#/Button';
-import { showInfo } from '#/provider/SnackbarProvider';
+import { showInfo } from '#/Snackbar';
const PASSWORD_HASH = persistedAtom('passwordHash', null);
export const usePasswordHash = () => useAtomValue(PASSWORD_HASH);
diff --git a/app/src/components/cloud/google/useLinkGoogle.ts b/app/src/components/cloud/google/useLinkGoogle.ts
index 9b2837205..690768263 100644
--- a/app/src/components/cloud/google/useLinkGoogle.ts
+++ b/app/src/components/cloud/google/useLinkGoogle.ts
@@ -1,4 +1,4 @@
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { ampli } from '~/lib/ampli';
import { useGetGoogleApprover } from '#/cloud/google/useGetGoogleApprover';
import { graphql } from 'relay-runtime';
diff --git a/app/src/components/cloud/useLinkApple.ts b/app/src/components/cloud/useLinkApple.ts
index b38a74dc3..75ad7658c 100644
--- a/app/src/components/cloud/useLinkApple.ts
+++ b/app/src/components/cloud/useLinkApple.ts
@@ -1,5 +1,5 @@
import { useGetAppleApprover } from './useGetAppleApprover';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { ampli } from '~/lib/ampli';
import { graphql } from 'relay-runtime';
import { useFragment } from 'react-relay';
diff --git a/app/src/components/link/ledger/LedgerItem.tsx b/app/src/components/link/ledger/LedgerItem.tsx
index 940960106..c146de947 100644
--- a/app/src/components/link/ledger/LedgerItem.tsx
+++ b/app/src/components/link/ledger/LedgerItem.tsx
@@ -3,7 +3,7 @@ import { useCallback } from 'react';
import { ListItem } from '#/list/ListItem';
import { useGetLedgerApprover } from '~/app/(sheet)/ledger/approve';
import { APPROVER_BLE_IDS } from '~/hooks/ledger/useLedger';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { useImmerAtom } from 'jotai-immer';
import { getLedgerDeviceModel } from '~/hooks/ledger/connectLedger';
import { elipseTruncate } from '~/util/format';
@@ -94,10 +94,11 @@ export function LedgerItem({ device: d, ...props }: LedgerItemProps) {
},
}),
);
- if (!authHeaders)
- return showError('Connection request cancelled', {
- action: { label: 'Try again', onPress: connect },
- });
+ if (!authHeaders) {
+ const retry = await showError('Connection request cancelled', { action: 'Try again' });
+ if (retry) connect();
+ return;
+ }
// 1. Link
const { approvers } = (await link({ token: user.linkingToken }, { headers: authHeaders })).link;
diff --git a/app/src/components/policy/ApprovalSettings.tsx b/app/src/components/policy/ApprovalSettings.tsx
index 6c7db6c99..bf7e7d660 100644
--- a/app/src/components/policy/ApprovalSettings.tsx
+++ b/app/src/components/policy/ApprovalSettings.tsx
@@ -9,7 +9,7 @@ import { ListItemHorizontalTrailing } from '#/list/ListItemHorizontalTrailing';
import { ListItemTrailingText } from '#/list/ListItemTrailingText';
import { ApproverItem } from '#/policy/ApproverItem';
import { ThresholdChip } from './ThresholdChip';
-import { showInfo } from '#/provider/SnackbarProvider';
+import { showInfo } from '#/Snackbar';
import { useSelectAddress } from '~/hooks/useSelectAddress';
import { useToggle } from '~/hooks/useToggle';
import { usePolicyDraft } from '~/lib/policy/policyAsDraft';
@@ -38,7 +38,7 @@ export function ApprovalSettings() {
}
};
- const remove = (approver: Address) => {
+ const remove = async (approver: Address) => {
const originalThreshold = policy.threshold;
update((draft) => {
@@ -46,16 +46,13 @@ export function ApprovalSettings() {
draft.threshold = Math.max(policy.threshold, policy.approvers.size);
});
- showInfo('Approver removed', {
- action: {
- label: 'Undo',
- onPress: () =>
- update((draft) => {
- draft.approvers.add(approver);
- draft.threshold = originalThreshold;
- }),
- },
- });
+ const undo = await showInfo('Approver removed', { action: 'Undo' });
+ if (undo) {
+ update((draft) => {
+ draft.approvers.add(approver);
+ draft.threshold = originalThreshold;
+ });
+ }
};
return (
diff --git a/app/src/components/policy/PolicySideSheet.tsx b/app/src/components/policy/PolicySideSheet.tsx
index 81aeb9658..d3afe32b9 100644
--- a/app/src/components/policy/PolicySideSheet.tsx
+++ b/app/src/components/policy/PolicySideSheet.tsx
@@ -3,7 +3,7 @@ import { FormTextField } from '#/fields/FormTextField';
import { Actions } from '#/layout/Actions';
import { FormSubmitButton } from '#/fields/FormSubmitButton';
import { usePolicyDraft } from '~/lib/policy/policyAsDraft';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { SideSheet } from '../SideSheet/SideSheet';
import { Button } from '../Button';
import { createStyles, useStyles } from '@theme/styles';
@@ -122,7 +122,7 @@ export function PolicySideSheet(props: PolicySideSheetProps) {
if (policy && draft.key !== undefined) {
const r = (await rename({ account: draft.account, key: draft.key, name }))
?.updatePolicyDetails;
- if (r?.__typename !== 'Policy') return showError(r?.message);
+ if (r?.__typename !== 'Policy') return showError(r?.message || 'Unknown error');
}
updateDraft((draft) => {
diff --git a/app/src/components/provider/SnackbarProvider.tsx b/app/src/components/provider/SnackbarProvider.tsx
deleted file mode 100644
index 2e45700ce..000000000
--- a/app/src/components/provider/SnackbarProvider.tsx
+++ /dev/null
@@ -1,135 +0,0 @@
-import { createStyles, useStyles } from '@theme/styles';
-import { useEffect } from 'react';
-import { StyleProp, TextStyle } from 'react-native';
-import { Snackbar, SnackbarProps, Text } from 'react-native-paper';
-import RnToast, { ToastConfig, ToastConfigParams, ToastOptions } from 'react-native-toast-message';
-import { hapticFeedback } from '~/lib/haptic';
-import { LogEventParams, logEvent } from '~/util/analytics';
-
-type SnackVariant = 'info' | 'success' | 'warning' | 'error';
-
-type SnackParams = Pick & {
- message: string;
- variant?: SnackVariant;
- messageStyle?: StyleProp;
- event?: Partial | boolean;
-};
-
-export type SnackProps = ToastConfigParams;
-
-const Snack = ({
- isVisible,
- hide,
- props: { message, variant = 'info', messageStyle, event: eventProp, action, style, ...props },
-}: SnackProps) => {
- const { styles, theme } = useStyles(getStylesheet({ variant }));
-
- useEffect(() => {
- if (variant !== 'info') hapticFeedback(variant);
- }, [variant]);
-
- useEffect(() => {
- if (eventProp && (variant === 'warning' || variant === 'error')) {
- logEvent({
- level: variant,
- message,
- snack: true,
- ...(typeof eventProp === 'object' && eventProp),
- });
- }
- }, [message, variant, eventProp]);
-
- return (
-
- {message}
-
- );
-};
-
-const getStylesheet = ({ variant }: { variant: SnackVariant }) =>
- createStyles(({ colors }) => {
- const s = {
- info: {
- snackbar: { backgroundColor: colors.inverseSurface },
- message: { color: colors.inverseOnSurface },
- actionLabel: { color: colors.inversePrimary },
- },
- success: {
- snackbar: { backgroundColor: colors.successContainer },
- message: { color: colors.onSuccessContainer },
- },
- warning: {
- snackbar: { backgroundColor: colors.warningContainer },
- message: { color: colors.onWarningContainer },
- },
- error: {
- snackbar: { backgroundColor: colors.errorContainer },
- message: { color: colors.onErrorContainer },
- },
- }[variant];
-
- return {
- actionLabel: {
- color: colors.primary,
- },
- snackbarBase: {
- maxWidth: 600,
- },
- ...s,
- };
- });
-
-export type ShowSnackOptions = Pick<
- ToastOptions,
- 'autoHide' | 'visibilityTime' | 'position' | 'onHide'
-> &
- Omit;
-
-export const showSnack = (
- message: string,
- { autoHide = true, visibilityTime = 5000, position, onHide, ...props }: ShowSnackOptions = {},
-) =>
- RnToast.show({
- type: Snack.name,
- props: {
- ...props,
- message,
- },
- autoHide,
- visibilityTime,
- position,
- onHide,
- });
-
-export const showInfo = (message: string, options?: ShowSnackOptions) =>
- showSnack(message, { ...options, variant: 'info' });
-
-export const showSuccess = (message: string, options?: ShowSnackOptions) =>
- showSnack(message, { ...options, variant: 'success' });
-
-export const showWarning = (message: string, options?: ShowSnackOptions) =>
- showSnack(message, { ...options, variant: 'warning' });
-
-export const showError = (message: string | undefined, options?: ShowSnackOptions) =>
- showSnack(message ?? 'Something went wrong', { ...options, variant: 'error' });
-
-export const hideSnackbar = RnToast.hide;
-
-const CONFIGS: ToastConfig = { [Snack.name]: Snack };
-
-export const SnackbarProvider = () => (
-
-);
diff --git a/app/src/components/provider/UpdateProvider.tsx b/app/src/components/provider/UpdateProvider.tsx
index 2b1fa06e6..d583d7037 100644
--- a/app/src/components/provider/UpdateProvider.tsx
+++ b/app/src/components/provider/UpdateProvider.tsx
@@ -1,9 +1,8 @@
import * as Updates from 'expo-updates';
import { useEffect } from 'react';
import { AppState, Platform } from 'react-native';
-import { showInfo } from './SnackbarProvider';
-import { showWarning } from './SnackbarProvider';
import * as Sentry from '@sentry/react-native';
+import { showInfo, showWarning } from '#/Snackbar';
const UPDATE_INTEVAL = 5 * 60_000;
@@ -50,12 +49,8 @@ export function UpdateProvider() {
// Prompt user to reload when update is pending
useEffect(() => {
if (isUpdatePending) {
- showInfo('A new improved version is available. Please reload to apply the update.', {
- action: {
- label: 'Reload',
- onPress: Updates.reloadAsync,
- },
- autoHide: false,
+ showInfo('Update available', { action: 'Reload', duration: Infinity }).then((confirmed) => {
+ confirmed && Updates.reloadAsync();
});
}
}, [isUpdatePending]);
diff --git a/app/src/components/transaction/ScheduleSection.tsx b/app/src/components/transaction/ScheduleSection.tsx
index e6e0e35e3..4fb09b7ed 100644
--- a/app/src/components/transaction/ScheduleSection.tsx
+++ b/app/src/components/transaction/ScheduleSection.tsx
@@ -2,7 +2,6 @@ import { Timestamp } from '#/format/Timestamp';
import { ListHeader } from '#/list/ListHeader';
import { ListItem } from '#/list/ListItem';
import { DELAY_ENTRIES } from '#/policy/DelaySettings';
-import { showError } from '#/provider/SnackbarProvider';
import { CancelIcon, materialCommunityIcon } from '@theme/icons';
import { createStyles } from '@theme/styles';
import { useRouter } from 'expo-router';
diff --git a/app/src/components/transaction/TransactionResponse.tsx b/app/src/components/transaction/TransactionResponse.tsx
index c029c6423..9cd3147f3 100644
--- a/app/src/components/transaction/TransactionResponse.tsx
+++ b/app/src/components/transaction/TransactionResponse.tsx
@@ -7,7 +7,7 @@ import { useFragment } from 'react-relay';
import { graphql } from 'relay-runtime';
import { TransactionResponse_transaction$key } from '~/api/__generated__/TransactionResponse_transaction.graphql';
import * as Clipboard from 'expo-clipboard';
-import { showInfo } from '#/provider/SnackbarProvider';
+import { showInfo } from '#/Snackbar';
import { size, slice } from 'viem';
import { isHex } from 'lib';
import { Link } from 'expo-router';
diff --git a/app/src/components/transaction/useSignWithApprover.ts b/app/src/components/transaction/useSignWithApprover.ts
index 3905740cc..17fd120b1 100644
--- a/app/src/components/transaction/useSignWithApprover.ts
+++ b/app/src/components/transaction/useSignWithApprover.ts
@@ -2,13 +2,13 @@ import { useApproverWallet } from '~/lib/network/useApprover';
import { ok, err } from 'neverthrow';
import { useMemo } from 'react';
import { useAuthenticate } from '~/app/auth';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { useAuthSettings } from '#/auth/AuthSettings';
export function useSignWithApprover() {
const approver = useApproverWallet();
const auth = useAuthenticate();
- const {approval: authRequired} = useAuthSettings();
+ const { approval: authRequired } = useAuthSettings();
return useMemo(() => {
const check = async () => {
diff --git a/app/src/components/walletconnect/WalletConnectListeners/useSessionConnectionListener.ts b/app/src/components/walletconnect/WalletConnectListeners/useSessionConnectionListener.ts
index 05d010112..f6820d6c8 100644
--- a/app/src/components/walletconnect/WalletConnectListeners/useSessionConnectionListener.ts
+++ b/app/src/components/walletconnect/WalletConnectListeners/useSessionConnectionListener.ts
@@ -1,6 +1,6 @@
import { getSdkError } from '@walletconnect/utils';
import { useEffect, useRef } from 'react';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { useWalletConnectWithoutWatching, sessionChains } from '~/lib/wc';
import { useRouter, usePathname, Href } from 'expo-router';
import { Web3WalletTypes } from '@walletconnect/web3wallet';
diff --git a/app/src/components/walletconnect/WalletConnectListeners/useSessionRequestListener.ts b/app/src/components/walletconnect/WalletConnectListeners/useSessionRequestListener.ts
index db76bf272..913e6b8d6 100644
--- a/app/src/components/walletconnect/WalletConnectListeners/useSessionRequestListener.ts
+++ b/app/src/components/walletconnect/WalletConnectListeners/useSessionRequestListener.ts
@@ -1,7 +1,7 @@
import { asUAddress } from 'lib';
import { CHAINS } from 'chains';
import { useEffect } from 'react';
-import { showError, showInfo } from '#/provider/SnackbarProvider';
+import { showError, showInfo } from '#/Snackbar';
import { logError } from '~/util/analytics';
import {
asCaip2,
diff --git a/app/src/hooks/mutations/useRemovePolicy.ts b/app/src/hooks/mutations/useRemovePolicy.ts
index aa83cb413..cd374f6e7 100644
--- a/app/src/hooks/mutations/useRemovePolicy.ts
+++ b/app/src/hooks/mutations/useRemovePolicy.ts
@@ -1,4 +1,4 @@
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { useRouter } from 'expo-router';
import { PolicyKey, UAddress } from 'lib';
import { graphql } from 'relay-runtime';
diff --git a/app/src/hooks/useApprove.ts b/app/src/hooks/useApprove.ts
index 641fbc3e6..aab740f45 100644
--- a/app/src/hooks/useApprove.ts
+++ b/app/src/hooks/useApprove.ts
@@ -1,7 +1,7 @@
import { useApproverAddress } from '~/lib/network/useApprover';
import { Address, asMessageTypedData, UUID } from 'lib';
import { match } from 'ts-pattern';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { proposalAsTypedData } from '~/lib/proposalAsTypedData';
import { useGetLedgerApprover } from '~/app/(sheet)/ledger/approve';
import { useSignWithApprover } from '#/transaction/useSignWithApprover';
diff --git a/app/src/hooks/useReject.ts b/app/src/hooks/useReject.ts
index b4faf2168..361785951 100644
--- a/app/src/hooks/useReject.ts
+++ b/app/src/hooks/useReject.ts
@@ -1,7 +1,7 @@
import { useApproverAddress } from '~/lib/network/useApprover';
import { Address } from 'lib';
import { match } from 'ts-pattern';
-import { showError } from '#/provider/SnackbarProvider';
+import { showError } from '#/Snackbar';
import { hapticFeedback } from '~/lib/haptic';
import { ampli, type RejectionProperties } from '~/lib/ampli';
import { useGetGoogleApprover } from '#/cloud/google/useGetGoogleApprover';
diff --git a/app/src/lib/share/index.ts b/app/src/lib/share/index.ts
index c0573b34d..b1d5a5a5d 100644
--- a/app/src/lib/share/index.ts
+++ b/app/src/lib/share/index.ts
@@ -1,5 +1,5 @@
import Clipboard from '@react-native-clipboard/clipboard';
-import { showInfo } from '#/provider/SnackbarProvider';
+import { showInfo } from '#/Snackbar';
export interface ShareOptions {
message?: string;
diff --git a/yarn.lock b/yarn.lock
index 7bd55ff10..aa29112e3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -14188,7 +14188,6 @@ __metadata:
react-native-screens: "npm:3.31.1"
react-native-svg: "npm:15.2.0"
react-native-tab-view: "npm:^3.5.2"
- react-native-toast-message: "npm:^2.2.0"
react-native-typewriter: "npm:^0.7.0"
react-native-unistyles: "npm:^2.9.1"
react-native-web: "npm:~0.19.12"
@@ -30731,16 +30730,6 @@ __metadata:
languageName: node
linkType: hard
-"react-native-toast-message@npm:^2.2.0":
- version: 2.2.0
- resolution: "react-native-toast-message@npm:2.2.0"
- peerDependencies:
- react: "*"
- react-native: "*"
- checksum: 10/5d4e18eb6bcdcf117c64242e09dd1fc791a51d614dcafc7ef685942dbf891010b8901cb5a6093088d65607f77b417cdc4053fb1bef7a8e119e2776063d32b78f
- languageName: node
- linkType: hard
-
"react-native-typewriter@npm:^0.7.0":
version: 0.7.0
resolution: "react-native-typewriter@npm:0.7.0"