diff --git a/app/components/UI/OptinMetrics/index.js b/app/components/UI/OptinMetrics/index.js
index a4c3cb0daf7..6461ce64200 100644
--- a/app/components/UI/OptinMetrics/index.js
+++ b/app/components/UI/OptinMetrics/index.js
@@ -25,6 +25,7 @@ import Analytics from '../../../core/Analytics';
import { ANALYTICS_EVENT_OPTS } from '../../../util/analytics';
import { clearOnboardingEvents } from '../../../actions/onboarding';
import { ONBOARDING_WIZARD, METRICS_OPT_IN, DENIED, AGREED } from '../../../constants/storage';
+import AppConstants from '../../../core/AppConstants';
const styles = StyleSheet.create({
root: {
@@ -91,7 +92,6 @@ const styles = StyleSheet.create({
}
});
-const PRIVACY_POLICY = 'https://metamask.io/privacy.html';
/**
* View that is displayed in the flow to agree to metrics
*/
@@ -212,7 +212,7 @@ class OptinMetrics extends PureComponent {
*/
onPressPolicy = () => {
this.props.navigation.navigate('Webview', {
- url: PRIVACY_POLICY,
+ url: AppConstants.URLS.PRIVACY_POLICY,
title: strings('privacy_policy.title')
});
};
diff --git a/app/components/UI/Swaps/QuotesView.js b/app/components/UI/Swaps/QuotesView.js
index fd9e76a74f3..124c82db1b8 100644
--- a/app/components/UI/Swaps/QuotesView.js
+++ b/app/components/UI/Swaps/QuotesView.js
@@ -807,7 +807,7 @@ function SwapsQuotesView({
const handleTermsPress = useCallback(
() =>
navigation.navigate('Webview', {
- url: 'https://metamask.io/terms.html'
+ url: AppConstants.URLS.TERMS_AND_CONDITIONS
}),
[navigation]
);
diff --git a/app/components/Views/Onboarding/index.js b/app/components/Views/Onboarding/index.js
index c5300eaaaab..d0b8964a164 100644
--- a/app/components/Views/Onboarding/index.js
+++ b/app/components/Views/Onboarding/index.js
@@ -79,7 +79,7 @@ const styles = StyleSheet.create({
height: Device.isIos() ? 90 : 45
},
termsAndConditions: {
- paddingVertical: 30
+ paddingBottom: 30
},
title: {
fontSize: 24,
@@ -622,15 +622,17 @@ class Onboarding extends PureComponent {
}
handleSimpleNotification = () => {
- const title = strings('onboarding.success');
- const description = strings('onboarding.your_wallet');
-
+ if (!this.props.navigation.getParam('delete', false)) return;
return (
-
+
);
diff --git a/app/components/Views/Settings/AppInformation/index.js b/app/components/Views/Settings/AppInformation/index.js
index 41fb028e41b..1a81896c065 100644
--- a/app/components/Views/Settings/AppInformation/index.js
+++ b/app/components/Views/Settings/AppInformation/index.js
@@ -14,6 +14,7 @@ import { colors, fontStyles } from '../../../../styles/common';
import PropTypes from 'prop-types';
import { strings } from '../../../../../locales/i18n';
import { getNavigationOptionsTitle } from '../../../UI/Navbar';
+import AppConstants from '../../../../core/AppConstants';
const styles = StyleSheet.create({
wrapper: {
@@ -103,12 +104,12 @@ export default class AppInformation extends PureComponent {
};
onPrivacyPolicy = () => {
- const url = 'https://metamask.io/privacy.html';
+ const url = AppConstants.URLS.PRIVACY_POLICY;
this.goTo(url, strings('app_information.privacy_policy'));
};
onTermsOfUse = () => {
- const url = 'https://metamask.io/terms.html';
+ const url = AppConstants.URLS.TERMS_AND_CONDITIONS;
this.goTo(url, strings('app_information.terms_of_use'));
};
diff --git a/app/components/Views/TermsAndConditions/index.js b/app/components/Views/TermsAndConditions/index.js
index eff8b4d7cbf..0d3fee372f6 100644
--- a/app/components/Views/TermsAndConditions/index.js
+++ b/app/components/Views/TermsAndConditions/index.js
@@ -1,16 +1,11 @@
import React, { PureComponent } from 'react';
-import { Text, View, StyleSheet, TouchableOpacity } from 'react-native';
+import { Text, StyleSheet, TouchableOpacity } from 'react-native';
import PropTypes from 'prop-types';
import { colors, fontStyles } from '../../../styles/common';
import { strings } from '../../../../locales/i18n';
-
-const TERMS_AND_CONDITIONS = 'https://metamask.io/terms.html';
+import AppConstants from '../../../core/AppConstants';
const styles = StyleSheet.create({
- mainWrapper: {
- backgroundColor: colors.transparent,
- alignSelf: 'center'
- },
text: {
...fontStyles.normal,
color: colors.grey500,
@@ -36,21 +31,19 @@ export default class TermsAndConditions extends PureComponent {
press = () => {
const { navigation } = this.props;
navigation.navigate('Webview', {
- url: TERMS_AND_CONDITIONS,
+ url: AppConstants.URLS.TERMS_AND_CONDITIONS,
title: strings('terms_and_conditions.title')
});
};
render() {
return (
-
-
-
- {strings('terms_and_conditions.description')}
- {strings('terms_and_conditions.terms')}.
-
-
-
+
+
+ {strings('terms_and_conditions.description')}
+ {strings('terms_and_conditions.terms')}.
+
+
);
}
}
diff --git a/app/core/AppConstants.js b/app/core/AppConstants.js
index 3d686cb5164..405fa85e02d 100644
--- a/app/core/AppConstants.js
+++ b/app/core/AppConstants.js
@@ -64,5 +64,9 @@ export default {
POLL_COUNT_LIMIT: 3,
DEFAULT_SLIPPAGE: 3
},
- MAX_SAFE_CHAIN_ID: 4503599627370476
+ MAX_SAFE_CHAIN_ID: 4503599627370476,
+ URLS: {
+ TERMS_AND_CONDITIONS: 'https://consensys.net/terms-of-use/',
+ PRIVACY_POLICY: 'https://consensys.net/privacy-policy/'
+ }
};