From 6cbbc5a82b509b3e9c0d07d0abfe4c6e9d067235 Mon Sep 17 00:00:00 2001 From: jinchung Date: Fri, 23 Nov 2018 20:33:51 -0500 Subject: [PATCH 01/32] initial setup for piwik tracking --- ios/BalanceWallet.xcodeproj/project.pbxproj | 51 +++++++++++++++++++++ package.json | 1 + src/App.js | 5 +- yarn.lock | 4 ++ 4 files changed, 60 insertions(+), 1 deletion(-) diff --git a/ios/BalanceWallet.xcodeproj/project.pbxproj b/ios/BalanceWallet.xcodeproj/project.pbxproj index bdd955a2f81..3a9d10fcd6f 100644 --- a/ios/BalanceWallet.xcodeproj/project.pbxproj +++ b/ios/BalanceWallet.xcodeproj/project.pbxproj @@ -5,6 +5,7 @@ }; objectVersion = 46; objects = { + /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; @@ -62,6 +63,8 @@ 3C363E14D5DE4A028E43EA38 /* SF-Pro-Display-UltralightItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = DCA738BE00E04734AEDA2F07 /* SF-Pro-Display-UltralightItalic.otf */; }; 3C398DDB3F4F4F7E9B3F8C86 /* libRNRandomBytes-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0889DFA1224AA48F1A5301 /* libRNRandomBytes-tvOS.a */; }; 3C41C1415A994234A0FF2589 /* SF-Pro-Text-Heavy.otf in Resources */ = {isa = PBXBuildFile; fileRef = 233322FCDC624F6FA60C4B52 /* SF-Pro-Text-Heavy.otf */; }; + 3CE916E621A8BF0200BF6B5E /* libBNFPiwik.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CE916A421A8BED500BF6B5E /* libBNFPiwik.a */; }; + 3CE916EA21A8BFAC00BF6B5E /* piwiktracker.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 3CE916E721A8BFAC00BF6B5E /* piwiktracker.xcdatamodeld */; }; 4013198EBD3D4D6F8052D25E /* SF-Pro-Display-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9DF45B9EB38D4E8FA18A04C6 /* SF-Pro-Display-Light.otf */; }; 41804DE52CE94296995264E0 /* SF-Pro-Text-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 35A24AFF4AB449C287EE66A8 /* SF-Pro-Text-Medium.otf */; }; 424410A1E84845328C5A0CAB /* Graphik-RegularItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 182DC054E3584C83822F2A82 /* Graphik-RegularItalic.otf */; }; @@ -469,6 +472,13 @@ remoteGlobalIDString = 47413E2820DBB5D000CCDA85; remoteInfo = "SRSRadialGradien-tvOS"; }; + 3CE916A321A8BED500BF6B5E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3CE9169F21A8BED500BF6B5E /* BNFPiwik.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = BNFPiwik; + }; 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; @@ -664,6 +674,9 @@ 3C39C266218BBE66004C763F /* FastImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FastImage.xcodeproj; path = "../node_modules/react-native-fast-image/ios/FastImage.xcodeproj"; sourceTree = ""; }; 3CE850D5210FEA8F00672599 /* libGoogleToolboxForMac.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libGoogleToolboxForMac.a; sourceTree = BUILT_PRODUCTS_DIR; }; 3CE850D7210FEACE00672599 /* libnanopb.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libnanopb.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 3CE9169F21A8BED500BF6B5E /* BNFPiwik.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = BNFPiwik.xcodeproj; path = "../node_modules/react-native-matomo/ios/BNFPiwik.xcodeproj"; sourceTree = ""; }; + 3CE916E821A8BFAC00BF6B5E /* piwiktracker.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = piwiktracker.xcdatamodel; sourceTree = ""; }; + 3CE916E921A8BFAC00BF6B5E /* piwiktracker v2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "piwiktracker v2.xcdatamodel"; sourceTree = ""; }; 3EA8003C5E2D46E38184714B /* Graphik-ThinItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Graphik-ThinItalic.otf"; path = "../src/assets/fonts/Graphik-ThinItalic.otf"; sourceTree = ""; }; 3F61BCAE46144D64ABDD2408 /* libPasscodeAuth.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libPasscodeAuth.a; sourceTree = ""; }; 40B0A80541C544ED93E6039D /* PasscodeAuth.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = PasscodeAuth.xcodeproj; path = "../node_modules/@ledgerhq/react-native-passcode-auth/PasscodeAuth.xcodeproj"; sourceTree = ""; }; @@ -759,6 +772,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3CE916E621A8BF0200BF6B5E /* libBNFPiwik.a in Frameworks */, ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, @@ -907,6 +921,7 @@ 13B07FAE1A68108700A75B9A /* BalanceWallet */ = { isa = PBXGroup; children = ( + 3CE916E721A8BFAC00BF6B5E /* piwiktracker.xcdatamodeld */, 3C379D5D20FD1F92009AF81F /* BalanceWallet.entitlements */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, @@ -1184,6 +1199,14 @@ name = Products; sourceTree = ""; }; + 3CE916A021A8BED500BF6B5E /* Products */ = { + isa = PBXGroup; + children = ( + 3CE916A421A8BED500BF6B5E /* libBNFPiwik.a */, + ); + name = Products; + sourceTree = ""; + }; 5E91572E1DD0AC6500FF2AA8 /* Products */ = { isa = PBXGroup; children = ( @@ -1205,6 +1228,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 3CE9169F21A8BED500BF6B5E /* BNFPiwik.xcodeproj */, 3C39C266218BBE66004C763F /* FastImage.xcodeproj */, 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, @@ -1474,6 +1498,10 @@ productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; projectReferences = ( + { + ProductGroup = 3CE916A021A8BED500BF6B5E /* Products */; + ProjectRef = 3CE9169F21A8BED500BF6B5E /* BNFPiwik.xcodeproj */; + }, { ProductGroup = 24979D4220F83E3E007EB0DA /* Products */; ProjectRef = 8AC83A50CE8F4EE782376063 /* BVLinearGradient.xcodeproj */; @@ -1954,6 +1982,13 @@ remoteRef = 3CD4E8CC216989E8000FA5BD /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 3CE916A421A8BED500BF6B5E /* libBNFPiwik.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libBNFPiwik.a; + remoteRef = 3CE916A321A8BED500BF6B5E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -2247,6 +2282,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3CE916EA21A8BFAC00BF6B5E /* piwiktracker.xcdatamodeld in Sources */, 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); @@ -3361,6 +3397,21 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 3CE916E721A8BFAC00BF6B5E /* piwiktracker.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 3CE916E821A8BFAC00BF6B5E /* piwiktracker.xcdatamodel */, + 3CE916E921A8BFAC00BF6B5E /* piwiktracker v2.xcdatamodel */, + ); + currentVersion = 3CE916E921A8BFAC00BF6B5E /* piwiktracker v2.xcdatamodel */; + name = piwiktracker.xcdatamodeld; + path = "../node_modules/react-native-matomo/ios/PiwikTracker/piwiktracker.xcdatamodeld"; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; } diff --git a/package.json b/package.json index c52f2c924b9..f67ca3d6898 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "assert": "^1.4.1", "axios": "^0.18.0", "balance-common": "0.5.28", + "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", "chroma-js": "^1.3.7", diff --git a/src/App.js b/src/App.js index 0bf5a3e34c9..5c6381ef22a 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,7 @@ import { AppRegistry, AlertIOS, AppState } from 'react-native'; import { compose, withProps } from 'recompact'; import { connect, Provider } from 'react-redux'; import { NavigationActions } from 'react-navigation'; +import Piwik from 'react-native-matomo'; import { withWalletConnectConnections } from './hoc'; import { addTransactionToApprove, @@ -43,6 +44,7 @@ class App extends Component { navigatorRef = null componentDidMount() { + Piwik.initTracker('https://matomo.balance.io/piwik.php', 2); AppState.addEventListener('change', this.handleAppStateChange); firebase.messaging().getToken() .then(fcmToken => { @@ -120,7 +122,8 @@ class App extends Component { } handleAppStateChange = async (nextAppState) => { - if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') { + if (this.state.appState.match(/inactive|unknown|background/) && nextAppState === 'active') { + Piwik.trackEvent('screen', 'view', 'app'); this.fetchAllTransactionsFromWalletConnectSessions(); } this.setState({ appState: nextAppState }); diff --git a/yarn.lock b/yarn.lock index 1801ab96d75..e0df37e8ee8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6735,6 +6735,10 @@ react-native-mail@^3.0.6: version "3.0.7" resolved "https://registry.yarnpkg.com/react-native-mail/-/react-native-mail-3.0.7.tgz#07e6aca43f6f1f85f3e58e96e7fcd16b31a927b8" +"react-native-matomo@git+https://github.com/BonifyByForteil/react-native-matomo.git": + version "0.0.8" + resolved "git+https://github.com/BonifyByForteil/react-native-matomo.git#32907c88a586f8dcc69a69a0303561753064cb50" + react-native-os@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.2.1.tgz#681c27b4b4340c96f6297cf50df00ba2f6fad7cb" From e92a56e324695d10f30914569bd6f9d3791c4fef Mon Sep 17 00:00:00 2001 From: jinchung Date: Fri, 23 Nov 2018 22:40:58 -0500 Subject: [PATCH 02/32] added more tracking events for Piwik --- src/components/coin-row/BalanceCoinRow.js | 2 ++ src/components/expanded-state/TokenExpandedState.js | 2 ++ src/components/fab/SendFab.js | 6 +++++- src/components/unique-token/UniqueTokenCard.js | 2 ++ src/screens/QRScannerScreenWithData.js | 4 ++++ src/screens/SendScreen.js | 3 +++ src/screens/TransactionConfirmationScreenWithData.js | 3 +++ 7 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/coin-row/BalanceCoinRow.js b/src/components/coin-row/BalanceCoinRow.js index 850163ef4cd..e9682f7b361 100644 --- a/src/components/coin-row/BalanceCoinRow.js +++ b/src/components/coin-row/BalanceCoinRow.js @@ -1,6 +1,7 @@ import { get } from 'lodash'; import PropTypes from 'prop-types'; import React, { Fragment } from 'react'; +import Piwik from 'react-native-matomo'; import { compose, shouldUpdate, withHandlers } from 'recompact'; import { colors } from '../../styles'; import { ButtonPressAnimation } from '../buttons'; @@ -65,6 +66,7 @@ export default compose( withHandlers({ onPress: ({ item: { symbol }, onPress }) => () => { if (onPress) { + Piwik.trackEvent('BalanceCoinRow', 'view-expanded'); onPress(symbol); } }, diff --git a/src/components/expanded-state/TokenExpandedState.js b/src/components/expanded-state/TokenExpandedState.js index d69623049d2..138cd11096b 100644 --- a/src/components/expanded-state/TokenExpandedState.js +++ b/src/components/expanded-state/TokenExpandedState.js @@ -2,6 +2,7 @@ import { get } from 'lodash'; import PropTypes from 'prop-types'; import React from 'react'; import { InteractionManager } from 'react-native'; +import Piwik from 'react-native-matomo'; import { compose, withHandlers, withProps } from 'recompact'; import { AssetPanel, AssetPanelAction, AssetPanelHeader } from './asset-panel'; import FloatingPanels from './FloatingPanels'; @@ -46,6 +47,7 @@ export default compose( navigation.goBack(); InteractionManager.runAfterInteractions(() => { + Piwik.trackEvent('Navigation', 'send-expanded'); navigation.navigate('SendScreen', { asset: symbol }); }); }, diff --git a/src/components/fab/SendFab.js b/src/components/fab/SendFab.js index 82decc1758e..1341c5275ba 100644 --- a/src/components/fab/SendFab.js +++ b/src/components/fab/SendFab.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React, { Fragment } from 'react'; import { withNavigation } from 'react-navigation'; +import Piwik from 'react-native-matomo'; import RadialGradient from 'react-native-radial-gradient'; import { compose, onlyUpdateForKeys, withHandlers } from 'recompact'; import styled from 'styled-components/primitives'; @@ -40,6 +41,9 @@ SendFab.propTypes = { export default compose( withNavigation, - withHandlers({ onPress: ({ navigation }) => () => navigation.navigate('SendScreen') }), + withHandlers({ onPress: ({ navigation }) => () => { + Piwik.trackEvent('Navigation', 'send-fab'); + navigation.navigate('SendScreen'); + }}), onlyUpdateForKeys(['disabled']), )(SendFab); diff --git a/src/components/unique-token/UniqueTokenCard.js b/src/components/unique-token/UniqueTokenCard.js index ddf3660a2ab..c7fbc125a53 100644 --- a/src/components/unique-token/UniqueTokenCard.js +++ b/src/components/unique-token/UniqueTokenCard.js @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import React from 'react'; +import Piwik from 'react-native-matomo'; import { compose, pure, withHandlers } from 'recompact'; import styled from 'styled-components/primitives'; import { colors, position, shadow } from '../../styles'; @@ -74,6 +75,7 @@ export default compose( withHandlers({ onPress: ({ item: { name }, onPress }) => () => { if (onPress) { + Piwik.trackEvent('UniqueTokens', 'view'); onPress(name); } }, diff --git a/src/screens/QRScannerScreenWithData.js b/src/screens/QRScannerScreenWithData.js index 04b0aea8415..82b01789381 100644 --- a/src/screens/QRScannerScreenWithData.js +++ b/src/screens/QRScannerScreenWithData.js @@ -4,6 +4,7 @@ import PropTypes from 'prop-types'; import React, { PureComponent } from 'react'; import { Vibration } from 'react-native'; import firebase from 'react-native-firebase'; +import Piwik from 'react-native-matomo'; import { compose } from 'recompact'; import { Alert } from '../components/alerts'; import { walletConnectInit } from '../model/walletconnect'; @@ -70,10 +71,12 @@ class QRScannerScreenWithData extends PureComponent { const address = getEthereumAddressFromQRCodeData(data); if (address) { + Piwik.trackEvent('QRScanner', 'address'); return navigation.navigate('SendScreen', { address }); } if (data.startsWith('ethereum:wc')) { + Piwik.trackEvent('QRScanner', 'walletconnect'); const walletConnector = await walletConnectInit( accountAddress, data @@ -81,6 +84,7 @@ class QRScannerScreenWithData extends PureComponent { await this.checkPushNotificationPermissions(); return addWalletConnector(walletConnector); } else { + Piwik.trackEvent('QRScanner', 'unknown'); return Alert({ message: lang.t('wallet.unrecognized_qrcode'), title: lang.t('wallet.unrecognized_qrcode_title'), diff --git a/src/screens/SendScreen.js b/src/screens/SendScreen.js index 3b3e59141e4..d9407dc9e00 100644 --- a/src/screens/SendScreen.js +++ b/src/screens/SendScreen.js @@ -13,6 +13,7 @@ import { View, } from 'react-native'; import { isIphoneX } from 'react-native-iphone-x-helper'; +import Piwik from 'react-native-matomo'; import TouchID from 'react-native-touch-id'; import { compose, withHandlers } from 'recompact'; import styled from 'styled-components/primitives'; @@ -359,6 +360,8 @@ class SendScreen extends Component { }; sendTransaction = () => { + // TODO: add a name, value? + Piwik.trackEvent('Send', 'confirm'); const { assetAmount, navigation, diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index 32e95d3f335..7c308fa95c4 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -4,6 +4,7 @@ import { get } from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { AlertIOS, StatusBar, Vibration } from 'react-native'; +import Piwik from 'react-native-matomo'; import { withTransactionConfirmationScreen } from '../hoc'; import { sendTransaction } from '../model/wallet'; import { walletConnectSendTransactionHash } from '../model/walletconnect'; @@ -26,6 +27,8 @@ class TransactionConfirmationScreenWithData extends Component { } handleConfirmTransaction = async () => { + // TODO: add a name, value? + Piwik.trackEvent('Send', 'confirm-wc'); const { transactionDetails } = this.props.navigation.state.params; const txPayload = transactionDetails.callData; const web3TxnCount = await getTransactionCount(txPayload.from); From 76fe7a6529d9028f4de099f493736498ec6c3b82 Mon Sep 17 00:00:00 2001 From: jinchung Date: Fri, 23 Nov 2018 23:07:21 -0500 Subject: [PATCH 03/32] deduping wc sessions with same dapp name --- src/redux/walletconnect.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/redux/walletconnect.js b/src/redux/walletconnect.js index c585e0cafa0..4c11aeaa9fa 100644 --- a/src/redux/walletconnect.js +++ b/src/redux/walletconnect.js @@ -1,13 +1,17 @@ import { isFuture } from 'date-fns'; -import { omitBy, pickBy } from 'lodash'; +import { get, isEmpty, omitBy, pickBy } from 'lodash'; // -- Constants --------------------------------------- // const WALLETCONNECT_NEW_SESSION = 'walletconnect/WALLETCONNECT_NEW_SESSION'; export const addWalletConnector = (walletConnector) => (dispatch, getState) => { if (walletConnector) { + const newDappName = get(walletConnector, 'dappName', null); const { walletConnectors } = getState().walletconnect; - const updatedWalletConnectors = { ...walletConnectors, [walletConnector.sessionId]: walletConnector }; + const dedupedConnectors = !isEmpty(newDappName) ? + pickBy(walletConnectors, (connector) => { return newDappName !== connector.dappName }) : + walletConnectors; + const updatedWalletConnectors = { ...dedupedConnectors, [walletConnector.sessionId]: walletConnector }; dispatch({ payload: updatedWalletConnectors, type: WALLETCONNECT_NEW_SESSION }); } }; From 8f06efc6ebfd1b3ec78036289c661b22c3bf612f Mon Sep 17 00:00:00 2001 From: jinchung Date: Sat, 24 Nov 2018 10:32:38 -0500 Subject: [PATCH 04/32] removing tvOS --- ios/BalanceWallet-tvOS/Info.plist | 54 -- ios/BalanceWallet-tvOSTests/Info.plist | 24 - ios/BalanceWallet.xcodeproj/project.pbxproj | 620 +------------------- 3 files changed, 1 insertion(+), 697 deletions(-) delete mode 100644 ios/BalanceWallet-tvOS/Info.plist delete mode 100644 ios/BalanceWallet-tvOSTests/Info.plist diff --git a/ios/BalanceWallet-tvOS/Info.plist b/ios/BalanceWallet-tvOS/Info.plist deleted file mode 100644 index 2fb6a11c2c3..00000000000 --- a/ios/BalanceWallet-tvOS/Info.plist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - - diff --git a/ios/BalanceWallet-tvOSTests/Info.plist b/ios/BalanceWallet-tvOSTests/Info.plist deleted file mode 100644 index 886825ccc9b..00000000000 --- a/ios/BalanceWallet-tvOSTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/ios/BalanceWallet.xcodeproj/project.pbxproj b/ios/BalanceWallet.xcodeproj/project.pbxproj index bdd955a2f81..83638320f87 100644 --- a/ios/BalanceWallet.xcodeproj/project.pbxproj +++ b/ios/BalanceWallet.xcodeproj/project.pbxproj @@ -5,6 +5,7 @@ }; objectVersion = 46; objects = { + /* Begin PBXBuildFile section */ 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; @@ -40,27 +41,13 @@ 24979E8920F84250007EB0DA /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 24979E7720F84004007EB0DA /* GoogleService-Info.plist */; }; 26095B12C30047F89592D463 /* SF-Pro-Text-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 944CF612F0304DF281E33B66 /* SF-Pro-Text-Regular.otf */; }; 27B7AFAC2AAE441BB13D9B06 /* libRNCamera.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0DA16B6B3B0844198AC5A107 /* libRNCamera.a */; }; - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; - 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; - 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; - 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; - 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; - 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; - 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; - 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; }; 2D7BB74FB1A44EE2A2426373 /* SF-Pro-Text-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = E672AB1C5404435897615660 /* SF-Pro-Text-Light.otf */; }; - 2DCD954D1E0B4F2C00145EB5 /* BalanceWalletTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* BalanceWalletTests.m */; }; - 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 3049BEF5B7E0435F905556DD /* Graphik-ThinItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3EA8003C5E2D46E38184714B /* Graphik-ThinItalic.otf */; }; 3310F0AEC95F47189C2B19DD /* Graphik-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 7CEEDA7A68C24426BBAA8D77 /* Graphik-BoldItalic.otf */; }; 340305B6506A4DDFB4EB98AA /* SF-Pro-Text-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F62BBE10D6534F74B2180711 /* SF-Pro-Text-Bold.otf */; }; 35AD5968C62046E7BC7CF346 /* Graphik-Super.otf in Resources */ = {isa = PBXBuildFile; fileRef = 7CD46377E5FC4E5EBFD57D71 /* Graphik-Super.otf */; }; 396C4BA42EEC4D0985CEBB42 /* SF-Pro-Text-SemiboldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = FA887652F27F43869229AD50 /* SF-Pro-Text-SemiboldItalic.otf */; }; 3C363E14D5DE4A028E43EA38 /* SF-Pro-Display-UltralightItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = DCA738BE00E04734AEDA2F07 /* SF-Pro-Display-UltralightItalic.otf */; }; - 3C398DDB3F4F4F7E9B3F8C86 /* libRNRandomBytes-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E0889DFA1224AA48F1A5301 /* libRNRandomBytes-tvOS.a */; }; 3C41C1415A994234A0FF2589 /* SF-Pro-Text-Heavy.otf in Resources */ = {isa = PBXBuildFile; fileRef = 233322FCDC624F6FA60C4B52 /* SF-Pro-Text-Heavy.otf */; }; 4013198EBD3D4D6F8052D25E /* SF-Pro-Display-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9DF45B9EB38D4E8FA18A04C6 /* SF-Pro-Display-Light.otf */; }; 41804DE52CE94296995264E0 /* SF-Pro-Text-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 35A24AFF4AB449C287EE66A8 /* SF-Pro-Text-Medium.otf */; }; @@ -80,7 +67,6 @@ 7E04FF8B32EC4F2BB6BF1403 /* Graphik-ExtralightItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = 273D2D617F3F43E99F8F404B /* Graphik-ExtralightItalic.otf */; }; 7F911FD5E35D4FD99D48A61D /* libSRSRadialGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2FA917DDE3314475BABEC117 /* libSRSRadialGradient.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; - 8701D37590E44FD890F8B051 /* libRNSVG-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A19C32218BC469EA9228F2E /* libRNSVG-tvOS.a */; }; 872630C5E4CA448D8DDC783E /* Graphik-Extralight.otf in Resources */ = {isa = PBXBuildFile; fileRef = 93D62D49D9CA46F292BD9869 /* Graphik-Extralight.otf */; }; 8B7F7FDAB33B4D119E087D57 /* Graphik-SemiboldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A7F0978B24BA4EC283C580D9 /* Graphik-SemiboldItalic.otf */; }; 8FB4C0E7FE3240F2B2D23CE2 /* SFMono-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8789D635428240B5ABF282EE /* SFMono-Bold.otf */; }; @@ -364,13 +350,6 @@ remoteGlobalIDString = F886647B1F4ADB500036D01B; remoteInfo = "CodePush-tvOS"; }; - 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; - remoteInfo = "BalanceWallet-tvOS"; - }; 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; @@ -647,8 +626,6 @@ 28B88B43D75F4B529A711317 /* RNRandomBytes.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNRandomBytes.xcodeproj; path = "../node_modules/react-native-randombytes/RNRandomBytes.xcodeproj"; sourceTree = ""; }; 2AEF0207B9724FE5A27519FF /* SF-Pro-Display-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SF-Pro-Display-Medium.otf"; path = "../src/assets/fonts/SF-Pro-Display-Medium.otf"; sourceTree = ""; }; 2C4A4A4FB3D84F14A48989D8 /* SFMono-Light.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "SFMono-Light.otf"; path = "../src/assets/fonts/SFMono-Light.otf"; sourceTree = ""; }; - 2D02E47B1E0B4A5D006451C7 /* BalanceWallet-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BalanceWallet-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2D02E4901E0B4A5D006451C7 /* BalanceWallet-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "BalanceWallet-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 2DA6F347A6B540399883FF91 /* Graphik-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Graphik-MediumItalic.otf"; path = "../src/assets/fonts/Graphik-MediumItalic.otf"; sourceTree = ""; }; 2DB932A7706945C787DE22A6 /* SplashScreen.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = SplashScreen.xcodeproj; path = "../node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj"; sourceTree = ""; }; @@ -797,31 +774,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */, - 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, - 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, - 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, - 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, - 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, - 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, - 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, - 3C398DDB3F4F4F7E9B3F8C86 /* libRNRandomBytes-tvOS.a in Frameworks */, - 8701D37590E44FD890F8B051 /* libRNSVG-tvOS.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -1273,8 +1225,6 @@ children = ( 13B07F961A680F5B00A75B9A /* BalanceWallet.app */, 00E356EE1AD99517003FC87E /* BalanceWalletTests.xctest */, - 2D02E47B1E0B4A5D006451C7 /* BalanceWallet-tvOS.app */, - 2D02E4901E0B4A5D006451C7 /* BalanceWallet-tvOSTests.xctest */, ); name = Products; sourceTree = ""; @@ -1390,42 +1340,6 @@ productReference = 13B07F961A680F5B00A75B9A /* BalanceWallet.app */; productType = "com.apple.product-type.application"; }; - 2D02E47A1E0B4A5D006451C7 /* BalanceWallet-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BalanceWallet-tvOS" */; - buildPhases = ( - 2D02E4771E0B4A5D006451C7 /* Sources */, - 2D02E4781E0B4A5D006451C7 /* Frameworks */, - 2D02E4791E0B4A5D006451C7 /* Resources */, - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "BalanceWallet-tvOS"; - productName = "BalanceWallet-tvOS"; - productReference = 2D02E47B1E0B4A5D006451C7 /* BalanceWallet-tvOS.app */; - productType = "com.apple.product-type.application"; - }; - 2D02E48F1E0B4A5D006451C7 /* BalanceWallet-tvOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BalanceWallet-tvOSTests" */; - buildPhases = ( - 2D02E48C1E0B4A5D006451C7 /* Sources */, - 2D02E48D1E0B4A5D006451C7 /* Frameworks */, - 2D02E48E1E0B4A5D006451C7 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, - ); - name = "BalanceWallet-tvOSTests"; - productName = "BalanceWallet-tvOSTests"; - productReference = 2D02E4901E0B4A5D006451C7 /* BalanceWallet-tvOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1449,17 +1363,6 @@ }; }; }; - 2D02E47A1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = Q4G66XSS36; - ProvisioningStyle = Automatic; - }; - 2D02E48F1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = Q4G66XSS36; - ProvisioningStyle = Automatic; - TestTargetID = 2D02E47A1E0B4A5D006451C7; - }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BalanceWallet" */; @@ -1611,8 +1514,6 @@ targets = ( 13B07F861A680F5B00A75B9A /* BalanceWallet */, 00E356ED1AD99517003FC87E /* BalanceWalletTests */, - 2D02E47A1E0B4A5D006451C7 /* BalanceWallet-tvOS */, - 2D02E48F1E0B4A5D006451C7 /* BalanceWallet-tvOSTests */, ); }; /* End PBXProject section */ @@ -2154,21 +2055,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2D02E4791E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48E1E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -2204,20 +2090,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native Code And Images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; - }; 3CF823D3218F310D0024B77B /* ShellScript */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -2252,23 +2124,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2D02E4771E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48C1E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DCD954D1E0B4F2C00145EB5 /* BalanceWalletTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -2277,11 +2132,6 @@ target = 13B07F861A680F5B00A75B9A /* BalanceWallet */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D02E47A1E0B4A5D006451C7 /* BalanceWallet-tvOS */; - targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -2638,113 +2488,6 @@ }; name = Staging; }; - 2C6A799A21127ED9003AFB37 /* Staging */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Staging; - }; - 2C6A799B21127ED9003AFB37 /* Staging */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BalanceWallet-tvOS.app/BalanceWallet-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Staging; - }; 2C87B7992197FA1900682EC4 /* LocalRelease */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2885,345 +2628,6 @@ }; name = LocalRelease; }; - 2C87B79C2197FA1900682EC4 /* LocalRelease */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = LocalRelease; - }; - 2C87B79D2197FA1900682EC4 /* LocalRelease */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BalanceWallet-tvOS.app/BalanceWallet-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = LocalRelease; - }; - 2D02E4971E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = Q4G66XSS36; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Debug; - }; - 2D02E4981E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Release; - }; - 2D02E4991E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = Q4G66XSS36; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BalanceWallet-tvOS.app/BalanceWallet-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Debug; - }; - 2D02E49A1E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = Q4G66XSS36; - GCC_NO_COMMON_BLOCKS = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../node_modules/react-native-camera/ios/**", - "$(SRCROOT)/../node_modules/react-native-fcm/ios", - "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", - "$(SRCROOT)/../node_modules/react-native-linear-gradient/BVLinearGradient", - "$(SRCROOT)/../node_modules/react-native-mail/RNMail", - "$(SRCROOT)/../node_modules/react-native-os/ios", - "$(SRCROOT)/../node_modules/react-native-permissions/ios/**", - "$(SRCROOT)/../node_modules/react-native-radial-gradient/ios", - "$(SRCROOT)/../node_modules/react-native-randombytes", - "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", - "$(SRCROOT)/../node_modules/react-native-svg/ios/**", - "$(SRCROOT)/../node_modules/react-native-tcp/ios/**", - "$(SRCROOT)/../node_modules/react-native-tooltip/ToolTipMenu", - "$(SRCROOT)/../node_modules/react-native-touch-id", - "$(SRCROOT)/../node_modules/react-native-udp/ios/**", - "$(SRCROOT)/../node_modules/react-native-haptic-feedback/ios", - "$(SRCROOT)/../node_modules/react-native-firebase/ios/RNFirebase/**", - "$(SRCROOT)/../node_modules/react-native-gesture-handler/ios/**", - "$(SRCROOT)/../node_modules/react-native-code-push/ios/CodePush/**", - "$(SRCROOT)/../node_modules/@ledgerhq/react-native-passcode-auth", - ); - INFOPLIST_FILE = "BalanceWallet-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - "\"$(SRCROOT)/$(TARGET_NAME)\"", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.BalanceWallet-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BalanceWallet-tvOS.app/BalanceWallet-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Release; - }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3327,28 +2731,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BalanceWallet-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4971E0B4A5E006451C7 /* Debug */, - 2D02E4981E0B4A5E006451C7 /* Release */, - 2C87B79C2197FA1900682EC4 /* LocalRelease */, - 2C6A799A21127ED9003AFB37 /* Staging */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "BalanceWallet-tvOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4991E0B4A5E006451C7 /* Debug */, - 2D02E49A1E0B4A5E006451C7 /* Release */, - 2C87B79D2197FA1900682EC4 /* LocalRelease */, - 2C6A799B21127ED9003AFB37 /* Staging */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "BalanceWallet" */ = { isa = XCConfigurationList; buildConfigurations = ( From b3896ce1c95f2c01e5df28419c52defb73a57b39 Mon Sep 17 00:00:00 2001 From: jinchung Date: Sat, 24 Nov 2018 11:57:26 -0500 Subject: [PATCH 05/32] removing dedupe wc changes until decided about how to represent multiple sessions per dapp name --- src/redux/walletconnect.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/redux/walletconnect.js b/src/redux/walletconnect.js index 4c11aeaa9fa..c585e0cafa0 100644 --- a/src/redux/walletconnect.js +++ b/src/redux/walletconnect.js @@ -1,17 +1,13 @@ import { isFuture } from 'date-fns'; -import { get, isEmpty, omitBy, pickBy } from 'lodash'; +import { omitBy, pickBy } from 'lodash'; // -- Constants --------------------------------------- // const WALLETCONNECT_NEW_SESSION = 'walletconnect/WALLETCONNECT_NEW_SESSION'; export const addWalletConnector = (walletConnector) => (dispatch, getState) => { if (walletConnector) { - const newDappName = get(walletConnector, 'dappName', null); const { walletConnectors } = getState().walletconnect; - const dedupedConnectors = !isEmpty(newDappName) ? - pickBy(walletConnectors, (connector) => { return newDappName !== connector.dappName }) : - walletConnectors; - const updatedWalletConnectors = { ...dedupedConnectors, [walletConnector.sessionId]: walletConnector }; + const updatedWalletConnectors = { ...walletConnectors, [walletConnector.sessionId]: walletConnector }; dispatch({ payload: updatedWalletConnectors, type: WALLETCONNECT_NEW_SESSION }); } }; From 0791581a73090cc357717cf1d77894f741afc41c Mon Sep 17 00:00:00 2001 From: jinchung Date: Sat, 24 Nov 2018 18:58:56 -0500 Subject: [PATCH 06/32] adding piwik to screen views --- src/App.js | 1 - src/hoc/index.js | 1 + src/hoc/withTrackingScreen.js | 12 ++++++++++++ src/screens/ActivityScreen.js | 10 +++++++++- src/screens/QRScannerScreenWithData.js | 1 + src/screens/SettingsScreenWithData.js | 7 +++++++ src/screens/TransactionConfirmationScreenWithData.js | 6 ++++++ src/screens/WalletScreen.js | 7 ++++++- 8 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 src/hoc/withTrackingScreen.js diff --git a/src/App.js b/src/App.js index 5c6381ef22a..d0bda861481 100644 --- a/src/App.js +++ b/src/App.js @@ -123,7 +123,6 @@ class App extends Component { handleAppStateChange = async (nextAppState) => { if (this.state.appState.match(/inactive|unknown|background/) && nextAppState === 'active') { - Piwik.trackEvent('screen', 'view', 'app'); this.fetchAllTransactionsFromWalletConnectSessions(); } this.setState({ appState: nextAppState }); diff --git a/src/hoc/index.js b/src/hoc/index.js index 7a34b128d89..ea0cfbfc4dd 100644 --- a/src/hoc/index.js +++ b/src/hoc/index.js @@ -9,6 +9,7 @@ export { default as withRequests } from './withRequests'; export { default as withRequestsInit } from './withRequestsInit'; export { default as withRotationForDirection } from './withRotationForDirection'; export { default as withSafeAreaViewInsetValues } from './withSafeAreaViewInsetValues'; +export { default as withTrackingScreen } from './withTrackingScreen'; export { default as withTransactionConfirmationScreen } from './withTransactionConfirmationScreen'; export { default as withTransitionProps } from './withTransitionProps'; export { default as withWalletConnectConnections } from './withWalletConnectConnections'; diff --git a/src/hoc/withTrackingScreen.js b/src/hoc/withTrackingScreen.js new file mode 100644 index 00000000000..c26e9817b4e --- /dev/null +++ b/src/hoc/withTrackingScreen.js @@ -0,0 +1,12 @@ +import Piwik from 'react-native-matomo'; +import { compose, lifecycle } from 'recompact'; +import { getDisplayName } from 'recompose'; + +export default Component => compose( + lifecycle({ + componentDidMount() { + const displayName = getDisplayName(Component); + Piwik.trackScreen(displayName, displayName); + }, + }), +)(Component); diff --git a/src/screens/ActivityScreen.js b/src/screens/ActivityScreen.js index d85e4c6d004..2f5a4130c03 100644 --- a/src/screens/ActivityScreen.js +++ b/src/screens/ActivityScreen.js @@ -1,12 +1,18 @@ import PropTypes from 'prop-types'; import React from 'react'; import { compose, withHandlers, onlyUpdateForKeys } from 'recompact'; +import { setDisplayName } from 'recompose'; import styled from 'styled-components/primitives'; import { ActivityList } from '../components/activity-list'; import { Header, HeaderButton } from '../components/header'; import Icon from '../components/icons/Icon'; import { Column } from '../components/layout'; -import { withAccountAddress, withAccountTransactions, withRequests } from '../hoc'; +import { + withAccountAddress, + withAccountTransactions, + withRequests, + withTrackingScreen, +} from '../hoc'; import { colors, position } from '../styles'; const CloseButtonIcon = styled(Icon)` @@ -60,6 +66,7 @@ ActivityScreen.propTypes = { }; export default compose( + setDisplayName('ActivityScreen'), withAccountAddress, withAccountTransactions, withRequests, @@ -67,4 +74,5 @@ export default compose( onPressBack: ({ navigation }) => () => navigation.goBack(), }), onlyUpdateForKeys(['hasPendingTransaction', 'requests', 'transactionsCount']), + withTrackingScreen, )(ActivityScreen); diff --git a/src/screens/QRScannerScreenWithData.js b/src/screens/QRScannerScreenWithData.js index 82b01789381..962f7263730 100644 --- a/src/screens/QRScannerScreenWithData.js +++ b/src/screens/QRScannerScreenWithData.js @@ -25,6 +25,7 @@ class QRScannerScreenWithData extends PureComponent { componentDidUpdate = (prevProps) => { if (this.props.isScreenActive && !prevProps.isScreenActive) { this.setState({ enableScanning: true }); + Piwik.trackScreen('QRScannerScreen', 'QRScannerScreen'); } } diff --git a/src/screens/SettingsScreenWithData.js b/src/screens/SettingsScreenWithData.js index 4409f4eda9b..5114bfd0b09 100644 --- a/src/screens/SettingsScreenWithData.js +++ b/src/screens/SettingsScreenWithData.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { InteractionManager } from 'react-native'; +import Piwik from 'react-native-matomo'; import { withAccountAddress } from '../hoc'; import { loadSeedPhrase } from '../model/wallet'; import SettingsScreen from './SettingsScreen'; @@ -12,6 +13,12 @@ class SettingsScreenWithData extends Component { state = { seedPhrase: null } + componentDidUpdate = (prevProps) => { + if (this.props.isScreenActive && !prevProps.isScreenActive) { + Piwik.trackScreen('SettingsScreen', 'SettingsScreen'); + } + } + shouldComponentUpdate = ({ accountAddress, isScreenActive }, nextState) => { if (!isScreenActive && this.state.seedPhrase) { this.handleSeedPhraseState(); diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index 7c308fa95c4..b631e8edec6 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -21,6 +21,12 @@ class TransactionConfirmationScreenWithData extends Component { walletConnectors: PropTypes.object, } + componentDidUpdate = (prevProps) => { + if (this.props.isScreenActive && !prevProps.isScreenActive) { + Piwik.trackScreen('TxnConfirmScreen', 'TxnConfirmScreen'); + } + } + componentDidMount() { StatusBar.setBarStyle('light-content', true); Vibration.vibrate(); diff --git a/src/screens/WalletScreen.js b/src/screens/WalletScreen.js index 0f2dc461139..df90e28ecaa 100644 --- a/src/screens/WalletScreen.js +++ b/src/screens/WalletScreen.js @@ -1,6 +1,7 @@ import { withSafeTimeout } from '@hocs/safe-timers'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; +import Piwik from 'react-native-matomo'; import { compose, onlyUpdateForKeys, @@ -42,10 +43,14 @@ class WalletScreen extends Component { componentDidUpdate = (prevProps) => { const { isLoading, onHideSplashScreen } = this.props; - if (!isLoading && prevProps.isLoading) { onHideSplashScreen(); } + + if (this.props.isScreenActive && !prevProps.isScreenActive) { + Piwik.trackScreen('WalletScreen', 'WalletScreen'); + } + } render = () => { From 99aae7579299d28a548ae1d9dcb8877f39bf8782 Mon Sep 17 00:00:00 2001 From: jinchung Date: Sun, 25 Nov 2018 20:11:52 -0500 Subject: [PATCH 07/32] clearing out notifications after app resume --- src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 5c6381ef22a..a2734f2fbf9 100644 --- a/src/App.js +++ b/src/App.js @@ -122,7 +122,7 @@ class App extends Component { } handleAppStateChange = async (nextAppState) => { - if (this.state.appState.match(/inactive|unknown|background/) && nextAppState === 'active') { + if (this.state.appState.match(/unknown|background/) && nextAppState === 'active') { Piwik.trackEvent('screen', 'view', 'app'); this.fetchAllTransactionsFromWalletConnectSessions(); } @@ -156,6 +156,7 @@ class App extends Component { const allTransactions = await walletConnectGetAllTransactions(allConnectors); if (!isEmpty(allTransactions)) { this.props.addTransactionsToApprove(allTransactions); + await firebase.notifications().removeAllDeliveredNotifications(); } } } From 184cbf390a80b5c2ea9e1b0c66d639a4eacfa422 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 27 Nov 2018 14:54:18 -0500 Subject: [PATCH 08/32] support for tracking send value on piwik --- package.json | 2 +- src/model/wallet.js | 15 +++---- src/screens/SendScreen.js | 3 -- yarn.lock | 87 ++++++++++++++++++++++----------------- 4 files changed, 59 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index f67ca3d6898..b2cdf2797d9 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "0.5.28", + "balance-common": "^0.6.0", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/src/model/wallet.js b/src/model/wallet.js index 31dff2cc1a4..f2f6672c7e4 100644 --- a/src/model/wallet.js +++ b/src/model/wallet.js @@ -7,6 +7,7 @@ import { AUTHENTICATION_TYPE, canImplyAuthentication, } from 'react-native-keychain'; +import Piwik from 'react-native-matomo'; import * as keychain from '../model/keychain'; const seedPhraseKey = 'balanceWalletSeedPhrase'; const privateKeyKey = 'balanceWalletPrivateKey'; @@ -25,8 +26,8 @@ export const walletInit = async (seedPhrase = null) => { return walletAddress; }; -export const loadWallet = async (authenticationPrompt) => { - const privateKey = await loadPrivateKey(authenticationPrompt); +export const loadWallet = async () => { + const privateKey = await loadPrivateKey(); if (privateKey) { const wallet = new ethers.Wallet(privateKey); wallet.provider = ethers.providers.getDefaultProvider(); @@ -48,11 +49,12 @@ export const createTransaction = async (to, data, value, gasLimit, gasPrice, non }; }; -export const sendTransaction = async (transaction, authenticationPrompt = lang.t('account.authenticate.please')) => { +export const sendTransaction = async ({ trackingName, trackingAmount, transaction }) => { try { - const wallet = await loadWallet(authenticationPrompt); + const wallet = await loadWallet(); try { const result = await wallet.sendTransaction(transaction); + Piwik.trackEvent('Send', 'confirm', trackingName, trackingAmount); return result.hash; } catch(error) { console.log('sendTxn error', error); @@ -65,8 +67,7 @@ export const sendTransaction = async (transaction, authenticationPrompt = lang.t } }; -export const loadSeedPhrase = async () => { - const authenticationPrompt = lang.t('account.authenticate.please_seed_phrase'); +export const loadSeedPhrase = async (authenticationPrompt = lang.t('account.authenticate.please_seed_phrase')) => { const seedPhrase = await keychain.loadString(seedPhraseKey, { authenticationPrompt }); return seedPhrase; }; @@ -106,7 +107,7 @@ const savePrivateKey = async (privateKey, accessControlOptions = {}) => { await keychain.saveString(privateKeyKey, privateKey, accessControlOptions); }; -const loadPrivateKey = async (authenticationPrompt) => { +const loadPrivateKey = async (authenticationPrompt = lang.t('account.authenticate.please')) => { const privateKey = await keychain.loadString(privateKeyKey, { authenticationPrompt }); return privateKey; }; diff --git a/src/screens/SendScreen.js b/src/screens/SendScreen.js index d9407dc9e00..3b3e59141e4 100644 --- a/src/screens/SendScreen.js +++ b/src/screens/SendScreen.js @@ -13,7 +13,6 @@ import { View, } from 'react-native'; import { isIphoneX } from 'react-native-iphone-x-helper'; -import Piwik from 'react-native-matomo'; import TouchID from 'react-native-touch-id'; import { compose, withHandlers } from 'recompact'; import styled from 'styled-components/primitives'; @@ -360,8 +359,6 @@ class SendScreen extends Component { }; sendTransaction = () => { - // TODO: add a name, value? - Piwik.trackEvent('Send', 'confirm'); const { assetAmount, navigation, diff --git a/yarn.lock b/yarn.lock index e0df37e8ee8..b5469b85ac5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -975,8 +975,8 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" ast-types@0.x.x: - version "0.11.6" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.6.tgz#4e2266c2658829aef3b40cc33ad599c4e9eb89ef" + version "0.11.7" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.7.tgz#f318bf44e339db6a320be0009ded64ec1471f46c" astral-regex@^1.0.0: version "1.0.0" @@ -1233,10 +1233,11 @@ babel-plugin-lodash@^3.3.4: require-package-name "^2.0.1" babel-plugin-styled-components@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.8.0.tgz#9dd054c8e86825203449a852a5746f29f2dab857" + version "1.9.1" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.1.tgz#53dde7a9cdff22a16db197129b1e68160c926e8b" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" lodash "^4.17.10" babel-plugin-syntax-async-functions@^6.8.0: @@ -1255,7 +1256,7 @@ babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -1687,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@0.5.28: - version "0.5.28" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.5.28.tgz#44761a0f2c5b3bad0d5f29502bb7d18f7f3348fb" +balance-common@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.0.tgz#1201a3856c4b461e0e4aa38524ee9d3ec29409ab" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" @@ -2054,8 +2055,8 @@ can-promise@0.0.1: window-or-global "^1.0.1" caniuse-lite@^1.0.30000844: - version "1.0.30000910" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000910.tgz#755d5181d4b006e5a2b59b1ffa05d0a0470039f5" + version "1.0.30000912" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000912.tgz#08e650d4090a9c0ab06bfd2b46b7d3ad6dcaea28" capture-exit@^1.2.0: version "1.2.0" @@ -2098,8 +2099,8 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" chroma-js@^1.3.7: - version "1.4.0" - resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.0.tgz#695c52e7c97617e5f687db31913503d410481ae4" + version "1.4.1" + resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.1.tgz#eb2d9c4d1ff24616be84b35119f4d26f8205f134" ci-info@^1.5.0: version "1.6.0" @@ -2844,8 +2845,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.3.47: - version "1.3.84" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz#2e55df59e818f150a9f61b53471ebf4f0feecc65" + version "1.3.85" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.85.tgz#5c46f790aa96445cabc57eb9d17346b1e46476fe" elliptic@6.3.3: version "6.3.3" @@ -3232,7 +3233,7 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + resolved "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" @@ -3975,8 +3976,8 @@ hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz#42414ccdfff019cd2168168be998c7b3bd5245c0" + version "3.2.0" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.2.0.tgz#d21b9fc72b50fdc38c5d88f6e2c52f2c2dbe5ee2" dependencies: react-is "^16.3.2" @@ -4851,9 +4852,9 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-walletconnect-core@^0.7.26: - version "0.7.26" - resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.26.tgz#2e875fe6c17d9958bbd891a807d448cebd7f5bc8" +js-walletconnect-core@^0.7.27: + version "0.7.27" + resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.27.tgz#e185ae277713fec69a612f43080096ba8ef59e07" dependencies: eth-parse-uri "^0.6.9" @@ -6459,7 +6460,7 @@ pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -psl@^1.1.24: +psl@^1.1.24, psl@^1.1.28: version "1.1.29" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" @@ -6482,7 +6483,7 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -6500,10 +6501,14 @@ qrcode@^1.2.0: pngjs "^3.3.0" yargs "^8.0.2" -qs@6.5.2, qs@^6.5.1, qs@~6.5.2: +qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" +qs@^6.5.1: + version "6.6.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" + query-string@^5.0.1: version "5.1.1" resolved "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -6612,7 +6617,7 @@ react-display-name@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/react-display-name/-/react-display-name-0.2.4.tgz#e2a670b81d79a2204335510c01246f4c92ff12cf" -react-is@^16.3.1, react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.3: +react-is@^16.3.1, react-is@^16.3.2, react-is@^16.5.2, react-is@^16.6.0, react-is@^16.6.3: version "16.6.3" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0" @@ -6697,8 +6702,8 @@ react-native-firebase@^4.3.8: prop-types "^15.6.1" react-native-gesture-handler@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.9.tgz#ddec4d19d51cb6fb54df6eca792ebd76aaef083f" + version "1.0.10" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.10.tgz#160e55e4886471931b7f7d52e22d94007540ab83" dependencies: hoist-non-react-statics "^2.3.1" invariant "^2.2.2" @@ -6728,8 +6733,8 @@ react-native-level-fs@^3.0.1: levelup "^0.18.2" react-native-linear-gradient@^2.4.2: - version "2.4.4" - resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.4.4.tgz#64944a39290eefbede18dfd7e9551f1ef61e3de7" + version "2.5.2" + resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.2.tgz#e00312997661ef99d76d5fb902fef3d04bc6b5d5" react-native-mail@^3.0.6: version "3.0.7" @@ -6959,14 +6964,15 @@ react-navigation-tabs@0.8.4: react-native-tab-view "^1.0.0" react-navigation@^2.18.0: - version "2.18.2" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.2.tgz#ba278ded41f736d029c7cae5d54ab1427dc6ed34" + version "2.18.3" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" dependencies: clamp "^1.0.1" create-react-context "0.2.2" hoist-non-react-statics "^2.2.0" path-to-regexp "^1.7.0" query-string "^6.1.0" + react-is "^16.5.2" react-lifecycles-compat "^3" react-native-safe-area-view "0.11.0" react-native-screens "^1.0.0-alpha.11" @@ -7252,7 +7258,7 @@ regjsgen@^0.4.0: regjsparser@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + resolved "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" dependencies: jsesc "~0.5.0" @@ -7420,10 +7426,10 @@ rn-nodeify@^10.0.0: xtend "^4.0.0" rn-walletconnect-wallet@^0.7.24: - version "0.7.26" - resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.26.tgz#9d39d18f74abd9fe2b4bfd343a6d90a338b43a96" + version "0.7.27" + resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.27.tgz#ac812f4e2c2cb429a10a3130d3eb0898210478fa" dependencies: - js-walletconnect-core "^0.7.26" + js-walletconnect-core "^0.7.27" rsvp@^3.3.3: version "3.6.2" @@ -7933,11 +7939,11 @@ string-width@^1.0.1: string_decoder@^0.10.31, string_decoder@~0.10.x: version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" @@ -8275,7 +8281,14 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3, tough-cookie@~2.4.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" dependencies: From d70da0688d5ddbf553bdbda9b3bd14307c0ccd7c Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 28 Nov 2018 16:54:52 -0500 Subject: [PATCH 09/32] support for send amount and balance amounts on piwik --- package.json | 2 +- src/hoc/index.js | 1 + src/hoc/withTrackingDate.js | 13 ++++++++ src/model/localstorage.js | 18 +++++++++++ src/model/wallet.js | 4 +-- src/redux/reducers.js | 2 ++ src/redux/tracking.js | 30 +++++++++++++++++++ src/redux/transactionsToApprove.js | 21 ++++++++----- src/screens/TransactionConfirmationScreen.js | 6 ++-- .../TransactionConfirmationScreenWithData.js | 18 +++++++---- src/screens/WalletScreen.js | 20 ++++++++++++- yarn.lock | 6 ++-- 12 files changed, 119 insertions(+), 22 deletions(-) create mode 100644 src/hoc/withTrackingDate.js create mode 100644 src/redux/tracking.js diff --git a/package.json b/package.json index b2cdf2797d9..9c7cb105750 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "^0.6.0", + "balance-common": "0.6.0-trackingobject", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/src/hoc/index.js b/src/hoc/index.js index ea0cfbfc4dd..59292bd8cf6 100644 --- a/src/hoc/index.js +++ b/src/hoc/index.js @@ -9,6 +9,7 @@ export { default as withRequests } from './withRequests'; export { default as withRequestsInit } from './withRequestsInit'; export { default as withRotationForDirection } from './withRotationForDirection'; export { default as withSafeAreaViewInsetValues } from './withSafeAreaViewInsetValues'; +export { default as withTrackingDate } from './withTrackingDate'; export { default as withTrackingScreen } from './withTrackingScreen'; export { default as withTransactionConfirmationScreen } from './withTransactionConfirmationScreen'; export { default as withTransitionProps } from './withTransitionProps'; diff --git a/src/hoc/withTrackingDate.js b/src/hoc/withTrackingDate.js new file mode 100644 index 00000000000..caaae989983 --- /dev/null +++ b/src/hoc/withTrackingDate.js @@ -0,0 +1,13 @@ +import { connect } from 'react-redux'; +import { trackingDateInit, updateTrackingDate } from '../redux/tracking'; + +const mapStateToProps = ({ + tracking: { trackingDate }, +}) => ({ + trackingDate, +}); + +export default Component => connect(mapStateToProps, { + trackingDateInit, + updateTrackingDate, +})(Component); diff --git a/src/model/localstorage.js b/src/model/localstorage.js index f28831e7810..222e528c6a9 100644 --- a/src/model/localstorage.js +++ b/src/model/localstorage.js @@ -2,6 +2,24 @@ import { differenceInMinutes } from 'date-fns'; import { pickBy } from 'lodash'; import { commonStorage } from 'balance-common'; +/** + * @desc get last tracking date + * @return {Date|Object} + */ +export const getLastTrackingDate = async () => { + const lastTrackingDate = await commonStorage.getLocal('lastTrackingDate'); + return lastTrackingDate ? new Date(lastTrackingDate) : null; +}; + +/** + * @desc update last tracking date + * @param {String} [address] + * @param {String} [network] + * @return {Void} + */ +export const updateLastTrackingDate = async () => { + await commonStorage.saveLocal('lastTrackingDate', Date.now()); +}; /** * @desc get account local requests * @param {String} [address] diff --git a/src/model/wallet.js b/src/model/wallet.js index f2f6672c7e4..21dec5f8139 100644 --- a/src/model/wallet.js +++ b/src/model/wallet.js @@ -49,12 +49,12 @@ export const createTransaction = async (to, data, value, gasLimit, gasPrice, non }; }; -export const sendTransaction = async ({ trackingName, trackingAmount, transaction }) => { +export const sendTransaction = async ({ tracking, transaction }) => { try { const wallet = await loadWallet(); try { const result = await wallet.sendTransaction(transaction); - Piwik.trackEvent('Send', 'confirm', trackingName, trackingAmount); + Piwik.trackEvent('Send', tracking.action, tracking.name, tracking.amount); return result.hash; } catch(error) { console.log('sendTxn error', error); diff --git a/src/redux/reducers.js b/src/redux/reducers.js index 0d1179ff8b9..ed731fc807c 100644 --- a/src/redux/reducers.js +++ b/src/redux/reducers.js @@ -4,6 +4,7 @@ import { combineReducers } from 'redux'; import imageDimensionsCache from './imageDimensionsCache'; import navigation from './navigation'; import nonce from './nonce'; +import tracking from './tracking'; import transactionsToApprove from './transactionsToApprove'; import walletconnect from './walletconnect'; @@ -13,6 +14,7 @@ export default combineReducers({ navigation, nonce, send, + tracking, transactionsToApprove, walletconnect, }); diff --git a/src/redux/tracking.js b/src/redux/tracking.js new file mode 100644 index 00000000000..2495a4c2764 --- /dev/null +++ b/src/redux/tracking.js @@ -0,0 +1,30 @@ +import { getLastTrackingDate, updateLastTrackingDate } from '../model/localstorage'; + +// -- Constants --------------------------------------- // +const TRACKING_UPDATE_DATE = 'tracking/TRACKING_UPDATE_DATE'; + +export const trackingDateInit = () => (dispatch, getState) => { + getLastTrackingDate().then(lastTrackingDate => { + dispatch({ payload: lastTrackingDate, type: TRACKING_UPDATE_DATE }); + }); +}; + +export const updateTrackingDate = () => (dispatch, getState) => { + updateLastTrackingDate().then(() => { + dispatch({ payload: Date.now(), type: TRACKING_UPDATE_DATE }); + }); +}; + +// -- Reducer ----------------------------------------- // +const INITIAL_STATE = { + trackingDate: null, +}; + +export default (state = INITIAL_STATE, action) => { + switch (action.type) { + case TRACKING_UPDATE_DATE: + return { ...state, trackingDate: action.payload }; + default: + return state; + } +}; diff --git a/src/redux/transactionsToApprove.js b/src/redux/transactionsToApprove.js index 8aa6d6f192e..49bf6e66591 100644 --- a/src/redux/transactionsToApprove.js +++ b/src/redux/transactionsToApprove.js @@ -35,18 +35,23 @@ const getAssetDetails = (contractAddress, assets) => { }; export const getNativeAmount = (prices, nativeCurrency, assetAmount, symbol) => { - let _nativeAmount = ''; + let nativeAmount = ''; + let nativeAmountDisplay = ''; if (prices && prices[nativeCurrency] && prices[nativeCurrency][symbol]) { - const nativeAmount = convertAssetAmountToNativeValue( + nativeAmount = convertAssetAmountToNativeValue( assetAmount, { symbol }, prices, ); - _nativeAmount = formatInputDecimals(nativeAmount, assetAmount); - return convertAssetAmountToDisplaySpecific(_nativeAmount, prices, nativeCurrency); + const _nativeAmount = formatInputDecimals(nativeAmount, assetAmount); + nativeAmountDisplay = convertAssetAmountToDisplaySpecific(_nativeAmount, prices, nativeCurrency); + return { + nativeAmount, + nativeAmountDisplay, + }; } - return _nativeAmount; + return { nativeAmount, nativeAmountDisplay }; }; const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrency) => { @@ -54,7 +59,7 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc const timestampInMs = Date.now(); if (transaction.data === '0x') { const value = fromWei(convertHexToString(transaction.value)); - const nativeAmount = getNativeAmount(prices, nativeCurrency, value, 'ETH'); + const { nativeAmount, nativeAmountDisplay } = getNativeAmount(prices, nativeCurrency, value, 'ETH'); return { asset: { address: null, @@ -66,6 +71,7 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), nativeAmount, + nativeAmountDisplay, nonce: Number(convertHexToString(transaction.nonce)), timestampInMs, to: transaction.to, @@ -78,13 +84,14 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc const toAddress = `0x${dataPayload.slice(0, 64).replace(/^0+/, '')}`; const amount = `0x${dataPayload.slice(64, 128).replace(/^0+/, '')}`; const value = fromWei(convertHexToString(amount), asset.decimals); - const nativeAmount = getNativeAmount(prices, nativeCurrency, value, asset.symbol); + const { nativeAmount, nativeAmountDisplay } = getNativeAmount(prices, nativeCurrency, value, asset.symbol); return { asset, from: transaction.from, gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), nativeAmount, + nativeAmountDisplay, nonce: Number(convertHexToString(transaction.nonce)), timestampInMs, to: toAddress, diff --git a/src/screens/TransactionConfirmationScreen.js b/src/screens/TransactionConfirmationScreen.js index c9031fce9ca..62d3df70d2b 100644 --- a/src/screens/TransactionConfirmationScreen.js +++ b/src/screens/TransactionConfirmationScreen.js @@ -138,7 +138,7 @@ const TransactionConfirmationScreen = ({ amount, dappName, name, - nativeAmount, + nativeAmountDisplay, symbol, }, onCancelTransaction, @@ -180,7 +180,7 @@ const TransactionConfirmationScreen = ({ {symbol} - {nativeAmount} + {nativeAmountDisplay} @@ -196,7 +196,7 @@ TransactionConfirmationScreen.propTypes = { address: PropTypes.string, amount: PropTypes.string, name: PropTypes.string, - nativeAmount: PropTypes.string, + nativeAmountDisplay: PropTypes.string, symbol: PropTypes.string, }), onCancelTransaction: PropTypes.func, diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index b631e8edec6..a9201660ea3 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -33,15 +33,23 @@ class TransactionConfirmationScreenWithData extends Component { } handleConfirmTransaction = async () => { - // TODO: add a name, value? - Piwik.trackEvent('Send', 'confirm-wc'); const { transactionDetails } = this.props.navigation.state.params; const txPayload = transactionDetails.callData; const web3TxnCount = await getTransactionCount(txPayload.from); const maxTxnCount = Math.max(this.props.transactionCountNonce, web3TxnCount); const nonce = web3Instance.utils.toHex(maxTxnCount); const txPayloadLatestNonce = { ...txPayload, nonce }; - const transactionHash = await sendTransaction(txPayloadLatestNonce, lang.t('wallet.transaction.confirm')); + const symbol = get(transactionDisplayDetails, 'asset.symbol', 'unknown'); + const address = get(transactionDisplayDetails, 'asset.address', ''); + const trackingName = `${symbol}:${address}`; + const transactionHash = await sendTransaction({ + tracking: { + action: 'send-wc', + amount: get(transactionDisplayDetails, 'nativeAmount'), + name: trackingName, + }, + transaction: txPayloadLatestNonce + }); if (transactionHash) { this.props.updateTransactionCountNonce(maxTxnCount + 1); @@ -100,7 +108,7 @@ class TransactionConfirmationScreenWithData extends Component { dappName, transactionDisplayDetails: { asset, - nativeAmount, + nativeAmountDisplay, to, value, }, @@ -114,7 +122,7 @@ class TransactionConfirmationScreenWithData extends Component { amount: value || '0.00', dappName: dappName || '', name: asset.name || 'No data', - nativeAmount, + nativeAmountDisplay, symbol: asset.symbol || 'N/A', }} onCancelTransaction={this.handleCancelTransaction} diff --git a/src/screens/WalletScreen.js b/src/screens/WalletScreen.js index df90e28ecaa..d4d01b99d7a 100644 --- a/src/screens/WalletScreen.js +++ b/src/screens/WalletScreen.js @@ -1,3 +1,5 @@ +import { get } from 'lodash'; +import { isSameDay } from 'date-fns'; import { withSafeTimeout } from '@hocs/safe-timers'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; @@ -21,6 +23,7 @@ import { withAccountAssets, withHideSplashScreen, withRequestsInit, + withTrackingDate, withTransitionProps, } from '../hoc'; import { position } from '../styles'; @@ -41,14 +44,28 @@ class WalletScreen extends Component { transitionProps: PropTypes.object, } + componentDidMount = () => { + this.props.trackingDateInit(); + } + componentDidUpdate = (prevProps) => { - const { isLoading, onHideSplashScreen } = this.props; + const { + assetsTotalUSD, + isLoading, + onHideSplashScreen, + trackingDate + } = this.props; if (!isLoading && prevProps.isLoading) { onHideSplashScreen(); } if (this.props.isScreenActive && !prevProps.isScreenActive) { Piwik.trackScreen('WalletScreen', 'WalletScreen'); + const totalTrackingAmount = get(assetsTotalUSD, 'totalTrackingAmount', null); + if (totalTrackingAmount && (!this.props.trackingDate || !isSameDay(this.props.trackingDate, Date.now()))) { + Piwik.trackEvent('Balance', 'Total', 'TotalUSDBalance', totalTrackingAmount); + this.props.updateTrackingDate(); + } } } @@ -103,6 +120,7 @@ export default compose( withHideSplashScreen, withRequestsInit, withSafeTimeout, + withTrackingDate, withTransitionProps, withState('showShitcoins', 'toggleShowShitcoins', true), withHandlers({ diff --git a/yarn.lock b/yarn.lock index b5469b85ac5..a829a1d019c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1688,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.0.tgz#1201a3856c4b461e0e4aa38524ee9d3ec29409ab" +balance-common@0.6.0-trackingobject: + version "0.6.0-trackingobject" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.0-trackingobject.tgz#a3796a6ff1e006291317368d3df7cb75026c1615" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" From 828cb64eeddc0b1c3d2c2fa35fffd29e6a22fa5b Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 28 Nov 2018 18:00:28 -0500 Subject: [PATCH 10/32] updating balance common package --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9c7cb105750..edb71ec687f 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "0.6.0-trackingobject", + "balance-common": "^0.6.1", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/yarn.lock b/yarn.lock index a829a1d019c..7fd77ab9f4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1688,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@0.6.0-trackingobject: - version "0.6.0-trackingobject" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.0-trackingobject.tgz#a3796a6ff1e006291317368d3df7cb75026c1615" +balance-common@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.1.tgz#8953a6d3ad83dde0d736b7128e042c454e92fb9e" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" From 50c4cda2901f0e8a684c286f99d975ba025de3a1 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 28 Nov 2018 19:25:25 -0500 Subject: [PATCH 11/32] fix for storing last track date --- src/model/localstorage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/model/localstorage.js b/src/model/localstorage.js index 222e528c6a9..33e549bfac4 100644 --- a/src/model/localstorage.js +++ b/src/model/localstorage.js @@ -8,7 +8,7 @@ import { commonStorage } from 'balance-common'; */ export const getLastTrackingDate = async () => { const lastTrackingDate = await commonStorage.getLocal('lastTrackingDate'); - return lastTrackingDate ? new Date(lastTrackingDate) : null; + return lastTrackingDate && lastTrackingDate.data ? new Date(lastTrackingDate.data) : null; }; /** @@ -18,7 +18,7 @@ export const getLastTrackingDate = async () => { * @return {Void} */ export const updateLastTrackingDate = async () => { - await commonStorage.saveLocal('lastTrackingDate', Date.now()); + await commonStorage.saveLocal('lastTrackingDate', { data: new Date().toString() }); }; /** * @desc get account local requests From d0b34b71bce5f09d3ca1bd2f9733f4f740d96b11 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 28 Nov 2018 19:50:21 -0500 Subject: [PATCH 12/32] adding nft and assets counts for piwik --- src/screens/WalletScreen.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/screens/WalletScreen.js b/src/screens/WalletScreen.js index d4d01b99d7a..ef81e127268 100644 --- a/src/screens/WalletScreen.js +++ b/src/screens/WalletScreen.js @@ -50,10 +50,12 @@ class WalletScreen extends Component { componentDidUpdate = (prevProps) => { const { + allAssetsCount, assetsTotalUSD, isLoading, onHideSplashScreen, - trackingDate + trackingDate, + uniqueTokens, } = this.props; if (!isLoading && prevProps.isLoading) { onHideSplashScreen(); @@ -63,6 +65,8 @@ class WalletScreen extends Component { Piwik.trackScreen('WalletScreen', 'WalletScreen'); const totalTrackingAmount = get(assetsTotalUSD, 'totalTrackingAmount', null); if (totalTrackingAmount && (!this.props.trackingDate || !isSameDay(this.props.trackingDate, Date.now()))) { + Piwik.trackEvent('Balance', 'AssetsCount', 'TotalAssetsCount', allAssetsCount); + Piwik.trackEvent('Balance', 'NFTCount', 'TotalNFTCount', uniqueTokens.length); Piwik.trackEvent('Balance', 'Total', 'TotalUSDBalance', totalTrackingAmount); this.props.updateTrackingDate(); } From 5cc14f6412f68771f1a94836bc9e36a308b6797f Mon Sep 17 00:00:00 2001 From: jinchung Date: Thu, 29 Nov 2018 11:00:07 -0500 Subject: [PATCH 13/32] added event names for piwik events --- src/components/coin-row/BalanceCoinRow.js | 2 +- src/components/expanded-state/TokenExpandedState.js | 2 +- src/components/fab/SendFab.js | 2 +- src/components/unique-token/UniqueTokenCard.js | 2 +- src/screens/QRScannerScreenWithData.js | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/coin-row/BalanceCoinRow.js b/src/components/coin-row/BalanceCoinRow.js index e9682f7b361..1f668ea2357 100644 --- a/src/components/coin-row/BalanceCoinRow.js +++ b/src/components/coin-row/BalanceCoinRow.js @@ -66,7 +66,7 @@ export default compose( withHandlers({ onPress: ({ item: { symbol }, onPress }) => () => { if (onPress) { - Piwik.trackEvent('BalanceCoinRow', 'view-expanded'); + Piwik.trackEvent('BalanceCoinRow', 'view-expanded', 'OpenBalanceCoinRow'); onPress(symbol); } }, diff --git a/src/components/expanded-state/TokenExpandedState.js b/src/components/expanded-state/TokenExpandedState.js index 138cd11096b..5af82ff38ae 100644 --- a/src/components/expanded-state/TokenExpandedState.js +++ b/src/components/expanded-state/TokenExpandedState.js @@ -47,7 +47,7 @@ export default compose( navigation.goBack(); InteractionManager.runAfterInteractions(() => { - Piwik.trackEvent('Navigation', 'send-expanded'); + Piwik.trackEvent('Navigation', 'send-expanded', 'SendTokenExpandedNav'); navigation.navigate('SendScreen', { asset: symbol }); }); }, diff --git a/src/components/fab/SendFab.js b/src/components/fab/SendFab.js index 1341c5275ba..8c505121a10 100644 --- a/src/components/fab/SendFab.js +++ b/src/components/fab/SendFab.js @@ -42,7 +42,7 @@ SendFab.propTypes = { export default compose( withNavigation, withHandlers({ onPress: ({ navigation }) => () => { - Piwik.trackEvent('Navigation', 'send-fab'); + Piwik.trackEvent('Navigation', 'send-fab', 'SendFabNav'); navigation.navigate('SendScreen'); }}), onlyUpdateForKeys(['disabled']), diff --git a/src/components/unique-token/UniqueTokenCard.js b/src/components/unique-token/UniqueTokenCard.js index c7fbc125a53..1fb98e6b988 100644 --- a/src/components/unique-token/UniqueTokenCard.js +++ b/src/components/unique-token/UniqueTokenCard.js @@ -75,7 +75,7 @@ export default compose( withHandlers({ onPress: ({ item: { name }, onPress }) => () => { if (onPress) { - Piwik.trackEvent('UniqueTokens', 'view'); + Piwik.trackEvent('UniqueTokens', 'open', 'OpenUniqueToken'); onPress(name); } }, diff --git a/src/screens/QRScannerScreenWithData.js b/src/screens/QRScannerScreenWithData.js index 962f7263730..6b85f6b6248 100644 --- a/src/screens/QRScannerScreenWithData.js +++ b/src/screens/QRScannerScreenWithData.js @@ -72,12 +72,12 @@ class QRScannerScreenWithData extends PureComponent { const address = getEthereumAddressFromQRCodeData(data); if (address) { - Piwik.trackEvent('QRScanner', 'address'); + Piwik.trackEvent('QRScanner', 'address', 'QRScannedAddress); return navigation.navigate('SendScreen', { address }); } if (data.startsWith('ethereum:wc')) { - Piwik.trackEvent('QRScanner', 'walletconnect'); + Piwik.trackEvent('QRScanner', 'walletconnect', 'QRScannedWC'); const walletConnector = await walletConnectInit( accountAddress, data @@ -85,7 +85,7 @@ class QRScannerScreenWithData extends PureComponent { await this.checkPushNotificationPermissions(); return addWalletConnector(walletConnector); } else { - Piwik.trackEvent('QRScanner', 'unknown'); + Piwik.trackEvent('QRScanner', 'unknown', 'QRScannedUnknown'); return Alert({ message: lang.t('wallet.unrecognized_qrcode'), title: lang.t('wallet.unrecognized_qrcode_title'), From 6f92a05790149cad820f08ce8bb17df4c14144a7 Mon Sep 17 00:00:00 2001 From: jinchung Date: Thu, 29 Nov 2018 11:00:32 -0500 Subject: [PATCH 14/32] added asset symbol names for piwik --- src/screens/WalletScreen.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/screens/WalletScreen.js b/src/screens/WalletScreen.js index ef81e127268..02cf220818f 100644 --- a/src/screens/WalletScreen.js +++ b/src/screens/WalletScreen.js @@ -1,4 +1,4 @@ -import { get } from 'lodash'; +import { get, join, map } from 'lodash'; import { isSameDay } from 'date-fns'; import { withSafeTimeout } from '@hocs/safe-timers'; import PropTypes from 'prop-types'; @@ -51,6 +51,7 @@ class WalletScreen extends Component { componentDidUpdate = (prevProps) => { const { allAssetsCount, + assets, assetsTotalUSD, isLoading, onHideSplashScreen, @@ -64,8 +65,10 @@ class WalletScreen extends Component { if (this.props.isScreenActive && !prevProps.isScreenActive) { Piwik.trackScreen('WalletScreen', 'WalletScreen'); const totalTrackingAmount = get(assetsTotalUSD, 'totalTrackingAmount', null); + const assetSymbols = join(map(assets, (asset) => asset.symbol)); if (totalTrackingAmount && (!this.props.trackingDate || !isSameDay(this.props.trackingDate, Date.now()))) { Piwik.trackEvent('Balance', 'AssetsCount', 'TotalAssetsCount', allAssetsCount); + Piwik.trackEvent('Balance', 'AssetSymbols', 'AssetSymbols', assetSymbols); Piwik.trackEvent('Balance', 'NFTCount', 'TotalNFTCount', uniqueTokens.length); Piwik.trackEvent('Balance', 'Total', 'TotalUSDBalance', totalTrackingAmount); this.props.updateTrackingDate(); From fbd0dbd238fd7d35cd4c781f66953e31cf25760b Mon Sep 17 00:00:00 2001 From: jinchung Date: Sat, 1 Dec 2018 18:09:33 -0500 Subject: [PATCH 15/32] fix for unterminated string --- src/screens/QRScannerScreenWithData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/QRScannerScreenWithData.js b/src/screens/QRScannerScreenWithData.js index 6b85f6b6248..0acb3bbe2ae 100644 --- a/src/screens/QRScannerScreenWithData.js +++ b/src/screens/QRScannerScreenWithData.js @@ -72,7 +72,7 @@ class QRScannerScreenWithData extends PureComponent { const address = getEthereumAddressFromQRCodeData(data); if (address) { - Piwik.trackEvent('QRScanner', 'address', 'QRScannedAddress); + Piwik.trackEvent('QRScanner', 'address', 'QRScannedAddress'); return navigation.navigate('SendScreen', { address }); } From df5fb65dff9836552e067ff1c796328e41452e33 Mon Sep 17 00:00:00 2001 From: jinchung Date: Mon, 3 Dec 2018 16:57:27 -0500 Subject: [PATCH 16/32] support for message signing via WC --- package.json | 2 +- src/App.js | 47 +- src/components/coin-row/RequestCoinRow.js | 21 +- src/hoc/index.js | 1 + src/hoc/withMessageSigningScreen.js | 14 + src/model/wallet.js | 16 + src/model/walletconnect.js | 34 +- src/redux/transactionsToApprove.js | 28 +- src/screens/MessageSigningScreen.js | 129 ++++++ src/screens/MessageSigningScreenWithData.js | 93 ++++ src/screens/Routes.js | 2 + .../TransactionConfirmationScreenWithData.js | 8 +- yarn.lock | 414 +++++++++--------- 13 files changed, 560 insertions(+), 249 deletions(-) create mode 100644 src/hoc/withMessageSigningScreen.js create mode 100644 src/screens/MessageSigningScreen.js create mode 100644 src/screens/MessageSigningScreenWithData.js diff --git a/package.json b/package.json index f67ca3d6898..8c19d439ecf 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "0.5.28", + "balance-common": "git+https://github.com/balance-io/balance-common.git#msg-signing", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/src/App.js b/src/App.js index a2734f2fbf9..e0caa37b84a 100644 --- a/src/App.js +++ b/src/App.js @@ -18,8 +18,8 @@ import { } from './redux/transactionsToApprove'; import { walletConnectInitAllConnectors, - walletConnectGetAllTransactions, - walletConnectGetTransaction, + walletConnectGetAllRequests, + walletConnectGetRequest, } from './model/walletconnect'; import store from './redux/store'; import { walletInit } from './model/wallet'; @@ -70,7 +70,7 @@ class App extends Component { const route = Navigation.getActiveRouteName(navState); const { callId, sessionId } = notification.data; if (route === 'ConfirmTransaction') { - this.fetchAndAddTransaction(callId, sessionId) + this.fetchAndAddWalletConnectRequest(callId, sessionId) .then(transaction => { const localNotification = new firebase.notifications.Notification() .setTitle(notification.title) @@ -106,7 +106,7 @@ class App extends Component { .getInitialNotification() .then(notificationOpen => { if (!notificationOpen) { - this.fetchAllTransactionsFromWalletConnectSessions(); + this.fetchAllRequestsFromWalletConnectSessions(); } }); }) @@ -124,7 +124,7 @@ class App extends Component { handleAppStateChange = async (nextAppState) => { if (this.state.appState.match(/unknown|background/) && nextAppState === 'active') { Piwik.trackEvent('screen', 'view', 'app'); - this.fetchAllTransactionsFromWalletConnectSessions(); + this.fetchAllRequestsFromWalletConnectSessions(); } this.setState({ appState: nextAppState }); } @@ -141,21 +141,28 @@ class App extends Component { handleOpenConfirmTransactionModal = (transactionDetails) => { if (!this.navigatorRef) return; - - const action = NavigationActions.navigate({ - routeName: 'ConfirmTransaction', - params: { transactionDetails }, - }); - + const requestType = get(transactionDetails, 'transactionDisplayDetails.type'); + let action = null; + if (requestType === 'message') { + action = NavigationActions.navigate({ + routeName: 'SignMessage', + params: { transactionDetails }, + }); + } else { + action = NavigationActions.navigate({ + routeName: 'ConfirmTransaction', + params: { transactionDetails }, + }); + } Navigation.handleAction(this.navigatorRef, action); } - fetchAllTransactionsFromWalletConnectSessions = async () => { + fetchAllRequestsFromWalletConnectSessions = async () => { const allConnectors = this.props.getValidWalletConnectors(); if (!isEmpty(allConnectors)) { - const allTransactions = await walletConnectGetAllTransactions(allConnectors); - if (!isEmpty(allTransactions)) { - this.props.addTransactionsToApprove(allTransactions); + const allRequests = await walletConnectGetAllRequests(allConnectors); + if (!isEmpty(allRequests)) { + this.props.addTransactionsToApprove(allRequests); await firebase.notifications().removeAllDeliveredNotifications(); } } @@ -166,7 +173,7 @@ class App extends Component { if (existingTransaction) { this.handleOpenConfirmTransactionModal(existingTransaction); } else { - const transaction = await this.fetchAndAddTransaction(callId, sessionId); + const transaction = await this.fetchAndAddWalletConnectRequest(callId, sessionId); if (transaction) { this.handleOpenConfirmTransactionModal(transaction); } else { @@ -175,12 +182,12 @@ class App extends Component { } } - fetchAndAddTransaction = async (callId, sessionId) => { + fetchAndAddWalletConnectRequest = async (callId, sessionId) => { const walletConnector = this.props.walletConnectors.find(({ _sessionId }) => (_sessionId === sessionId)); - const transactionDetails = await walletConnectGetTransaction(callId, walletConnector); - if (!transactionDetails) return null; + const callData = await walletConnectGetRequest(callId, walletConnector); + if (!callData) return null; - const { callData, dappName } = transactionDetails; + const { dappName } = walletConnector; return this.props.addTransactionToApprove(sessionId, callId, callData, dappName); } diff --git a/src/components/coin-row/RequestCoinRow.js b/src/components/coin-row/RequestCoinRow.js index a759a00ebf8..0bc17a5e86f 100644 --- a/src/components/coin-row/RequestCoinRow.js +++ b/src/components/coin-row/RequestCoinRow.js @@ -37,7 +37,7 @@ const RequestCoinRow = ({ {dappName}} + bottomRowRender={({ dappName }) => {dappName}} coinIconRender={RequestCoinIcon} expirationColor={expirationColor} topRowRender={() => ( @@ -80,11 +80,20 @@ export default compose( }; }), withHandlers({ - onPressOpen: ({ item, navigation }) => () => - navigation.navigate({ - params: { transactionDetails: item }, - routeName: 'ConfirmTransaction', - }), + onPressOpen: ({ item, navigation }) => () => { + const methodType = get(item, 'transactionDisplayDetails.type'); + if (methodType === 'transaction') { + navigation.navigate({ + params: { transactionDetails: item }, + routeName: 'ConfirmTransaction', + }) + } else { + navigation.navigate({ + params: { transactionDetails: item }, + routeName: 'SignMessage', + }) + } + }, }), onlyUpdateForKeys(['expirationColor', 'percentElapsed']), )(RequestCoinRow); diff --git a/src/hoc/index.js b/src/hoc/index.js index 7a34b128d89..e23e57d9765 100644 --- a/src/hoc/index.js +++ b/src/hoc/index.js @@ -5,6 +5,7 @@ export { default as withAddWalletConnector } from './withAddWalletConnector'; export { default as withHideSplashScreen } from './withHideSplashScreen'; export { default as withHideSplashScreenOnMount } from './withHideSplashScreenOnMount'; export { default as withImageDimensionsCache } from './withImageDimensionsCache'; +export { default as withMessageSigningScreen } from './withMessageSigningScreen'; export { default as withRequests } from './withRequests'; export { default as withRequestsInit } from './withRequestsInit'; export { default as withRotationForDirection } from './withRotationForDirection'; diff --git a/src/hoc/withMessageSigningScreen.js b/src/hoc/withMessageSigningScreen.js new file mode 100644 index 00000000000..dde21ce1cdf --- /dev/null +++ b/src/hoc/withMessageSigningScreen.js @@ -0,0 +1,14 @@ +import { accountUpdateTransactions } from 'balance-common'; +import { connect } from 'react-redux'; +import { removeTransaction } from '../redux/transactionsToApprove'; + +const mapStateToProps = ({ + walletconnect: { walletConnectors }, +}) => ({ + walletConnectors, +}); + +export default Component => connect(mapStateToProps, { + accountUpdateTransactions, + removeTransaction, +})(Component); diff --git a/src/model/wallet.js b/src/model/wallet.js index 31dff2cc1a4..4b3673d7ed1 100644 --- a/src/model/wallet.js +++ b/src/model/wallet.js @@ -65,6 +65,22 @@ export const sendTransaction = async (transaction, authenticationPrompt = lang.t } }; +export const signMessage = async (message, authenticationPrompt = lang.t('account.authenticate.please')) => { + try { + const wallet = await loadWallet(authenticationPrompt); + try { + return await wallet.signMessage(message); + } catch(error) { + console.log('signMessage error', error); + AlertIOS.alert(lang.t('wallet.message_signing.failed_signing')); + return null; + } + } catch(error) { + AlertIOS.alert(lang.t('wallet.transaction.alert.authentication')); + return null; + } +}; + export const loadSeedPhrase = async () => { const authenticationPrompt = lang.t('account.authenticate.please_seed_phrase'); const seedPhrase = await keychain.loadString(seedPhraseKey, { authenticationPrompt }); diff --git a/src/model/walletconnect.js b/src/model/walletconnect.js index cfc8fc47729..64dc7faca7d 100644 --- a/src/model/walletconnect.js +++ b/src/model/walletconnect.js @@ -66,12 +66,12 @@ export const walletConnectDisconnect = async (walletConnector) => { } }; -const getTransactionForSession = (walletConnector) => new Promise((resolve, reject) => { +const getRequestsForSession = (walletConnector) => new Promise((resolve, reject) => { const { dappName, sessionId } = walletConnector; walletConnector.getAllCallRequests() .then((allCalls) => - resolve(mapValues(allCalls, (transactionPayload, callId) => ({ - callData: get(transactionPayload, 'data.params[0]', null), + resolve(mapValues(allCalls, (requestPayload, callId) => ({ + callData: get(requestPayload, 'data'), dappName, sessionId, callId, @@ -79,26 +79,22 @@ const getTransactionForSession = (walletConnector) => new Promise((resolve, reje .catch(error => resolve({})); }); -export const walletConnectGetAllTransactions = async (walletConnectors) => { +export const walletConnectGetAllRequests = async (walletConnectors) => { try { - const sessionToTransactions = mapValues(walletConnectors, getTransactionForSession); - const transactionValues = await Promise.all(values(sessionToTransactions)); - return assign({}, ...transactionValues); + const sessionToRequests = mapValues(walletConnectors, getRequestsForSession); + const requestValues = await Promise.all(values(sessionToRequests)); + return assign({}, ...requestValues); } catch (error) { - AlertIOS.alert('Error fetching all transactions from open WalletConnect sessions.'); + AlertIOS.alert('Error fetching all requests from open WalletConnect sessions.'); return {}; } }; -export const walletConnectGetTransaction = async (callId, walletConnector) => { +export const walletConnectGetRequest = async (callId, walletConnector) => { try { if (walletConnector) { - const { dappName } = walletConnector; const callData = await walletConnector.getCallRequest(callId); - return { - callData: get(callData, 'data.params[0]', null), - dappName, - }; + return get(callData, 'data'); } return null; } catch (error) { @@ -106,18 +102,18 @@ export const walletConnectGetTransaction = async (callId, walletConnector) => { } }; -export const walletConnectSendTransactionHash = async (walletConnector, callId, success, txHash) => { +export const walletConnectSendStatus = async (walletConnector, callId, result) => { if (walletConnector) { try { - if (success) { - await walletConnector.approveCallRequest(callId, { result: txHash }); + if (result) { + await walletConnector.approveCallRequest(callId, { result }); } else { await walletConnector.rejectCallRequest(callId); } } catch (error) { - AlertIOS.alert('Failed to send transaction status to WalletConnect.'); + AlertIOS.alert('Failed to send request status to WalletConnect.'); } } else { - AlertIOS.alert('WalletConnect session has expired while trying to send transaction hash. Please reconnect.'); + AlertIOS.alert('WalletConnect session has expired while trying to send request status. Please reconnect.'); } }; diff --git a/src/redux/transactionsToApprove.js b/src/redux/transactionsToApprove.js index 8aa6d6f192e..8af252f1619 100644 --- a/src/redux/transactionsToApprove.js +++ b/src/redux/transactionsToApprove.js @@ -7,7 +7,7 @@ import { formatInputDecimals, fromWei, } from 'balance-common'; -import { mapValues, omit } from 'lodash'; +import { get, mapValues, omit } from 'lodash'; import { getAccountLocalRequests, removeLocalRequest, @@ -49,6 +49,26 @@ export const getNativeAmount = (prices, nativeCurrency, assetAmount, symbol) => return _nativeAmount; }; +const getRequestDisplayDetails = (callData, assets, prices, nativeCurrency) => { + if (callData.method === 'eth_sendTransaction') { + const transaction = get(callData, 'params[0]', null); + return getTransactionDisplayDetails(transaction, assets, prices, nativeCurrency); + } else if (callData.method === 'eth_sign') { + const message = get(callData, 'params[1]'); + return getMessageDisplayDetails(message); + } + return null; +}; + +const getMessageDisplayDetails = (message) => { + const timestampInMs = Date.now(); + return { + type: 'message', + message, + timestampInMs, + }; +}; + const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrency) => { const tokenTransferHash = smartContractMethods.token_transfer.hash; const timestampInMs = Date.now(); @@ -69,6 +89,7 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc nonce: Number(convertHexToString(transaction.nonce)), timestampInMs, to: transaction.to, + type: 'transaction', value, }; } else if (transaction.data.startsWith(tokenTransferHash)) { @@ -88,6 +109,7 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc nonce: Number(convertHexToString(transaction.nonce)), timestampInMs, to: toAddress, + type: 'transaction', value, }; } @@ -99,7 +121,7 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc export const addTransactionToApprove = (sessionId, callId, callData, dappName) => (dispatch, getState) => { const { transactionsToApprove } = getState().transactionsToApprove; const { accountInfo, accountAddress, network, prices, nativeCurrency } = getState().account; - const transactionDisplayDetails = getTransactionDisplayDetails(callData, accountInfo.assets, prices, nativeCurrency); + const transactionDisplayDetails = getRequestDisplayDetails(callData, accountInfo.assets, prices, nativeCurrency); const transaction = { sessionId, callId, callData, transactionDisplayDetails, dappName }; const updatedTransactions = { ...transactionsToApprove, [callId]: transaction }; dispatch({ type: WALLETCONNECT_UPDATE_TRANSACTIONS_TO_APPROVE, payload: updatedTransactions }); @@ -111,7 +133,7 @@ export const addTransactionsToApprove = (transactions) => (dispatch, getState) = const { transactionsToApprove } = getState().transactionsToApprove; const { accountInfo, accountAddress, network, prices, nativeCurrency } = getState().account; const transactionsWithDisplayDetails = mapValues(transactions, (transactionDetails) => { - const transactionDisplayDetails = getTransactionDisplayDetails(transactionDetails.callData, accountInfo.assets, prices, nativeCurrency); + const transactionDisplayDetails = getRequestDisplayDetails(transactionDetails.callData, accountInfo.assets, prices, nativeCurrency); return { ...transactionDetails, transactionDisplayDetails }; }); const updatedTransactions = { ...transactionsToApprove, ...transactionsWithDisplayDetails }; diff --git a/src/screens/MessageSigningScreen.js b/src/screens/MessageSigningScreen.js new file mode 100644 index 00000000000..84492f06b69 --- /dev/null +++ b/src/screens/MessageSigningScreen.js @@ -0,0 +1,129 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import lang from 'i18n-js'; +import styled from 'styled-components'; +import BalanceManagerLogo from '../assets/balance-manager-logo.png'; +import { Button, BlockButton } from '../components/buttons'; +import { CoinIcon } from '../components/coin-icon'; +import { Nbsp } from '../components/html-entities'; +import { Centered, Column, Row } from '../components/layout'; +import { + Monospace, + Smallcaps, + Text, +} from '../components/text'; +import { withSafeAreaViewInsetValues } from '../hoc'; +import { borders, colors, fonts, padding, position } from '../styles'; + +const Message = styled(Text).attrs({ size: 'lmedium' })` + color: ${colors.alpha(colors.blueGreyDark, 0.6)} + margin-top: 5; +`; + +const MessageRow = styled(Column)` + ${padding(19, 19, 18)} + flex-shrink: 0; +`; + +const BottomSheet = styled(Column).attrs({ justify: 'space-between' })` + ${borders.buildRadius('top', 15)} + background-color: ${colors.white}; + flex: 0; + min-height: ${({ bottomInset }) => (bottomInset + 236)}; + padding-bottom: ${({ bottomInset }) => bottomInset}; + width: 100%; +`; + +const CancelButtonContainer = styled.View` + bottom: 22; + position: absolute; + right: 19; +`; + +const Container = styled(Column)` + ${position.size('100%')} + background-color: ${colors.black}; + flex: 1; +`; + +const Masthead = styled(Centered).attrs({ direction: 'column' })` + flex: 1; + padding-bottom: 2px; + width: 100%; +`; + +const SendButtonContainer = styled.View` + ${padding(7, 15, 14)} + flex-shrink: 0; +`; + +const TransactionType = styled(Text).attrs({ size: 'h5' })` + color: ${colors.alpha(colors.white, 0.68)} + margin-top: 6; +`; + +const VendorLogo = styled.Image` + ${position.size('100%')} + resize-mode: contain; +`; + +const VenderLogoContainer = styled(Centered)` + ${position.size(60)} + margin-bottom: 24; +`; + +const VendorName = styled(Text).attrs({ + size: 'h4', + weight: 'semibold', +})` + color: ${colors.white}; + letter-spacing: -0.2px; +`; + +const MessageSigningScreen = ({ + dappName, + message, + onCancelSignMessage, + onSignMessage, + safeAreaInset, +}) => ( + + + + + + {dappName} + {lang.t('wallet.message_signing.request')} + + + + + + + {lang.t('wallet.message_signing.message')} + {message} + + + + {lang.t('wallet.message_signing.sign')} + + + + +); + +MessageSigningScreen.propTypes = { + message: PropTypes.array, + onCancelSignMessage: PropTypes.func, + onSignMessage: PropTypes.func, + safeAreaInset: PropTypes.object, +}; + +export default withSafeAreaViewInsetValues(MessageSigningScreen); diff --git a/src/screens/MessageSigningScreenWithData.js b/src/screens/MessageSigningScreenWithData.js new file mode 100644 index 00000000000..e143c1beefb --- /dev/null +++ b/src/screens/MessageSigningScreenWithData.js @@ -0,0 +1,93 @@ +import { web3Instance } from 'balance-common'; +import lang from 'i18n-js'; +import { get } from 'lodash'; +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; +import { AlertIOS, StatusBar, Vibration } from 'react-native'; +import Piwik from 'react-native-matomo'; +import { withMessageSigningScreen } from '../hoc'; +import { signMessage } from '../model/wallet'; +import { walletConnectSendStatus } from '../model/walletconnect'; +import MessageSigningScreen from './MessageSigningScreen'; + +class MessageSigningScreenWithData extends Component { + static propTypes = { + accountUpdateTransactions: PropTypes.func, + navigation: PropTypes.any, + removeTransaction: PropTypes.func, + walletConnectors: PropTypes.object, + } + + componentDidMount() { + StatusBar.setBarStyle('light-content', true); + Vibration.vibrate(); + } + + handleSignMessage = async () => { + // TODO: add a name, value? + Piwik.trackEvent('Send', 'confirm-wc'); + const { transactionDetails } = this.props.navigation.state.params; + const message = get(transactionDetails, 'transactionDisplayDetails.message'); + const flatFormatSignature = await signMessage(message); + + if (flatFormatSignature) { + const txDetails = { message }; + //this.props.accountUpdateTransactions(txDetails); // TODO: how to display transactions for signed message + this.props.removeTransaction(transactionDetails.callId); + const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; + await walletConnectSendStatus(walletConnector, transactionDetails.callId, flatFormatSignature); + this.closeScreen(); + } else { + await this.handleCancelSignMessage(); + } + }; + + sendFailedTransactionStatus = async () => { + try { + this.closeScreen(); + const { transactionDetails } = this.props.navigation.state.params; + const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; + await walletConnectSendStatus(walletConnector, transactionDetails.callId, null); + } catch (error) { + this.closeScreen(); + AlertIOS.alert(lang.t('wallet.transaction.alert.cancelled_transaction')); + } + } + + handleCancelSignMessage = async () => { + try { + await this.sendFailedTransactionStatus(); + const { transactionDetails } = this.props.navigation.state.params; + this.props.removeTransaction(transactionDetails.callId); + } catch (error) { + this.closeScreen(); + AlertIOS.alert('Failed to send rejected transaction status'); + } + } + + closeScreen = () => { + StatusBar.setBarStyle('dark-content', true); + this.props.navigation.goBack(); + } + + render = () => { + const { + transactionDetails: { + transactionDisplayDetails: { + message + }, + dappName, + }, + } = this.props.navigation.state.params; + return ( + + ); + } +} + +export default withMessageSigningScreen(MessageSigningScreenWithData); diff --git a/src/screens/Routes.js b/src/screens/Routes.js index 4be4daa802a..fd4e6642069 100644 --- a/src/screens/Routes.js +++ b/src/screens/Routes.js @@ -10,6 +10,7 @@ import SendQRScannerScreenWithData from './SendQRScannerScreenWithData'; import SendScreenWithData from './SendScreenWithData'; import SettingsScreenWithData from './SettingsScreenWithData'; import TransactionConfirmationScreenWithData from './TransactionConfirmationScreenWithData'; +import MessageSigningScreenWithData from './MessageSigningScreenWithData'; import WalletScreen from './WalletScreen'; import { deviceUtils } from '../utils'; import store from '../redux/store'; @@ -49,6 +50,7 @@ const AppStack = createStackNavigator({ screen: ActivityScreen, }, ConfirmTransaction: TransactionConfirmationScreenWithData, + SignMessage: MessageSigningScreenWithData, ExpandedAssetScreen: { navigationOptions: { effect: 'expanded', diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index 7c308fa95c4..b7a66dab908 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -7,7 +7,7 @@ import { AlertIOS, StatusBar, Vibration } from 'react-native'; import Piwik from 'react-native-matomo'; import { withTransactionConfirmationScreen } from '../hoc'; import { sendTransaction } from '../model/wallet'; -import { walletConnectSendTransactionHash } from '../model/walletconnect'; +import { walletConnectSendStatus } from '../model/walletconnect'; import TransactionConfirmationScreen from './TransactionConfirmationScreen'; class TransactionConfirmationScreenWithData extends Component { @@ -30,7 +30,7 @@ class TransactionConfirmationScreenWithData extends Component { // TODO: add a name, value? Piwik.trackEvent('Send', 'confirm-wc'); const { transactionDetails } = this.props.navigation.state.params; - const txPayload = transactionDetails.callData; + const txPayload = get(transactionDetails, 'callData.params[0]'); const web3TxnCount = await getTransactionCount(txPayload.from); const maxTxnCount = Math.max(this.props.transactionCountNonce, web3TxnCount); const nonce = web3Instance.utils.toHex(maxTxnCount); @@ -53,7 +53,7 @@ class TransactionConfirmationScreenWithData extends Component { this.props.accountUpdateTransactions(txDetails); this.props.removeTransaction(transactionDetails.callId); const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; - await walletConnectSendTransactionHash(walletConnector, transactionDetails.callId, true, transactionHash); + await walletConnectSendStatus(walletConnector, transactionDetails.callId, transactionHash); this.closeTransactionScreen(); } else { await this.handleCancelTransaction(); @@ -65,7 +65,7 @@ class TransactionConfirmationScreenWithData extends Component { this.closeTransactionScreen(); const { transactionDetails } = this.props.navigation.state.params; const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; - await walletConnectSendTransactionHash(walletConnector, transactionDetails.callId, false, null); + await walletConnectSendStatus(walletConnector, transactionDetails.callId, null); } catch (error) { this.closeTransactionScreen(); AlertIOS.alert(lang.t('wallet.transaction.alert.cancelled_transaction')); diff --git a/yarn.lock b/yarn.lock index e0df37e8ee8..1a59772db76 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,16 +15,16 @@ "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0", "@babel/core@^7.1.2": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.6.tgz#3733cbee4317429bc87c62b29cf8587dba7baeb3" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.0.tgz#a4dd3814901998e93340f0086e9867fefa163ada" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.6" - "@babel/helpers" "^7.1.5" - "@babel/parser" "^7.1.6" + "@babel/generator" "^7.2.0" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.2.0" "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.6" - "@babel/types" "^7.1.6" + "@babel/types" "^7.2.0" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -43,11 +43,11 @@ source-map "^0.5.0" trim-right "^1.0.1" -"@babel/generator@^7.0.0", "@babel/generator@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.6.tgz#001303cf87a5b9d093494a4bf251d7b5d03d3999" +"@babel/generator@^7.0.0", "@babel/generator@^7.1.6", "@babel/generator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c" dependencies: - "@babel/types" "^7.1.6" + "@babel/types" "^7.2.0" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -81,6 +81,16 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" +"@babel/helper-create-class-features-plugin@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.0.tgz#8d52930558897042444e670f26ae6581ec9a4a4a" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-define-map@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" @@ -208,21 +218,21 @@ "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.2.0" -"@babel/helpers@^7.1.5": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.5.tgz#68bfc1895d685f2b8f1995e788dbfe1f6ccb1996" +"@babel/helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" dependencies: "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.5" - "@babel/types" "^7.1.5" + "@babel/types" "^7.2.0" "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" @@ -240,146 +250,136 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.6.tgz#16e97aca1ec1062324a01c5a6a7d0df8dd189854" +"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6", "@babel/parser@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.0.tgz#02d01dbc330b6cbf36b76ac93c50752c69027065" "@babel/plugin-external-helpers@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.0.0.tgz#61ee7ba5dba27d7cad72a13d46bec23c060b762e" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.2.0.tgz#7f4cb7dee651cd380d2034847d914288467a6be4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-class-properties@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.0.tgz#12ade6dc7b92ea4fa4c84b4d7b87e9d0f446b4f8" dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-create-class-features-plugin" "^7.2.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-proposal-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.0.0.tgz#a057bbfd4649facfe39f33a537e18554bdd2b5da" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.2.0.tgz#737b0da44b9254b6152fe29bb99c64e5691f6f68" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-export-default-from" "^7.2.0" "@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.0.0.tgz#b72ec31adf612d062dc0348316246127a451e45f" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.2.0.tgz#c3fda766187b2f2162657354407247a758ee9cf9" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.2.0" "@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-proposal-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz#3d344d4152253379b8758e7d041148e8787c4a9d" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - -"@babel/plugin-syntax-class-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.2.0.tgz#ae454f4c21c6c2ce8cb2397dc332ae8b420c5441" dependencies: "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.2.0" "@babel/plugin-syntax-dynamic-import@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz#6dfb7d8b6c3be14ce952962f658f3b7eb54c33ee" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.0.0.tgz#084b639bce3d42f3c5bf3f68ccb42220bb2d729d" +"@babel/plugin-syntax-export-default-from@^7.0.0", "@babel/plugin-syntax-export-default-from@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.2.0.tgz#edd83b7adc2e0d059e2467ca96c650ab6d2f3820" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-flow@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" +"@babel/plugin-syntax-flow@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-jsx@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" +"@babel/plugin-syntax-jsx@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz#0b85a3b4bc7cdf4cc4b8bf236335b907ca22e7c7" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.0.0.tgz#b60931d5a15da82625fff6657c39419969598743" +"@babel/plugin-syntax-nullish-coalescing-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.2.0.tgz#f75083dfd5ade73e783db729bbd87e7b9efb7624" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" +"@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz#1e6ecba124310b5d3a8fc1e00d50b1c4c2e05e68" +"@babel/plugin-syntax-optional-chaining@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz#a59d6ae8c167e7608eaa443fda9fa8fa6bf21dff" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-typescript@^7.0.0": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.1.5.tgz#956a1f43dec8a9d6b36221f5c865335555fdcb98" +"@babel/plugin-syntax-typescript@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.2.0.tgz#55d240536bd314dcbbec70fd949c5cabaed1de29" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.1.5.tgz#3e8e0bc9a5104519923302a24f748f72f2f61f37" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" "@babel/plugin-transform-classes@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz#374f8876075d7d21fea55aeb5c53561259163f96" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -391,92 +391,92 @@ globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.1.6.tgz#4b7be62604d39e63cfe23b1d00d63e9fb7e763ba" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.2.0.tgz#db6180d098caaabdd609a8da3800f5204e66b69b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.2.0" "@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/plugin-transform-object-assign@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.0.0.tgz#fca6d7500d9675c42868b8f3882979201b9a5ad8" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.2.0.tgz#6fdeea42be17040f119e38e23ea0f49f31968bde" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-parameters@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-display-name@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-jsx-source@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0.tgz#28e00584f9598c0dd279f6280eee213fa0121c3c" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.2.0.tgz#20c8c60f0140f5dd3cd63418d452801cf3f7180f" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-transform-react-jsx@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.1.6.tgz#e6188e7d2a2dcd2796d45a87f8b0a8c906f57d1a" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.2.0.tgz#ca36b6561c4d3b45524f8efb6f0fbc9a0d1d622f" dependencies: "@babel/helper-builder-react-jsx" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-transform-regenerator@^7.0.0": version "7.0.0" @@ -485,8 +485,8 @@ regenerator-transform "^0.13.3" "@babel/plugin-transform-runtime@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.1.0.tgz#9f76920d42551bb577e2dc594df229b5f7624b63" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz#566bc43f7d0aedc880eaddbd29168d0f248966ea" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -494,41 +494,41 @@ semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.0.tgz#0c76c12a3b5826130078ee8ec84a7a8e4afd79c4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" "@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-typescript@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.2.0.tgz#bce7c06300434de6a860ae8acf6a442ef74a99d1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.2.0" "@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -547,8 +547,8 @@ source-map-support "^0.5.9" "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.5.tgz#4170907641cf1f61508f563ece3725150cc6fe39" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f" dependencies: regenerator-runtime "^0.12.0" @@ -606,9 +606,9 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.1.2", "@babel/types@^7.1.5", "@babel/types@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.6.tgz#0adb330c3a281348a190263aceb540e10f04bcce" +"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.1.2", "@babel/types@^7.1.6", "@babel/types@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.0.tgz#7941c5b2d8060e06f9601d6be7c223eef906d5d8" dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -755,8 +755,8 @@ ajv@^5.2.3, ajv@^5.3.0: json-schema-traverse "^0.3.0" ajv@^6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.5.tgz#cf97cdade71c6399a92c6d6c4177381291b781a1" + version "6.6.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -905,7 +905,7 @@ array-find-index@^1.0.2: array-flatten@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + resolved "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" array-includes@^3.0.3: version "3.0.3" @@ -975,8 +975,8 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" ast-types@0.x.x: - version "0.11.6" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.6.tgz#4e2266c2658829aef3b40cc33ad599c4e9eb89ef" + version "0.11.7" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.7.tgz#f318bf44e339db6a320be0009ded64ec1471f46c" astral-regex@^1.0.0: version "1.0.0" @@ -1233,10 +1233,11 @@ babel-plugin-lodash@^3.3.4: require-package-name "^2.0.1" babel-plugin-styled-components@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.8.0.tgz#9dd054c8e86825203449a852a5746f29f2dab857" + version "1.9.2" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" lodash "^4.17.10" babel-plugin-syntax-async-functions@^6.8.0: @@ -1255,7 +1256,7 @@ babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -1687,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@0.5.28: - version "0.5.28" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.5.28.tgz#44761a0f2c5b3bad0d5f29502bb7d18f7f3348fb" +"balance-common@git+https://github.com/balance-io/balance-common.git#msg-signing": + version "0.6.1" + resolved "git+https://github.com/balance-io/balance-common.git#8fd42e1f2cf93175fe128a91cfcdb81e6676a422" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" @@ -1744,8 +1745,8 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" big-integer@^1.6.7: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + version "1.6.38" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.38.tgz#e5ae0a2d08a05bb194cf9e0c0641798eda4ea044" bignumber.js@^7.0.1: version "7.2.1" @@ -2054,8 +2055,8 @@ can-promise@0.0.1: window-or-global "^1.0.1" caniuse-lite@^1.0.30000844: - version "1.0.30000910" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000910.tgz#755d5181d4b006e5a2b59b1ffa05d0a0470039f5" + version "1.0.30000913" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000913.tgz#560311ecf242eaf12159b720e64b11ebd759b5e4" capture-exit@^1.2.0: version "1.2.0" @@ -2098,8 +2099,8 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" chroma-js@^1.3.7: - version "1.4.0" - resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.0.tgz#695c52e7c97617e5f687db31913503d410481ae4" + version "1.4.1" + resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.1.tgz#eb2d9c4d1ff24616be84b35119f4d26f8205f134" ci-info@^1.5.0: version "1.6.0" @@ -2844,8 +2845,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.3.47: - version "1.3.84" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz#2e55df59e818f150a9f61b53471ebf4f0feecc65" + version "1.3.87" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.87.tgz#f0481ca84824752bced51673396e9a6c74fe5ec7" elliptic@6.3.3: version "6.3.3" @@ -3165,7 +3166,7 @@ ethjs-unit@0.1.6: event-target-shim@^1.0.5: version "1.1.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" + resolved "http://registry.npmjs.org/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" eventemitter3@1.1.1: version "1.1.1" @@ -3232,7 +3233,7 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + resolved "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" @@ -3349,11 +3350,12 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" fancy-log@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" dependencies: ansi-gray "^0.1.1" color-support "^1.1.3" + parse-node-version "^1.0.0" time-stamp "^1.0.0" fast-deep-equal@^1.0.0: @@ -3956,8 +3958,8 @@ hash-base@^3.0.0: safe-buffer "^5.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.1" @@ -3975,8 +3977,8 @@ hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz#42414ccdfff019cd2168168be998c7b3bd5245c0" + version "3.2.1" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.2.1.tgz#c09c0555c84b38a7ede6912b61efddafd6e75e1e" dependencies: react-is "^16.3.2" @@ -4851,9 +4853,9 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-walletconnect-core@^0.7.26: - version "0.7.26" - resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.26.tgz#2e875fe6c17d9958bbd891a807d448cebd7f5bc8" +js-walletconnect-core@^0.7.27: + version "0.7.27" + resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.27.tgz#e185ae277713fec69a612f43080096ba8ef59e07" dependencies: eth-parse-uri "^0.6.9" @@ -5231,11 +5233,11 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" lru-cache@^4.0.1, lru-cache@^4.1.2: - version "4.1.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.4.tgz#51cc46e8e6d9530771c857e24ccc720ecdbcc031" + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" dependencies: pseudomap "^1.0.2" - yallist "^3.0.2" + yallist "^2.1.2" make-dir@^1.0.0: version "1.3.0" @@ -6138,7 +6140,7 @@ pac-resolver@^3.0.0: pako@~0.2.0: version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + resolved "http://registry.npmjs.org/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" parse-asn1@^5.0.0: version "5.1.1" @@ -6179,6 +6181,10 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-node-version@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.0.tgz#33d9aa8920dcc3c0d33658ec18ce237009a56d53" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -6376,8 +6382,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.14.2: - version "1.15.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e" + version "1.15.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" pretty-format@^22.4.0, pretty-format@^22.4.3: version "22.4.3" @@ -6407,8 +6413,8 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" progress@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31" + version "2.0.2" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.2.tgz#db9476f916bcc9ebe8a04efb22b18b0740376c61" promise@^7.1.1: version "7.3.1" @@ -6459,7 +6465,7 @@ pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -psl@^1.1.24: +psl@^1.1.24, psl@^1.1.28: version "1.1.29" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" @@ -6482,7 +6488,7 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -6500,10 +6506,14 @@ qrcode@^1.2.0: pngjs "^3.3.0" yargs "^8.0.2" -qs@6.5.2, qs@^6.5.1, qs@~6.5.2: +qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" +qs@^6.5.1: + version "6.6.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" + query-string@^5.0.1: version "5.1.1" resolved "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -6612,7 +6622,7 @@ react-display-name@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/react-display-name/-/react-display-name-0.2.4.tgz#e2a670b81d79a2204335510c01246f4c92ff12cf" -react-is@^16.3.1, react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.3: +react-is@^16.3.1, react-is@^16.3.2, react-is@^16.5.2, react-is@^16.6.0, react-is@^16.6.3: version "16.6.3" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0" @@ -6697,8 +6707,8 @@ react-native-firebase@^4.3.8: prop-types "^15.6.1" react-native-gesture-handler@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.9.tgz#ddec4d19d51cb6fb54df6eca792ebd76aaef083f" + version "1.0.10" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.10.tgz#160e55e4886471931b7f7d52e22d94007540ab83" dependencies: hoist-non-react-statics "^2.3.1" invariant "^2.2.2" @@ -6728,8 +6738,8 @@ react-native-level-fs@^3.0.1: levelup "^0.18.2" react-native-linear-gradient@^2.4.2: - version "2.4.4" - resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.4.4.tgz#64944a39290eefbede18dfd7e9551f1ef61e3de7" + version "2.5.3" + resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.3.tgz#d90cf19a13fcccfa8bb32025ac40a15ae1b49e99" react-native-mail@^3.0.6: version "3.0.7" @@ -6740,8 +6750,8 @@ react-native-mail@^3.0.6: resolved "git+https://github.com/BonifyByForteil/react-native-matomo.git#32907c88a586f8dcc69a69a0303561753064cb50" react-native-os@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.2.1.tgz#681c27b4b4340c96f6297cf50df00ba2f6fad7cb" + version "1.2.2" + resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.2.2.tgz#402cee00ac00a0588200a66b90e1d2b5a593fec0" react-native-permissions@^1.1.1: version "1.1.1" @@ -6959,14 +6969,15 @@ react-navigation-tabs@0.8.4: react-native-tab-view "^1.0.0" react-navigation@^2.18.0: - version "2.18.2" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.2.tgz#ba278ded41f736d029c7cae5d54ab1427dc6ed34" + version "2.18.3" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" dependencies: clamp "^1.0.1" create-react-context "0.2.2" hoist-non-react-statics "^2.2.0" path-to-regexp "^1.7.0" query-string "^6.1.0" + react-is "^16.5.2" react-lifecycles-compat "^3" react-native-safe-area-view "0.11.0" react-native-screens "^1.0.0-alpha.11" @@ -7252,7 +7263,7 @@ regjsgen@^0.4.0: regjsparser@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + resolved "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" dependencies: jsesc "~0.5.0" @@ -7420,10 +7431,10 @@ rn-nodeify@^10.0.0: xtend "^4.0.0" rn-walletconnect-wallet@^0.7.24: - version "0.7.26" - resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.26.tgz#9d39d18f74abd9fe2b4bfd343a6d90a338b43a96" + version "0.7.27" + resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.27.tgz#ac812f4e2c2cb429a10a3130d3eb0898210478fa" dependencies: - js-walletconnect-core "^0.7.26" + js-walletconnect-core "^0.7.27" rsvp@^3.3.3: version "3.6.2" @@ -7491,8 +7502,8 @@ sax@~1.1.1: resolved "http://registry.npmjs.org/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240" saxes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.3.tgz#334ab3b802a465ccda96fff9bdefbd505546ffa8" + version "3.1.4" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.4.tgz#4ad5c53eb085ac0570ea1071a07aaf22ad29cebd" dependencies: xmlchars "^1.3.1" @@ -7503,8 +7514,8 @@ schedule@0.4.0: object-assign "^4.1.1" scheduler@^0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.2.tgz#a8db5399d06eba5abac51b705b7151d2319d33d3" + version "0.11.3" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b" dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -7933,11 +7944,11 @@ string-width@^1.0.1: string_decoder@^0.10.31, string_decoder@~0.10.x: version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" @@ -8275,7 +8286,14 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3, tough-cookie@~2.4.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" dependencies: @@ -8991,6 +9009,10 @@ yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + yallist@^3.0.0, yallist@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" @@ -9068,7 +9090,7 @@ yauzl@^2.4.2: fd-slicer "~1.1.0" yazl@^2.4.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.0.tgz#1ab8de8cd3c3c252986c7fa2f6562784d7288e49" + version "2.5.1" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" dependencies: buffer-crc32 "~0.2.3" From 139deb5dfc5ec0356918a2c8a324181f9205b4e5 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 4 Dec 2018 09:50:59 -0500 Subject: [PATCH 17/32] remove unneeded functions for message signing --- src/hoc/withMessageSigningScreen.js | 2 -- src/screens/MessageSigningScreenWithData.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/hoc/withMessageSigningScreen.js b/src/hoc/withMessageSigningScreen.js index dde21ce1cdf..205007eec95 100644 --- a/src/hoc/withMessageSigningScreen.js +++ b/src/hoc/withMessageSigningScreen.js @@ -1,4 +1,3 @@ -import { accountUpdateTransactions } from 'balance-common'; import { connect } from 'react-redux'; import { removeTransaction } from '../redux/transactionsToApprove'; @@ -9,6 +8,5 @@ const mapStateToProps = ({ }); export default Component => connect(mapStateToProps, { - accountUpdateTransactions, removeTransaction, })(Component); diff --git a/src/screens/MessageSigningScreenWithData.js b/src/screens/MessageSigningScreenWithData.js index e143c1beefb..07d1c6d796f 100644 --- a/src/screens/MessageSigningScreenWithData.js +++ b/src/screens/MessageSigningScreenWithData.js @@ -12,7 +12,6 @@ import MessageSigningScreen from './MessageSigningScreen'; class MessageSigningScreenWithData extends Component { static propTypes = { - accountUpdateTransactions: PropTypes.func, navigation: PropTypes.any, removeTransaction: PropTypes.func, walletConnectors: PropTypes.object, @@ -32,7 +31,6 @@ class MessageSigningScreenWithData extends Component { if (flatFormatSignature) { const txDetails = { message }; - //this.props.accountUpdateTransactions(txDetails); // TODO: how to display transactions for signed message this.props.removeTransaction(transactionDetails.callId); const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; await walletConnectSendStatus(walletConnector, transactionDetails.callId, flatFormatSignature); From d732d64fa4ef32cd587cf8fb769d44bbb4fc8949 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 4 Dec 2018 12:30:57 -0500 Subject: [PATCH 18/32] reused components for txn confirmation screen layout for messages as well as txns --- src/App.js | 19 +-- src/components/MessageSigningSection.js | 62 +++++++ .../TransactionConfirmationSection.js | 144 ++++++++++++++++ src/components/coin-row/RequestCoinRow.js | 19 +-- src/redux/transactionsToApprove.js | 48 +++--- src/screens/MessageSigningScreen.js | 129 -------------- src/screens/MessageSigningScreenWithData.js | 91 ---------- src/screens/Routes.js | 4 +- src/screens/TransactionConfirmationScreen.js | 158 ++++-------------- .../TransactionConfirmationScreenWithData.js | 64 ++++--- 10 files changed, 309 insertions(+), 429 deletions(-) create mode 100644 src/components/MessageSigningSection.js create mode 100644 src/components/TransactionConfirmationSection.js delete mode 100644 src/screens/MessageSigningScreen.js delete mode 100644 src/screens/MessageSigningScreenWithData.js diff --git a/src/App.js b/src/App.js index e0caa37b84a..793adcf4eec 100644 --- a/src/App.js +++ b/src/App.js @@ -69,7 +69,7 @@ class App extends Component { const navState = get(this.navigatorRef, 'state.nav'); const route = Navigation.getActiveRouteName(navState); const { callId, sessionId } = notification.data; - if (route === 'ConfirmTransaction') { + if (route === 'ConfirmRequest') { this.fetchAndAddWalletConnectRequest(callId, sessionId) .then(transaction => { const localNotification = new firebase.notifications.Notification() @@ -141,19 +141,10 @@ class App extends Component { handleOpenConfirmTransactionModal = (transactionDetails) => { if (!this.navigatorRef) return; - const requestType = get(transactionDetails, 'transactionDisplayDetails.type'); - let action = null; - if (requestType === 'message') { - action = NavigationActions.navigate({ - routeName: 'SignMessage', - params: { transactionDetails }, - }); - } else { - action = NavigationActions.navigate({ - routeName: 'ConfirmTransaction', - params: { transactionDetails }, - }); - } + const action = NavigationActions.navigate({ + routeName: 'ConfirmRequest', + params: { transactionDetails }, + }); Navigation.handleAction(this.navigatorRef, action); } diff --git a/src/components/MessageSigningSection.js b/src/components/MessageSigningSection.js new file mode 100644 index 00000000000..bec91a61926 --- /dev/null +++ b/src/components/MessageSigningSection.js @@ -0,0 +1,62 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import lang from 'i18n-js'; +import styled from 'styled-components'; +import { BlockButton } from '../components/buttons'; +import { Column } from '../components/layout'; +import { + Smallcaps, + Text, +} from '../components/text'; +import { withSafeAreaViewInsetValues } from '../hoc'; +import { borders, colors, fonts, padding, position } from '../styles'; + +const Message = styled(Text).attrs({ size: 'lmedium' })` + color: ${colors.alpha(colors.blueGreyDark, 0.6)} + margin-top: 5; +`; + +const MessageRow = styled(Column)` + ${padding(19, 19, 18)} + flex-shrink: 0; +`; + +const BottomSheet = styled(Column).attrs({ justify: 'space-between' })` + ${borders.buildRadius('top', 15)} + background-color: ${colors.white}; + flex: 0; + min-height: ${({ bottomInset }) => (bottomInset + 236)}; + padding-bottom: ${({ bottomInset }) => bottomInset}; + width: 100%; +`; + +const SendButtonContainer = styled.View` + ${padding(7, 15, 14)} + flex-shrink: 0; +`; + +const MessageSigningSection = ({ + message, + onSignMessage, + safeAreaInset, +}) => ( + + + {lang.t('wallet.message_signing.message')} + {message} + + + + {lang.t('wallet.message_signing.sign')} + + + +); + +MessageSigningSection.propTypes = { + message: PropTypes.string, + onSignMessage: PropTypes.func, + safeAreaInset: PropTypes.object, +}; + +export default withSafeAreaViewInsetValues(MessageSigningSection); diff --git a/src/components/TransactionConfirmationSection.js b/src/components/TransactionConfirmationSection.js new file mode 100644 index 00000000000..d5a7b93e2b2 --- /dev/null +++ b/src/components/TransactionConfirmationSection.js @@ -0,0 +1,144 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import lang from 'i18n-js'; +import styled from 'styled-components'; +import BalanceManagerLogo from '../assets/balance-manager-logo.png'; +import { BlockButton } from '../components/buttons'; +import { CoinIcon } from '../components/coin-icon'; +import { Nbsp } from '../components/html-entities'; +import { Column, Row } from '../components/layout'; +import { + Monospace, + Smallcaps, + TruncatedAddress, + TruncatedText, +} from '../components/text'; +import Divider from '../components/Divider'; +import { withSafeAreaViewInsetValues } from '../hoc'; +import { borders, colors, fonts, padding, position } from '../styles'; + +const Address = styled(TruncatedAddress).attrs({ size: 'lmedium' })` + color: ${colors.alpha(colors.blueGreyDark, 0.6)} + margin-top: 5; +`; + +const AddressRow = styled(Column)` + ${padding(19, 19, 18)} + flex-shrink: 0; +`; + +const Amount = styled(Monospace).attrs({ size: 'smedium' })` + color: ${colors.alpha(colors.blueGreyDark, 0.6)} + text-transform: uppercase; +`; + +const AmountRow = styled(Row).attrs({ + align: 'center', + justify: 'space-between', +})` + ${padding(21, 19)} + flex: 1; +`; + +const AmountRowLeft = styled(Column)` + flex-grow: -1; + flex-shrink: 1; + padding-right: ${fonts.size.lmedium}; +`; + +const AssetName = styled(TruncatedText).attrs({ + size: 'lmedium', + weight: 'medium', +})` + flex-shrink: 1; + margin-left: 6; +`; + +const BottomSheet = styled(Column).attrs({ justify: 'space-between' })` + ${borders.buildRadius('top', 15)} + background-color: ${colors.white}; + flex: 0; + min-height: ${({ bottomInset }) => (bottomInset + 236)}; + padding-bottom: ${({ bottomInset }) => bottomInset}; + width: 100%; +`; + +const NativeAmount = styled(Monospace).attrs({ + size: 'h2', + weight: 'medium', +})` + flex-grow: 0; + flex-shrink: 0; +`; + +const SendButtonContainer = styled.View` + ${padding(7, 15, 14)} + flex-shrink: 0; +`; + +const TokenAmount = styled(TruncatedText).attrs({ component: Amount })` + flex-grow: 0; + flex-shrink: 1; +`; + +const TokenAmountRow = styled(Row).attrs({ align: 'center' })` + margin-top: 6; +`; + +const TokenSymbol = styled(Amount)` + flex-grow: -1; + flex-shrink: 0; +`; + +const TransactionConfirmationSection = ({ + asset: { + address, + amount, + dappName, + name, + nativeAmount, + symbol, + }, + onConfirmTransaction, + safeAreaInset, +}) => ( + + + {lang.t('wallet.action.to')} +
+ + + + + + + {name} + + + {amount} + {symbol} + + + {nativeAmount} + + + + {lang.t('wallet.transaction.send')} + + + +); + +TransactionConfirmationSection.propTypes = { + asset: PropTypes.shape({ + address: PropTypes.string, + amount: PropTypes.string, + name: PropTypes.string, + nativeAmount: PropTypes.string, + symbol: PropTypes.string, + }), + onConfirmTransaction: PropTypes.func, + safeAreaInset: PropTypes.object, +}; + +export default withSafeAreaViewInsetValues(TransactionConfirmationSection); diff --git a/src/components/coin-row/RequestCoinRow.js b/src/components/coin-row/RequestCoinRow.js index 0bc17a5e86f..0a624adfbd2 100644 --- a/src/components/coin-row/RequestCoinRow.js +++ b/src/components/coin-row/RequestCoinRow.js @@ -80,20 +80,11 @@ export default compose( }; }), withHandlers({ - onPressOpen: ({ item, navigation }) => () => { - const methodType = get(item, 'transactionDisplayDetails.type'); - if (methodType === 'transaction') { - navigation.navigate({ - params: { transactionDetails: item }, - routeName: 'ConfirmTransaction', - }) - } else { - navigation.navigate({ - params: { transactionDetails: item }, - routeName: 'SignMessage', - }) - } - }, + onPressOpen: ({ item, navigation }) => () => + navigation.navigate({ + params: { transactionDetails: item }, + routeName: 'ConfirmRequest', + }), }), onlyUpdateForKeys(['expirationColor', 'percentElapsed']), )(RequestCoinRow); diff --git a/src/redux/transactionsToApprove.js b/src/redux/transactionsToApprove.js index 8af252f1619..db878097024 100644 --- a/src/redux/transactionsToApprove.js +++ b/src/redux/transactionsToApprove.js @@ -63,9 +63,9 @@ const getRequestDisplayDetails = (callData, assets, prices, nativeCurrency) => { const getMessageDisplayDetails = (message) => { const timestampInMs = Date.now(); return { - type: 'message', - message, + payload: message, timestampInMs, + type: 'message', }; }; @@ -76,21 +76,23 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc const value = fromWei(convertHexToString(transaction.value)); const nativeAmount = getNativeAmount(prices, nativeCurrency, value, 'ETH'); return { - asset: { - address: null, - decimals: 18, - name: 'Ethereum', - symbol: 'ETH', + payload: { + asset: { + address: null, + decimals: 18, + name: 'Ethereum', + symbol: 'ETH', + }, + from: transaction.from, + gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), + gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), + nativeAmount, + nonce: Number(convertHexToString(transaction.nonce)), + to: transaction.to, + value, }, - from: transaction.from, - gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), - gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), - nativeAmount, - nonce: Number(convertHexToString(transaction.nonce)), timestampInMs, - to: transaction.to, type: 'transaction', - value, }; } else if (transaction.data.startsWith(tokenTransferHash)) { const contractAddress = transaction.to; @@ -101,16 +103,18 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc const value = fromWei(convertHexToString(amount), asset.decimals); const nativeAmount = getNativeAmount(prices, nativeCurrency, value, asset.symbol); return { - asset, - from: transaction.from, - gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), - gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), - nativeAmount, - nonce: Number(convertHexToString(transaction.nonce)), + payload: { + asset, + from: transaction.from, + gasLimit: BigNumber(convertHexToString(transaction.gasLimit)), + gasPrice: BigNumber(convertHexToString(transaction.gasPrice)), + nativeAmount, + nonce: Number(convertHexToString(transaction.nonce)), + to: toAddress, + value, + }, timestampInMs, - to: toAddress, type: 'transaction', - value, }; } diff --git a/src/screens/MessageSigningScreen.js b/src/screens/MessageSigningScreen.js deleted file mode 100644 index 84492f06b69..00000000000 --- a/src/screens/MessageSigningScreen.js +++ /dev/null @@ -1,129 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import lang from 'i18n-js'; -import styled from 'styled-components'; -import BalanceManagerLogo from '../assets/balance-manager-logo.png'; -import { Button, BlockButton } from '../components/buttons'; -import { CoinIcon } from '../components/coin-icon'; -import { Nbsp } from '../components/html-entities'; -import { Centered, Column, Row } from '../components/layout'; -import { - Monospace, - Smallcaps, - Text, -} from '../components/text'; -import { withSafeAreaViewInsetValues } from '../hoc'; -import { borders, colors, fonts, padding, position } from '../styles'; - -const Message = styled(Text).attrs({ size: 'lmedium' })` - color: ${colors.alpha(colors.blueGreyDark, 0.6)} - margin-top: 5; -`; - -const MessageRow = styled(Column)` - ${padding(19, 19, 18)} - flex-shrink: 0; -`; - -const BottomSheet = styled(Column).attrs({ justify: 'space-between' })` - ${borders.buildRadius('top', 15)} - background-color: ${colors.white}; - flex: 0; - min-height: ${({ bottomInset }) => (bottomInset + 236)}; - padding-bottom: ${({ bottomInset }) => bottomInset}; - width: 100%; -`; - -const CancelButtonContainer = styled.View` - bottom: 22; - position: absolute; - right: 19; -`; - -const Container = styled(Column)` - ${position.size('100%')} - background-color: ${colors.black}; - flex: 1; -`; - -const Masthead = styled(Centered).attrs({ direction: 'column' })` - flex: 1; - padding-bottom: 2px; - width: 100%; -`; - -const SendButtonContainer = styled.View` - ${padding(7, 15, 14)} - flex-shrink: 0; -`; - -const TransactionType = styled(Text).attrs({ size: 'h5' })` - color: ${colors.alpha(colors.white, 0.68)} - margin-top: 6; -`; - -const VendorLogo = styled.Image` - ${position.size('100%')} - resize-mode: contain; -`; - -const VenderLogoContainer = styled(Centered)` - ${position.size(60)} - margin-bottom: 24; -`; - -const VendorName = styled(Text).attrs({ - size: 'h4', - weight: 'semibold', -})` - color: ${colors.white}; - letter-spacing: -0.2px; -`; - -const MessageSigningScreen = ({ - dappName, - message, - onCancelSignMessage, - onSignMessage, - safeAreaInset, -}) => ( - - - - - - {dappName} - {lang.t('wallet.message_signing.request')} - - - - - - - {lang.t('wallet.message_signing.message')} - {message} - - - - {lang.t('wallet.message_signing.sign')} - - - - -); - -MessageSigningScreen.propTypes = { - message: PropTypes.array, - onCancelSignMessage: PropTypes.func, - onSignMessage: PropTypes.func, - safeAreaInset: PropTypes.object, -}; - -export default withSafeAreaViewInsetValues(MessageSigningScreen); diff --git a/src/screens/MessageSigningScreenWithData.js b/src/screens/MessageSigningScreenWithData.js deleted file mode 100644 index 07d1c6d796f..00000000000 --- a/src/screens/MessageSigningScreenWithData.js +++ /dev/null @@ -1,91 +0,0 @@ -import { web3Instance } from 'balance-common'; -import lang from 'i18n-js'; -import { get } from 'lodash'; -import PropTypes from 'prop-types'; -import React, { Component } from 'react'; -import { AlertIOS, StatusBar, Vibration } from 'react-native'; -import Piwik from 'react-native-matomo'; -import { withMessageSigningScreen } from '../hoc'; -import { signMessage } from '../model/wallet'; -import { walletConnectSendStatus } from '../model/walletconnect'; -import MessageSigningScreen from './MessageSigningScreen'; - -class MessageSigningScreenWithData extends Component { - static propTypes = { - navigation: PropTypes.any, - removeTransaction: PropTypes.func, - walletConnectors: PropTypes.object, - } - - componentDidMount() { - StatusBar.setBarStyle('light-content', true); - Vibration.vibrate(); - } - - handleSignMessage = async () => { - // TODO: add a name, value? - Piwik.trackEvent('Send', 'confirm-wc'); - const { transactionDetails } = this.props.navigation.state.params; - const message = get(transactionDetails, 'transactionDisplayDetails.message'); - const flatFormatSignature = await signMessage(message); - - if (flatFormatSignature) { - const txDetails = { message }; - this.props.removeTransaction(transactionDetails.callId); - const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; - await walletConnectSendStatus(walletConnector, transactionDetails.callId, flatFormatSignature); - this.closeScreen(); - } else { - await this.handleCancelSignMessage(); - } - }; - - sendFailedTransactionStatus = async () => { - try { - this.closeScreen(); - const { transactionDetails } = this.props.navigation.state.params; - const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; - await walletConnectSendStatus(walletConnector, transactionDetails.callId, null); - } catch (error) { - this.closeScreen(); - AlertIOS.alert(lang.t('wallet.transaction.alert.cancelled_transaction')); - } - } - - handleCancelSignMessage = async () => { - try { - await this.sendFailedTransactionStatus(); - const { transactionDetails } = this.props.navigation.state.params; - this.props.removeTransaction(transactionDetails.callId); - } catch (error) { - this.closeScreen(); - AlertIOS.alert('Failed to send rejected transaction status'); - } - } - - closeScreen = () => { - StatusBar.setBarStyle('dark-content', true); - this.props.navigation.goBack(); - } - - render = () => { - const { - transactionDetails: { - transactionDisplayDetails: { - message - }, - dappName, - }, - } = this.props.navigation.state.params; - return ( - - ); - } -} - -export default withMessageSigningScreen(MessageSigningScreenWithData); diff --git a/src/screens/Routes.js b/src/screens/Routes.js index fd4e6642069..4c16dd20749 100644 --- a/src/screens/Routes.js +++ b/src/screens/Routes.js @@ -10,7 +10,6 @@ import SendQRScannerScreenWithData from './SendQRScannerScreenWithData'; import SendScreenWithData from './SendScreenWithData'; import SettingsScreenWithData from './SettingsScreenWithData'; import TransactionConfirmationScreenWithData from './TransactionConfirmationScreenWithData'; -import MessageSigningScreenWithData from './MessageSigningScreenWithData'; import WalletScreen from './WalletScreen'; import { deviceUtils } from '../utils'; import store from '../redux/store'; @@ -49,8 +48,7 @@ const AppStack = createStackNavigator({ }, screen: ActivityScreen, }, - ConfirmTransaction: TransactionConfirmationScreenWithData, - SignMessage: MessageSigningScreenWithData, + ConfirmRequest: TransactionConfirmationScreenWithData, ExpandedAssetScreen: { navigationOptions: { effect: 'expanded', diff --git a/src/screens/TransactionConfirmationScreen.js b/src/screens/TransactionConfirmationScreen.js index c9031fce9ca..92807f2a2b8 100644 --- a/src/screens/TransactionConfirmationScreen.js +++ b/src/screens/TransactionConfirmationScreen.js @@ -1,69 +1,16 @@ +import { get } from 'lodash'; import PropTypes from 'prop-types'; import React from 'react'; import lang from 'i18n-js'; import styled from 'styled-components'; import BalanceManagerLogo from '../assets/balance-manager-logo.png'; -import { Button, BlockButton } from '../components/buttons'; -import { CoinIcon } from '../components/coin-icon'; -import { Nbsp } from '../components/html-entities'; -import { Centered, Column, Row } from '../components/layout'; -import { - Monospace, - Smallcaps, - Text, - TruncatedAddress, - TruncatedText, -} from '../components/text'; -import Divider from '../components/Divider'; -import { withSafeAreaViewInsetValues } from '../hoc'; +import { Button } from '../components/buttons'; +import { Centered, Column } from '../components/layout'; +import TransactionConfirmationSection from '../components/TransactionConfirmationSection'; +import MessageSigningSection from '../components/MessageSigningSection'; +import { Text } from '../components/text'; import { borders, colors, fonts, padding, position } from '../styles'; -const Address = styled(TruncatedAddress).attrs({ size: 'lmedium' })` - color: ${colors.alpha(colors.blueGreyDark, 0.6)} - margin-top: 5; -`; - -const AddressRow = styled(Column)` - ${padding(19, 19, 18)} - flex-shrink: 0; -`; - -const Amount = styled(Monospace).attrs({ size: 'smedium' })` - color: ${colors.alpha(colors.blueGreyDark, 0.6)} - text-transform: uppercase; -`; - -const AmountRow = styled(Row).attrs({ - align: 'center', - justify: 'space-between', -})` - ${padding(21, 19)} - flex: 1; -`; - -const AmountRowLeft = styled(Column)` - flex-grow: -1; - flex-shrink: 1; - padding-right: ${fonts.size.lmedium}; -`; - -const AssetName = styled(TruncatedText).attrs({ - size: 'lmedium', - weight: 'medium', -})` - flex-shrink: 1; - margin-left: 6; -`; - -const BottomSheet = styled(Column).attrs({ justify: 'space-between' })` - ${borders.buildRadius('top', 15)} - background-color: ${colors.white}; - flex: 0; - min-height: ${({ bottomInset }) => (bottomInset + 236)}; - padding-bottom: ${({ bottomInset }) => bottomInset}; - width: 100%; -`; - const CancelButtonContainer = styled.View` bottom: 22; position: absolute; @@ -82,33 +29,6 @@ const Masthead = styled(Centered).attrs({ direction: 'column' })` width: 100%; `; -const NativeAmount = styled(Monospace).attrs({ - size: 'h2', - weight: 'medium', -})` - flex-grow: 0; - flex-shrink: 0; -`; - -const SendButtonContainer = styled.View` - ${padding(7, 15, 14)} - flex-shrink: 0; -`; - -const TokenAmount = styled(TruncatedText).attrs({ component: Amount })` - flex-grow: 0; - flex-shrink: 1; -`; - -const TokenAmountRow = styled(Row).attrs({ align: 'center' })` - margin-top: 6; -`; - -const TokenSymbol = styled(Amount)` - flex-grow: -1; - flex-shrink: 0; -`; - const TransactionType = styled(Text).attrs({ size: 'h5' })` color: ${colors.alpha(colors.white, 0.68)} margin-top: 6; @@ -133,17 +53,12 @@ const VendorName = styled(Text).attrs({ `; const TransactionConfirmationScreen = ({ - asset: { - address, - amount, - dappName, - name, - nativeAmount, - symbol, - }, + dappName, + request, + requestType, onCancelTransaction, onConfirmTransaction, - safeAreaInset, + onSignMessage, }) => ( @@ -163,45 +78,30 @@ const TransactionConfirmationScreen = ({ - - - {lang.t('wallet.action.to')} -
- - - - - - - {name} - - - {amount} - {symbol} - - - {nativeAmount} - - - - {lang.t('wallet.transaction.send')} - - - + {requestType === 'message' ? () : + ()} ); TransactionConfirmationScreen.propTypes = { - asset: PropTypes.shape({ - address: PropTypes.string, - amount: PropTypes.string, - name: PropTypes.string, - nativeAmount: PropTypes.string, - symbol: PropTypes.string, - }), + dappName: PropTypes.string, + request: PropTypes.object, + requestType: PropTypes.string, onCancelTransaction: PropTypes.func, onConfirmTransaction: PropTypes.func, - safeAreaInset: PropTypes.object, + onSignMessage: PropTypes.func, }; -export default withSafeAreaViewInsetValues(TransactionConfirmationScreen); +export default TransactionConfirmationScreen; diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index b7a66dab908..ca1d95c63b3 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -6,7 +6,7 @@ import React, { Component } from 'react'; import { AlertIOS, StatusBar, Vibration } from 'react-native'; import Piwik from 'react-native-matomo'; import { withTransactionConfirmationScreen } from '../hoc'; -import { sendTransaction } from '../model/wallet'; +import { signMessage, sendTransaction } from '../model/wallet'; import { walletConnectSendStatus } from '../model/walletconnect'; import TransactionConfirmationScreen from './TransactionConfirmationScreen'; @@ -40,34 +40,50 @@ class TransactionConfirmationScreenWithData extends Component { if (transactionHash) { this.props.updateTransactionCountNonce(maxTxnCount + 1); const txDetails = { - asset: get(transactionDetails, 'transactionDisplayDetails.asset'), - from: get(transactionDetails, 'transactionDisplayDetails.from'), - gasLimit: get(transactionDetails, 'transactionDisplayDetails.gasLimit'), - gasPrice: get(transactionDetails, 'transactionDisplayDetails.gasPrice'), + asset: get(transactionDetails, 'transactionDisplayDetails.payload.asset'), + from: get(transactionDetails, 'transactionDisplayDetails.payload.from'), + gasLimit: get(transactionDetails, 'transactionDisplayDetails.payload.gasLimit'), + gasPrice: get(transactionDetails, 'transactionDisplayDetails.payload.gasPrice'), hash: transactionHash, - nonce: get(transactionDetails, 'transactionDisplayDetails.nonce'), - to: get(transactionDetails, 'transactionDisplayDetails.to'), - value: get(transactionDetails, 'transactionDisplayDetails.value'), + nonce: get(transactionDetails, 'transactionDisplayDetails.payload.nonce'), + to: get(transactionDetails, 'transactionDisplayDetails.payload.to'), + value: get(transactionDetails, 'transactionDisplayDetails.payload.value'), }; this.props.accountUpdateHasPendingTransaction(); this.props.accountUpdateTransactions(txDetails); this.props.removeTransaction(transactionDetails.callId); const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; await walletConnectSendStatus(walletConnector, transactionDetails.callId, transactionHash); - this.closeTransactionScreen(); + this.closeScreen(); } else { await this.handleCancelTransaction(); } }; + handleSignMessage = async () => { + const { transactionDetails } = this.props.navigation.state.params; + const message = get(transactionDetails, 'transactionDisplayDetails.payload'); + const flatFormatSignature = await signMessage(message); + + if (flatFormatSignature) { + const txDetails = { message }; + this.props.removeTransaction(transactionDetails.callId); + const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; + await walletConnectSendStatus(walletConnector, transactionDetails.callId, flatFormatSignature); + this.closeScreen(); + } else { + await this.handleCancelSignMessage(); + } + }; + sendFailedTransactionStatus = async () => { try { - this.closeTransactionScreen(); + this.closeScreen(); const { transactionDetails } = this.props.navigation.state.params; const walletConnector = this.props.walletConnectors[transactionDetails.sessionId]; await walletConnectSendStatus(walletConnector, transactionDetails.callId, null); } catch (error) { - this.closeTransactionScreen(); + this.closeScreen(); AlertIOS.alert(lang.t('wallet.transaction.alert.cancelled_transaction')); } } @@ -78,12 +94,12 @@ class TransactionConfirmationScreenWithData extends Component { const { transactionDetails } = this.props.navigation.state.params; this.props.removeTransaction(transactionDetails.callId); } catch (error) { - this.closeTransactionScreen(); + this.closeScreen(); AlertIOS.alert('Failed to send rejected transaction status'); } } - closeTransactionScreen = () => { + closeScreen = () => { StatusBar.setBarStyle('dark-content', true); this.props.navigation.goBack(); } @@ -93,26 +109,20 @@ class TransactionConfirmationScreenWithData extends Component { transactionDetails: { dappName, transactionDisplayDetails: { - asset, - nativeAmount, - to, - value, - }, - }, + type, + payload, + } + } } = this.props.navigation.state.params; return ( ); } From dae8b20f755c2d70e755e9e88142c277c488bdc6 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 4 Dec 2018 12:44:56 -0500 Subject: [PATCH 19/32] updating balance common version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8c19d439ecf..704132bb974 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "git+https://github.com/balance-io/balance-common.git#msg-signing", + "balance-common": "^0.6.2", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", @@ -180,4 +180,4 @@ "./src/assets/fonts" ] } -} \ No newline at end of file +} From 674242e7689f26c9a3d5201d8f8588948459065d Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 4 Dec 2018 16:31:56 -0500 Subject: [PATCH 20/32] grouping wc sessions by dapp name and disconnecting from all --- package.json | 2 +- .../walletconnect-list/WalletConnectList.js | 21 +- .../WalletConnectListItem.js | 2 +- src/hoc/withWalletConnectConnections.js | 16 +- src/model/walletconnect.js | 17 +- src/redux/walletconnect.js | 14 +- yarn.lock | 418 +++++++++--------- 7 files changed, 259 insertions(+), 231 deletions(-) diff --git a/package.json b/package.json index f67ca3d6898..13a23aa0191 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "0.5.28", + "balance-common": "git+https://github.com/balance-io/balance-common.git#wc-dapp", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/src/components/walletconnect-list/WalletConnectList.js b/src/components/walletconnect-list/WalletConnectList.js index 3bb0cac8fab..675f69918cf 100644 --- a/src/components/walletconnect-list/WalletConnectList.js +++ b/src/components/walletconnect-list/WalletConnectList.js @@ -1,11 +1,11 @@ -import { get } from 'lodash'; +import { get, pickBy, values } from 'lodash'; import PropTypes from 'prop-types'; import React from 'react'; import { FlatList } from 'react-native'; import { compose, onlyUpdateForPropTypes, withHandlers } from 'recompact'; import styled from 'styled-components/primitives'; import { withWalletConnectConnections, withSafeAreaViewInsetValues } from '../../hoc'; -import { walletConnectDisconnect } from '../../model/walletconnect'; +import { walletConnectDisconnectAll } from '../../model/walletconnect'; import { borders, colors, shadow } from '../../styles'; import { Column } from '../layout'; import WalletConnectListItem from './WalletConnectListItem'; @@ -40,7 +40,7 @@ const WalletConnectList = ({ renderItem={({ index, item }) => ( )} @@ -62,19 +62,20 @@ export default compose( withSafeAreaViewInsetValues, withWalletConnectConnections, withHandlers({ - onHandleDisconnectAlert: ({ getValidWalletConnectors, removeWalletConnector }) => (sessionId) => { + onHandleDisconnectAlert: ({ getValidWalletConnectors, removeWalletConnectorByDapp }) => (dappName) => { showActionSheetWithOptions({ cancelButtonIndex: 1, destructiveButtonIndex: 0, options: ['Disconnect', 'Cancel'], - title: 'Would you like to disconnect your session?', + title: `Would you like to disconnect from ${dappName}?`, }, (buttonIndex) => { if (buttonIndex === 0) { - console.log('disconnecting!!', sessionId); - const walletConnectors = getValidWalletConnectors(); - return walletConnectDisconnect( - walletConnectors[sessionId] - ).then(() => removeWalletConnector(sessionId)); + const validSessions = getValidWalletConnectors(); + const dappSessions = values(pickBy(validSessions, (session) => session.dappName === dappName)); + walletConnectDisconnectAll(dappSessions) + .then(() => { + removeWalletConnectorByDapp(dappName); + }); } }); } diff --git a/src/components/walletconnect-list/WalletConnectListItem.js b/src/components/walletconnect-list/WalletConnectListItem.js index 3fafb46617a..6a235ea6ae6 100644 --- a/src/components/walletconnect-list/WalletConnectListItem.js +++ b/src/components/walletconnect-list/WalletConnectListItem.js @@ -67,5 +67,5 @@ WalletConnectListItem.height = VendorLogoIconSize + (ContainerPadding * 2); export default hoistStatics(compose( onlyUpdateForKeys(['expires']), - withHandlers({ onPress: ({ onPress, _sessionId }) => () => onPress(_sessionId) }), + withHandlers({ onPress: ({ onPress, dappName }) => () => onPress(dappName) }), ))(WalletConnectListItem); diff --git a/src/hoc/withWalletConnectConnections.js b/src/hoc/withWalletConnectConnections.js index 0d06d585d9c..a808f7c91a6 100644 --- a/src/hoc/withWalletConnectConnections.js +++ b/src/hoc/withWalletConnectConnections.js @@ -1,8 +1,9 @@ +import { head, groupBy, mapValues, values } from 'lodash'; import { compose, withProps } from 'recompact'; import { connect } from 'react-redux'; import { getValidWalletConnectors, - removeWalletConnector, + removeWalletConnectorByDapp, setWalletConnectors, } from '../redux/walletconnect'; import { sortList } from '../utils'; @@ -12,14 +13,21 @@ const mapStateToProps = ({ walletconnect: { walletConnectors } }) => ({ walletCo export default Component => compose( connect(mapStateToProps, { getValidWalletConnectors, - removeWalletConnector, + removeWalletConnectorByDapp, setWalletConnectors, }), withProps(({ walletConnectors }) => { const sortedWalletConnectors = sortList(Object.values(walletConnectors), 'expires'); - + const sortedWalletConnectorsByDappName = groupBy(sortedWalletConnectors, 'dappName'); + const dappWalletConnector = mapValues(sortedWalletConnectorsByDappName, (connectors) => { + const firstElement = head(connectors); + return { + dappName: firstElement.dappName, + expires: firstElement.expires + }; + }); return { - walletConnectors: sortedWalletConnectors, + walletConnectors: values(dappWalletConnector), walletConnectorsCount: sortedWalletConnectors.length, }; }), diff --git a/src/model/walletconnect.js b/src/model/walletconnect.js index cfc8fc47729..b85918066ed 100644 --- a/src/model/walletconnect.js +++ b/src/model/walletconnect.js @@ -1,6 +1,6 @@ import { commonStorage } from 'balance-common'; import lang from 'i18n-js'; -import { assign, get, mapValues, values } from 'lodash'; +import { assign, forEach, get, mapValues, values } from 'lodash'; import { AlertIOS } from 'react-native'; import RNWalletConnect from 'rn-walletconnect-wallet'; @@ -55,14 +55,13 @@ export const walletConnectInitAllConnectors = async () => { } }; -export const walletConnectDisconnect = async (walletConnector) => { - if (walletConnector) { - try { - await commonStorage.removeWalletConnectSession(walletConnector._sessionId); - await walletConnector.killSession(); - } catch (error) { - AlertIOS.alert('Failed to disconnect WalletConnect session'); - } +export const walletConnectDisconnectAll = async (walletConnectors) => { + try { + const sessionIds = values(mapValues(walletConnectors, (walletConnector) => walletConnector.sessionId)); + await commonStorage.removeWalletConnectSessions(sessionIds); + forEach(walletConnectors, (walletConnector) => walletConnector.killSession()); + } catch (error) { + AlertIOS.alert('Failed to disconnect all WalletConnect sessions'); } }; diff --git a/src/redux/walletconnect.js b/src/redux/walletconnect.js index c585e0cafa0..e0a8c6ad096 100644 --- a/src/redux/walletconnect.js +++ b/src/redux/walletconnect.js @@ -19,14 +19,12 @@ export const getValidWalletConnectors = () => (dispatch, getState) => { return validConnectors; }; -export const removeWalletConnector = (sessionId) => (dispatch, getState) => { - if (sessionId) { - const { walletConnectors } = getState().walletconnect; - dispatch({ - payload: omitBy(walletConnectors, ({ _sessionId }) => (_sessionId === sessionId)), - type: WALLETCONNECT_NEW_SESSION, - }); - } +export const removeWalletConnectorByDapp = (dappName) => (dispatch, getState) => { + const { walletConnectors } = getState().walletconnect; + dispatch({ + payload: omitBy(walletConnectors, ({ dappName: _dappName }) => (_dappName === dappName)), + type: WALLETCONNECT_NEW_SESSION, + }); }; export const setWalletConnectors = (walletConnectors) => (dispatch) => diff --git a/yarn.lock b/yarn.lock index e0df37e8ee8..b2b3fdb8bf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,16 +15,16 @@ "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0", "@babel/core@^7.1.2": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.6.tgz#3733cbee4317429bc87c62b29cf8587dba7baeb3" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.0.tgz#a4dd3814901998e93340f0086e9867fefa163ada" dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.6" - "@babel/helpers" "^7.1.5" - "@babel/parser" "^7.1.6" + "@babel/generator" "^7.2.0" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.2.0" "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.6" - "@babel/types" "^7.1.6" + "@babel/types" "^7.2.0" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -43,11 +43,11 @@ source-map "^0.5.0" trim-right "^1.0.1" -"@babel/generator@^7.0.0", "@babel/generator@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.6.tgz#001303cf87a5b9d093494a4bf251d7b5d03d3999" +"@babel/generator@^7.0.0", "@babel/generator@^7.1.6", "@babel/generator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.0.tgz#eaf3821fa0301d9d4aef88e63d4bcc19b73ba16c" dependencies: - "@babel/types" "^7.1.6" + "@babel/types" "^7.2.0" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -81,6 +81,16 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" +"@babel/helper-create-class-features-plugin@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.1.tgz#f6e8027291669ef64433220dc8327531233f1161" + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + "@babel/helper-define-map@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" @@ -208,21 +218,21 @@ "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.2.0" -"@babel/helpers@^7.1.5": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.5.tgz#68bfc1895d685f2b8f1995e788dbfe1f6ccb1996" +"@babel/helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" dependencies: "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.5" - "@babel/types" "^7.1.5" + "@babel/types" "^7.2.0" "@babel/highlight@7.0.0-beta.44": version "7.0.0-beta.44" @@ -240,146 +250,136 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.6.tgz#16e97aca1ec1062324a01c5a6a7d0df8dd189854" +"@babel/parser@^7.0.0", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6", "@babel/parser@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.0.tgz#02d01dbc330b6cbf36b76ac93c50752c69027065" "@babel/plugin-external-helpers@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.0.0.tgz#61ee7ba5dba27d7cad72a13d46bec23c060b762e" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-external-helpers/-/plugin-external-helpers-7.2.0.tgz#7f4cb7dee651cd380d2034847d914288467a6be4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-class-properties@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.1.0.tgz#9af01856b1241db60ec8838d84691aa0bd1e8df4" + version "7.2.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.1.tgz#c734a53e0a1ec40fe5c22ee5069d26da3b187d05" dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.0.0" - "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-create-class-features-plugin" "^7.2.1" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.1.0" - "@babel/plugin-syntax-class-properties" "^7.0.0" "@babel/plugin-proposal-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.0.0.tgz#a057bbfd4649facfe39f33a537e18554bdd2b5da" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.2.0.tgz#737b0da44b9254b6152fe29bb99c64e5691f6f68" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-export-default-from" "^7.2.0" "@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.0.0.tgz#b72ec31adf612d062dc0348316246127a451e45f" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.2.0.tgz#c3fda766187b2f2162657354407247a758ee9cf9" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.2.0" "@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" "@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" "@babel/plugin-proposal-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.0.0.tgz#3d344d4152253379b8758e7d041148e8787c4a9d" - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-chaining" "^7.0.0" - -"@babel/plugin-syntax-class-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.0.0.tgz#e051af5d300cbfbcec4a7476e37a803489881634" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.2.0.tgz#ae454f4c21c6c2ce8cb2397dc332ae8b420c5441" dependencies: "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.2.0" "@babel/plugin-syntax-dynamic-import@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.0.0.tgz#6dfb7d8b6c3be14ce952962f658f3b7eb54c33ee" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.2.0.tgz#69c159ffaf4998122161ad8ebc5e6d1f55df8612" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-export-default-from@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.0.0.tgz#084b639bce3d42f3c5bf3f68ccb42220bb2d729d" +"@babel/plugin-syntax-export-default-from@^7.0.0", "@babel/plugin-syntax-export-default-from@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.2.0.tgz#edd83b7adc2e0d059e2467ca96c650ab6d2f3820" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-flow@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.0.0.tgz#70638aeaad9ee426bc532e51523cff8ff02f6f17" +"@babel/plugin-syntax-flow@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-jsx@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.0.0.tgz#034d5e2b4e14ccaea2e4c137af7e4afb39375ffd" +"@babel/plugin-syntax-jsx@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.2.0.tgz#0b85a3b4bc7cdf4cc4b8bf236335b907ca22e7c7" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-nullish-coalescing-operator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.0.0.tgz#b60931d5a15da82625fff6657c39419969598743" +"@babel/plugin-syntax-nullish-coalescing-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.2.0.tgz#f75083dfd5ade73e783db729bbd87e7b9efb7624" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" +"@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-chaining@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.0.0.tgz#1e6ecba124310b5d3a8fc1e00d50b1c4c2e05e68" +"@babel/plugin-syntax-optional-chaining@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.2.0.tgz#a59d6ae8c167e7608eaa443fda9fa8fa6bf21dff" dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-typescript@^7.0.0": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.1.5.tgz#956a1f43dec8a9d6b36221f5c865335555fdcb98" +"@babel/plugin-syntax-typescript@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.2.0.tgz#55d240536bd314dcbbec70fd949c5cabaed1de29" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" "@babel/plugin-transform-block-scoping@^7.0.0": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.1.5.tgz#3e8e0bc9a5104519923302a24f748f72f2f61f37" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" "@babel/plugin-transform-classes@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.0.tgz#374f8876075d7d21fea55aeb5c53561259163f96" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -391,92 +391,92 @@ globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.1.6.tgz#4b7be62604d39e63cfe23b1d00d63e9fb7e763ba" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.2.0.tgz#db6180d098caaabdd609a8da3800f5204e66b69b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.2.0" "@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-commonjs@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/plugin-transform-object-assign@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.0.0.tgz#fca6d7500d9675c42868b8f3882979201b9a5ad8" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-assign/-/plugin-transform-object-assign-7.2.0.tgz#6fdeea42be17040f119e38e23ea0f49f31968bde" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-parameters@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-display-name@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.0.0.tgz#93759e6c023782e52c2da3b75eca60d4f10533ee" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.2.0.tgz#ebfaed87834ce8dc4279609a4f0c324c156e3eb0" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-react-jsx-source@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.0.0.tgz#28e00584f9598c0dd279f6280eee213fa0121c3c" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.2.0.tgz#20c8c60f0140f5dd3cd63418d452801cf3f7180f" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-transform-react-jsx@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.1.6.tgz#e6188e7d2a2dcd2796d45a87f8b0a8c906f57d1a" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.2.0.tgz#ca36b6561c4d3b45524f8efb6f0fbc9a0d1d622f" dependencies: "@babel/helper-builder-react-jsx" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.2.0" "@babel/plugin-transform-regenerator@^7.0.0": version "7.0.0" @@ -485,8 +485,8 @@ regenerator-transform "^0.13.3" "@babel/plugin-transform-runtime@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.1.0.tgz#9f76920d42551bb577e2dc594df229b5f7624b63" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.2.0.tgz#566bc43f7d0aedc880eaddbd29168d0f248966ea" dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -494,41 +494,41 @@ semver "^5.5.1" "@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.0.tgz#0c76c12a3b5826130078ee8ec84a7a8e4afd79c4" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" "@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-typescript@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.1.0.tgz#81e7b4be90e7317cbd04bf1163ebf06b2adee60b" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.2.0.tgz#bce7c06300434de6a860ae8acf6a442ef74a99d1" dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.0.0" + "@babel/plugin-syntax-typescript" "^7.2.0" "@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -547,8 +547,8 @@ source-map-support "^0.5.9" "@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.5.tgz#4170907641cf1f61508f563ece3725150cc6fe39" + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f" dependencies: regenerator-runtime "^0.12.0" @@ -606,9 +606,9 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.1.2", "@babel/types@^7.1.5", "@babel/types@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.6.tgz#0adb330c3a281348a190263aceb540e10f04bcce" +"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.1.2", "@babel/types@^7.1.6", "@babel/types@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.0.tgz#7941c5b2d8060e06f9601d6be7c223eef906d5d8" dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -755,8 +755,8 @@ ajv@^5.2.3, ajv@^5.3.0: json-schema-traverse "^0.3.0" ajv@^6.5.5: - version "6.5.5" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.5.tgz#cf97cdade71c6399a92c6d6c4177381291b781a1" + version "6.6.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -905,7 +905,7 @@ array-find-index@^1.0.2: array-flatten@1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + resolved "http://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" array-includes@^3.0.3: version "3.0.3" @@ -975,8 +975,8 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" ast-types@0.x.x: - version "0.11.6" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.6.tgz#4e2266c2658829aef3b40cc33ad599c4e9eb89ef" + version "0.11.7" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.7.tgz#f318bf44e339db6a320be0009ded64ec1471f46c" astral-regex@^1.0.0: version "1.0.0" @@ -1233,10 +1233,11 @@ babel-plugin-lodash@^3.3.4: require-package-name "^2.0.1" babel-plugin-styled-components@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.8.0.tgz#9dd054c8e86825203449a852a5746f29f2dab857" + version "1.9.2" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" + babel-plugin-syntax-jsx "^6.18.0" lodash "^4.17.10" babel-plugin-syntax-async-functions@^6.8.0: @@ -1255,7 +1256,7 @@ babel-plugin-syntax-flow@^6.18.0, babel-plugin-syntax-flow@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" -babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: +babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0: version "6.18.0" resolved "http://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946" @@ -1687,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@0.5.28: - version "0.5.28" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.5.28.tgz#44761a0f2c5b3bad0d5f29502bb7d18f7f3348fb" +"balance-common@git+https://github.com/balance-io/balance-common.git#wc-dapp": + version "0.6.2" + resolved "git+https://github.com/balance-io/balance-common.git#74b95b2feb7460b5928248be3a0f8c0e056d7d5e" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" @@ -1744,8 +1745,8 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" big-integer@^1.6.7: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + version "1.6.39" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.39.tgz#57dffd6b8008cfc429e1b8b3fcd32d77f6694ecf" bignumber.js@^7.0.1: version "7.2.1" @@ -2054,8 +2055,8 @@ can-promise@0.0.1: window-or-global "^1.0.1" caniuse-lite@^1.0.30000844: - version "1.0.30000910" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000910.tgz#755d5181d4b006e5a2b59b1ffa05d0a0470039f5" + version "1.0.30000914" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000914.tgz#f802b4667c24d0255f54a95818dcf8e1aa41f624" capture-exit@^1.2.0: version "1.2.0" @@ -2098,8 +2099,8 @@ chownr@^1.1.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" chroma-js@^1.3.7: - version "1.4.0" - resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.0.tgz#695c52e7c97617e5f687db31913503d410481ae4" + version "1.4.1" + resolved "https://registry.yarnpkg.com/chroma-js/-/chroma-js-1.4.1.tgz#eb2d9c4d1ff24616be84b35119f4d26f8205f134" ci-info@^1.5.0: version "1.6.0" @@ -2844,8 +2845,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.3.47: - version "1.3.84" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.84.tgz#2e55df59e818f150a9f61b53471ebf4f0feecc65" + version "1.3.88" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.88.tgz#f36ab32634f49ef2b0fdc1e82e2d1cc17feb29e7" elliptic@6.3.3: version "6.3.3" @@ -3165,7 +3166,7 @@ ethjs-unit@0.1.6: event-target-shim@^1.0.5: version "1.1.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" + resolved "http://registry.npmjs.org/event-target-shim/-/event-target-shim-1.1.1.tgz#a86e5ee6bdaa16054475da797ccddf0c55698491" eventemitter3@1.1.1: version "1.1.1" @@ -3232,7 +3233,7 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" - resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + resolved "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" dependencies: fill-range "^2.1.0" @@ -3349,11 +3350,12 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" fancy-log@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1" + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" dependencies: ansi-gray "^0.1.1" color-support "^1.1.3" + parse-node-version "^1.0.0" time-stamp "^1.0.0" fast-deep-equal@^1.0.0: @@ -3956,8 +3958,8 @@ hash-base@^3.0.0: safe-buffer "^5.0.1" hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.5.tgz#e38ab4b85dfb1e0c40fe9265c0e9b54854c23812" + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" dependencies: inherits "^2.0.3" minimalistic-assert "^1.0.1" @@ -3975,8 +3977,8 @@ hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.3.1, hoist-non-react- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz#42414ccdfff019cd2168168be998c7b3bd5245c0" + version "3.2.1" + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.2.1.tgz#c09c0555c84b38a7ede6912b61efddafd6e75e1e" dependencies: react-is "^16.3.2" @@ -4851,9 +4853,9 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-walletconnect-core@^0.7.26: - version "0.7.26" - resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.26.tgz#2e875fe6c17d9958bbd891a807d448cebd7f5bc8" +js-walletconnect-core@^0.7.27: + version "0.7.27" + resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.27.tgz#e185ae277713fec69a612f43080096ba8ef59e07" dependencies: eth-parse-uri "^0.6.9" @@ -5231,11 +5233,11 @@ lowercase-keys@^1.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" lru-cache@^4.0.1, lru-cache@^4.1.2: - version "4.1.4" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.4.tgz#51cc46e8e6d9530771c857e24ccc720ecdbcc031" + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" dependencies: pseudomap "^1.0.2" - yallist "^3.0.2" + yallist "^2.1.2" make-dir@^1.0.0: version "1.3.0" @@ -6138,7 +6140,7 @@ pac-resolver@^3.0.0: pako@~0.2.0: version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" + resolved "http://registry.npmjs.org/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" parse-asn1@^5.0.0: version "5.1.1" @@ -6179,6 +6181,10 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-node-version@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.0.tgz#33d9aa8920dcc3c0d33658ec18ce237009a56d53" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -6376,8 +6382,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.14.2: - version "1.15.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e" + version "1.15.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" pretty-format@^22.4.0, pretty-format@^22.4.3: version "22.4.3" @@ -6407,8 +6413,8 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" progress@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.1.tgz#c9242169342b1c29d275889c95734621b1952e31" + version "2.0.2" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.2.tgz#db9476f916bcc9ebe8a04efb22b18b0740376c61" promise@^7.1.1: version "7.3.1" @@ -6459,7 +6465,7 @@ pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -psl@^1.1.24: +psl@^1.1.24, psl@^1.1.28: version "1.1.29" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" @@ -6482,7 +6488,7 @@ punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -6500,10 +6506,14 @@ qrcode@^1.2.0: pngjs "^3.3.0" yargs "^8.0.2" -qs@6.5.2, qs@^6.5.1, qs@~6.5.2: +qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" +qs@^6.5.1: + version "6.6.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.6.0.tgz#a99c0f69a8d26bf7ef012f871cdabb0aee4424c2" + query-string@^5.0.1: version "5.1.1" resolved "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" @@ -6612,7 +6622,7 @@ react-display-name@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/react-display-name/-/react-display-name-0.2.4.tgz#e2a670b81d79a2204335510c01246f4c92ff12cf" -react-is@^16.3.1, react-is@^16.3.2, react-is@^16.6.0, react-is@^16.6.3: +react-is@^16.3.1, react-is@^16.3.2, react-is@^16.5.2, react-is@^16.6.0, react-is@^16.6.3: version "16.6.3" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0" @@ -6697,8 +6707,8 @@ react-native-firebase@^4.3.8: prop-types "^15.6.1" react-native-gesture-handler@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.9.tgz#ddec4d19d51cb6fb54df6eca792ebd76aaef083f" + version "1.0.10" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.0.10.tgz#160e55e4886471931b7f7d52e22d94007540ab83" dependencies: hoist-non-react-statics "^2.3.1" invariant "^2.2.2" @@ -6728,8 +6738,8 @@ react-native-level-fs@^3.0.1: levelup "^0.18.2" react-native-linear-gradient@^2.4.2: - version "2.4.4" - resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.4.4.tgz#64944a39290eefbede18dfd7e9551f1ef61e3de7" + version "2.5.3" + resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.5.3.tgz#d90cf19a13fcccfa8bb32025ac40a15ae1b49e99" react-native-mail@^3.0.6: version "3.0.7" @@ -6740,8 +6750,8 @@ react-native-mail@^3.0.6: resolved "git+https://github.com/BonifyByForteil/react-native-matomo.git#32907c88a586f8dcc69a69a0303561753064cb50" react-native-os@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.2.1.tgz#681c27b4b4340c96f6297cf50df00ba2f6fad7cb" + version "1.2.2" + resolved "https://registry.yarnpkg.com/react-native-os/-/react-native-os-1.2.2.tgz#402cee00ac00a0588200a66b90e1d2b5a593fec0" react-native-permissions@^1.1.1: version "1.1.1" @@ -6801,8 +6811,8 @@ react-native-splash-screen@crazycodeboy/react-native-splash-screen#285/head: resolved "https://codeload.github.com/crazycodeboy/react-native-splash-screen/tar.gz/7f8dd1d7ca2cc3e9a3e5fec938e91a769c356c3e" react-native-storage@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/react-native-storage/-/react-native-storage-0.2.3.tgz#294f034c6ecbd9e08cfe02fa24ecb9db7a861a1b" + version "0.2.4" + resolved "https://registry.yarnpkg.com/react-native-storage/-/react-native-storage-0.2.4.tgz#a3cba3bf28cb0a16d8f9e6ced8aea26b3020ca10" react-native-svg@^7.1.2: version "7.2.0" @@ -6959,14 +6969,15 @@ react-navigation-tabs@0.8.4: react-native-tab-view "^1.0.0" react-navigation@^2.18.0: - version "2.18.2" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.2.tgz#ba278ded41f736d029c7cae5d54ab1427dc6ed34" + version "2.18.3" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" dependencies: clamp "^1.0.1" create-react-context "0.2.2" hoist-non-react-statics "^2.2.0" path-to-regexp "^1.7.0" query-string "^6.1.0" + react-is "^16.5.2" react-lifecycles-compat "^3" react-native-safe-area-view "0.11.0" react-native-screens "^1.0.0-alpha.11" @@ -7252,7 +7263,7 @@ regjsgen@^0.4.0: regjsparser@^0.1.4: version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" + resolved "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" dependencies: jsesc "~0.5.0" @@ -7420,10 +7431,10 @@ rn-nodeify@^10.0.0: xtend "^4.0.0" rn-walletconnect-wallet@^0.7.24: - version "0.7.26" - resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.26.tgz#9d39d18f74abd9fe2b4bfd343a6d90a338b43a96" + version "0.7.27" + resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.27.tgz#ac812f4e2c2cb429a10a3130d3eb0898210478fa" dependencies: - js-walletconnect-core "^0.7.26" + js-walletconnect-core "^0.7.27" rsvp@^3.3.3: version "3.6.2" @@ -7491,8 +7502,8 @@ sax@~1.1.1: resolved "http://registry.npmjs.org/sax/-/sax-1.1.6.tgz#5d616be8a5e607d54e114afae55b7eaf2fcc3240" saxes@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.3.tgz#334ab3b802a465ccda96fff9bdefbd505546ffa8" + version "3.1.4" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-3.1.4.tgz#4ad5c53eb085ac0570ea1071a07aaf22ad29cebd" dependencies: xmlchars "^1.3.1" @@ -7503,8 +7514,8 @@ schedule@0.4.0: object-assign "^4.1.1" scheduler@^0.11.2: - version "0.11.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.2.tgz#a8db5399d06eba5abac51b705b7151d2319d33d3" + version "0.11.3" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b" dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -7933,11 +7944,11 @@ string-width@^1.0.1: string_decoder@^0.10.31, string_decoder@~0.10.x: version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" string_decoder@~1.1.1: version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + resolved "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" dependencies: safe-buffer "~5.1.0" @@ -8275,7 +8286,14 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3, tough-cookie@~2.4.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@^2.4.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" dependencies: @@ -8991,6 +9009,10 @@ yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + yallist@^3.0.0, yallist@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" @@ -9068,7 +9090,7 @@ yauzl@^2.4.2: fd-slicer "~1.1.0" yazl@^2.4.1: - version "2.5.0" - resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.0.tgz#1ab8de8cd3c3c252986c7fa2f6562784d7288e49" + version "2.5.1" + resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35" dependencies: buffer-crc32 "~0.2.3" From a85adaed6093e9de1d6da003a15c09005a7407c5 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 5 Dec 2018 12:09:41 -0500 Subject: [PATCH 21/32] updating to latest balance common version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index edb71ec687f..38977e8ec80 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "^0.6.1", + "balance-common": "^0.6.3", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", @@ -180,4 +180,4 @@ "./src/assets/fonts" ] } -} \ No newline at end of file +} From 591252350377df1eab4040aa8c2a37d6964f9e40 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 5 Dec 2018 17:48:17 -0500 Subject: [PATCH 22/32] updating balance common version --- package.json | 4 ++-- yarn.lock | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index 38977e8ec80..0235d3c1400 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "^0.6.3", + "balance-common": "^0.6.4", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", @@ -180,4 +180,4 @@ "./src/assets/fonts" ] } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 53b832437a4..6ff163deed2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1688,9 +1688,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.1.tgz#8953a6d3ad83dde0d736b7128e042c454e92fb9e" +balance-common@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.4.tgz#27144e85a69f351b945539657d7a743af998e810" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" @@ -1745,8 +1745,8 @@ bcrypt-pbkdf@^1.0.0: tweetnacl "^0.14.3" big-integer@^1.6.7: - version "1.6.39" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.39.tgz#57dffd6b8008cfc429e1b8b3fcd32d77f6694ecf" + version "1.6.40" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.40.tgz#02e4cd4d6e266c4d9ece2469c05cb6439149fc78" bignumber.js@^7.0.1: version "7.2.1" @@ -2376,8 +2376,8 @@ core-js@^1.0.0: resolved "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + version "2.6.0" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.0.tgz#1e30793e9ee5782b307e37ffa22da0eacddd84d4" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -6413,8 +6413,8 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" progress@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.2.tgz#db9476f916bcc9ebe8a04efb22b18b0740376c61" + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" promise@^7.1.1: version "7.3.1" @@ -6641,8 +6641,8 @@ react-native-blur@^3.2.2: prop-types "^15.5.10" react-native-camera@^1.3.0: - version "1.4.3" - resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.4.3.tgz#71359ae8efdf372fb1b8b5ec72ecae1c6708da4b" + version "1.5.0" + resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.5.0.tgz#36be8658578639154755830d0e070a7716e20fb4" dependencies: lodash "^4.17.10" prop-types "^15.6.2" @@ -6799,8 +6799,8 @@ react-native-safe-area-view@mikedemarais/react-native-safe-area-view: hoist-non-react-statics "^2.3.1" react-native-screens@^1.0.0-alpha.11: - version "1.0.0-alpha.16" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.16.tgz#e3651b7077ea8fa04e8dd3265ad9b87f1f77a758" + version "1.0.0-alpha.17" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.17.tgz#8c1a7224b967c476670963fce7d06b946e7158e9" react-native-shimmer-placeholder@^1.0.29: version "1.0.29" @@ -7236,20 +7236,20 @@ regexpp@^1.0.1: regexpu-core@^2.0.0: version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" + resolved "http://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" dependencies: regenerate "^1.2.1" regjsgen "^0.2.0" regjsparser "^0.1.4" regexpu-core@^4.1.3: - version "4.2.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" + version "4.4.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" dependencies: regenerate "^1.4.0" regenerate-unicode-properties "^7.0.0" - regjsgen "^0.4.0" - regjsparser "^0.3.0" + regjsgen "^0.5.0" + regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.0.2" @@ -7257,9 +7257,9 @@ regjsgen@^0.2.0: version "0.2.0" resolved "http://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" -regjsgen@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" regjsparser@^0.1.4: version "0.1.5" @@ -7267,9 +7267,9 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" -regjsparser@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" dependencies: jsesc "~0.5.0" From 6eb7d3a89500fc7c0a129ae543023fc0261b6b22 Mon Sep 17 00:00:00 2001 From: jinchung Date: Thu, 6 Dec 2018 15:44:26 -0500 Subject: [PATCH 23/32] updating build version --- ios/BalanceWallet/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/BalanceWallet/Info.plist b/ios/BalanceWallet/Info.plist index 30d16cd2d59..1773221bd82 100644 --- a/ios/BalanceWallet/Info.plist +++ b/ios/BalanceWallet/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1 + 2 CodePushDeploymentKey $(CODEPUSH_KEY) ITSAppUsesNonExemptEncryption From f2263e8152e950ddf7a75f33da72383b8252619d Mon Sep 17 00:00:00 2001 From: jinchung Date: Mon, 10 Dec 2018 10:32:42 -0500 Subject: [PATCH 24/32] temp switch --- src/redux/transactionsToApprove.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/redux/transactionsToApprove.js b/src/redux/transactionsToApprove.js index db878097024..fdc3e9cee5b 100644 --- a/src/redux/transactionsToApprove.js +++ b/src/redux/transactionsToApprove.js @@ -50,13 +50,24 @@ export const getNativeAmount = (prices, nativeCurrency, assetAmount, symbol) => }; const getRequestDisplayDetails = (callData, assets, prices, nativeCurrency) => { + /* + * eth_accounts + * eth_signTransaction + * eth_sendRawTransaction + * eth_signTypedData + */ if (callData.method === 'eth_sendTransaction') { const transaction = get(callData, 'params[0]', null); return getTransactionDisplayDetails(transaction, assets, prices, nativeCurrency); - } else if (callData.method === 'eth_sign') { + } else if (callData.method === 'eth_sign' || callData.method === 'personal_sign') { const message = get(callData, 'params[1]'); return getMessageDisplayDetails(message); + } else if (callData.method === 'eth_signTypedData' || + callData.method === 'eth_signTypedData_v3') { + console.log('callData signed typed data', callData); + return null; } + //callData.method === 'eth_signTypedData_v1' || return null; }; From 7822f1f6a9c60fa828e158ad67eceeb31f1e63ad Mon Sep 17 00:00:00 2001 From: jinchung Date: Mon, 10 Dec 2018 16:59:25 -0500 Subject: [PATCH 25/32] saving show shitcoins settings to localstorage --- src/model/localstorage.js | 18 ++++++++++++++++++ src/screens/WalletScreen.js | 12 +++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/model/localstorage.js b/src/model/localstorage.js index 33e549bfac4..62f66443a71 100644 --- a/src/model/localstorage.js +++ b/src/model/localstorage.js @@ -2,6 +2,24 @@ import { differenceInMinutes } from 'date-fns'; import { pickBy } from 'lodash'; import { commonStorage } from 'balance-common'; +/** + * @desc get show shitcoins setting + * @return {True|False} + */ +export const getShowShitcoinsSetting = async () => { + const showShitcoins = await commonStorage.getLocal('showShitcoins'); + return showShitcoins ? showShitcoins.data : null; +}; + +/** + * @desc update show shitcoins setting + * @param {Boolean} [updatedSetting] + * @return {Void} + */ +export const updateShowShitcoinsSetting = async (updatedSetting) => { + await commonStorage.saveLocal('showShitcoins', { data: updatedSetting }); +}; + /** * @desc get last tracking date * @return {Date|Object} diff --git a/src/screens/WalletScreen.js b/src/screens/WalletScreen.js index 02cf220818f..9c9ad11318c 100644 --- a/src/screens/WalletScreen.js +++ b/src/screens/WalletScreen.js @@ -3,6 +3,7 @@ import { isSameDay } from 'date-fns'; import { withSafeTimeout } from '@hocs/safe-timers'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; +import { getShowShitcoinsSetting, updateShowShitcoinsSetting } from '../model/localstorage'; import Piwik from 'react-native-matomo'; import { compose, @@ -44,8 +45,12 @@ class WalletScreen extends Component { transitionProps: PropTypes.object, } - componentDidMount = () => { + componentDidMount = async () => { this.props.trackingDateInit(); + const showShitcoins = await getShowShitcoinsSetting(); + if (showShitcoins !== null) { + this.props.toggleShowShitcoins(showShitcoins); + } } componentDidUpdate = (prevProps) => { @@ -74,7 +79,6 @@ class WalletScreen extends Component { this.props.updateTrackingDate(); } } - } render = () => { @@ -145,7 +149,9 @@ export default compose( }, onToggleShowShitcoins: ({ showShitcoins, toggleShowShitcoins }) => (index) => { if (index === 0) { - toggleShowShitcoins(!showShitcoins); + const updatedShowShitcoinsSetting = !showShitcoins; + toggleShowShitcoins(updatedShowShitcoinsSetting); + updateShowShitcoinsSetting(updatedShowShitcoinsSetting); } }, }), From f6d6725b7f120b45d1b55bed592b64a58326318b Mon Sep 17 00:00:00 2001 From: jinchung Date: Mon, 10 Dec 2018 19:26:58 -0500 Subject: [PATCH 26/32] updating common for account reset fix; async setstate in sectionlist only if mounted --- package.json | 2 +- src/App.js | 3 +- src/components/list/SectionList.js | 12 ++- yarn.lock | 128 ++++++++++++++++------------- 4 files changed, 84 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 0235d3c1400..83e7bd8d3d6 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "^0.6.4", + "balance-common": "^0.6.5", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/src/App.js b/src/App.js index a2734f2fbf9..58494a25e60 100644 --- a/src/App.js +++ b/src/App.js @@ -131,9 +131,8 @@ class App extends Component { componentWillUnmount() { AppState.removeEventListener('change', this.handleAppStateChange); - this.notificationDisplayedListener(); this.notificationListener(); - this.notificationOpenedListender(); + this.notificationOpenedListener(); this.onTokenRefreshListener(); } diff --git a/src/components/list/SectionList.js b/src/components/list/SectionList.js index 158706157fe..15cc702d74f 100644 --- a/src/components/list/SectionList.js +++ b/src/components/list/SectionList.js @@ -36,6 +36,14 @@ class SectionList extends PureComponent { state = { isRefreshing: false } + componentDidMount = () => { + this.isCancelled = false; + }; + + componentWillUnmount = () => { + this.isCancelled = true; + }; + listRef = null handleListRef = (ref) => { this.listRef = ref; } @@ -44,7 +52,9 @@ class SectionList extends PureComponent { if (this.state.isRefreshing) return; this.setState({ isRefreshing: true }); - this.props.fetchData().then(() => this.setState({ isRefreshing: false })); + this.props.fetchData().then(() => { + !this.isCancelled && this.setState({ isRefreshing: false }) + }); } renderRefreshControl = () => { diff --git a/yarn.lock b/yarn.lock index 6ff163deed2..351f8221fdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -534,6 +534,13 @@ "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" +"@babel/polyfill@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" + dependencies: + core-js "^2.5.7" + regenerator-runtime "^0.11.1" + "@babel/register@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" @@ -1233,8 +1240,8 @@ babel-plugin-lodash@^3.3.4: require-package-name "^2.0.1" babel-plugin-styled-components@^1.8.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.2.tgz#0e6a6587454dcb1c9a362a8fd31fc0b075ccd260" + version "1.9.3" + resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.9.3.tgz#facc61da441d15b291128b36cba07f309ed324f0" dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" babel-plugin-syntax-jsx "^6.18.0" @@ -1688,9 +1695,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@^0.6.4: - version "0.6.4" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.4.tgz#27144e85a69f351b945539657d7a743af998e810" +balance-common@^0.6.5: + version "0.6.5" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.5.tgz#34d4dd29f1c657089b3b83635112c0d13abe51ac" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" @@ -2055,8 +2062,8 @@ can-promise@0.0.1: window-or-global "^1.0.1" caniuse-lite@^1.0.30000844: - version "1.0.30000914" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000914.tgz#f802b4667c24d0255f54a95818dcf8e1aa41f624" + version "1.0.30000918" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000918.tgz#6288f79da3c5c8b45e502f47ad8f3eb91f1379a9" capture-exit@^1.2.0: version "1.2.0" @@ -2559,8 +2566,8 @@ data-urls@^1.0.0, data-urls@^1.0.1: whatwg-url "^7.0.0" date-fns@^1.29.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + version "1.30.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" date-now@^0.1.4: version "0.1.4" @@ -2809,8 +2816,8 @@ domain-browser@^1.2.0: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" domelementtype@1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.2.1.tgz#578558ef23befac043a1abb0db07635509393479" + version "1.3.1" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f" domelementtype@~1.1.1: version "1.1.3" @@ -4066,6 +4073,12 @@ iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: dependencies: safer-buffer ">= 2.1.2 < 3" +idempotent-babel-polyfill@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/idempotent-babel-polyfill/-/idempotent-babel-polyfill-7.0.0.tgz#df181e660db6933fd3914442b0bc099b54849733" + dependencies: + "@babel/polyfill" "^7.0.0" + ieee754@^1.1.4: version "1.1.12" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.12.tgz#50bf24e5b9c8bb98af4964c941cdb0918da7b60b" @@ -4853,11 +4866,12 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-walletconnect-core@^0.7.27: - version "0.7.27" - resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.27.tgz#e185ae277713fec69a612f43080096ba8ef59e07" +js-walletconnect-core@^0.7.28: + version "0.7.28" + resolved "https://registry.yarnpkg.com/js-walletconnect-core/-/js-walletconnect-core-0.7.28.tgz#8f1a58cbbc2a51d4326e8ffa3f9cf92f69974933" dependencies: eth-parse-uri "^0.6.9" + idempotent-babel-polyfill "^7.0.0" js-yaml@^3.12.0, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.12.0" @@ -5643,8 +5657,8 @@ minipass@^2.2.1, minipass@^2.3.4: yallist "^3.0.0" minizlib@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" dependencies: minipass "^2.2.1" @@ -5881,8 +5895,8 @@ nth-check@^1.0.2: boolbase "~1.0.0" nullthrows@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.0.tgz#832bb19ef7fedab989f81675c846e2858a3917a2" + version "1.1.1" + resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" number-is-nan@^1.0.0: version "1.0.1" @@ -6203,7 +6217,7 @@ pascalcase@^0.1.1: path-browserify@0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" + resolved "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" path-exists@^2.0.0: version "2.1.0" @@ -6641,8 +6655,8 @@ react-native-blur@^3.2.2: prop-types "^15.5.10" react-native-camera@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.5.0.tgz#36be8658578639154755830d0e070a7716e20fb4" + version "1.5.1" + resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.5.1.tgz#c241cc0456e5dd31f1d05812bf3d0e86fb6931a3" dependencies: lodash "^4.17.10" prop-types "^15.6.2" @@ -6654,8 +6668,8 @@ react-native-circular-progress@^1.0.1: prop-types "^15.6.0" react-native-code-push@^5.4.1: - version "5.4.2" - resolved "https://registry.yarnpkg.com/react-native-code-push/-/react-native-code-push-5.4.2.tgz#a43f976f983b9866005aac50fe7c1e915ab23943" + version "5.5.0" + resolved "https://registry.yarnpkg.com/react-native-code-push/-/react-native-code-push-5.5.0.tgz#984c7f7cfc1b9e3b88b8725f7e1712d17dc36bb8" dependencies: code-push "2.0.6" glob "^5.0.15" @@ -6947,8 +6961,8 @@ react-navigation-drawer@0.5.0: react-native-drawer-layout-polyfill "^1.3.2" react-navigation-fluid-transitions@^0.2.72: - version "0.2.73" - resolved "https://registry.yarnpkg.com/react-navigation-fluid-transitions/-/react-navigation-fluid-transitions-0.2.73.tgz#cdd2da391639dac0255fbcdb59c14cc816222172" + version "0.2.74" + resolved "https://registry.yarnpkg.com/react-navigation-fluid-transitions/-/react-navigation-fluid-transitions-0.2.74.tgz#36acc6a07621209da8ceb046b222f63c8785538b" dependencies: lodash.chunk "*" lodash.clamp "*" @@ -7195,7 +7209,7 @@ regenerator-runtime@^0.10.0: version "0.10.5" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" -regenerator-runtime@^0.11.0: +regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" @@ -7369,7 +7383,7 @@ resolve-url@^0.2.1: resolve@1.1.7: version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + resolved "http://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" resolve@^1.3.2, resolve@^1.5.0, resolve@^1.6.0, resolve@^1.8.1: version "1.8.1" @@ -7431,10 +7445,10 @@ rn-nodeify@^10.0.0: xtend "^4.0.0" rn-walletconnect-wallet@^0.7.24: - version "0.7.27" - resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.27.tgz#ac812f4e2c2cb429a10a3130d3eb0898210478fa" + version "0.7.28" + resolved "https://registry.yarnpkg.com/rn-walletconnect-wallet/-/rn-walletconnect-wallet-0.7.28.tgz#0a7245719a7a9f4a4530a4d335d57b2b9eabe8e8" dependencies: - js-walletconnect-core "^0.7.27" + js-walletconnect-core "^0.7.28" rsvp@^3.3.3: version "3.6.2" @@ -7695,7 +7709,7 @@ simple-get@^2.7.0: simple-plist@^0.2.1: version "0.2.1" - resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723" + resolved "http://registry.npmjs.org/simple-plist/-/simple-plist-0.2.1.tgz#71766db352326928cf3a807242ba762322636723" dependencies: bplist-creator "0.0.7" bplist-parser "0.1.1" @@ -7813,8 +7827,8 @@ spawn-sync@^1.0.15: os-shim "^0.1.2" spdx-correct@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -7842,7 +7856,7 @@ split-string@^3.0.1, split-string@^3.0.2: sprintf-js@~1.0.2: version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + resolved "http://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: version "1.15.2" @@ -8232,7 +8246,7 @@ timed-out@^4.0.0, timed-out@^4.0.1: timers-browserify@^1.4.2: version "1.4.2" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" + resolved "http://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz#c9c58b575be8407375cb5e2462dacee74359f41d" dependencies: process "~0.11.0" @@ -8316,7 +8330,7 @@ trim@0.0.1: tty-browserify@0.0.0: version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + resolved "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" tunnel-agent@^0.6.0: version "0.6.0" @@ -8386,7 +8400,7 @@ unbzip2-stream@^1.0.9: underscore@1.8.3: version "1.8.3" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + resolved "http://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" underscore@^1.9.1: version "1.9.1" @@ -8534,7 +8548,7 @@ verror@1.10.0: vm-browserify@0.0.4: version "0.0.4" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" + resolved "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" dependencies: indexof "0.0.1" @@ -8573,7 +8587,7 @@ watch@~0.18.0: web3-bzz@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.0.0-beta.34.tgz#068d37777ab65e5c60f8ec8b9a50cfe45277929c" + resolved "http://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.34.tgz#068d37777ab65e5c60f8ec8b9a50cfe45277929c" dependencies: got "7.1.0" swarm-js "0.1.37" @@ -8581,7 +8595,7 @@ web3-bzz@1.0.0-beta.34: web3-core-helpers@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.34.tgz#b168da00d3e19e156bc15ae203203dd4dfee2d03" + resolved "http://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.34.tgz#b168da00d3e19e156bc15ae203203dd4dfee2d03" dependencies: underscore "1.8.3" web3-eth-iban "1.0.0-beta.34" @@ -8589,7 +8603,7 @@ web3-core-helpers@1.0.0-beta.34: web3-core-method@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.0.0-beta.34.tgz#ec163c8a2c490fa02a7ec15559fa7307fc7cc6dd" + resolved "http://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.34.tgz#ec163c8a2c490fa02a7ec15559fa7307fc7cc6dd" dependencies: underscore "1.8.3" web3-core-helpers "1.0.0-beta.34" @@ -8599,14 +8613,14 @@ web3-core-method@1.0.0-beta.34: web3-core-promievent@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.34.tgz#a4f4fa6784bb293e82c60960ae5b56a94cd03edc" + resolved "http://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.34.tgz#a4f4fa6784bb293e82c60960ae5b56a94cd03edc" dependencies: any-promise "1.3.0" eventemitter3 "1.1.1" web3-core-requestmanager@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.34.tgz#01f8f6cf2ae6b6f0b70c38bae1ef741b5bab215c" + resolved "http://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.34.tgz#01f8f6cf2ae6b6f0b70c38bae1ef741b5bab215c" dependencies: underscore "1.8.3" web3-core-helpers "1.0.0-beta.34" @@ -8616,7 +8630,7 @@ web3-core-requestmanager@1.0.0-beta.34: web3-core-subscriptions@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.34.tgz#9fed144033f221c3cf21060302ffdaf5ef2de2de" + resolved "http://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.34.tgz#9fed144033f221c3cf21060302ffdaf5ef2de2de" dependencies: eventemitter3 "1.1.1" underscore "1.8.3" @@ -8624,7 +8638,7 @@ web3-core-subscriptions@1.0.0-beta.34: web3-core@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.0.0-beta.34.tgz#121be8555e9fb00d2c5d05ddd3381d0c9e46987e" + resolved "http://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.34.tgz#121be8555e9fb00d2c5d05ddd3381d0c9e46987e" dependencies: web3-core-helpers "1.0.0-beta.34" web3-core-method "1.0.0-beta.34" @@ -8633,7 +8647,7 @@ web3-core@1.0.0-beta.34: web3-eth-abi@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.34.tgz#034533e3aa2f7e59ff31793eaea685c0ed5af67a" + resolved "http://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.34.tgz#034533e3aa2f7e59ff31793eaea685c0ed5af67a" dependencies: bn.js "4.11.6" underscore "1.8.3" @@ -8642,7 +8656,7 @@ web3-eth-abi@1.0.0-beta.34: web3-eth-accounts@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.34.tgz#e09142eeecc797ac3459b75e9b23946d3695f333" + resolved "http://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.34.tgz#e09142eeecc797ac3459b75e9b23946d3695f333" dependencies: any-promise "1.3.0" crypto-browserify "3.12.0" @@ -8657,7 +8671,7 @@ web3-eth-accounts@1.0.0-beta.34: web3-eth-contract@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.34.tgz#9dbb38fae7643a808427a20180470ec7415c91e6" + resolved "http://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.34.tgz#9dbb38fae7643a808427a20180470ec7415c91e6" dependencies: underscore "1.8.3" web3-core "1.0.0-beta.34" @@ -8670,14 +8684,14 @@ web3-eth-contract@1.0.0-beta.34: web3-eth-iban@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.34.tgz#9af458605867ccf74ea979aaf326b38ba6a5ba0c" + resolved "http://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.34.tgz#9af458605867ccf74ea979aaf326b38ba6a5ba0c" dependencies: bn.js "4.11.6" web3-utils "1.0.0-beta.34" web3-eth-personal@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.34.tgz#9afba167342ebde5420bcd5895c3f6c34388f205" + resolved "http://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.34.tgz#9afba167342ebde5420bcd5895c3f6c34388f205" dependencies: web3-core "1.0.0-beta.34" web3-core-helpers "1.0.0-beta.34" @@ -8687,7 +8701,7 @@ web3-eth-personal@1.0.0-beta.34: web3-eth@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.0.0-beta.34.tgz#74086000850c6fe6f535ef49837d6d4bb6113268" + resolved "http://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.34.tgz#74086000850c6fe6f535ef49837d6d4bb6113268" dependencies: underscore "1.8.3" web3-core "1.0.0-beta.34" @@ -8704,7 +8718,7 @@ web3-eth@1.0.0-beta.34: web3-net@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.0.0-beta.34.tgz#427cea2f431881449c8e38d523290f173f9ff63d" + resolved "http://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.34.tgz#427cea2f431881449c8e38d523290f173f9ff63d" dependencies: web3-core "1.0.0-beta.34" web3-core-method "1.0.0-beta.34" @@ -8712,14 +8726,14 @@ web3-net@1.0.0-beta.34: web3-providers-http@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.0.0-beta.34.tgz#e561b52bbb43766282007d40285bfe3550c27e7a" + resolved "http://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.34.tgz#e561b52bbb43766282007d40285bfe3550c27e7a" dependencies: web3-core-helpers "1.0.0-beta.34" xhr2 "0.1.4" web3-providers-ipc@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.34.tgz#a1b77f1a306d73649a9c039052e40cb71328d00a" + resolved "http://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.34.tgz#a1b77f1a306d73649a9c039052e40cb71328d00a" dependencies: oboe "2.1.3" underscore "1.8.3" @@ -8727,7 +8741,7 @@ web3-providers-ipc@1.0.0-beta.34: web3-providers-ws@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.34.tgz#7de70f1b83f2de36476772156becfef6e3516eb3" + resolved "http://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.34.tgz#7de70f1b83f2de36476772156becfef6e3516eb3" dependencies: underscore "1.8.3" web3-core-helpers "1.0.0-beta.34" @@ -8735,7 +8749,7 @@ web3-providers-ws@1.0.0-beta.34: web3-shh@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.0.0-beta.34.tgz#975061d71eaec42ccee576f7bd8f70f03844afe0" + resolved "http://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.34.tgz#975061d71eaec42ccee576f7bd8f70f03844afe0" dependencies: web3-core "1.0.0-beta.34" web3-core-method "1.0.0-beta.34" @@ -8744,7 +8758,7 @@ web3-shh@1.0.0-beta.34: web3-utils@1.0.0-beta.34: version "1.0.0-beta.34" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.34.tgz#9411fc39aaef39ca4e06169f762297d9ff020970" + resolved "http://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.34.tgz#9411fc39aaef39ca4e06169f762297d9ff020970" dependencies: bn.js "4.11.6" eth-lib "0.1.27" From 03e1c55339a5f978ae66e05f366654e9b24dd705 Mon Sep 17 00:00:00 2001 From: jinchung Date: Mon, 10 Dec 2018 19:56:45 -0500 Subject: [PATCH 27/32] updating balance common for default asset selection fix --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 83e7bd8d3d6..89639a1e989 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@tradle/react-native-http": "^2.0.0", "assert": "^1.4.1", "axios": "^0.18.0", - "balance-common": "^0.6.5", + "balance-common": "^0.6.6", "react-native-matomo": "git+https://github.com/BonifyByForteil/react-native-matomo.git", "browserify-zlib": "^0.1.4", "buffer": "^4.9.1", diff --git a/yarn.lock b/yarn.lock index 351f8221fdd..a6ec8660e86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1695,9 +1695,9 @@ babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -balance-common@^0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.5.tgz#34d4dd29f1c657089b3b83635112c0d13abe51ac" +balance-common@^0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/balance-common/-/balance-common-0.6.6.tgz#0147bffa660b5d3edaa546c297537f93727f41c8" dependencies: axios "^0.18.0" bignumber.js "^7.0.1" From 6b2a44f892f0f03fb2acd7332385c0a507450a21 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 11 Dec 2018 13:30:28 -0500 Subject: [PATCH 28/32] fixes after merging with dev --- src/App.js | 4 ++-- src/components/walletconnect-list/WalletConnectList.js | 6 +++--- src/hoc/withWalletConnectConnections.js | 3 ++- src/redux/transactionsToApprove.js | 9 --------- src/screens/TransactionConfirmationScreenWithData.js | 6 +++--- 5 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/App.js b/src/App.js index 6c07dbd2dd9..39aa961c57a 100644 --- a/src/App.js +++ b/src/App.js @@ -36,7 +36,7 @@ class App extends Component { setWalletConnectors: PropTypes.func, transactionIfExists: PropTypes.func, transactionsToApproveInit: PropTypes.func, - walletConnectors: PropTypes.arrayOf(PropTypes.object), + sortedWalletConnectors: PropTypes.arrayOf(PropTypes.object), } state = { appState: AppState.currentState } @@ -173,7 +173,7 @@ class App extends Component { } fetchAndAddWalletConnectRequest = async (callId, sessionId) => { - const walletConnector = this.props.walletConnectors.find(({ _sessionId }) => (_sessionId === sessionId)); + const walletConnector = this.props.sortedWalletConnectors.find(({ _sessionId }) => (_sessionId === sessionId)); const callData = await walletConnectGetRequest(callId, walletConnector); if (!callData) return null; diff --git a/src/components/walletconnect-list/WalletConnectList.js b/src/components/walletconnect-list/WalletConnectList.js index 675f69918cf..e5d975d5a82 100644 --- a/src/components/walletconnect-list/WalletConnectList.js +++ b/src/components/walletconnect-list/WalletConnectList.js @@ -30,12 +30,12 @@ const WalletConnectList = ({ onHandleDisconnectAlert, onLayout, safeAreaInset, - walletConnectors, + walletConnectorsByDappName, }) => ( ( compose( }; }); return { - walletConnectors: values(dappWalletConnector), + sortedWalletConnectors, + walletConnectorsByDappName: values(dappWalletConnector), walletConnectorsCount: sortedWalletConnectors.length, }; }), diff --git a/src/redux/transactionsToApprove.js b/src/redux/transactionsToApprove.js index 20b41bc4662..a808208ab2a 100644 --- a/src/redux/transactionsToApprove.js +++ b/src/redux/transactionsToApprove.js @@ -55,12 +55,6 @@ export const getNativeAmount = (prices, nativeCurrency, assetAmount, symbol) => }; const getRequestDisplayDetails = (callData, assets, prices, nativeCurrency) => { - /* - * eth_accounts - * eth_signTransaction - * eth_sendRawTransaction - * eth_signTypedData - */ if (callData.method === 'eth_sendTransaction') { const transaction = get(callData, 'params[0]', null); return getTransactionDisplayDetails(transaction, assets, prices, nativeCurrency); @@ -69,10 +63,8 @@ const getRequestDisplayDetails = (callData, assets, prices, nativeCurrency) => { return getMessageDisplayDetails(message); } else if (callData.method === 'eth_signTypedData' || callData.method === 'eth_signTypedData_v3') { - console.log('callData signed typed data', callData); return null; } - //callData.method === 'eth_signTypedData_v1' || return null; }; @@ -136,7 +128,6 @@ const getTransactionDisplayDetails = (transaction, assets, prices, nativeCurrenc }; } - console.log('This type of transaction is currently not supported.'); return null; }; diff --git a/src/screens/TransactionConfirmationScreenWithData.js b/src/screens/TransactionConfirmationScreenWithData.js index 7d99cc57a22..f2993dc0dd4 100644 --- a/src/screens/TransactionConfirmationScreenWithData.js +++ b/src/screens/TransactionConfirmationScreenWithData.js @@ -39,13 +39,13 @@ class TransactionConfirmationScreenWithData extends Component { const maxTxnCount = Math.max(this.props.transactionCountNonce, web3TxnCount); const nonce = web3Instance.utils.toHex(maxTxnCount); const txPayloadLatestNonce = { ...txPayload, nonce }; - const symbol = get(transactionDisplayDetails, 'asset.symbol', 'unknown'); - const address = get(transactionDisplayDetails, 'asset.address', ''); + const symbol = get(transactionDetails, 'transactionDisplayDetails.payload.asset.symbol', 'unknown'); + const address = get(transactionDetails, 'transactionDisplayDetails.payload.asset.address', ''); const trackingName = `${symbol}:${address}`; const transactionHash = await sendTransaction({ tracking: { action: 'send-wc', - amount: get(transactionDisplayDetails, 'nativeAmount'), + amount: get(transactionDetails, 'transactionDisplayDetails.payload.nativeAmount'), name: trackingName, }, transaction: txPayloadLatestNonce From 8912aa2aceeddecde885d484aacc92b2cc0508e5 Mon Sep 17 00:00:00 2001 From: jinchung Date: Tue, 11 Dec 2018 14:00:52 -0500 Subject: [PATCH 29/32] offline badge --- src/App.js | 13 ++- src/components/OfflineBadge.js | 120 ++++++++++++++++++++++++ src/components/icons/Icon.js | 2 + src/components/icons/svg/OfflineIcon.js | 25 +++++ 4 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 src/components/OfflineBadge.js create mode 100644 src/components/icons/svg/OfflineIcon.js diff --git a/src/App.js b/src/App.js index 39aa961c57a..e331e787347 100644 --- a/src/App.js +++ b/src/App.js @@ -4,11 +4,13 @@ import firebase from 'react-native-firebase'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { accountInitializeState, accountUpdateAccountAddress, commonStorage } from 'balance-common'; -import { AppRegistry, AlertIOS, AppState } from 'react-native'; +import { AppRegistry, AlertIOS, AppState, View } from 'react-native'; import { compose, withProps } from 'recompact'; import { connect, Provider } from 'react-redux'; import { NavigationActions } from 'react-navigation'; import Piwik from 'react-native-matomo'; +import styled from 'styled-components'; +import OfflineBadge from './components/OfflineBadge'; import { withWalletConnectConnections } from './hoc'; import { addTransactionToApprove, @@ -26,6 +28,10 @@ import { walletInit } from './model/wallet'; import Routes from './screens/Routes'; import Navigation from './navigation'; +const Container = styled(View)` + flex: 1; +`; + class App extends Component { static propTypes = { accountInitializeState: PropTypes.func, @@ -183,7 +189,10 @@ class App extends Component { render = () => ( - + + + + ) } diff --git a/src/components/OfflineBadge.js b/src/components/OfflineBadge.js new file mode 100644 index 00000000000..3a4f08e9529 --- /dev/null +++ b/src/components/OfflineBadge.js @@ -0,0 +1,120 @@ +import React, { PureComponent } from 'react'; +import { Animated, NetInfo } from 'react-native'; +import styled from 'styled-components'; + +import Icon from './icons/Icon'; +import { Text } from './text'; +import { colors, padding } from '../styles'; + +const Badge = styled(Animated.View)` + position: absolute; + align-self: center; + bottom: 40; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + ${padding(10)}; + background: ${colors.dark}; + border-radius: 50; + shadow-color: ${colors.dark}; + shadow-opacity: 0.14; + shadow-offset: 0px 6px; + shadow-radius: 10; + z-index: 100; +`; + +const BadgeIcon = styled(Icon).attrs({ + color: colors.white, +})` + margin-bottom: -3px; +`; + +const BadgeLabel = styled(Text).attrs({ + size: 'smedium', + weight: 'semibold', + color: colors.white, +})` + margin-left: 5px; +`; + +class OfflineBadge extends PureComponent { + state = { + isConnected: true, + badgeYPosition: new Animated.Value(100), + badgeOpacity: new Animated.Value(0), + }; + + componentDidMount() { + NetInfo.isConnected.addEventListener( + 'connectionChange', + this.handleConnectivityChange + ); + } + + componentWillUnmount() { + NetInfo.isConnected.removeEventListener( + 'connectionChange', + this.handleConnectivityChange + ); + } + + handleConnectivityChange = isConnected => { + if (isConnected) { + this.animateBadgeOut(); + } else { + this.animateBadgeIn(); + } + this.setState({ isConnected }); + }; + + animateBadgeIn = () => { + Animated.parallel([ + Animated.spring(this.state.badgeYPosition, { + toValue: 0, + tension: 90, + friction: 11, + useNativeDriver: true, + }).start(), + Animated.spring(this.state.badgeOpacity, { + toValue: 1, + tension: 90, + friction: 11, + useNativeDriver: true, + }).start(), + ]); + }; + + animateBadgeOut = () => { + Animated.parallel([ + Animated.spring(this.state.badgeYPosition, { + toValue: 100, + tension: 90, + friction: 11, + useNativeDriver: true, + }).start(), + Animated.spring(this.state.badgeOpacity, { + toValue: 0, + tension: 90, + friction: 11, + useNativeDriver: true, + }).start(), + ]); + }; + + render() { + return ( + + + Offline + + ); + } +} + +export default OfflineBadge; diff --git a/src/components/icons/Icon.js b/src/components/icons/Icon.js index ad1754db4b4..703490c1460 100644 --- a/src/components/icons/Icon.js +++ b/src/components/icons/Icon.js @@ -13,6 +13,7 @@ import CompassIcon from './svg/CompassIcon'; import DotIcon from './svg/DotIcon'; import FaceIdIcon from './svg/FaceIdIcon'; import HandleIcon from './svg/HandleIcon'; +import OfflineIcon from './svg/OfflineIcon'; import ProgressIcon from './svg/ProgressIcon'; import SendIcon from './svg/SendIcon'; import ShareIcon from './svg/ShareIcon'; @@ -37,6 +38,7 @@ Icon.IconTypes = { dot: DotIcon, faceid: FaceIdIcon, handle: HandleIcon, + offline: OfflineIcon, progress: ProgressIcon, spinner: SpinnerIcon, threeDots: ThreeDotsIcon, diff --git a/src/components/icons/svg/OfflineIcon.js b/src/components/icons/svg/OfflineIcon.js new file mode 100644 index 00000000000..fa6d9a9ac4d --- /dev/null +++ b/src/components/icons/svg/OfflineIcon.js @@ -0,0 +1,25 @@ +import PropTypes from 'prop-types'; +import React from 'react'; +import { Path } from 'svgs'; +import { colors } from '../../../styles'; +import Svg from '../Svg'; + +const OfflineIcon = ({ color, ...props }) => ( + + + +); + +OfflineIcon.propTypes = { + color: PropTypes.string, +}; + +OfflineIcon.defaultProps = { + color: colors.black, +}; + +export default OfflineIcon; From 52731316ea59354aee26ae554b617ff5958c553b Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 12 Dec 2018 14:20:57 -0500 Subject: [PATCH 30/32] added changelog and setting versions for build --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ package.json | 4 ++-- src/components/AppVersionStamp.js | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000000..de0a0caa373 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,30 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/) + +## [Unreleased] + +### Added + +### Changed + +### Removed + +## [0.2.1-3](https://github.com/balance-io/balance-wallet/releases/tag/v0.2.1-3) +### Added +* NFT attributes page +* Offline status indicator +* Support for message signing via WalletConnect +* Piwik support +* Storing 'hide assets' selection +* Grouping WalletConnect sessions view by dapp name +* Clearing out notifications once app opened + +### Changed +* Fixed network spinner issue for older iPhones +* Fixed Add Funds flashing at app loading +* Better camera handling for overall app performance +* Navigation fixes diff --git a/package.json b/package.json index 89639a1e989..021dcfd7e67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "BalanceWallet", - "version": "0.2.2", + "version": "0.2.1-3", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", @@ -180,4 +180,4 @@ "./src/assets/fonts" ] } -} \ No newline at end of file +} diff --git a/src/components/AppVersionStamp.js b/src/components/AppVersionStamp.js index 070dd3d9288..5fc230ec4d8 100644 --- a/src/components/AppVersionStamp.js +++ b/src/components/AppVersionStamp.js @@ -14,6 +14,6 @@ const Container = styled(Monospace).attrs({ text-align: center; `; -const AppVersionStamp = props => Balance v0.2.2; +const AppVersionStamp = props => Balance v0.2.1 (3); export default AppVersionStamp; From 0faf67c9a7cd3a7972248138848fb196d51b6062 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 12 Dec 2018 14:23:51 -0500 Subject: [PATCH 31/32] latest yarn updates --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 021dcfd7e67..4f4f9275e42 100644 --- a/package.json +++ b/package.json @@ -180,4 +180,4 @@ "./src/assets/fonts" ] } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index d9e1f490b1e..cbf9016105d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4104,8 +4104,8 @@ image-size@^0.6.0: resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.3.tgz#e7e5c65bb534bd7cdcedd6cb5166272a85f75fb2" immer@^1.7.4: - version "1.8.0" - resolved "https://registry.yarnpkg.com/immer/-/immer-1.8.0.tgz#afa8393996a1f3f5255019e7d10c29d42dd95225" + version "1.8.2" + resolved "https://registry.yarnpkg.com/immer/-/immer-1.8.2.tgz#111e9c9e6832c833868f3f6481758a421f63f403" import-fresh@^2.0.0: version "2.0.0" @@ -5356,9 +5356,9 @@ metro-babel7-plugin-react-transform@0.45.6: dependencies: "@babel/helper-module-imports" "^7.0.0" -metro-babel7-plugin-react-transform@0.48.3: - version "0.48.3" - resolved "https://registry.yarnpkg.com/metro-babel7-plugin-react-transform/-/metro-babel7-plugin-react-transform-0.48.3.tgz#c3e43c99173c143537fb234b44cdd6e6b511d511" +metro-babel7-plugin-react-transform@0.48.5: + version "0.48.5" + resolved "https://registry.yarnpkg.com/metro-babel7-plugin-react-transform/-/metro-babel7-plugin-react-transform-0.48.5.tgz#312eb0adf3764357c79b79acc6eb92646051b349" dependencies: "@babel/helper-module-imports" "^7.0.0" @@ -5439,8 +5439,8 @@ metro-react-native-babel-preset@0.45.6: react-transform-hmr "^1.0.4" metro-react-native-babel-preset@^0.48.1: - version "0.48.3" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.48.3.tgz#839dbd0d9e4012f550861d2295b998144a61bcc8" + version "0.48.5" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.48.5.tgz#cafa1c3ea326a447a89031928b0932f38a65815c" dependencies: "@babel/plugin-proposal-class-properties" "^7.0.0" "@babel/plugin-proposal-export-default-from" "^7.0.0" @@ -5475,7 +5475,7 @@ metro-react-native-babel-preset@^0.48.1: "@babel/plugin-transform-typescript" "^7.0.0" "@babel/plugin-transform-unicode-regex" "^7.0.0" "@babel/template" "^7.0.0" - metro-babel7-plugin-react-transform "0.48.3" + metro-babel7-plugin-react-transform "0.48.5" react-transform-hmr "^1.0.4" metro-resolver@0.45.6: @@ -6486,8 +6486,8 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" psl@^1.1.24, psl@^1.1.28: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" public-encrypt@^4.0.0: version "4.0.3" @@ -6661,8 +6661,8 @@ react-native-blur@^3.2.2: prop-types "^15.5.10" react-native-camera@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.5.1.tgz#c241cc0456e5dd31f1d05812bf3d0e86fb6931a3" + version "1.6.0" + resolved "https://registry.yarnpkg.com/react-native-camera/-/react-native-camera-1.6.0.tgz#0b3777e119d07800ee626f802f44daae4c711258" dependencies: lodash "^4.17.10" prop-types "^15.6.2" From e211ed1bb1365ff6c363861bcb96bcf8a2a33db0 Mon Sep 17 00:00:00 2001 From: jinchung Date: Wed, 12 Dec 2018 14:24:51 -0500 Subject: [PATCH 32/32] updating build version in xcode --- ios/BalanceWallet/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/BalanceWallet/Info.plist b/ios/BalanceWallet/Info.plist index 1773221bd82..40f35cb8478 100644 --- a/ios/BalanceWallet/Info.plist +++ b/ios/BalanceWallet/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 2 + 3 CodePushDeploymentKey $(CODEPUSH_KEY) ITSAppUsesNonExemptEncryption