mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-26 08:55:56 +01:00
DEL: function is not needed anymore
This commit is contained in:
parent
16a8577c43
commit
b436bdbd38
2 changed files with 11 additions and 28 deletions
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { ActivityIndicator, findNodeHandle, ScrollView, StyleSheet, View } from 'react-native';
|
||||
import { ActivityIndicator, ScrollView, StyleSheet, View } from 'react-native';
|
||||
import { useNavigation, useRoute, useIsFocused } from '@react-navigation/native';
|
||||
|
||||
import { BlueSpacing20 } from '../../BlueComponents';
|
||||
|
@ -9,10 +9,9 @@ import { SquareButton } from '../../components/SquareButton';
|
|||
|
||||
import loc from '../../loc';
|
||||
import presentAlert from '../../components/Alert';
|
||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
||||
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
import { isDesktop } from '../../blue_modules/environment';
|
||||
const bitcoin = require('bitcoinjs-lib');
|
||||
const fs = require('../../blue_modules/fs');
|
||||
|
||||
|
@ -21,6 +20,7 @@ const PsbtMultisigQRCode = () => {
|
|||
const { colors } = useTheme();
|
||||
const openScannerButton = useRef();
|
||||
const { psbtBase64, isShowOpenScanner } = useRoute().params;
|
||||
const { name } = useRoute();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const dynamicQRCode = useRef();
|
||||
const isFocused = useIsFocused();
|
||||
|
@ -61,20 +61,9 @@ const PsbtMultisigQRCode = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const openScanner = () => {
|
||||
if (isDesktop) {
|
||||
fs.showActionSheet({ anchor: findNodeHandle(openScannerButton.current) }).then(data => onBarScanned({ data }));
|
||||
} else {
|
||||
requestCameraAuthorization().then(() =>
|
||||
navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
const openScanner = async () => {
|
||||
const scanned = await scanQrHelper(navigate, name, true);
|
||||
onBarScanned({ data: scanned });
|
||||
};
|
||||
|
||||
const exportPSBT = () => {
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
Text,
|
||||
TouchableOpacity,
|
||||
View,
|
||||
findNodeHandle,
|
||||
} from 'react-native';
|
||||
import { Icon } from 'react-native-elements';
|
||||
import { useFocusEffect, useNavigation, useRoute } from '@react-navigation/native';
|
||||
|
@ -37,7 +36,6 @@ import { useTheme } from '../../components/themes';
|
|||
import Button from '../../components/Button';
|
||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||
import usePrivacy from '../../hooks/usePrivacy';
|
||||
import { isDesktop } from '../../blue_modules/environment';
|
||||
|
||||
const prompt = require('../../helpers/prompt');
|
||||
const A = require('../../blue_modules/analytics');
|
||||
|
@ -467,15 +465,11 @@ const WalletsAddMultisigStep2 = () => {
|
|||
};
|
||||
|
||||
const scanOrOpenFile = () => {
|
||||
if (isDesktop) {
|
||||
fs.showActionSheet({ anchor: findNodeHandle(openScannerButton.current) }).then(onBarScanned);
|
||||
} else {
|
||||
setIsProvideMnemonicsModalVisible(false);
|
||||
InteractionManager.runAfterInteractions(async () => {
|
||||
const scanned = await scanQrHelper(navigation.navigate, name, true);
|
||||
onBarScanned({ data: scanned });
|
||||
});
|
||||
}
|
||||
setIsProvideMnemonicsModalVisible(false);
|
||||
InteractionManager.runAfterInteractions(async () => {
|
||||
const scanned = await scanQrHelper(navigation.navigate, name, true);
|
||||
onBarScanned({ data: scanned });
|
||||
});
|
||||
};
|
||||
|
||||
const dashType = ({ index, lastIndex, isChecked, isFocus }) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue