diff --git a/src/utils.js b/src/utils.js index 8b561795b..86436201c 100644 --- a/src/utils.js +++ b/src/utils.js @@ -13,7 +13,7 @@ import { Linking, Platform, Text } from 'react-native'; import { getStatusBarHeight } from 'react-native-status-bar-height'; import { isEmpty } from 'lodash'; import baseStyle from './styles/init'; -import { KEYCHAIN_USER } from './constants'; +import { KEYCHAIN_USER, NETWORK_MAINNET } from './constants'; import { STORE } from './store'; import { TxHistory } from './models'; import { COLORS, STYLE } from './styles/themes'; @@ -387,6 +387,11 @@ export const isPushNotificationAvailableForUser = (state) => ( state.pushNotification.available // On iOS a simulator can't register a device token on APNS && state.pushNotification.deviceRegistered + // TODO: We should drop this condition when we add support other networks + // XXX: We don't have support in this app to generate device tokens + // to the FCM testnet app. Currently we embbed only the mainnet + // configuration file during the build. + && state.networkSettings.network === NETWORK_MAINNET // If Wallet Service URLs are empty it makes impossible to use the // Wallet Service API to register the device's token. && !isEmpty(state.networkSettings.walletServiceUrl)