Merge pull request #6581 from BlueWallet/elec

FIX: Camera would not open in Electrum settings
This commit is contained in:
GLaDOS 2024-05-18 09:28:55 +00:00 committed by GitHub
commit 596a9cd33d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 => {