FIX: Camera would not open in Electrum settings

This commit is contained in:
Marcos Rodriguez Velez 2024-05-18 00:32:47 -04:00
parent 8256c8be30
commit b0db2e78d5
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7

View file

@ -31,11 +31,12 @@ import { BlueCurrentTheme } from '../../components/themes';
import { reloadAllTimelines } from '../../components/WidgetCommunication';
import { BlueStorageContext } from '../../blue_modules/storage-context';
import presentAlert from '../../components/Alert';
import { requestCameraAuthorization } from '../../helpers/scan-qr';
import { scanQrHelper } from '../../helpers/scan-qr';
import Button from '../../components/Button';
import ListItem from '../../components/ListItem';
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
import { navigationRef } from '../../NavigationService';
export default class ElectrumSettings extends Component {
static contextType = BlueStorageContext;
@ -225,17 +226,9 @@ export default class ElectrumSettings extends Component {
});
};
importScan = () => {
requestCameraAuthorization().then(() =>
this.props.navigation.navigate('ScanQRCodeRoot', {
screen: 'ScanQRCode',
params: {
launchedBy: this.props.route.name,
onBarScanned: this.onBarScanned,
showFileImportButton: true,
},
}),
);
importScan = async () => {
const scanned = await scanQrHelper(navigationRef.navigate, 'ElectrumSettings', true);
this.onBarScanned(scanned);
};
useSSLPortToggled = value => {