Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update terms and privacy links #2443

Merged
merged 6 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/components/UI/OptinMetrics/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -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')
});
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/Swaps/QuotesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ function SwapsQuotesView({
const handleTermsPress = useCallback(
() =>
navigation.navigate('Webview', {
url: 'https://metamask.io/terms.html'
url: AppConstants.URLS.TERMS_AND_CONDITIONS
}),
[navigation]
);
Expand Down
12 changes: 7 additions & 5 deletions app/components/Views/Onboarding/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const styles = StyleSheet.create({
height: Device.isIos() ? 90 : 45
},
termsAndConditions: {
paddingVertical: 30
paddingBottom: 30
},
title: {
fontSize: 24,
Expand Down Expand Up @@ -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 (
<ElevatedView style={styles.modalTypeView} elevation={100}>
<Animated.View
style={[styles.notificationContainer, { transform: [{ translateY: this.notificationAnimated }] }]}
>
<BaseNotification closeButtonDisabled status="success" data={{ title, description }} />
<BaseNotification
closeButtonDisabled
status="success"
data={{ title: strings('onboarding.success'), description: strings('onboarding.your_wallet') }}
/>
</Animated.View>
</ElevatedView>
);
Expand Down
5 changes: 3 additions & 2 deletions app/components/Views/Settings/AppInformation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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'));
};

Expand Down
25 changes: 9 additions & 16 deletions app/components/Views/TermsAndConditions/index.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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 (
<View style={styles.mainWrapper}>
<TouchableOpacity onPress={this.press}>
<Text style={styles.text}>
{strings('terms_and_conditions.description')}
<Text style={styles.link}>{strings('terms_and_conditions.terms')}</Text>.
</Text>
</TouchableOpacity>
</View>
<TouchableOpacity onPress={this.press}>
<Text style={styles.text}>
{strings('terms_and_conditions.description')}
<Text style={styles.link}>{strings('terms_and_conditions.terms')}</Text>.
</Text>
</TouchableOpacity>
);
}
}
6 changes: 5 additions & 1 deletion app/core/AppConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
}
};