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, diff --git a/components/layout/Modal.tsx b/components/layout/Modal.tsx index 6a43c1c4..c942f1a9 100644 --- a/components/layout/Modal.tsx +++ b/components/layout/Modal.tsx @@ -22,9 +22,12 @@ 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'; -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; @@ -155,16 +158,18 @@ export default function Modal({ React.isValidElement(children) ? children : {children}; return ( - + + {renderHeader()} + ); }