diff --git a/packages/blockchain-link-types/package.json b/packages/blockchain-link-types/package.json
index 8b891f6c898..1e5babfb167 100644
--- a/packages/blockchain-link-types/package.json
+++ b/packages/blockchain-link-types/package.json
@@ -16,9 +16,9 @@
"prepublish": "yarn tsx ../../scripts/prepublish.js"
},
"dependencies": {
+ "@solana/web3.js": "^1.87.6",
"@trezor/type-utils": "workspace:*",
"@trezor/utxo-lib": "workspace:*",
- "@solana/web3.js": "^1.87.6",
"socks-proxy-agent": "6.1.1"
},
"devDependencies": {
diff --git a/suite-native/alerts/src/components/AlertRenderer.tsx b/suite-native/alerts/src/components/AlertRenderer.tsx
index 160ba1bade3..6ddff965330 100644
--- a/suite-native/alerts/src/components/AlertRenderer.tsx
+++ b/suite-native/alerts/src/components/AlertRenderer.tsx
@@ -1,21 +1,12 @@
-import { ReactNode } from 'react';
-
import { useAtomValue } from 'jotai';
import { AlertSheet } from './AlertSheet';
import { alertAtom } from '../alertsAtoms';
-type NotificationRendererProps = {
- children: ReactNode;
-};
-
-export const AlertRenderer = ({ children }: NotificationRendererProps) => {
+export const AlertRenderer = () => {
const alert = useAtomValue(alertAtom);
- return (
- <>
- {children}
- {alert && }
- >
- );
+ if (!alert) return null;
+
+ return ;
};
diff --git a/suite-native/app/src/App.tsx b/suite-native/app/src/App.tsx
index 4d0ebbee4a2..340bc3c5fcc 100644
--- a/suite-native/app/src/App.tsx
+++ b/suite-native/app/src/App.tsx
@@ -8,25 +8,20 @@ import * as Sentry from '@sentry/react-native';
import TrezorConnect from '@trezor/connect';
import { selectIsAppReady, selectIsConnectInitialized, StoreProvider } from '@suite-native/state';
-// import { NotificationRenderer } from '@suite-native/notifications';
-import { ToastRenderer } from '@suite-native/toasts';
import { FormatterProvider } from '@suite-common/formatters';
-import { AlertRenderer } from '@suite-native/alerts';
import { NavigationContainerWithAnalytics } from '@suite-native/navigation';
-import { AuthenticatorProvider } from '@suite-native/biometrics';
import { FeatureMessageScreen, MessageSystemBannerRenderer } from '@suite-native/message-system';
import { IntlProvider } from '@suite-native/intl';
import { useTransactionCache } from '@suite-native/accounts';
import { isDebugEnv } from '@suite-native/config';
-import { PassphraseModalRenderer } from '@suite-native/passphrase';
import { RootStackNavigator } from './navigation/RootStackNavigator';
import { StylesProvider } from './StylesProvider';
-import { Snow } from './snow/Snow';
import { useFormattersConfig } from './hooks/useFormattersConfig';
import { applicationInit } from './initActions';
import { useReportAppInitToAnalytics } from './hooks/useReportAppInitToAnalytics';
import { SentryProvider } from './SentryProvider';
+import { ModalsRenderer } from './ModalsRenderer';
// Base time to measure app loading time.
// The constant has to be placed at the beginning of this file to be initialized as soon as possible.
@@ -95,27 +90,13 @@ const AppComponent = () => {
if (!isAppReady) return null;
return (
- <>
-
-
-
-
- {/* Notifications are disabled until the problem with after-import notifications flooding is solved. */}
- {/* More here: https://github.com/trezor/trezor-suite/issues/7721 */}
- {/* */}
-
-
-
-
- {/* */}
-
-
-
-
-
+
+
+
+
{/* NOTE: Rendered as last item so that it covers the whole app screen */}
- >
+
);
};
diff --git a/suite-native/app/src/ModalsRenderer.tsx b/suite-native/app/src/ModalsRenderer.tsx
new file mode 100644
index 00000000000..3a5683b9648
--- /dev/null
+++ b/suite-native/app/src/ModalsRenderer.tsx
@@ -0,0 +1,20 @@
+import { AlertRenderer } from '@suite-native/alerts';
+import { PassphraseModalRenderer } from '@suite-native/passphrase';
+import { ToastRenderer } from '@suite-native/toasts';
+import { BiometricsModalRenderer } from '@suite-native/biometrics';
+// import { NotificationRenderer } from '@suite-native/notifications';
+
+import { Snow } from './snow/Snow';
+
+export const ModalsRenderer = () => (
+ <>
+
+
+
+
+
+ {/* Notifications are disabled until the problem with after-import notifications flooding is solved. */}
+ {/* More here: https://github.com/trezor/trezor-suite/issues/7721 */}
+ {/* */}
+ >
+);
diff --git a/suite-native/biometrics/src/components/AuthenticatorProvider.tsx b/suite-native/biometrics/src/components/AuthenticatorProvider.tsx
deleted file mode 100644
index 6fb6772097e..00000000000
--- a/suite-native/biometrics/src/components/AuthenticatorProvider.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { ReactNode } from 'react';
-
-import { useBiometrics } from '../useBiometrics';
-import { useIsBiometricsOverlayVisible } from '../biometricsAtoms';
-import { BiometricOverlay } from './BiometricOverlay';
-
-type AuthenticatorProviderProps = {
- children: ReactNode;
-};
-
-export const AuthenticatorProvider = ({ children }: AuthenticatorProviderProps) => {
- useBiometrics();
- const { isBiometricsOverlayVisible } = useIsBiometricsOverlayVisible();
-
- return (
- <>
- {children}
- {isBiometricsOverlayVisible && }
- >
- );
-};
diff --git a/suite-native/biometrics/src/components/BiometricsModalRenderer.tsx b/suite-native/biometrics/src/components/BiometricsModalRenderer.tsx
new file mode 100644
index 00000000000..878c23e0117
--- /dev/null
+++ b/suite-native/biometrics/src/components/BiometricsModalRenderer.tsx
@@ -0,0 +1,12 @@
+import { useBiometrics } from '../useBiometrics';
+import { useIsBiometricsOverlayVisible } from '../biometricsAtoms';
+import { BiometricOverlay } from './BiometricOverlay';
+
+export const BiometricsModalRenderer = () => {
+ useBiometrics();
+ const { isBiometricsOverlayVisible } = useIsBiometricsOverlayVisible();
+
+ if (!isBiometricsOverlayVisible) return null;
+
+ return ;
+};
diff --git a/suite-native/biometrics/src/index.ts b/suite-native/biometrics/src/index.ts
index 988ce4333d6..37a7ca24c71 100644
--- a/suite-native/biometrics/src/index.ts
+++ b/suite-native/biometrics/src/index.ts
@@ -1,6 +1,6 @@
export * from './isBiometricsFeatureAvailable';
export * from './biometricsAtoms';
export * from './useBiometrics';
-export * from './components/AuthenticatorProvider';
+export * from './components/BiometricsModalRenderer';
export * from './useBiometricsSettings';
export * from './utils';
diff --git a/suite-native/notifications/src/components/NotificationRenderer.tsx b/suite-native/notifications/src/components/NotificationRenderer.tsx
index 54e3ccfaf03..16de0e1615e 100644
--- a/suite-native/notifications/src/components/NotificationRenderer.tsx
+++ b/suite-native/notifications/src/components/NotificationRenderer.tsx
@@ -1,4 +1,3 @@
-import { ReactNode } from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useSelector } from 'react-redux';
@@ -8,10 +7,6 @@ import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
import { TransactionNotification } from './TransactionNotification';
-type NotificationRendererProps = {
- children: ReactNode;
-};
-
const notificationContainerStyle = prepareNativeStyle<{ topSafeAreaInset: number }>(
(utils, { topSafeAreaInset }) => ({
position: 'absolute',
@@ -22,25 +17,22 @@ const notificationContainerStyle = prepareNativeStyle<{ topSafeAreaInset: number
}),
);
-export const NotificationRenderer = ({ children }: NotificationRendererProps) => {
+export const NotificationRenderer = () => {
const { applyStyle } = useNativeStyles();
const { top: topSafeAreaInset } = useSafeAreaInsets();
const transactionNotifications = useSelector(selectOpenedTransactionNotifications);
return (
- <>
- {children}
-
-
- {transactionNotifications.map(({ id }) => (
-
- ))}
-
-
- >
+
+
+ {transactionNotifications.map(({ id }) => (
+
+ ))}
+
+
);
};
diff --git a/suite-native/passphrase/src/PassphraseModalRenderer.tsx b/suite-native/passphrase/src/PassphraseModalRenderer.tsx
index c12994b9847..2b8e35a4961 100644
--- a/suite-native/passphrase/src/PassphraseModalRenderer.tsx
+++ b/suite-native/passphrase/src/PassphraseModalRenderer.tsx
@@ -1,21 +1,12 @@
-import { ReactNode } from 'react';
-
import { useAtomValue } from 'jotai';
import { PassphraseFormModal } from './PassphraseFormModal';
import { isPassphraseModalVisibleAtom } from './isPassphraseModalVisibleAtom';
-type PassphraseModalRendererProps = {
- children: ReactNode;
-};
-
-export const PassphraseModalRenderer = ({ children }: PassphraseModalRendererProps) => {
+export const PassphraseModalRenderer = () => {
const isPassphraseModalVisible = useAtomValue(isPassphraseModalVisibleAtom);
- return (
- <>
- {children}
- {isPassphraseModalVisible && }
- >
- );
+ if (!isPassphraseModalVisible) return null;
+
+ return ;
};
diff --git a/suite-native/toasts/src/components/ToastRenderer.tsx b/suite-native/toasts/src/components/ToastRenderer.tsx
index 6323b894993..8d364f9528f 100644
--- a/suite-native/toasts/src/components/ToastRenderer.tsx
+++ b/suite-native/toasts/src/components/ToastRenderer.tsx
@@ -1,4 +1,3 @@
-import { ReactNode } from 'react';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useAtomValue } from 'jotai';
@@ -9,10 +8,6 @@ import { prepareNativeStyle, useNativeStyles } from '@trezor/styles';
import { toastsAtom } from '../toastsAtoms';
import { Toast } from './Toast';
-type ToastRendererProps = {
- children: ReactNode;
-};
-
const toastsContainerStyle = prepareNativeStyle<{ topSafeAreaInset: number }>(
(utils, { topSafeAreaInset }) => ({
width: '100%',
@@ -23,26 +18,23 @@ const toastsContainerStyle = prepareNativeStyle<{ topSafeAreaInset: number }>(
}),
);
-export const ToastRenderer = ({ children }: ToastRendererProps) => {
+export const ToastRenderer = () => {
const { applyStyle } = useNativeStyles();
const { top: topSafeAreaInset } = useSafeAreaInsets();
const toasts = useAtomValue(toastsAtom);
return (
- <>
- {children}
-
-
- {toasts.map(toast => (
-
- ))}
-
-
- >
+
+
+ {toasts.map(toast => (
+
+ ))}
+
+
);
};