Skip to content

Commit

Permalink
add terms and conditions url
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Sep 26, 2023
1 parent 33fec1c commit 1aec30c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 17 deletions.
31 changes: 16 additions & 15 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{
"QR_READER_BITCOIN_DEFAULT_NETWORK_MAINNET": "BITCOIN",
"QR_READER_BITCOIN_DEFAULT_NETWORK_TESTNET": "BITCOIN_TESTNET",
"RIF_RELAY_SERVER_MAINNET":"https://relay.rif-wallet-services.mainnet.rifcomputing.net",
"RIF_RELAY_SERVER_TESTNET":"https://relay.rif-wallet-services.testnet.rifcomputing.net",
"SMART_WALLET_FACTORY_ADDRESS_MAINNET":"0x9eebec6c5157bee13b451b1dfe1ee2cb40846323",
"SMART_WALLET_FACTORY_ADDRESS_TESTNET":"0xBaDb31cAf5B95edd785446B76219b60fB1f07233",
"RELAY_VERIFIER_ADDRESS_MAINNET":"0x5C9c7d96E6C59E55dA4dCf7F791AE58dAF8DBc86",
"RELAY_VERIFIER_ADDRESS_TESTNET":"0x5897E84216220663F306676458Afc7bf2A6A3C52",
"DEPLOY_VERIFIER_ADDRESS_MAINET":"0x2fd633e358bc50ccf6bf926d621e8612b55264c9",
"DEPLOY_VERIFIER_ADDRESS_TESTNET":"0xAe59e767768c6c25d64619Ee1c498Fd7D83e3c24",
"BTC_EXPLORER_ADDRESS_URL_MAINNET":"https://explorer.btc.com/btc/transaction",
"BTC_EXPLORER_ADDRESS_URL_TESTNET":"https://live.blockcypher.com/btc-testnet",
"RPC_URL_MAINNET":"https://public-node.rsk.co",
"RPC_URL_TESTNET":"https://public-node.testnet.rsk.co",
"EXPLORER_ADDRESS_URL_MAINNET":"https://explorer.rsk.co",
"EXPLORER_ADDRESS_URL_TESTNET":"https://explorer.testnet.rsk.co"
}
"RIF_RELAY_SERVER_MAINNET": "https://relay.rif-wallet-services.mainnet.rifcomputing.net",
"RIF_RELAY_SERVER_TESTNET": "https://relay.rif-wallet-services.testnet.rifcomputing.net",
"SMART_WALLET_FACTORY_ADDRESS_MAINNET": "0x9eebec6c5157bee13b451b1dfe1ee2cb40846323",
"SMART_WALLET_FACTORY_ADDRESS_TESTNET": "0xBaDb31cAf5B95edd785446B76219b60fB1f07233",
"RELAY_VERIFIER_ADDRESS_MAINNET": "0x5C9c7d96E6C59E55dA4dCf7F791AE58dAF8DBc86",
"RELAY_VERIFIER_ADDRESS_TESTNET": "0x5897E84216220663F306676458Afc7bf2A6A3C52",
"DEPLOY_VERIFIER_ADDRESS_MAINET": "0x2fd633e358bc50ccf6bf926d621e8612b55264c9",
"DEPLOY_VERIFIER_ADDRESS_TESTNET": "0xAe59e767768c6c25d64619Ee1c498Fd7D83e3c24",
"BTC_EXPLORER_ADDRESS_URL_MAINNET": "https://explorer.btc.com/btc/transaction",
"BTC_EXPLORER_ADDRESS_URL_TESTNET": "https://live.blockcypher.com/btc-testnet",
"RPC_URL_MAINNET": "https://public-node.rsk.co",
"RPC_URL_TESTNET": "https://public-node.testnet.rsk.co",
"EXPLORER_ADDRESS_URL_MAINNET": "https://explorer.rsk.co",
"EXPLORER_ADDRESS_URL_TESTNET": "https://explorer.testnet.rsk.co",
"TERMS_AND_CONDITIONS_URL": "https://drive.google.com/file/d/1-jKY7K_93g9c7kNJ__cDYkGYp03PrOO8/view"
}
1 change: 1 addition & 0 deletions src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export enum SETTINGS {
RIF_WALLET_KEY = 'RIF_WALLET_KEY',
WALLETCONNECT2_PROJECT_ID = 'WALLETCONNECT2_PROJECT_ID',
BTC_EXPLORER_ADDRESS_URL = 'BTC_EXPLORER_ADDRESS_URL',
TERMS_AND_CONDITIONS_URL = 'TERMS_AND_CONDITIONS_URL',
}
29 changes: 27 additions & 2 deletions src/screens/createKeys/SecurityInformation.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useCallback, useState } from 'react'
import { StyleSheet, View } from 'react-native'
import { Linking, StyleSheet, View } from 'react-native'
import { useTranslation } from 'react-i18next'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { TouchableOpacity } from 'react-native-gesture-handler'
import config from 'config.json'

import {
createKeysRouteNames,
Expand All @@ -11,6 +13,7 @@ import { sharedColors, sharedStyles } from 'shared/constants'
import { castStyle } from 'shared/utils'
import { AppButton, AppTouchable, Typography } from 'components/index'
import { Checkbox } from 'components/checkbox'
import { SETTINGS } from 'src/core/types'

enum TestID {
IAgreeCheckbox = 'Checkbox.IAgreeCheckbox',
Expand Down Expand Up @@ -58,6 +61,17 @@ export const SecurityInformation = ({
</Typography>
</View>
<View style={[styles.checkboxBtnWrapper, { bottom: insets.bottom }]}>
<View style={styles.termsAndConditionsView}>
<TouchableOpacity
accessibilityLabel="termsAndConditions"
onPress={() =>
Linking.openURL(config[SETTINGS.TERMS_AND_CONDITIONS_URL])
}>
<Typography type="body1" style={styles.termsAndConditionsText}>
Terms and conditions
</Typography>
</TouchableOpacity>
</View>
<View style={styles.agreementView}>
<AppTouchable
width={18}
Expand All @@ -84,7 +98,10 @@ export const SecurityInformation = ({
}

const styles = StyleSheet.create({
header: castStyle.text({ marginTop: 10, letterSpacing: -0.03 }),
header: castStyle.text({
marginTop: 10,
letterSpacing: -0.03,
}),
checkboxBtnWrapper: castStyle.view({
position: 'absolute',
right: 24,
Expand All @@ -103,6 +120,14 @@ const styles = StyleSheet.create({
lineHeight: 18,
color: sharedColors.labelLight,
}),
termsAndConditionsView: castStyle.view({
alignSelf: 'center',
marginBottom: 22,
}),
termsAndConditionsText: castStyle.text({
color: 'blue',
textDecorationLine: 'underline',
}),
agreementView: castStyle.view({ flexDirection: 'row', alignSelf: 'center' }),
agreeText: castStyle.text({ marginLeft: 10 }),
button: castStyle.view({ marginTop: 22 }),
Expand Down

0 comments on commit 1aec30c

Please sign in to comment.