mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
ADD: macOS catalina support for scanning in is it my address
This commit is contained in:
parent
f4cdccf948
commit
80f47d3c4a
2 changed files with 19 additions and 8 deletions
5
blue_modules/environment.js
Normal file
5
blue_modules/environment.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { getSystemName } from 'react-native-device-info';
|
||||
|
||||
const isMacCatalina = getSystemName() === 'Mac OS X';
|
||||
|
||||
module.exports.isMacCatalina = isMacCatalina;
|
|
@ -13,6 +13,8 @@ import {
|
|||
} from '../../BlueComponents';
|
||||
import { BlueStorageContext } from '../../blue_modules/storage-context';
|
||||
import { useNavigation, useRoute, useTheme } from '@react-navigation/native';
|
||||
import { isMacCatalina } from '../../blue_modules/environment';
|
||||
const fs = require('../../blue_modules/fs');
|
||||
|
||||
const IsItMyAddress = () => {
|
||||
/** @type {AbstractWallet[]} */
|
||||
|
@ -61,14 +63,18 @@ const IsItMyAddress = () => {
|
|||
};
|
||||
|
||||
const importScan = () => {
|
||||
navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
launchedBy: name,
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
});
|
||||
if (isMacCatalina) {
|
||||
fs.showActionSheet().then(onBarScanned);
|
||||
} else {
|
||||
navigate('ScanQRCodeRoot', {
|
||||
screen: 'ScanQRCode',
|
||||
params: {
|
||||
launchedBy: name,
|
||||
onBarScanned,
|
||||
showFileImportButton: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const clearAddressInput = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue