mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 15:04:50 +01:00
FIX: use scanqrhelper
This commit is contained in:
parent
bdadde2a5f
commit
3fa8e430a4
3 changed files with 7 additions and 33 deletions
|
@ -25,7 +25,7 @@ import AmountInput from '../../components/AmountInput';
|
|||
import Button from '../../components/Button';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import { presentWalletExportReminder } from '../../helpers/presentWalletExportReminder';
|
||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
||||
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||
import loc, { formatBalance, formatBalancePlain, formatBalanceWithoutSuffix } from '../../loc';
|
||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||
import * as NavigationService from '../../NavigationService';
|
||||
|
@ -325,16 +325,8 @@ const LNDCreateInvoice = () => {
|
|||
};
|
||||
|
||||
const navigateToScanQRCode = () => {
|
||||
requestCameraAuthorization().then(() => {
|
||||
NavigationService.navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
onBarScanned: processLnurl,
|
||||
launchedBy: name,
|
||||
},
|
||||
});
|
||||
Keyboard.dismiss();
|
||||
});
|
||||
scanQrHelper(name, true, processLnurl);
|
||||
Keyboard.dismiss();
|
||||
};
|
||||
|
||||
const renderScanClickable = () => {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { BlueButtonLink, BlueCard, BlueSpacing10, BlueSpacing20, BlueText } from
|
|||
import Button from '../../components/Button';
|
||||
import SafeArea from '../../components/SafeArea';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
||||
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||
import loc from '../../loc';
|
||||
import { useStorage } from '../../hooks/context/useStorage';
|
||||
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
||||
|
@ -57,16 +57,7 @@ const IsItMyAddress = () => {
|
|||
};
|
||||
|
||||
const importScan = () => {
|
||||
requestCameraAuthorization().then(() => {
|
||||
navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
launchedBy: name,
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
scanQrHelper(name, true, onBarScanned);
|
||||
};
|
||||
|
||||
const clearAddressInput = () => {
|
||||
|
|
|
@ -15,7 +15,7 @@ import { DynamicQRCode } from '../../components/DynamicQRCode';
|
|||
import SaveFileButton from '../../components/SaveFileButton';
|
||||
import { SecondButton } from '../../components/SecondButton';
|
||||
import { useTheme } from '../../components/themes';
|
||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
||||
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||
import { useBiometrics, unlockWithBiometrics } from '../../hooks/useBiometrics';
|
||||
import loc from '../../loc';
|
||||
import { useStorage } from '../../hooks/context/useStorage';
|
||||
|
@ -215,16 +215,7 @@ const PsbtWithHardwareWallet = () => {
|
|||
};
|
||||
|
||||
const openScanner = () => {
|
||||
requestCameraAuthorization().then(() => {
|
||||
navigation.navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
launchedBy: route.name,
|
||||
showFileImportButton: false,
|
||||
onBarScanned,
|
||||
},
|
||||
});
|
||||
});
|
||||
scanQrHelper(route.name, false, onBarScanned);
|
||||
};
|
||||
|
||||
if (txHex) return _renderBroadcastHex();
|
||||
|
|
Loading…
Add table
Reference in a new issue