diff --git a/packages/mobile/locales/en-US/walletFlow5.json b/packages/mobile/locales/en-US/walletFlow5.json index 9d91717be9c..9e8d9d3967c 100644 --- a/packages/mobile/locales/en-US/walletFlow5.json +++ b/packages/mobile/locales/en-US/walletFlow5.json @@ -23,9 +23,6 @@ "exchange": "Exchange", "viewAll": "View All", "thanksForVerifying": "Thanks for verifying", - "earnCeloRewards": "Earn Celo Rewards for verifying others", - "earnCeloGold": "Earn CELO by allowing the network to send verification texts from your phone", - "startEarning": "Start Earning", "learnMore": "Learn More", "goldIsWhereYouSave": "CELO is where you can save {{CeloDollars}} you have", "manageCeloDollars": "Manage {{CeloDollars}}", diff --git a/packages/mobile/locales/es-419/walletFlow5.json b/packages/mobile/locales/es-419/walletFlow5.json index 972a7686c0c..506f8890166 100755 --- a/packages/mobile/locales/es-419/walletFlow5.json +++ b/packages/mobile/locales/es-419/walletFlow5.json @@ -23,9 +23,6 @@ "exchange": "Cambio", "viewAll": "Ver Todo", "thanksForVerifying": "Gracias por completar la verificación", - "earnCeloRewards": "Gana Recompensas Celo por verificar a otros", - "earnCeloGold": "Gane CELO al permitir que la red envíe mensajes de verificación desde tu teléfono", - "startEarning": "Comenzar a ganar", "learnMore": "Saber más", "goldIsWhereYouSave": "Convierta sus {{CeloDollars}} en CELO", "manageCeloDollars": "Administrar {{CeloDollars}}", diff --git a/packages/mobile/src/account/actions.ts b/packages/mobile/src/account/actions.ts index ccbd35cf124..78822fbc28d 100644 --- a/packages/mobile/src/account/actions.ts +++ b/packages/mobile/src/account/actions.ts @@ -1,7 +1,6 @@ import { PincodeType } from 'src/account/reducer' import { PaymentRequest } from 'src/account/types' -// TODO(Rossy): Remove the _ACTION suffix from these actions for consistency with other other names export enum Actions { SET_NAME = 'ACCOUNT/SET_NAME', SET_PHONE_NUMBER = 'ACCOUNT/SET_PHONE_NUMBER', @@ -10,14 +9,13 @@ export enum Actions { SET_PINCODE = 'ACCOUNT/SET_PINCODE', SET_PINCODE_SUCCESS = 'ACCOUNT/SET_PINCODE_SUCCESS', SET_PINCODE_FAILURE = 'ACCOUNT/SET_PINCODE_FAILURE', - SET_ACCOUNT_CREATION_TIME_ACTION = 'ACCOUNT/SET_ACCOUNT_CREATION_TIME_ACTION', - SET_BACKUP_COMPLETED_ACTION = 'ACCOUNT/SET_BACKUP_COMPLETED_ACTION', - SET_BACKUP_DELAYED_ACTION = 'ACCOUNT/SET_BACKUP_DELAYED_ACTION', - SET_SOCIAL_BACKUP_COMPLETED_ACTION = 'ACCOUNT/SET_SOCIAL_BACKUP_COMPLETED_ACTION', + SET_ACCOUNT_CREATION_TIME = 'ACCOUNT/SET_ACCOUNT_CREATION_TIME', + SET_BACKUP_COMPLETED = 'ACCOUNT/SET_BACKUP_COMPLETED', + SET_BACKUP_DELAYED = 'ACCOUNT/SET_BACKUP_DELAYED', + SET_SOCIAL_BACKUP_COMPLETED = 'ACCOUNT/SET_SOCIAL_BACKUP_COMPLETED', TOGGLE_BACKUP_STATE = 'ACCOUNT/TOGGLE_BACKUP_STATE', UPDATE_INCOMING_PAYMENT_REQUESTS = 'ACCOUNT/UPDATE_INCOMING_PAYMENT_REQUESTS', UPDATE_OUTGOING_PAYMENT_REQUESTS = 'ACCOUNT/UPDATE_OUTGOING_PAYMENT_REQUESTS', - DISMISS_EARN_REWARDS = 'ACCOUNT/DISMISS_EARN_REWARDS', DISMISS_INVITE_FRIENDS = 'ACCOUNT/DISMISS_INVITE_FRIENDS', DISMISS_GET_VERIFIED = 'ACCOUNT/DISMISS_GET_VERIFIED', SET_USER_CONTACT_DETAILS = 'ACCOUNT/SET_USER_CONTACT_DETAILS', @@ -65,19 +63,19 @@ export interface SetPincodeFailureAction { } export interface SetAccountCreationAction { - type: Actions.SET_ACCOUNT_CREATION_TIME_ACTION + type: Actions.SET_ACCOUNT_CREATION_TIME } export interface SetBackupCompletedAction { - type: Actions.SET_BACKUP_COMPLETED_ACTION + type: Actions.SET_BACKUP_COMPLETED } export interface SetBackupDelayedAction { - type: Actions.SET_BACKUP_DELAYED_ACTION + type: Actions.SET_BACKUP_DELAYED } export interface SetSocialBackupCompletedAction { - type: Actions.SET_SOCIAL_BACKUP_COMPLETED_ACTION + type: Actions.SET_SOCIAL_BACKUP_COMPLETED } export interface ToggleBackupState { @@ -94,10 +92,6 @@ export interface UpdateOutgoingPaymentRequestsAction { paymentRequests: PaymentRequest[] } -export interface DismissEarnRewardsAction { - type: Actions.DISMISS_EARN_REWARDS -} - export interface DismissInviteFriendsAction { type: Actions.DISMISS_INVITE_FRIENDS } @@ -139,7 +133,6 @@ export type ActionTypes = | SetBackupDelayedAction | SetSocialBackupCompletedAction | ToggleBackupState - | DismissEarnRewardsAction | DismissInviteFriendsAction | DismissGetVerifiedAction | UpdateIncomingPaymentRequestsAction @@ -193,19 +186,19 @@ export const setPincodeFailure = (): SetPincodeFailureAction => ({ }) export const setAccountCreationTime = (): SetAccountCreationAction => ({ - type: Actions.SET_ACCOUNT_CREATION_TIME_ACTION, + type: Actions.SET_ACCOUNT_CREATION_TIME, }) export const setBackupCompleted = (): SetBackupCompletedAction => ({ - type: Actions.SET_BACKUP_COMPLETED_ACTION, + type: Actions.SET_BACKUP_COMPLETED, }) export const setBackupDelayed = (): SetBackupDelayedAction => ({ - type: Actions.SET_BACKUP_DELAYED_ACTION, + type: Actions.SET_BACKUP_DELAYED, }) export const setSocialBackupCompleted = (): SetSocialBackupCompletedAction => ({ - type: Actions.SET_SOCIAL_BACKUP_COMPLETED_ACTION, + type: Actions.SET_SOCIAL_BACKUP_COMPLETED, }) export const toggleBackupState = (): ToggleBackupState => ({ @@ -226,10 +219,6 @@ export const updateOutgoingPaymentRequests = ( paymentRequests, }) -export const dismissEarnRewards = (): DismissEarnRewardsAction => ({ - type: Actions.DISMISS_EARN_REWARDS, -}) - export const dismissInviteFriends = (): DismissInviteFriendsAction => ({ type: Actions.DISMISS_INVITE_FRIENDS, }) diff --git a/packages/mobile/src/account/reducer.ts b/packages/mobile/src/account/reducer.ts index b48be948039..fc4ea435717 100644 --- a/packages/mobile/src/account/reducer.ts +++ b/packages/mobile/src/account/reducer.ts @@ -23,7 +23,6 @@ export interface State { socialBackupCompleted: boolean incomingPaymentRequests: PaymentRequest[] outgoingPaymentRequests: PaymentRequest[] - dismissedEarnRewards: boolean dismissedInviteFriends: boolean dismissedGetVerified: boolean promptFornoIfNeeded: boolean @@ -61,7 +60,6 @@ export const initialState = { backupCompleted: false, backupDelayedTime: 0, socialBackupCompleted: false, - dismissedEarnRewards: false, dismissedInviteFriends: false, dismissedGetVerified: false, promptFornoIfNeeded: false, @@ -126,22 +124,22 @@ export const reducer = ( pincodeType: PincodeType.Unset, isSettingPin: false, } - case Actions.SET_ACCOUNT_CREATION_TIME_ACTION: + case Actions.SET_ACCOUNT_CREATION_TIME: return { ...state, accountCreationTime: getRemoteTime(), } - case Actions.SET_BACKUP_COMPLETED_ACTION: + case Actions.SET_BACKUP_COMPLETED: return { ...state, backupCompleted: true, } - case Actions.SET_BACKUP_DELAYED_ACTION: + case Actions.SET_BACKUP_DELAYED: return { ...state, backupDelayedTime: getRemoteTime(), } - case Actions.SET_SOCIAL_BACKUP_COMPLETED_ACTION: + case Actions.SET_SOCIAL_BACKUP_COMPLETED: return { ...state, socialBackupCompleted: true, @@ -163,11 +161,6 @@ export const reducer = ( ...state, outgoingPaymentRequests: action.paymentRequests, } - case Actions.DISMISS_EARN_REWARDS: - return { - ...state, - dismissedEarnRewards: true, - } case Actions.DISMISS_INVITE_FRIENDS: return { ...state, diff --git a/packages/mobile/src/config.ts b/packages/mobile/src/config.ts index cd28728f451..aff2c2440eb 100644 --- a/packages/mobile/src/config.ts +++ b/packages/mobile/src/config.ts @@ -53,10 +53,6 @@ export const DEFAULT_TESTNET = Config.DEFAULT_TESTNET || 'integration' export const DAILY_PAYMENT_LIMIT_CUSD = 500 export const SMS_RETRIEVER_APP_SIGNATURE = Config.SMS_RETRIEVER_APP_SIGNATURE -// LINKS -export const CELO_VERIFIER_DOWNLOAD_LINK = 'https://celo.org/rewards' -export const CELO_VERIFIER_START_MINING_LINK = 'celo://verifier/start' - // TODO: remove special case for mainnet export const DEFAULT_FORNO_URL = `https://${ DEFAULT_TESTNET === 'mainnet' ? 'rc1' : DEFAULT_TESTNET @@ -64,7 +60,6 @@ export const DEFAULT_FORNO_URL = `https://${ // FEATURE FLAGS export const FIREBASE_ENABLED = stringToBoolean(Config.FIREBASE_ENABLED || 'true') -export const PROMOTE_REWARDS_APP = false export const SHOW_TESTNET_BANNER = stringToBoolean(Config.SHOW_TESTNET_BANNER || 'false') export const SHOW_GET_INVITE_LINK = stringToBoolean(Config.SHOW_GET_INVITE_LINK || 'false') export const FORNO_ENABLED_INITIALLY = Config.FORNO_ENABLED_INITIALLY @@ -73,8 +68,6 @@ export const FORNO_ENABLED_INITIALLY = Config.FORNO_ENABLED_INITIALLY export const DEFAULT_SYNC_MODE: GethSyncMode = Config.DEFAULT_SYNC_MODE ? new BigNumber(Config.DEFAULT_SYNC_MODE).toNumber() : GethSyncMode.Lightest -// TODO Remove when feature is stable -export const USE_PHONE_NUMBER_PRIVACY = true // SECRETS export const SEGMENT_API_KEY = keyOrUndefined(secretsFile, Config.SECRETS_KEY, 'SEGMENT_API_KEY') diff --git a/packages/mobile/src/escrow/saga.ts b/packages/mobile/src/escrow/saga.ts index f3d44e95ba6..58910349b72 100644 --- a/packages/mobile/src/escrow/saga.ts +++ b/packages/mobile/src/escrow/saga.ts @@ -82,7 +82,6 @@ function* transferStableTokenToEscrow(action: EscrowTransferPaymentAction) { NUM_ATTESTATIONS_REQUIRED ) ValoraAnalytics.track(EscrowEvents.escrow_transfer_transfer_tx_sent) - // TODO check types yield call(sendAndMonitorTransaction, action.txId, transferTx, account) yield put(fetchSentEscrowPayments()) ValoraAnalytics.track(EscrowEvents.escrow_transfer_complete) diff --git a/packages/mobile/src/fees/CalculateFee.tsx b/packages/mobile/src/fees/CalculateFee.tsx index 5f22e531063..7e462195a5c 100644 --- a/packages/mobile/src/fees/CalculateFee.tsx +++ b/packages/mobile/src/fees/CalculateFee.tsx @@ -47,9 +47,6 @@ interface ReclaimEscrowProps extends CommonProps { paymentID: string } -// TODO: remove this once we use TS 3.5 -type Omit = Pick> - export type PropsWithoutChildren = | Omit | Omit diff --git a/packages/mobile/src/flags.ts b/packages/mobile/src/flags.ts index cf1b39b67a1..adf3899cef3 100644 --- a/packages/mobile/src/flags.ts +++ b/packages/mobile/src/flags.ts @@ -1,3 +1,4 @@ +// Feature flags export const features = { SHOW_SHOW_REWARDS_APP_LINK: false, USE_COMMENT_ENCRYPTION: true, @@ -7,6 +8,7 @@ export const features = { VERIFICATION_FORNO_RETRY: true, CUSD_MOONPAY_ENABLED: false, SHOW_CASH_OUT: false, + USE_PHONE_NUMBER_PRIVACY: true, } export const pausedFeatures = { diff --git a/packages/mobile/src/home/NotificationBox.test.tsx b/packages/mobile/src/home/NotificationBox.test.tsx index e2fde3ba8a7..e3ae9918ec6 100644 --- a/packages/mobile/src/home/NotificationBox.test.tsx +++ b/packages/mobile/src/home/NotificationBox.test.tsx @@ -14,7 +14,6 @@ const storeDataNotificationsEnabled = { goldToken: { educationCompleted: false }, account: { backupCompleted: false, - dismissedEarnRewards: false, dismissedInviteFriends: false, dismissedGetVerified: false, accountCreationTime: EXPIRED_BACKUP_TIME, @@ -26,7 +25,6 @@ const storeDataNotificationsDisabled = { goldToken: { educationCompleted: true }, account: { backupCompleted: true, - dismissedEarnRewards: true, dismissedInviteFriends: true, dismissedGetVerified: true, accountCreationTime: RECENT_BACKUP_TIME, @@ -69,7 +67,6 @@ describe('NotificationBox', () => { goldToken: { educationCompleted: false }, account: { ...storeDataNotificationsDisabled.account, - dismissedEarnRewards: false, dismissedInviteFriends: false, }, }) diff --git a/packages/mobile/src/home/NotificationBox.tsx b/packages/mobile/src/home/NotificationBox.tsx index 2c7f7a0f4a3..b135c499ef4 100644 --- a/packages/mobile/src/home/NotificationBox.tsx +++ b/packages/mobile/src/home/NotificationBox.tsx @@ -5,13 +5,12 @@ import * as React from 'react' import { WithTranslation } from 'react-i18next' import { NativeScrollEvent, ScrollView, StyleSheet, View } from 'react-native' import { connect } from 'react-redux' -import { dismissEarnRewards, dismissGetVerified, dismissInviteFriends } from 'src/account/actions' +import { dismissGetVerified, dismissInviteFriends } from 'src/account/actions' import { getIncomingPaymentRequests, getOutgoingPaymentRequests } from 'src/account/selectors' import { PaymentRequest } from 'src/account/types' import { HomeEvents } from 'src/analytics/Events' import { ScrollDirection } from 'src/analytics/types' import ValoraAnalytics from 'src/analytics/ValoraAnalytics' -import { PROMOTE_REWARDS_APP } from 'src/config' import { EscrowedPayment } from 'src/escrow/actions' import EscrowedPaymentReminderSummaryNotification from 'src/escrow/EscrowedPaymentReminderSummaryNotification' import { getReclaimableEscrowPayments } from 'src/escrow/reducer' @@ -26,7 +25,6 @@ import IncomingPaymentRequestSummaryNotification from 'src/paymentRequest/Incomi import OutgoingPaymentRequestSummaryNotification from 'src/paymentRequest/OutgoingPaymentRequestSummaryNotification' import { RootState } from 'src/redux/reducers' import { isBackupTooLate } from 'src/redux/selectors' -import { navigateToVerifierApp } from 'src/utils/linking' export enum NotificationBannerTypes { incoming_tx_request = 'incoming_tx_request', @@ -34,7 +32,6 @@ export enum NotificationBannerTypes { escrow_tx_summary = 'escrow_tx_summary', escrow_tx_pending = 'escrow_tx_pending', celo_asset_education = 'celo_asset_education', - celo_rewards_education = 'celo_rewards_education', invite_prompt = 'invite_prompt', verification_prompt = 'verification_prompt', backup_prompt = 'backup_prompt', @@ -53,7 +50,6 @@ interface StateProps { backupCompleted: boolean numberVerified: boolean goldEducationCompleted: boolean - dismissedEarnRewards: boolean dismissedInviteFriends: boolean dismissedGetVerified: boolean incomingPaymentRequests: PaymentRequest[] @@ -64,7 +60,6 @@ interface StateProps { } interface DispatchProps { - dismissEarnRewards: typeof dismissEarnRewards dismissInviteFriends: typeof dismissInviteFriends dismissGetVerified: typeof dismissGetVerified } @@ -77,7 +72,6 @@ const mapStateToProps = (state: RootState): StateProps => ({ goldEducationCompleted: state.goldToken.educationCompleted, incomingPaymentRequests: getIncomingPaymentRequests(state), outgoingPaymentRequests: getOutgoingPaymentRequests(state), - dismissedEarnRewards: state.account.dismissedEarnRewards, dismissedInviteFriends: state.account.dismissedInviteFriends, dismissedGetVerified: state.account.dismissedGetVerified, backupTooLate: isBackupTooLate(state), @@ -86,7 +80,6 @@ const mapStateToProps = (state: RootState): StateProps => ({ }) const mapDispatchToProps = { - dismissEarnRewards, dismissInviteFriends, dismissGetVerified, } @@ -140,7 +133,6 @@ export class NotificationBox extends React.Component { backupCompleted, numberVerified, goldEducationCompleted, - dismissedEarnRewards, dismissedInviteFriends, dismissedGetVerified, } = this.props @@ -196,37 +188,6 @@ export class NotificationBox extends React.Component { }) } - if (!dismissedEarnRewards && PROMOTE_REWARDS_APP) { - actions.push({ - title: t('walletFlow5:earnCeloRewards'), - text: t('walletFlow5:earnCeloGold'), - icon: null, - callToActions: [ - { - text: t('walletFlow5:startEarning'), - onPress: () => { - this.props.dismissEarnRewards() - ValoraAnalytics.track(HomeEvents.notification_select, { - notificationType: NotificationBannerTypes.celo_rewards_education, - selectedAction: NotificationBannerCTATypes.accept, - }) - navigateToVerifierApp() - }, - }, - { - text: t('maybeLater'), - onPress: () => { - this.props.dismissEarnRewards() - ValoraAnalytics.track(HomeEvents.notification_select, { - notificationType: NotificationBannerTypes.celo_rewards_education, - selectedAction: NotificationBannerCTATypes.decline, - }) - }, - }, - ], - }) - } - if (!goldEducationCompleted) { actions.push({ title: t('global:celoGold'), diff --git a/packages/mobile/src/home/WalletHome.test.tsx b/packages/mobile/src/home/WalletHome.test.tsx index 854ae7c467a..65d05bf8691 100644 --- a/packages/mobile/src/home/WalletHome.test.tsx +++ b/packages/mobile/src/home/WalletHome.test.tsx @@ -10,7 +10,6 @@ const storeData = { goldToken: { educationCompleted: true }, account: { backupCompleted: true, - dismissedEarnRewards: true, dismissedInviteFriends: true, accountCreationTime: new Date().getTime() - TWO_DAYS_MS, paymentRequests: [], diff --git a/packages/mobile/src/home/selectors.ts b/packages/mobile/src/home/selectors.ts index e17e38e21a1..13b54930efa 100644 --- a/packages/mobile/src/home/selectors.ts +++ b/packages/mobile/src/home/selectors.ts @@ -1,6 +1,5 @@ import { createSelector } from 'reselect' import { getIncomingPaymentRequests, getOutgoingPaymentRequests } from 'src/account/selectors' -import { PROMOTE_REWARDS_APP } from 'src/config' import { getReclaimableEscrowPayments } from 'src/escrow/reducer' import { RootState } from 'src/redux/reducers' import { isBackupTooLate } from 'src/redux/selectors' @@ -28,7 +27,6 @@ export const callToActNotificationSelector = (state: RootState) => { return ( !state.account.backupCompleted || !state.goldToken.educationCompleted || - (!state.account.dismissedEarnRewards && PROMOTE_REWARDS_APP) || !state.account.dismissedInviteFriends || (!state.app.numberVerified && !state.account.dismissedGetVerified) ) diff --git a/packages/mobile/src/identity/contactMapping.ts b/packages/mobile/src/identity/contactMapping.ts index bedc9bbaf40..6a0eadc3183 100644 --- a/packages/mobile/src/identity/contactMapping.ts +++ b/packages/mobile/src/identity/contactMapping.ts @@ -14,7 +14,7 @@ import { showErrorOrFallback } from 'src/alert/actions' import { IdentityEvents } from 'src/analytics/Events' import ValoraAnalytics from 'src/analytics/ValoraAnalytics' import { ErrorMessages } from 'src/app/ErrorMessages' -import { USE_PHONE_NUMBER_PRIVACY } from 'src/config' +import { features } from 'src/flags' import { Actions, endFetchingAddresses, @@ -219,7 +219,7 @@ export function* fetchAddressesAndValidateSaga({ function* getAddresses(e164Number: string) { let phoneHash: string - if (USE_PHONE_NUMBER_PRIVACY) { + if (features.USE_PHONE_NUMBER_PRIVACY) { const phoneHashDetails: PhoneNumberHashDetails = yield call(fetchPhoneHashPrivate, e164Number) phoneHash = phoneHashDetails.phoneHash } else { diff --git a/packages/mobile/src/identity/verification.ts b/packages/mobile/src/identity/verification.ts index a4c6840dd43..81b52bfa272 100644 --- a/packages/mobile/src/identity/verification.ts +++ b/packages/mobile/src/identity/verification.ts @@ -20,7 +20,8 @@ import { VerificationEvents } from 'src/analytics/Events' import ValoraAnalytics from 'src/analytics/ValoraAnalytics' import { setNumberVerified } from 'src/app/actions' import { ErrorMessages } from 'src/app/ErrorMessages' -import { DEFAULT_TESTNET, SMS_RETRIEVER_APP_SIGNATURE, USE_PHONE_NUMBER_PRIVACY } from 'src/config' +import { DEFAULT_TESTNET, SMS_RETRIEVER_APP_SIGNATURE } from 'src/config' +import { features } from 'src/flags' import { refreshAllBalances } from 'src/home/actions' import { Actions, @@ -99,10 +100,9 @@ export function* doVerificationFlow() { yield put(setVerificationStatus(VerificationStatus.Prepping)) const account: string = yield call(getConnectedUnlockedAccount) const e164Number: string = yield select(e164NumberSelector) - // TODO cleanup when feature flag is removed let phoneHash: string let phoneHashDetails: PhoneNumberHashDetails - if (USE_PHONE_NUMBER_PRIVACY) { + if (features.USE_PHONE_NUMBER_PRIVACY) { phoneHashDetails = yield call(fetchPhoneHashPrivate, e164Number) phoneHash = phoneHashDetails.phoneHash } else { @@ -530,12 +530,12 @@ function* tryRevealPhoneNumber( Logger.debug(TAG + '@tryRevealPhoneNumber', `Revealing an attestation for issuer: ${issuer}`) try { - const smsRetrieverAppSig = - Platform.OS === 'android' && USE_PHONE_NUMBER_PRIVACY - ? SMS_RETRIEVER_APP_SIGNATURE - : undefined + // Only include retriever app sig for android, iOS doesn't support auto-read + const smsRetrieverAppSig = Platform.OS === 'android' ? SMS_RETRIEVER_APP_SIGNATURE : undefined - const useProxy = DEFAULT_TESTNET === 'mainnet' // Proxy required for any network where attestation service domains are not static + // Proxy required for any network where attestation service domains are not static + // This works around TLS issues + const useProxy = DEFAULT_TESTNET === 'mainnet' const revealRequestBody: AttesationServiceRevealRequest = { account, diff --git a/packages/mobile/src/invite/saga.ts b/packages/mobile/src/invite/saga.ts index 8d8dd64df18..5a59fabca2e 100644 --- a/packages/mobile/src/invite/saga.ts +++ b/packages/mobile/src/invite/saga.ts @@ -13,10 +13,11 @@ import { showError, showMessage } from 'src/alert/actions' import { InviteEvents, OnboardingEvents } from 'src/analytics/Events' import ValoraAnalytics from 'src/analytics/ValoraAnalytics' import { ErrorMessages } from 'src/app/ErrorMessages' -import { ALERT_BANNER_DURATION, USE_PHONE_NUMBER_PRIVACY } from 'src/config' +import { ALERT_BANNER_DURATION } from 'src/config' import { transferEscrowedPayment } from 'src/escrow/actions' import { calculateFee } from 'src/fees/saga' import { generateShortInviteLink } from 'src/firebase/dynamicLinks' +import { features } from 'src/flags' import { CURRENCY_ENUM, UNLOCK_DURATION } from 'src/geth/consts' import { refreshAllBalances } from 'src/home/actions' import i18n from 'src/i18n' @@ -220,7 +221,7 @@ function* initiateEscrowTransfer(temporaryAddress: string, e164Number: string, a const escrowTxId = generateStandbyTransactionId(temporaryAddress) try { let phoneHash: string - if (USE_PHONE_NUMBER_PRIVACY) { + if (features.USE_PHONE_NUMBER_PRIVACY) { const phoneHashDetails = yield call(fetchPhoneHashPrivate, e164Number) phoneHash = phoneHashDetails.phoneHash } else { diff --git a/packages/mobile/src/missingGlobals.ts b/packages/mobile/src/missingGlobals.ts index feccdb07ea8..103ce261169 100644 --- a/packages/mobile/src/missingGlobals.ts +++ b/packages/mobile/src/missingGlobals.ts @@ -1,4 +1,3 @@ -// TODO remove, move to celo/utils export interface Global { btoa: any URL: any diff --git a/packages/mobile/src/utils/Logger.ts b/packages/mobile/src/utils/Logger.ts index e32c827188b..7a710e54a8d 100644 --- a/packages/mobile/src/utils/Logger.ts +++ b/packages/mobile/src/utils/Logger.ts @@ -16,8 +16,8 @@ class Logger extends ReactNativeLogger { * @override */ getLogs = async (): Promise => { - // TODO(Rossy) Does this technique of passing logs back as a string - // fail when the logs get o big? + // TODO(Rossy) This approach of passing logs back as a string + // fails when the logs get too big try { const rnLogsSrc = this.getReactNativeLogsFilePath() const gethLogsSrc = this.getGethLogFilePath() diff --git a/packages/mobile/src/utils/linking.ts b/packages/mobile/src/utils/linking.ts index 077647dadc1..16e8a0c2e49 100644 --- a/packages/mobile/src/utils/linking.ts +++ b/packages/mobile/src/utils/linking.ts @@ -1,14 +1,9 @@ import { Linking } from 'react-native' import DeviceInfo from 'react-native-device-info' -import { CELO_VERIFIER_DOWNLOAD_LINK, CELO_VERIFIER_START_MINING_LINK } from 'src/config' import Logger from 'src/utils/Logger' const TAG = 'utils/linking' -export function navigateToVerifierApp() { - navigateToURI(CELO_VERIFIER_START_MINING_LINK, CELO_VERIFIER_DOWNLOAD_LINK) -} - export function navigateToWalletPlayStorePage() { navigateToURI(`market://details?id=${DeviceInfo.getBundleId()}`) } diff --git a/packages/mobile/test/schemas.ts b/packages/mobile/test/schemas.ts index edfac11d419..476db494ee5 100644 --- a/packages/mobile/test/schemas.ts +++ b/packages/mobile/test/schemas.ts @@ -110,7 +110,6 @@ export const vNeg1Schema = { incomingPaymentRequests: [], outgoingPaymentRequests: [], dismissedGetVerified: false, - dismissedEarnRewards: false, dismissedInviteFriends: false, promptFornoIfNeeded: false, acceptedTerms: false,