Merge pull request #6262 from BlueWallet/importmulti

FIX: Camera would force close on ViewEditCosigners
This commit is contained in:
GLaDOS 2024-03-13 12:38:42 +00:00 committed by GitHub
commit 7e4a758df4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -28,6 +28,7 @@ interface BottomModalProps {
avoidKeyboard?: boolean;
allowBackdropPress?: boolean;
isVisible: boolean;
coverScreen?: boolean;
}
const BottomModal: React.FC<BottomModalProps> = ({
@ -40,6 +41,7 @@ const BottomModal: React.FC<BottomModalProps> = ({
isVisible,
avoidKeyboard = false,
allowBackdropPress = true,
coverScreen = true,
...props
}) => {
const { height: valueWindowHeight, width: valueWindowWidth } = useWindowDimensions();
@ -60,6 +62,7 @@ const BottomModal: React.FC<BottomModalProps> = ({
onBackButtonPress={handleBackButtonPress}
onBackdropPress={handleBackdropPress}
isVisible={isVisible}
coverScreen={coverScreen}
{...props}
accessibilityViewIsModal
avoidKeyboard={avoidKeyboard}

View File

@ -244,7 +244,7 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
const renderMnemonicsModal = () => {
return (
<BottomModal isVisible={isMnemonicsModalVisible} onClose={hideMnemonicsModal}>
<BottomModal isVisible={isMnemonicsModalVisible} onClose={hideMnemonicsModal} coverScreen={false}>
<View style={[styles.newKeyModalContent, stylesHook.modalContent]}>
<View style={styles.itemKeyUnprovidedWrapper}>
<View style={[styles.vaultKeyCircleSuccess, stylesHook.vaultKeyCircleSuccess]}>
@ -537,7 +537,7 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
// @ts-ignore weird, property exists on typedefinition. might be some ts bugs
const isPad: boolean = Platform.isPad;
return (
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal}>
<BottomModal isVisible={isProvideMnemonicsModalVisible} onClose={hideProvideMnemonicsModal} coverScreen={false}>
<KeyboardAvoidingView enabled={!isPad} behavior={Platform.OS === 'ios' ? 'position' : undefined}>
<View style={[styles.modalContent, stylesHook.modalContent]}>
<BlueTextCentered>{loc.multisig.type_your_mnemonics}</BlueTextCentered>
@ -571,7 +571,7 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
return (
// @ts-ignore wtf doneButton
<BottomModal isVisible={isShareModalVisible} onClose={hideShareModal} doneButton>
<BottomModal isVisible={isShareModalVisible} onClose={hideShareModal} doneButton coverScreen={false}>
<KeyboardAvoidingView enabled={!isPad} behavior={Platform.OS === 'ios' ? 'position' : undefined}>
<View style={[styles.modalContent, stylesHook.modalContent, styles.alignItemsCenter]}>
<Text style={[styles.headerText, stylesHook.textDestination]}>