wallet alpha warning (#118)
This commit is contained in:
parent
48350ff175
commit
614069e342
8 changed files with 62 additions and 9 deletions
|
@ -14,11 +14,13 @@ export default class Button extends React.PureComponent {
|
|||
} = this.props;
|
||||
|
||||
let styles = [buttonStyle.button, buttonStyle.row];
|
||||
if (style) {
|
||||
if (style.length) {
|
||||
styles = styles.concat(style);
|
||||
} else {
|
||||
styles.push(style);
|
||||
}
|
||||
}
|
||||
|
||||
if (disabled) {
|
||||
styles.push(buttonStyle.disabled);
|
||||
|
|
5
app/src/constants.js
Normal file
5
app/src/constants.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
const Constants = {
|
||||
SETTING_ALPHA_UNDERSTANDS_RISKS: "ALPHA_UNDERSTANDS_RISKS"
|
||||
};
|
||||
|
||||
export default Constants;
|
|
@ -1,4 +1,15 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { doSetClientSetting } from '../../redux/actions/settings';
|
||||
import { makeSelectClientSetting } from '../../redux/selectors/settings';
|
||||
import Constants from '../../constants';
|
||||
import WalletPage from './view';
|
||||
|
||||
export default connect(null, null)(WalletPage);
|
||||
const select = state => ({
|
||||
understandsRisks: makeSelectClientSetting(Constants.SETTING_ALPHA_UNDERSTANDS_RISKS)(state),
|
||||
});
|
||||
|
||||
const perform = dispatch => ({
|
||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||
});
|
||||
|
||||
export default connect(select, perform)(WalletPage);
|
||||
|
|
|
@ -1,12 +1,31 @@
|
|||
import React from 'react';
|
||||
import { ScrollView } from 'react-native';
|
||||
import { ScrollView, Text, View } from 'react-native';
|
||||
import TransactionListRecent from '../../component/transactionListRecent';
|
||||
import WalletAddress from '../../component/walletAddress';
|
||||
import WalletBalance from '../../component/walletBalance';
|
||||
import WalletSend from '../../component/walletSend';
|
||||
import Button from '../../component/button';
|
||||
import Constants from '../../constants';
|
||||
import walletStyle from '../../styles/wallet';
|
||||
|
||||
class WalletPage extends React.PureComponent {
|
||||
render() {
|
||||
const { understandsRisks, setClientSetting } = this.props;
|
||||
|
||||
if (!understandsRisks) {
|
||||
return (
|
||||
<View>
|
||||
<View style={walletStyle.warning}>
|
||||
<Text style={walletStyle.warningText}>
|
||||
This is alpha software. You may lose any LBC that you send to your wallet due to uninstallation, software bugs, deleted files, or malicious third-party software. You should not use this wallet as your primary wallet. If you understand the risks and you wish to continue, please click the button below.
|
||||
</Text>
|
||||
</View>
|
||||
<Button text={'I understand the risks'} style={[walletStyle.button, walletStyle.understand]}
|
||||
onPress={() => setClientSetting(Constants.SETTING_ALPHA_UNDERSTANDS_RISKS, true)}/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
<WalletBalance />
|
||||
|
|
|
@ -4,6 +4,7 @@ const Colors = {
|
|||
DescriptionGrey: '#999999',
|
||||
LbryGreen: '#40b89a',
|
||||
LightGrey: '#cccccc',
|
||||
Orange: '#ffbb00',
|
||||
Red: '#ff0000',
|
||||
VeryLightGrey: '#f1f1f1',
|
||||
White: '#ffffff'
|
||||
|
|
|
@ -117,6 +117,20 @@ const walletStyle = StyleSheet.create({
|
|||
addressInput: {
|
||||
width: '80%'
|
||||
},
|
||||
warning: {
|
||||
backgroundColor: Colors.Orange,
|
||||
padding: 16,
|
||||
margin: 16
|
||||
},
|
||||
warningText: {
|
||||
color: '#ffffff',
|
||||
fontFamily: 'Metropolis-Regular',
|
||||
fontSize: 16,
|
||||
lineHeight: 30
|
||||
},
|
||||
understand: {
|
||||
marginLeft: 16
|
||||
},
|
||||
currency: {
|
||||
alignSelf: 'flex-start',
|
||||
marginTop: 17
|
||||
|
|
|
@ -7,7 +7,8 @@ import sh
|
|||
|
||||
class LibGMPRecipe(Recipe):
|
||||
version = '6.1.2'
|
||||
url = 'https://gmplib.org/download/gmp/gmp-{version}.tar.bz2'
|
||||
url = 'https://ftp.gnu.org/pub/gnu/gmp/gmp-{version}.tar.bz2'
|
||||
#url = 'https://gmplib.org/download/gmp/gmp-{version}.tar.bz2'
|
||||
|
||||
def should_build(self, arch):
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
|
|
|
@ -17,8 +17,8 @@ import org.json.JSONException;
|
|||
public class MixpanelModule extends ReactContextBaseJavaModule {
|
||||
|
||||
// TODO: Detect dev / debug and release mode and update value accordingly
|
||||
//private static final String MIXPANEL_TOKEN = "93b81fb957cb0ddcd3198c10853a6a95"; // Production
|
||||
private static final String MIXPANEL_TOKEN = "bc1630b8be64c5dfaa4700b3a62969f3"; // Dev Testing
|
||||
private static final String MIXPANEL_TOKEN = "93b81fb957cb0ddcd3198c10853a6a95"; // Production
|
||||
//private static final String MIXPANEL_TOKEN = "bc1630b8be64c5dfaa4700b3a62969f3"; // Dev Testing
|
||||
|
||||
private Context context;
|
||||
|
||||
|
|
Loading…
Reference in a new issue