Skip to content
Permalink
Browse files

adds device-info dependency, version and network in settings

  • Loading branch information...
v-almonacid committed Aug 13, 2019
1 parent cf85d72 commit beca785eac56722f019eac8526b00a1287a51882
@@ -182,6 +182,7 @@ android {
}

dependencies {
implementation project(':react-native-device-info')
implementation project(':@react-native-community_async-storage')
implementation project(':react-native-cardano')
implementation project(':react-native-sentry')
@@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
import io.sentry.RNSentryPackage;
import com.igorbelyayev.rnlocalresource.RNLocalResourcePackage;
@@ -35,6 +36,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNDeviceInfo(),
new AsyncStoragePackage(),
new RNSentryPackage(),
new RNLocalResourcePackage(),
@@ -1,4 +1,6 @@
rootProject.name = 'emurgo'
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':@react-native-community_async-storage'
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/async-storage/android')
include ':react-native-sentry'
@@ -5,6 +5,8 @@ target 'emurgo' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

target 'emurgoTests' do
inherit! :search_paths
# Pods for testing
@@ -57,6 +57,7 @@
"react-native-cardano": "https://github.com/Emurgo/react-native-cardano.git",
"react-native-config": "^0.11.7",
"react-native-crypto": "^2.1.2",
"react-native-device-info": "^2.3.2",
"react-native-easy-markdown": "https://github.com/Emurgo/react-native-easy-markdown.git",
"react-native-fs": "^2.11.18",
"react-native-keychain": "3.0.0",
@@ -12,6 +12,7 @@ import {withNavigationTitle} from '../../utils/renderUtils'
import {errorMessages} from '../../i18n/global-messages'
import {setAppSettingField, setSystemAuth, showErrorDialog} from '../../actions'
import {APP_SETTINGS_KEYS} from '../../helpers/appSettings'
import env from '../../env'
import {
isBiometricEncryptionHardwareSupported,
canBiometricEncryptionBeEnabled,
@@ -35,6 +36,8 @@ import {StatusBar} from '../UiKit'
import type {ComponentType} from 'react'
import type {Navigation} from '../../types/navigation'

import DeviceInfo from 'react-native-device-info';

const messages = defineMessages({
title: {
id: 'components.settings.applicationsettingsscreen.title',
@@ -151,6 +154,12 @@ const updateDeviceSettings = async ({setAppSettingField}) => {
)
}

const versionLabel = "Current version: " + DeviceInfo.getVersion()

const network = env.getBoolean('USE_TESTNET', true) ? 'Testnet' : 'Mainnet'

const networkLabel = "Network: " + network

const ApplicationSettingsScreen = ({
onToggleBiometricsAuthIn,
intl,
@@ -208,6 +217,16 @@ const ApplicationSettingsScreen = ({
navigateTo={SETTINGS_ROUTES.SUPPORT}
/>
</SettingsSection>

<SettingsSection title="About">
<SettingsItem
label={versionLabel}
/>

<SettingsItem
label={networkLabel}
/>
</SettingsSection>
</ScrollView>
)

@@ -7274,6 +7274,11 @@ react-native-crypto@^2.1.2:
pbkdf2 "3.0.8"
public-encrypt "^4.0.0"

react-native-device-info@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/react-native-device-info/-/react-native-device-info-2.3.2.tgz#db2b8f135aaf2515583e367ab791dcc7d2f0d14c"
integrity sha512-ccpPuUbwhw5uYdVwN1UJp6ykMZz6U/u82HNM3oJ7O6MP8RIMlMDkHbqR4O0sDtUSuRMGiqqRzFtmOLFYeQ0ODw==

react-native-dismiss-keyboard@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz#32886242b3f2317e121f3aeb9b0a585e2b879b49"

0 comments on commit beca785

Please sign in to comment.
You can’t perform that action at this time.