mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-15 11:59:21 +01:00
Update ScanQRCode.tsx
This commit is contained in:
parent
1c8aa08de8
commit
040f91028a
1 changed files with 2 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { RouteProp, StackActions, useFocusEffect, useIsFocused, useRoute } from '@react-navigation/native';
|
import { RouteProp, StackActions, useIsFocused, useRoute } from '@react-navigation/native';
|
||||||
import * as bitcoin from 'bitcoinjs-lib';
|
import * as bitcoin from 'bitcoinjs-lib';
|
||||||
import createHash from 'create-hash';
|
import createHash from 'create-hash';
|
||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { Platform, StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
|
import { Platform, StyleSheet, TextInput, TouchableOpacity, View } from 'react-native';
|
||||||
import Base43 from '../../blue_modules/base43';
|
import Base43 from '../../blue_modules/base43';
|
||||||
import * as fs from '../../blue_modules/fs';
|
import * as fs from '../../blue_modules/fs';
|
||||||
|
@ -12,7 +12,6 @@ import Button from '../../components/Button';
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import { isCameraAuthorizationStatusGranted } from '../../helpers/scan-qr';
|
import { isCameraAuthorizationStatusGranted } from '../../helpers/scan-qr';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { useSettings } from '../../hooks/context/useSettings';
|
|
||||||
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
||||||
import CameraScreen from '../../components/CameraScreen';
|
import CameraScreen from '../../components/CameraScreen';
|
||||||
import SafeArea from '../../components/SafeArea';
|
import SafeArea from '../../components/SafeArea';
|
||||||
|
@ -57,7 +56,6 @@ const styles = StyleSheet.create({
|
||||||
|
|
||||||
const ScanQRCode = () => {
|
const ScanQRCode = () => {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const { setIsDrawerShouldHide } = useSettings();
|
|
||||||
const navigation = useExtendedNavigation();
|
const navigation = useExtendedNavigation();
|
||||||
const route = useRoute<RouteProps>();
|
const route = useRoute<RouteProps>();
|
||||||
const navigationState = navigation.getState();
|
const navigationState = navigation.getState();
|
||||||
|
@ -96,16 +94,6 @@ const ScanQRCode = () => {
|
||||||
return createHash('sha256').update(s).digest().toString('hex');
|
return createHash('sha256').update(s).digest().toString('hex');
|
||||||
};
|
};
|
||||||
|
|
||||||
useFocusEffect(
|
|
||||||
useCallback(() => {
|
|
||||||
setIsDrawerShouldHide(true);
|
|
||||||
|
|
||||||
return () => {
|
|
||||||
setIsDrawerShouldHide(false);
|
|
||||||
};
|
|
||||||
}, [setIsDrawerShouldHide]),
|
|
||||||
);
|
|
||||||
|
|
||||||
const _onReadUniformResourceV2 = (part: string) => {
|
const _onReadUniformResourceV2 = (part: string) => {
|
||||||
if (!decoder) decoder = new BlueURDecoder();
|
if (!decoder) decoder = new BlueURDecoder();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue