From eb06c941c67eb8417ec6f6a12b9217575fa64bb3 Mon Sep 17 00:00:00 2001 From: Kelbie Date: Thu, 3 Jul 2025 10:20:47 +0100 Subject: [PATCH 1/3] fix: register sheets in modal context --- components/layout/Modal.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/layout/Modal.tsx b/components/layout/Modal.tsx index 6a43c1c4..894d92a4 100644 --- a/components/layout/Modal.tsx +++ b/components/layout/Modal.tsx @@ -24,7 +24,9 @@ import { memoizedGetTheme } from 'helper/redux/settings'; import { registerAllSheets } from 'components/layout/sheets/registerSheets'; -registerAllSheets({ context: undefined }); +// Register all action sheets within the modal context so that +// sheets opened from a modal are scoped correctly +registerAllSheets({ context: 'modal' }); const headerHeight = Constants.statusBarHeight ?? 0; From 5c302f11226692dcaf2b786a8e30d5fceef27838 Mon Sep 17 00:00:00 2001 From: Kelbie Date: Thu, 3 Jul 2025 10:28:06 +0100 Subject: [PATCH 2/3] Wrap Modal content with SheetProvider --- components/layout/Modal.tsx | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/components/layout/Modal.tsx b/components/layout/Modal.tsx index 894d92a4..c942f1a9 100644 --- a/components/layout/Modal.tsx +++ b/components/layout/Modal.tsx @@ -22,6 +22,7 @@ import { useNavigation } from 'expo-router'; import opacity from 'hex-color-opacity'; import { memoizedGetTheme } from 'helper/redux/settings'; +import { SheetProvider } from 'react-native-actions-sheet'; import { registerAllSheets } from 'components/layout/sheets/registerSheets'; // Register all action sheets within the modal context so that @@ -157,16 +158,18 @@ export default function Modal({ React.isValidElement(children) ? children : {children}; return ( - + + {renderHeader()} + ); } From 559174a71df8de96d74a7ea57f3163694010c446 Mon Sep 17 00:00:00 2001 From: Kelbie Date: Thu, 3 Jul 2025 10:34:50 +0100 Subject: [PATCH 3/3] fix bottom sheet context --- app/currency.tsx | 1 + app/esimCheckout.tsx | 6 +++++- app/lightningSendConfirmation.tsx | 1 + app/vpnCheckout.tsx | 6 +++++- components/layout/MintBalanceDisplay.tsx | 6 ++++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/currency.tsx b/app/currency.tsx index 005cc641..a4f195d6 100644 --- a/app/currency.tsx +++ b/app/currency.tsx @@ -303,6 +303,7 @@ function ModalScreen() { Pay with - + diff --git a/app/lightningSendConfirmation.tsx b/app/lightningSendConfirmation.tsx index ae0cc98a..9c726b1e 100644 --- a/app/lightningSendConfirmation.tsx +++ b/app/lightningSendConfirmation.tsx @@ -213,6 +213,7 @@ export function LightningSendConfirmation({ onMintSelected={handleMintSelected} unit={unit} updateSelectedMint={false} + context="modal" /> )} diff --git a/app/vpnCheckout.tsx b/app/vpnCheckout.tsx index 7104e81b..8e6ed1c2 100644 --- a/app/vpnCheckout.tsx +++ b/app/vpnCheckout.tsx @@ -214,7 +214,11 @@ function ModalScreen() { }}> Pay with - + ; } @@ -37,6 +41,7 @@ const MintBalanceDisplay: React.FC = ({ onMintSelected, requireBalance = true, updateSelectedMint = true, + context = 'global', style, }) => { const theme = useSelector(memoizedGetTheme); @@ -48,6 +53,7 @@ const MintBalanceDisplay: React.FC = ({ const handlePress = () => { SheetManager.show('mint-balance', { + context, payload: { navigate: false, requireBalance,