Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Mobile 0.26.6 release (#4030)
Browse files Browse the repository at this point in the history
* Add patch for react-native-push-notification january.ai issue

* Upgrades packages, upgrade version, minor tweaks

* Recovery phrase spacing adjustments

* Spacing fixes for small phones

* Change memory settings

* Move react-native-gesture-handler import

* Version bump

* Display tweak

* Version bump
  • Loading branch information
Tom Linton authored Nov 22, 2019
1 parent ecbf91c commit 47dd912
Show file tree
Hide file tree
Showing 20 changed files with 376 additions and 288 deletions.
3 changes: 2 additions & 1 deletion mobile/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx4608m
3 changes: 3 additions & 0 deletions mobile/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
'use strict'

// https://github.com/kmagiera/react-native-gesture-handler/issues/320
import 'react-native-gesture-handler'

import 'core-js/stable'
import 'regenerator-runtime/runtime'

Expand Down
2 changes: 1 addition & 1 deletion mobile/ios/OriginMarketplace/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>6</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fb</string>
Expand Down
22 changes: 14 additions & 8 deletions mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ PODS:
- React
- react-native-geolocation (1.4.2):
- React
- react-native-webview (7.4.3):
- react-native-safe-area-context (0.6.0):
- React
- react-native-webview (7.5.1):
- React
- React-RCTActionSheet (0.61.4):
- React-Core/RCTActionSheetHeaders (= 0.61.4)
Expand Down Expand Up @@ -251,15 +253,15 @@ PODS:
- React-cxxreact (= 0.61.4)
- React-jsi (= 0.61.4)
- ReactCommon/jscallinvoker (= 0.61.4)
- RNCAsyncStorage (1.6.2):
- RNCAsyncStorage (1.6.3):
- React
- RNCPushNotificationIOS (1.0.2):
- RNCPushNotificationIOS (1.0.3):
- React
- RNGestureHandler (1.5.0):
- React
- RNLocalize (1.3.1):
- React
- RNSentry (1.0.9):
- RNSentry (1.1.0):
- React
- Sentry (~> 4.4.0)
- Sentry (4.4.1):
Expand Down Expand Up @@ -289,6 +291,7 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-fbsdk (from `../node_modules/react-native-fbsdk`)
- "react-native-geolocation (from `../node_modules/@react-native-community/geolocation`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
Expand Down Expand Up @@ -352,6 +355,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-fbsdk"
react-native-geolocation:
:path: "../node_modules/@react-native-community/geolocation"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
react-native-webview:
:path: "../node_modules/react-native-webview"
React-RCTActionSheet:
Expand Down Expand Up @@ -411,7 +416,8 @@ SPEC CHECKSUMS:
React-jsinspector: d15478d0a8ada19864aa4d1cc1c697b41b3fa92f
react-native-fbsdk: b94a83971c496a35803f38b921aec6d637ba07b5
react-native-geolocation: a7b94614afbd5fd8350e0233a2025c8228fc8041
react-native-webview: 82d6456dfae1b3ef70c3939135536342afc96373
react-native-safe-area-context: d288138da2c800caa111f9352e9333f186a06ead
react-native-webview: 2aadbfef6b9eaa9e89b306ae3e31e6e870a6306d
React-RCTActionSheet: 7369b7c85f99b6299491333affd9f01f5a130c22
React-RCTAnimation: d07be15b2bd1d06d89417eb0343f98ffd2b099a7
React-RCTBlob: 8e0b23d95c9baa98f6b0e127e07666aaafd96c34
Expand All @@ -422,11 +428,11 @@ SPEC CHECKSUMS:
React-RCTText: 21934e0a51d522abcd0a275407e80af45d6fd9ec
React-RCTVibration: 0f76400ee3cec6edb9c125da49fed279340d145a
ReactCommon: a6a294e7028ed67b926d29551aa9394fd989c24c
RNCAsyncStorage: 60a80e72d95bf02a01cace55d3697d9724f0d77f
RNCPushNotificationIOS: 0b8d06ff190d84627dd17501bfb96652375970e4
RNCAsyncStorage: 3c304d1adfaea02ec732ac218801cb13897aa8c0
RNCPushNotificationIOS: 83ec11fe19d4ea9e32cc339d8e7d2cc3c88f543e
RNGestureHandler: a4ddde1ffc6e590c8127b8b7eabfdade45475c74
RNLocalize: 07eb7a91d10021cdf59d80061ebf3adb8a5b5688
RNSentry: 2803ba8c8129dcf26b79e9b4d8c80168be6e4390
RNSentry: 932ac1c8b2f581b1c8be5812f88ff556c99e7fb7
Sentry: 5d312a04e369154aeac616214f4dfc3cbcc8b296
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: ba3d99dbee6c15ea6bbe3783d1f0cb1ffb79af0f
Expand Down
27 changes: 15 additions & 12 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"author": "Origin Protocol Inc",
"license": "MIT",
"repository": "https://github.com/OriginProtocol/origin/mobile",
"version": "0.26.1",
"version": "0.26.6",
"scripts": {
"android": "react-native run-android --appId com.origincatcher",
"clean": "git clean -fdX .",
"postinstall": "npx jetify; cd ios && pod install",
"postinstall": "npx jetify; patch-package; cd ios && pod install",
"ios": "react-native run-ios",
"lint": "eslint . && npm run prettier:check",
"prettier": "prettier --write *.js \"**/*.js\"",
Expand All @@ -28,14 +28,14 @@
"@babel/core": "^7.7.2",
"@babel/plugin-transform-new-target": "^7.4.4",
"@babel/register": "^7.7.0",
"@react-native-community/async-storage": "^1.6.2",
"@react-native-community/push-notification-ios": "^1.0.2",
"@sentry/react-native": "^1.0.9",
"@react-native-community/async-storage": "^1.6.3",
"@react-native-community/push-notification-ios": "^1.0.3",
"@sentry/react-native": "^1.1.0",
"babel-plugin-fbt": "^0.11.0",
"babel-plugin-fbt-runtime": "^0.9.9",
"babel-plugin-inline-dotenv": "^1.5.0",
"compare-versions": "^3.5.1",
"core-js": "^3.4.0",
"core-js": "^3.4.1",
"cross-fetch": "^3.0.4",
"eslint": "^6.6.0",
"ethers": "^4.0.39",
Expand All @@ -48,11 +48,13 @@
"json-stable-stringify": "^1.0.1",
"lodash.get": "^4.4.2",
"metro-react-native-babel-preset": "^0.57.0",
"patch-package": "^6.2.0",
"postinstall-postinstall": "^2.0.0",
"prettier": "^1.19.1",
"react": "^16.11.0",
"react": "^16.12.0",
"react-devtools-core": "^4.2.0",
"react-dom": "^16.11.0",
"react-hot-loader": "^4.12.16",
"react-dom": "^16.12.0",
"react-hot-loader": "^4.12.18",
"react-native": "^0.61.4",
"react-native-android-open-settings": "^1.3.0",
"react-native-fbsdk": "1.1.1",
Expand All @@ -61,14 +63,15 @@
"react-native-localize": "^1.3.1",
"react-native-push-notification": "^3.1.9",
"react-native-restart": "^0.0.13",
"react-native-safe-area-view": "^0.6.0",
"react-native-safe-area-context": "^0.6.0",
"react-native-safe-area-view": "^1.0.0",
"react-native-samsung-bks": "^0.1.1",
"react-native-touch-id": "^4.4.1",
"react-native-webview": "^7.4.3",
"react-native-webview": "^7.5.1",
"react-navigation": "3.11.0",
"react-navigation-backhandler": "^1.3.2",
"react-redux": "^7.1.3",
"react-test-renderer": "16.11.0",
"react-test-renderer": "16.12.0",
"redux": "^4.0.4",
"redux-persist": "^6.0.0",
"redux-persist-transform-encrypt": "^2.0.1",
Expand Down
11 changes: 11 additions & 0 deletions mobile/patches/react-native-push-notification+3.1.9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/node_modules/react-native-push-notification/android/react-native-push-notification.iml b/node_modules/react-native-push-notification/android/react-native-push-notification.iml
index 4c1e6c2..fd068a4 100644
--- a/node_modules/react-native-push-notification/android/react-native-push-notification.iml
+++ b/node_modules/react-native-push-notification/android/react-native-push-notification.iml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module external.linked.project.id=":react-native-push-notification" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../january.ai/januarychallenge/android" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
+<module external.linked.project.id=":react-native-push-notification" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../../android" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
15 changes: 8 additions & 7 deletions mobile/src/App.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict'

import React from 'react'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { YellowBox } from 'react-native'
import { Provider as ReduxProvider } from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
// https://github.com/kmagiera/react-native-gesture-handler/issues/320
import 'react-native-gesture-handler'

import Store, { persistor } from './Store'
import AppContainer from './AppContainer'
Expand Down Expand Up @@ -36,11 +35,13 @@ const App = () => {
return (
<ReduxProvider store={Store}>
<PersistGate onBeforeLift={onBeforeLift} persistor={persistor}>
<AppContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef)
}}
/>
<SafeAreaProvider>
<AppContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef)
}}
/>
</SafeAreaProvider>
</PersistGate>
</ReduxProvider>
)
Expand Down
8 changes: 1 addition & 7 deletions mobile/src/PushNotifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import withConfig from 'hoc/withConfig'

import AuthClient from '@origin/auth-client/src/auth-client'

import RNSamsungBKS from 'react-native-samsung-bks'

class PushNotifications extends Component {
constructor(props) {
super(props)
Expand Down Expand Up @@ -321,11 +319,7 @@ class PushNotifications extends Component {

// No private key (Samsung BKS account), can't proceed
if (wallet.activeAccount.hdPath) {
const messageToSign = Buffer.from(payload).toString('base64')
signature = await RNSamsungBKS.signEthPersonalMessage(
wallet.activeAccount.hdPath,
messageToSign
)
return
} else {
const { privateKey, mnemonic } = wallet.activeAccount

Expand Down
1 change: 1 addition & 0 deletions mobile/src/components/disclaimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const styles = StyleSheet.create({
container: {
fontSize: 14,
paddingVertical: 10,
marginBottom: 10,
width: '80%'
},
text: {
Expand Down
2 changes: 1 addition & 1 deletion mobile/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

export const VERSION = '0.26.1'
export const VERSION = '0.26.6'

class Enum extends Array {
constructor(...args) {
Expand Down
79 changes: 42 additions & 37 deletions mobile/src/screens/accountBackup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

import React from 'react'
import { Image, StyleSheet, Text, View } from 'react-native'
import { Image, ScrollView, StyleSheet, Text, View } from 'react-native'
import { fbt } from 'fbt-runtime'
import SafeAreaView from 'react-native-safe-area-view'

Expand All @@ -13,42 +13,47 @@ const IMAGES_PATH = '../../assets/images/'

const AccountBackupScreen = ({ navigation }) => (
<SafeAreaView style={styles.container}>
<BackArrow onClick={() => navigation.goBack(null)} />
<View style={styles.content}>
<Image
resizeMethod={'scale'}
resizeMode={'contain'}
source={require(IMAGES_PATH + 'wallet-backup-icon.png')}
style={styles.image}
/>
<Text style={styles.title}>
<fbt desc="AccountBackup.title">Back Up Your Wallet</fbt>
</Text>
<Text style={styles.subtitle}>
<fbt desc="AccountBackup.subtitle">
Now that your wallet has been created, it&apos;s ready to be used with
Origin.
</fbt>
</Text>
<Text style={styles.subtitle}>
<fbt desc="AccountBackup.warning">
But what happens if you lose this device? Unless you back up your
wallet, you will lose access to it forever. We don&apos;t store your
recovery phrase, so we won&apos;t be able to help you access your
account or your funds.
</fbt>
</Text>
</View>
<View style={styles.buttonContainer}>
<OriginButton
size="large"
type="primary"
title={fbt('Continue', 'AccountBackup.continueButton')}
onPress={() => {
navigation.navigate('RecoveryPhraseExplainer')
}}
/>
</View>
<ScrollView
style={styles.container}
contentContainerStyle={{ flexGrow: 1 }}
>
<BackArrow onClick={() => navigation.goBack(null)} />
<View style={styles.content}>
<Image
resizeMethod={'scale'}
resizeMode={'contain'}
source={require(IMAGES_PATH + 'wallet-backup-icon.png')}
style={styles.image}
/>
<Text style={styles.title}>
<fbt desc="AccountBackup.title">Back Up Your Wallet</fbt>
</Text>
<Text style={styles.subtitle}>
<fbt desc="AccountBackup.subtitle">
Now that your wallet has been created, it&apos;s ready to be used
with Origin.
</fbt>
</Text>
<Text style={styles.subtitle}>
<fbt desc="AccountBackup.warning">
But what happens if you lose this device? Unless you back up your
wallet, you will lose access to it forever. We don&apos;t store your
recovery phrase, so we won&apos;t be able to help you access your
account or your funds.
</fbt>
</Text>
</View>
<View style={styles.buttonContainer}>
<OriginButton
size="large"
type="primary"
title={fbt('Continue', 'AccountBackup.continueButton')}
onPress={() => {
navigation.navigate('RecoveryPhraseExplainer')
}}
/>
</View>
</ScrollView>
</SafeAreaView>
)

Expand Down
7 changes: 2 additions & 5 deletions mobile/src/screens/changePin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

import React, { Component } from 'react'
import { KeyboardAvoidingView, Platform, StyleSheet, Text } from 'react-native'
import { KeyboardAvoidingView, StyleSheet, Text } from 'react-native'
import { connect } from 'react-redux'
import { fbt } from 'fbt-runtime'

Expand Down Expand Up @@ -71,10 +71,7 @@ class ChangePinScreen extends Component {
}

return (
<KeyboardAvoidingView
style={styles.content}
behavior={Platform.OS === 'ios' ? 'padding' : null}
>
<KeyboardAvoidingView style={styles.content} behavior={'padding'}>
<Text style={styles.subtitle}>{titleElement}</Text>
{this.state.isRetry === true && (
<Text style={styles.invalid}>
Expand Down
4 changes: 2 additions & 2 deletions mobile/src/screens/importMnemonic.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ class ImportAccountScreen extends Component {
<KeyboardAvoidingView
style={styles.darkOverlay}
behavior={'padding'}
keyboardVerticalOffset={Platform.OS === 'android' ? 40 : 10}
keyboardVerticalOffset={Platform.OS === 'android' ? 25 : 10}
>
<SafeAreaView style={styles.container}>
<ScrollView
style={styles.onboardingModal}
contentContainerStyle={styles.container}
contentContainerStyle={{ flexGrow: 1 }}
keyboardShouldPersistTaps={'always'}
>
<BackArrow onClick={() => this.props.navigation.goBack(null)} />
Expand Down
Loading

0 comments on commit 47dd912

Please sign in to comment.