Skip to content

Commit 7b5db8b

Browse files
author
Bruno Barbieri
authored
Release 0.1.9 to master (#823)
* attempt to fix and get info * enable android app bundles * update homepage url * Update navigation deps to latest versions (#818) * update deps * update snapshots * Bugfix: improve payment deposit * Bugfix: onboarding android (#820) * fix skip * snaps * rm * min height * release 0.1.9 (#822)
1 parent 321053b commit 7b5db8b

File tree

14 files changed

+234
-222
lines changed

14 files changed

+234
-222
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ jobs:
132132
name: build:pre-release
133133
command:
134134
|
135-
npm run build:android:pre-release
135+
npm run build:android:pre-release:bundle
136+
- store_artifacts:
137+
path: android/app/build/outputs/bundle/release
138+
destination: bundle
136139
- store_artifacts:
137140
path: android/app/build/outputs/apk/release
138141
destination: builds

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ android {
174174
applicationId "io.metamask"
175175
minSdkVersion rootProject.ext.minSdkVersion
176176
targetSdkVersion rootProject.ext.targetSdkVersion
177-
versionCode 9
178-
versionName "0.1.8"
177+
versionCode 10
178+
versionName "0.1.9"
179179
multiDexEnabled true
180180
testBuildType System.getProperty('testBuildType', 'debug')
181181
missingDimensionStrategy "minReactNative", "minReactNative46"

app/components/Nav/App/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ exports[`App should render correctly 1`] = `
1212
"getChildNavigation": [Function],
1313
"getScreenProps": [Function],
1414
"goBack": [Function],
15+
"isFirstRouteInParent": [Function],
1516
"isFocused": [Function],
1617
"navigate": [Function],
1718
"router": Object {
@@ -416,6 +417,7 @@ exports[`App should render correctly 1`] = `
416417
"getChildNavigation": [Function],
417418
"getScreenProps": [Function],
418419
"goBack": [Function],
420+
"isFirstRouteInParent": [Function],
419421
"isFocused": [Function],
420422
"navigate": [Function],
421423
"router": Object {

app/components/Nav/Main/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ exports[`Main should render correctly 1`] = `
2020
"getChildNavigation": [Function],
2121
"getScreenProps": [Function],
2222
"goBack": [Function],
23+
"isFirstRouteInParent": [Function],
2324
"isFocused": [Function],
2425
"navigate": [Function],
2526
"pop": [Function],
@@ -310,6 +311,7 @@ exports[`Main should render correctly 1`] = `
310311
"getChildNavigation": [Function],
311312
"getScreenProps": [Function],
312313
"goBack": [Function],
314+
"isFirstRouteInParent": [Function],
313315
"isFocused": [Function],
314316
"navigate": [Function],
315317
"pop": [Function],

app/components/UI/OnboardingWizard/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ exports[`OnboardingWizard should render correctly 1`] = `
4747
style={
4848
Array [
4949
Object {
50+
"backgroundColor": "transparent",
5051
"bottom": 0,
5152
"flex": 1,
5253
"left": 0,
@@ -55,9 +56,7 @@ exports[`OnboardingWizard should render correctly 1`] = `
5556
"right": 0,
5657
"top": 0,
5758
},
58-
Object {
59-
"backgroundColor": "transparent",
60-
},
59+
Object {},
6160
]
6261
}
6362
supportedOrientations={

app/components/UI/OnboardingWizard/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
3-
import { Platform, TouchableOpacity, View, StyleSheet, Text } from 'react-native';
3+
import { Platform, TouchableOpacity, View, StyleSheet, Text, Dimensions } from 'react-native';
44
import { colors, fontStyles } from '../../../styles/common';
55
import { connect } from 'react-redux';
66
import Step1 from './Step1';
@@ -18,6 +18,7 @@ import ElevatedView from 'react-native-elevated-view';
1818
import Modal from 'react-native-modal';
1919
import DeviceSize from '../../../util/DeviceSize';
2020

21+
const MIN_HEIGHT = Dimensions.get('window').height;
2122
const styles = StyleSheet.create({
2223
root: {
2324
top: 0,
@@ -26,7 +27,8 @@ const styles = StyleSheet.create({
2627
right: 0,
2728
flex: 1,
2829
margin: 0,
29-
position: 'absolute'
30+
position: 'absolute',
31+
backgroundColor: colors.transparent
3032
},
3133
main: {
3234
flex: 1,
@@ -118,7 +120,7 @@ class OnboardingWizard extends Component {
118120
backdropOpacity={0}
119121
disableAnimation
120122
transparent
121-
style={[styles.root, { backgroundColor: colors.transparent }]}
123+
style={[styles.root, Platform.OS === 'android' ? { minHeight: MIN_HEIGHT } : {}]}
122124
>
123125
<View style={styles.main}>{this.onboardingWizardNavigator(step)}</View>
124126
{step !== 1 && (

app/components/Views/LockScreen/index.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import LottieView from 'lottie-react-native';
55
import Engine from '../../../core/Engine';
66
import SecureKeychain from '../../../core/SecureKeychain';
77
import { baseStyles } from '../../../styles/common';
8+
import Logger from '../../../util/Logger';
89

910
const LOGO_SIZE = 175;
1011
const styles = StyleSheet.create({
@@ -57,6 +58,7 @@ export default class LockScreen extends Component {
5758

5859
appState = 'active';
5960
locked = true;
61+
timedOut = false;
6062
firstAnimation = React.createRef();
6163
secondAnimation = React.createRef();
6264
animationName = React.createRef();
@@ -81,24 +83,52 @@ export default class LockScreen extends Component {
8183
this.firstAnimation.play();
8284
this.appState = nextAppState;
8385
this.unlockKeychain();
86+
this.timeoutWatcher();
8487
}
8588
};
8689

90+
timeoutWatcher() {
91+
setTimeout(() => {
92+
if (!this.state.ready) {
93+
Logger.log('Lockscreen::timeout - state', this.state);
94+
Logger.log('Lockscreen::timeout - appState', this.appState);
95+
Logger.log('Lockscreen::timeout - locked', this.locked);
96+
Logger.log('Lockscreen::timeout - errorUnlockingKeychain', this.errorUnlockingKeychain);
97+
Logger.error('Lockscreen::timeout', `${this.timedOut ? 10 : 5} sec timeout`);
98+
// Retry one more time
99+
if (!this.timedOut) {
100+
this.unlockKeychain();
101+
this.timeoutWatcher();
102+
this.timedOut = true;
103+
}
104+
}
105+
}, 5000);
106+
}
107+
87108
componentWillUnmount() {
88109
this.mounted = false;
89110
AppState.removeEventListener('change', this.handleAppStateChange);
90111
}
91112

92113
async unlockKeychain() {
114+
let credentials = null;
93115
try {
94116
// Retreive the credentials
95-
const credentials = await SecureKeychain.getGenericPassword();
117+
Logger.log('Lockscreen::unlockKeychain - getting credentials');
118+
credentials = await SecureKeychain.getGenericPassword();
96119
if (credentials) {
120+
Logger.log('Lockscreen::unlockKeychain - got credentials', !!credentials.password);
121+
97122
// Restore vault with existing credentials
98123
const { KeyringController } = Engine.context;
124+
Logger.log('Lockscreen::unlockKeychain - submitting password');
125+
99126
await KeyringController.submitPassword(credentials.password);
127+
Logger.log('Lockscreen::unlockKeychain - keyring unlocked');
128+
100129
this.locked = false;
101130
this.setState({ ready: true }, () => {
131+
Logger.log('Lockscreen::unlockKeychain - state: ready');
102132
if (Platform.OS === 'android') {
103133
setTimeout(() => {
104134
this.secondAnimation.play(0, 25);
@@ -109,13 +139,14 @@ export default class LockScreen extends Component {
109139
} else {
110140
this.secondAnimation.play();
111141
this.animationName.play();
142+
Logger.log('Lockscreen::unlockKeychain - playing animations');
112143
}
113144
});
114145
} else {
115146
this.props.navigation.navigate('Login');
116147
}
117148
} catch (error) {
118-
console.log(`Keychain couldn't be accessed`, error); // eslint-disable-line
149+
Logger.error('Lockscreen:unlockKeychain', error);
119150
}
120151
}
121152

0 commit comments

Comments
 (0)