From 13572c8775fac9b479b121c6d3fa3d0b466e1fee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Sun, 3 May 2020 14:17:49 -0400 Subject: [PATCH] OPS: Upgrade RN elements --- BlueComponents.js | 82 ++------ package-lock.json | 276 ++++++++++++--------------- package.json | 3 +- screen/send/details.js | 6 +- screen/settings/GeneralSettings.js | 17 +- screen/settings/about.js | 3 + screen/settings/currency.js | 16 +- screen/settings/defaultView.js | 15 +- screen/settings/electrumSettings.js | 7 +- screen/settings/encryptStorage.js | 39 ++-- screen/settings/language.js | 21 +- screen/settings/lightningSettings.js | 3 +- screen/settings/settings.js | 26 ++- screen/wallets/add.js | 52 +++-- screen/wallets/list.js | 77 ++++---- screen/wallets/pleaseBackup.js | 33 ++-- 16 files changed, 304 insertions(+), 372 deletions(-) diff --git a/BlueComponents.js b/BlueComponents.js index 9550b8c48..5e85d602c 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -2,7 +2,7 @@ import React, { Component, useEffect, useState } from 'react'; import Ionicons from 'react-native-vector-icons/Ionicons'; import PropTypes from 'prop-types'; -import { Icon, FormLabel, FormInput, Text, Header, List, ListItem } from 'react-native-elements'; +import { Icon, Input, Text, Header, ListItem } from 'react-native-elements'; import { TouchableOpacity, TouchableWithoutFeedback, @@ -20,6 +20,7 @@ import { InputAccessoryView, Clipboard, Platform, + FlatList, TextInput, } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; @@ -587,7 +588,7 @@ export class BlueListItem extends Component { paddingBottom: 16, }} titleStyle={{ - color: BlueApp.settings.foregroundColor, + color: this.props.disabled ? BlueApp.settings.buttonDisabledTextColor : BlueApp.settings.foregroundColor, fontSize: 16, fontWeight: '500', marginLeft: 16, @@ -595,6 +596,7 @@ export class BlueListItem extends Component { subtitleStyle={{ color: BlueApp.settings.alternativeTextColor, marginLeft: 16, fontWeight: '400', width: 230 }} subtitleNumberOfLines={1} titleNumberOfLines={0} + Component={TouchableOpacity} {...this.props} /> ); @@ -603,14 +605,14 @@ export class BlueListItem extends Component { export class BlueFormLabel extends Component { render() { - return ; + return ; } } export class BlueFormInput extends Component { render() { return ( -
- ); + return ; } } @@ -999,6 +989,7 @@ const stylesBlueIcon = StyleSheet.create({ borderRadius: 15, backgroundColor: '#d2f8d6', transform: [{ rotate: '-45deg' }], + justifyContent: 'center', }, ballIncomingWithoutRotate: { width: 30, @@ -1019,6 +1010,7 @@ const stylesBlueIcon = StyleSheet.create({ borderRadius: 15, backgroundColor: '#f8d2d2', transform: [{ rotate: '225deg' }], + justifyContent: 'center', }, ballOutgoingWithoutRotate: { width: 30, @@ -1031,6 +1023,7 @@ const stylesBlueIcon = StyleSheet.create({ height: 30, borderRadius: 15, backgroundColor: '#EEF0F4', + justifyContent: 'center', }, ballTransparrent: { width: 30, @@ -1075,14 +1068,7 @@ export class BlueTransactionIncomingIcon extends Component { - + @@ -1152,14 +1138,7 @@ export class BlueTransactionOffchainIcon extends Component { - + @@ -1173,14 +1152,7 @@ export class BlueTransactionOffchainIncomingIcon extends Component { - + @@ -1194,14 +1166,7 @@ export class BlueTransactionOutgoingIcon extends Component { - + @@ -1571,19 +1536,15 @@ export const BlueTransactionListItem = ({ item, itemPriceUnit = BitcoinUnit.BTC, return ( @@ -1766,11 +1727,6 @@ export class BlueListTransactionItem extends Component { title={loc.transactionTimeToReadable(this.props.item.received)} subtitle={this.subtitle()} onPress={this.onPress} - badge={{ - value: 3, - textStyle: { color: 'orange' }, - containerStyle: { marginTop: 0 }, - }} hideChevron rightTitle={this.rowTitle()} rightTitleStyle={this.rowTitleStyle()} diff --git a/package-lock.json b/package-lock.json index ca5a145bb..dce9064d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1935,6 +1935,37 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==" }, + "@types/prop-types": { + "version": "15.7.3", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz", + "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" + }, + "@types/react": { + "version": "16.9.34", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.34.tgz", + "integrity": "sha512-8AJlYMOfPe1KGLKyHpflCg5z46n0b5DbRfqDksxBLBTUpB75ypDBAO9eCUcjNwE6LCUslwTz00yyG/X9gaVtow==", + "requires": { + "@types/prop-types": "*", + "csstype": "^2.2.0" + } + }, + "@types/react-native": { + "version": "0.62.5", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.5.tgz", + "integrity": "sha512-x6ZBbo752yAw5XUarOyh53oNgMuafL4EhWEbd4ARSMK6Y7nTRm2a1tBHy8Fp7h7ji0XXJrxNRTXGJRRP3+MWzg==", + "requires": { + "@types/react": "*" + } + }, + "@types/react-native-vector-icons": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@types/react-native-vector-icons/-/react-native-vector-icons-6.4.5.tgz", + "integrity": "sha512-JBpcjWQE4n0GlE0p6HpDDclT+uXpFC453T5k4h+B38q0utlGJhvgNr8899BoJGc1xOktA2cgqFKmFMJd0h7YaA==", + "requires": { + "@types/react": "*", + "@types/react-native": "*" + } + }, "@types/stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", @@ -2679,23 +2710,6 @@ "babel-runtime": "^6.22.0" } }, - "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=", - "requires": { - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" - } - } - }, "babel-preset-fbjs": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz", @@ -2779,6 +2793,7 @@ "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true, "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" @@ -2787,7 +2802,8 @@ "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true } } }, @@ -3777,6 +3793,15 @@ "object-visit": "^1.0.0" } }, + "color": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/color/-/color-3.1.2.tgz", + "integrity": "sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg==", + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -3790,6 +3815,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -4170,6 +4204,11 @@ "cssom": "0.3.x" } }, + "csstype": { + "version": "2.6.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.10.tgz", + "integrity": "sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w==" + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -6747,6 +6786,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true, "requires": { "ansi-regex": "^2.0.0" }, @@ -6754,7 +6794,8 @@ "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true } } }, @@ -8477,11 +8518,6 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, - "lodash.isempty": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=" - }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -8505,11 +8541,6 @@ "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" }, - "lodash.times": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.times/-/lodash.times-4.3.2.tgz", - "integrity": "sha1-Ph8lZcQxdU1Uq1fy7RdBk5KFyh0=" - }, "lodash.unescape": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", @@ -9953,118 +9984,10 @@ "is-wsl": "^1.1.0" } }, - "opencollective": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", - "integrity": "sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=", - "requires": { - "babel-polyfill": "6.23.0", - "chalk": "1.1.3", - "inquirer": "3.0.6", - "minimist": "1.2.0", - "node-fetch": "1.6.3", - "opn": "4.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=" - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "inquirer": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", - "integrity": "sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=", - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.1", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^2.0.0", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" - }, - "node-fetch": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", - "integrity": "sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=", - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" - } - } + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==" }, "opn": { "version": "5.5.0", @@ -10359,12 +10282,14 @@ "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, "requires": { "pinkie": "^2.0.0" } @@ -11728,21 +11653,30 @@ "from": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa" }, "react-native-elements": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-0.19.0.tgz", - "integrity": "sha1-c3xRmL90h/mYbiAjgmzQvXpQA2Y=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/react-native-elements/-/react-native-elements-2.0.0.tgz", + "integrity": "sha512-xViTU/JlabYX94fDL2iu17gvMtgEOq2lFAToYlU3RBkwb/J13cdwSr8Ti9z6v6Iui4f8S3FjkpRJnFaOsZrK7w==", "requires": { - "lodash.isempty": "^4.4.0", - "lodash.times": "^4.3.2", - "opencollective": "^1.0.3", - "prop-types": "^15.5.8" + "@types/react-native-vector-icons": "^6.4.4", + "color": "^3.1.0", + "deepmerge": "^3.1.0", + "hoist-non-react-statics": "^3.1.0", + "opencollective-postinstall": "^2.0.0", + "prop-types": "^15.7.2", + "react-native-ratings": "^6.5.0", + "react-native-status-bar-height": "^2.2.0" + }, + "dependencies": { + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + } + } } }, - "react-native-flexi-radio-button": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/react-native-flexi-radio-button/-/react-native-flexi-radio-button-0.2.2.tgz", - "integrity": "sha1-oBgDk8UxujR3cixuQqMc6xwRYjs=" - }, "react-native-fs": { "version": "2.16.6", "resolved": "https://registry.npmjs.org/react-native-fs/-/react-native-fs-2.16.6.tgz", @@ -11858,6 +11792,15 @@ "resolved": "https://registry.npmjs.org/react-native-rate/-/react-native-rate-1.1.10.tgz", "integrity": "sha512-07L5923RpL+AdnsZCQSkiMbRi/7N/OJtZ6AWAl5bZyhncDD7L1ap94H3jtV7uFW5WGBNxMnGiC4fPLzn426mMw==" }, + "react-native-ratings": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/react-native-ratings/-/react-native-ratings-6.5.0.tgz", + "integrity": "sha512-YMcfQ7UQCmXGEc/WPlukHSHs5yvckTwjq5fTRk1FG8gaO7fZCNygEUGPuw4Dbvvp3IlsCUn0bOQd63RYsb7NDQ==", + "requires": { + "lodash": "^4.17.4", + "prop-types": "^15.5.10" + } + }, "react-native-safe-area-view": { "version": "0.14.8", "resolved": "https://registry.npmjs.org/react-native-safe-area-view/-/react-native-safe-area-view-0.14.8.tgz", @@ -11908,6 +11851,11 @@ "prop-types": "^15.5.10" } }, + "react-native-status-bar-height": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/react-native-status-bar-height/-/react-native-status-bar-height-2.5.0.tgz", + "integrity": "sha512-sYBCPYA/NapBSHkdm/IVL4ID3LLlIuLqINi2FBDyMkc2BU9pfSGOtkz9yfxoK39mYJuTrlTOQ7mManARUsYDSA==" + }, "react-native-svg": { "version": "9.13.6", "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-9.13.6.tgz", @@ -12624,11 +12572,6 @@ "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "dev": true }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=" - }, "rx-lite": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", @@ -12905,6 +12848,21 @@ "plist": "^3.0.1" } }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + } + } + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", diff --git a/package.json b/package.json index 66d06d532..b904a95b8 100644 --- a/package.json +++ b/package.json @@ -106,8 +106,7 @@ "react-native-default-preference": "1.4.1", "react-native-device-info": "4.0.1", "react-native-document-picker": "git+https://github.com/BlueWallet/react-native-document-picker.git#9ce83792db340d01b1361d24b19613658abef4aa", - "react-native-elements": "0.19.0", - "react-native-flexi-radio-button": "0.2.2", + "react-native-elements": "2.0.0", "react-native-fs": "2.16.6", "react-native-gesture-handler": "1.6.1", "react-native-handoff": "git+https://github.com/marcosrdz/react-native-handoff.git", diff --git a/screen/send/details.js b/screen/send/details.js index 1fe86f235..a85eab102 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -655,10 +655,8 @@ export default class SendDetails extends Component { {this.state.fromWallet.type === HDSegwitBech32Wallet.type && ( )} {this.state.fromWallet.type === WatchOnlyWallet.type && diff --git a/screen/settings/GeneralSettings.js b/screen/settings/GeneralSettings.js index a587c391e..1530b7b91 100644 --- a/screen/settings/GeneralSettings.js +++ b/screen/settings/GeneralSettings.js @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { ScrollView, Platform, TouchableOpacity } from 'react-native'; +import { ScrollView, Platform, TouchableWithoutFeedback, TouchableOpacity } from 'react-native'; import { BlueLoading, BlueText, BlueSpacing20, BlueListItem, SafeBlueArea, BlueNavigationStyle, BlueCard } from '../../BlueComponents'; import PropTypes from 'prop-types'; import { AppStorage } from '../../class'; @@ -38,12 +38,17 @@ const GeneralSettings = () => { {BlueApp.getWallets().length > 1 && ( <> - navigate('DefaultView')} title="On Launch" /> + navigate('DefaultView')} title="On Launch" chevron /> )} {Platform.OS === 'ios' ? ( <> - + When enabled, you will be able to view selected wallets, and transactions, using your other Apple iCloud connected devices. @@ -53,11 +58,9 @@ const GeneralSettings = () => { ) : null} diff --git a/screen/settings/about.js b/screen/settings/about.js index 51dcfbe5c..e3c8551b0 100644 --- a/screen/settings/about.js +++ b/screen/settings/about.js @@ -133,6 +133,7 @@ const About = () => { type: 'font-awesome', color: '#9AA0AA', }} + chevron onPress={handleOnReleaseNotesPress} title="Release notes" /> @@ -142,6 +143,7 @@ const About = () => { type: 'octicon', color: 'black', }} + chevron onPress={handleOnLicensingPress} title="MIT License" /> @@ -151,6 +153,7 @@ const About = () => { type: 'font-awesome', color: '#FC0D44', }} + chevron onPress={handleOnSelfTestPress} title="Run self test" testID="RunSelfTestButton" diff --git a/screen/settings/currency.js b/screen/settings/currency.js index 0bb55ae81..08f2c3b9f 100644 --- a/screen/settings/currency.js +++ b/screen/settings/currency.js @@ -38,8 +38,13 @@ const Currency = () => { extraData={data} renderItem={({ item }) => { return ( - } + : { hideChevron: true })} + Component={TouchableOpacity} onPress={async () => { setIsSavingNewPreferredCurrency(true); setSelectedCurrency(item); @@ -47,14 +52,7 @@ const Currency = () => { await currency.startUpdater(); setIsSavingNewPreferredCurrency(false); }} - > - } - : { hideChevron: true })} - /> - + /> ); }} /> diff --git a/screen/settings/defaultView.js b/screen/settings/defaultView.js index e166ba945..8b1e6fefd 100644 --- a/screen/settings/defaultView.js +++ b/screen/settings/defaultView.js @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { TouchableOpacity, View } from 'react-native'; +import { TouchableOpacity, View, TouchableWithoutFeedback } from 'react-native'; import { SafeBlueArea, BlueCard, BlueText, BlueNavigationStyle, BlueListItem } from '../../BlueComponents'; import OnAppLaunch from '../../class/onAppLaunch'; import { useNavigation } from 'react-navigation-hooks'; @@ -52,17 +52,18 @@ const DefaultView = () => { 0} - switched={viewAllWalletsEnabled} - onSwitch={onViewAllWalletsSwitchValueChanged} + Component={TouchableWithoutFeedback} + switch={{ + onValueChange: onViewAllWalletsSwitchValueChanged, + value: viewAllWalletsEnabled, + disabled: BlueApp.getWallets().length <= 0, + }} /> When disabled, BlueWallet will immediately open the selected wallet at launch. {!viewAllWalletsEnabled && ( - + )} diff --git a/screen/settings/electrumSettings.js b/screen/settings/electrumSettings.js index 76b2b4743..700c88578 100644 --- a/screen/settings/electrumSettings.js +++ b/screen/settings/electrumSettings.js @@ -5,7 +5,6 @@ import { AppStorage } from '../../class'; import AsyncStorage from '@react-native-community/async-storage'; import { ScrollView } from 'react-native-gesture-handler'; import { BlueLoading, BlueSpacing20, BlueButton, SafeBlueArea, BlueCard, BlueNavigationStyle, BlueText } from '../../BlueComponents'; -import { Badge } from 'react-native-elements'; import PropTypes from 'prop-types'; let loc = require('../../loc'); let BlueElectrum = require('../../BlueElectrum'); @@ -92,8 +91,8 @@ export default class ElectrumSettings extends Component { Status - {(this.state.config.status === 1 && 'Connected') || 'Not Connected'} - + diff --git a/screen/settings/encryptStorage.js b/screen/settings/encryptStorage.js index ea6845b20..ef32da1c7 100644 --- a/screen/settings/encryptStorage.js +++ b/screen/settings/encryptStorage.js @@ -1,6 +1,6 @@ /* global alert */ import React, { Component } from 'react'; -import { ScrollView, Alert, Platform, TouchableOpacity } from 'react-native'; +import { ScrollView, Alert, Platform, TouchableOpacity, TouchableWithoutFeedback } from 'react-native'; import { BlueLoading, BlueHeaderDefaultSub, @@ -140,11 +140,9 @@ export default class EncryptStorage extends Component { <> @@ -160,32 +158,31 @@ export default class EncryptStorage extends Component { testID="EncyptedAndPasswordProtected" hideChevron title="Encypted and Password protected" - switchButton - onSwitch={this.onEncryptStorageSwitch} - switched={this.state.storageIsEncrypted} + Component={TouchableWithoutFeedback} + switch={{ onValueChange: this.onEncryptStorageSwitch, value: this.state.storageIsEncrypted }} /> {Platform.OS === 'ios' && this.state.storageIsEncrypted && ( )} {this.state.storageIsEncrypted && ( - this.props.navigation.navigate('PlausibleDeniability')} - > - - + disabled={!this.state.storageIsEncrypted} + title={loc.settings.plausible_deniability} + chevron + testID="PlausibleDeniabilityButton" + Component={TouchableOpacity} + /> )} diff --git a/screen/settings/language.js b/screen/settings/language.js index cc25283b2..248b158f9 100644 --- a/screen/settings/language.js +++ b/screen/settings/language.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { FlatList, TouchableOpacity } from 'react-native'; +import { FlatList } from 'react-native'; import { BlueLoading, BlueText, SafeBlueArea, BlueListItem, BlueCard, BlueNavigationStyle } from '../../BlueComponents'; import PropTypes from 'prop-types'; import { Icon } from 'react-native-elements'; @@ -56,22 +56,19 @@ export default class Language extends Component { renderItem = ({ item }) => { return ( - { console.log('setLanguage', item.value); loc.saveLanguage(item.value); return this.setState({ language: item.value }); }} - > - , - } - : { hideChevron: true })} - /> - + title={item.label} + {...(this.state.language === item.value + ? { + rightIcon: , + } + : { hideChevron: true })} + /> ); }; diff --git a/screen/settings/lightningSettings.js b/screen/settings/lightningSettings.js index 70f159287..5ad4a9e3a 100644 --- a/screen/settings/lightningSettings.js +++ b/screen/settings/lightningSettings.js @@ -68,10 +68,11 @@ export default class LightningSettings extends Component { onPress={() => { Linking.openURL('https://github.com/BlueWallet/LndHub'); }} + titleStyle={{ color: BlueApp.settings.buttonAlternativeTextColor }} title="github.com/BlueWallet/LndHub" color={BlueApp.settings.buttonTextColor} buttonStyle={{ - backgroundColor: '#FFFFFF', + backgroundColor: 'transparent', }} /> diff --git a/screen/settings/settings.js b/screen/settings/settings.js index 13855089e..d5e877a39 100644 --- a/screen/settings/settings.js +++ b/screen/settings/settings.js @@ -16,14 +16,26 @@ const Settings = () => { ) : ( - - navigate('GeneralSettings')} /> - navigate('Currency')} /> - navigate('Language')} /> - navigate('EncryptStorage')} component={TouchableOpacity} testID="SecurityButton" /> - navigate('NetworkSettings')} /> - navigate('About')} testID="AboutButton" /> + + navigate('GeneralSettings')} chevron /> + navigate('Currency')} chevron /> + navigate('Language')} chevron /> + navigate('EncryptStorage')} + component={TouchableOpacity} + testID="SecurityButton" + chevron + /> + navigate('NetworkSettings')} chevron /> + navigate('About')} + testID="AboutButton" + chevron + /> ); diff --git a/screen/wallets/add.js b/screen/wallets/add.js index 7de3e45d6..8cb8e57f0 100644 --- a/screen/wallets/add.js +++ b/screen/wallets/add.js @@ -15,6 +15,7 @@ import AsyncStorage from '@react-native-community/async-storage'; import { BlueTextCentered, BlueText, + BlueListItem, LightningButton, BitcoinButton, BlueFormLabel, @@ -24,12 +25,12 @@ import { BlueButtonLink, BlueSpacing20, } from '../../BlueComponents'; -import { RadioGroup, RadioButton } from 'react-native-flexi-radio-button'; import PropTypes from 'prop-types'; import { HDSegwitP2SHWallet } from '../../class/hd-segwit-p2sh-wallet'; import { LightningCustodianWallet } from '../../class/lightning-custodian-wallet'; import { AppStorage, HDSegwitBech32Wallet, SegwitP2SHWallet } from '../../class'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; +import { Icon } from 'react-native-elements'; let EV = require('../../events'); let A = require('../../analytics'); let BlueApp: AppStorage = require('../../BlueApp'); @@ -46,6 +47,7 @@ export default class WalletsAdd extends Component { this.state = { isLoading: true, walletBaseURI: '', + selectedIndex: 0, }; } @@ -53,7 +55,6 @@ export default class WalletsAdd extends Component { let walletBaseURI = await AsyncStorage.getItem(AppStorage.LNDHUB); let isAdvancedOptionsEnabled = await BlueApp.isAdancedModeEnabled(); walletBaseURI = walletBaseURI || ''; - this.setState({ isLoading: false, activeBitcoin: undefined, @@ -69,10 +70,9 @@ export default class WalletsAdd extends Component { }); /* also, a hack to make screen update new typed text */ } - onSelect(index, value) { + onSelect(index) { this.setState({ selectedIndex: index, - selectedValue: value, }); } @@ -178,17 +178,39 @@ export default class WalletsAdd extends Component { {loc.settings.advanced_options} - this.onSelect(index, value)} selectedIndex={0}> - - {HDSegwitBech32Wallet.typeReadable} - Multiple addresses - - - {SegwitP2SHWallet.typeReadable} - Single address - - - {HDSegwitP2SHWallet.typeReadable} - Multiple addresses - - + { + this.onSelect(0, HDSegwitBech32Wallet.type); + }} + title={HDSegwitBech32Wallet.typeReadable} + {...(this.state.selectedIndex === 0 + ? { + rightIcon: , + } + : { hideChevron: true })} + /> + { + this.onSelect(1, SegwitP2SHWallet.type); + }} + title={SegwitP2SHWallet.typeReadable} + {...(this.state.selectedIndex === 1 + ? { + rightIcon: , + } + : { hideChevron: true })} + /> + { + this.onSelect(2, HDSegwitP2SHWallet.typeReadable.type); + }} + title={HDSegwitP2SHWallet.typeReadable} + {...(this.state.selectedIndex === 2 + ? { + rightIcon: , + } + : { hideChevron: true })} + /> ); } else if (this.state.activeLightning && this.state.isAdvancedOptionsEnabled) { diff --git a/screen/wallets/list.js b/screen/wallets/list.js index 6cf3d4f28..4ac749902 100644 --- a/screen/wallets/list.js +++ b/screen/wallets/list.js @@ -1,16 +1,5 @@ import React, { Component } from 'react'; -import { - View, - StatusBar, - TouchableOpacity, - Text, - StyleSheet, - FlatList, - InteractionManager, - RefreshControl, - ScrollView, - Alert, -} from 'react-native'; +import { View, StatusBar, TouchableOpacity, Text, StyleSheet, InteractionManager, RefreshControl, ScrollView, Alert } from 'react-native'; import { BlueLoading, SafeBlueArea, WalletsCarousel, BlueList, BlueHeaderDefaultMain, BlueTransactionListItem } from '../../BlueComponents'; import { Icon } from 'react-native-elements'; import { NavigationEvents } from 'react-navigation'; @@ -420,39 +409,37 @@ export default class WalletsList extends Component { }} ref={c => (this.walletsCarousel = c)} /> - - {this.renderLocalTrader()} - - - {loc.wallets.list.empty_txs1} - - - {loc.wallets.list.empty_txs2} - - - } - data={this.state.dataSource} - extraData={this.state.dataSource} - keyExtractor={this._keyExtractor} - renderItem={this._renderItem} - /> - + {this.renderLocalTrader()} + + + {loc.wallets.list.empty_txs1} + + + {loc.wallets.list.empty_txs2} + + + } + data={this.state.dataSource} + extraData={this.state.dataSource} + keyExtractor={this._keyExtractor} + renderItem={this._renderItem} + /> diff --git a/screen/wallets/pleaseBackup.js b/screen/wallets/pleaseBackup.js index d34869634..6e1b486fb 100644 --- a/screen/wallets/pleaseBackup.js +++ b/screen/wallets/pleaseBackup.js @@ -1,7 +1,6 @@ import React, { useEffect, useState, useCallback } from 'react'; import { ActivityIndicator, View, BackHandler, Text, ScrollView } from 'react-native'; import { BlueSpacing20, SafeBlueArea, BlueNavigationStyle, BlueText, BlueButton } from '../../BlueComponents'; -import { Badge } from 'react-native-elements'; import Privacy from '../../Privacy'; import { useNavigation, useNavigationParam } from 'react-navigation-hooks'; const loc = require('../../loc'); @@ -29,21 +28,23 @@ const PleaseBackup = () => { let component = []; for (const [index, secret] of words.entries()) { component.push( - - - - {`${index}`}. {secret} - - + + + {`${index}`}. {secret} + , ); }