BlueWallet/blue_modules/environment.js

21 lines
657 B
JavaScript
Raw Normal View History

import { Platform } from 'react-native';
2021-05-29 01:57:40 -04:00
import { getSystemName, isTablet, getDeviceType } from 'react-native-device-info';
const isMacCatalina = getSystemName() === 'Mac OS X';
const isDesktop = getDeviceType() === 'Desktop';
const isTorCapable = () => {
let capable = true;
if (Platform.OS === 'android' && Platform.Version < 26) {
capable = false;
} else if (isDesktop) {
capable = false;
}
return capable;
};
module.exports.isMacCatalina = isMacCatalina;
module.exports.isDesktop = isDesktop;
2021-06-16 02:13:13 -04:00
module.exports.isHandset = getDeviceType() === 'Handset';
module.exports.isTablet = isTablet;
module.exports.isTorCapable = isTorCapable();