mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: Camera would not open in Electrum settings
This commit is contained in:
parent
8256c8be30
commit
b0db2e78d5
1 changed files with 5 additions and 12 deletions
|
@ -31,11 +31,12 @@ import { BlueCurrentTheme } from '../../components/themes';
|
||||||
import { reloadAllTimelines } from '../../components/WidgetCommunication';
|
import { reloadAllTimelines } from '../../components/WidgetCommunication';
|
||||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||||
import presentAlert from '../../components/Alert';
|
import presentAlert from '../../components/Alert';
|
||||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||||
import Button from '../../components/Button';
|
import Button from '../../components/Button';
|
||||||
import ListItem from '../../components/ListItem';
|
import ListItem from '../../components/ListItem';
|
||||||
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
import triggerHapticFeedback, { HapticFeedbackTypes } from '../../blue_modules/hapticFeedback';
|
||||||
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
|
import * as BlueElectrum from '../../blue_modules/BlueElectrum';
|
||||||
|
import { navigationRef } from '../../NavigationService';
|
||||||
|
|
||||||
export default class ElectrumSettings extends Component {
|
export default class ElectrumSettings extends Component {
|
||||||
static contextType = BlueStorageContext;
|
static contextType = BlueStorageContext;
|
||||||
|
@ -225,17 +226,9 @@ export default class ElectrumSettings extends Component {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
importScan = () => {
|
importScan = async () => {
|
||||||
requestCameraAuthorization().then(() =>
|
const scanned = await scanQrHelper(navigationRef.navigate, 'ElectrumSettings', true);
|
||||||
this.props.navigation.navigate('ScanQRCodeRoot', {
|
this.onBarScanned(scanned);
|
||||||
screen: 'ScanQRCode',
|
|
||||||
params: {
|
|
||||||
launchedBy: this.props.route.name,
|
|
||||||
onBarScanned: this.onBarScanned,
|
|
||||||
showFileImportButton: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useSSLPortToggled = value => {
|
useSSLPortToggled = value => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue