mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +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 Button from '../../components/Button';
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import { presentWalletExportReminder } from '../../helpers/presentWalletExportReminder';
|
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 loc, { formatBalance, formatBalancePlain, formatBalanceWithoutSuffix } from '../../loc';
|
||||||
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
import { BitcoinUnit, Chain } from '../../models/bitcoinUnits';
|
||||||
import * as NavigationService from '../../NavigationService';
|
import * as NavigationService from '../../NavigationService';
|
||||||
|
@ -325,16 +325,8 @@ const LNDCreateInvoice = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateToScanQRCode = () => {
|
const navigateToScanQRCode = () => {
|
||||||
requestCameraAuthorization().then(() => {
|
scanQrHelper(name, true, processLnurl);
|
||||||
NavigationService.navigate('ScanQRCodeRoot', {
|
Keyboard.dismiss();
|
||||||
screen: 'ScanQRCode',
|
|
||||||
params: {
|
|
||||||
onBarScanned: processLnurl,
|
|
||||||
launchedBy: name,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
Keyboard.dismiss();
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderScanClickable = () => {
|
const renderScanClickable = () => {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { BlueButtonLink, BlueCard, BlueSpacing10, BlueSpacing20, BlueText } from
|
||||||
import Button from '../../components/Button';
|
import Button from '../../components/Button';
|
||||||
import SafeArea from '../../components/SafeArea';
|
import SafeArea from '../../components/SafeArea';
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { useStorage } from '../../hooks/context/useStorage';
|
import { useStorage } from '../../hooks/context/useStorage';
|
||||||
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
import { useExtendedNavigation } from '../../hooks/useExtendedNavigation';
|
||||||
|
@ -57,16 +57,7 @@ const IsItMyAddress = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const importScan = () => {
|
const importScan = () => {
|
||||||
requestCameraAuthorization().then(() => {
|
scanQrHelper(name, true, onBarScanned);
|
||||||
navigate('ScanQRCodeRoot', {
|
|
||||||
screen: 'ScanQRCode',
|
|
||||||
params: {
|
|
||||||
launchedBy: name,
|
|
||||||
onBarScanned,
|
|
||||||
showFileImportButton: true,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const clearAddressInput = () => {
|
const clearAddressInput = () => {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { DynamicQRCode } from '../../components/DynamicQRCode';
|
||||||
import SaveFileButton from '../../components/SaveFileButton';
|
import SaveFileButton from '../../components/SaveFileButton';
|
||||||
import { SecondButton } from '../../components/SecondButton';
|
import { SecondButton } from '../../components/SecondButton';
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import { requestCameraAuthorization } from '../../helpers/scan-qr';
|
import { scanQrHelper } from '../../helpers/scan-qr';
|
||||||
import { useBiometrics, unlockWithBiometrics } from '../../hooks/useBiometrics';
|
import { useBiometrics, unlockWithBiometrics } from '../../hooks/useBiometrics';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
import { useStorage } from '../../hooks/context/useStorage';
|
import { useStorage } from '../../hooks/context/useStorage';
|
||||||
|
@ -215,16 +215,7 @@ const PsbtWithHardwareWallet = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const openScanner = () => {
|
const openScanner = () => {
|
||||||
requestCameraAuthorization().then(() => {
|
scanQrHelper(route.name, false, onBarScanned);
|
||||||
navigation.navigate('ScanQRCodeRoot', {
|
|
||||||
screen: 'ScanQRCode',
|
|
||||||
params: {
|
|
||||||
launchedBy: route.name,
|
|
||||||
showFileImportButton: false,
|
|
||||||
onBarScanned,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (txHex) return _renderBroadcastHex();
|
if (txHex) return _renderBroadcastHex();
|
||||||
|
|
Loading…
Add table
Reference in a new issue