Skip to content

Commit af7c39f

Browse files
authored
v1.0.7
v1.0.7
2 parents 882f8b0 + b37ff20 commit af7c39f

File tree

38 files changed

+468
-207
lines changed

38 files changed

+468
-207
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,17 @@ jobs:
114114
working_directory: ~/MetaMask
115115
environment:
116116
JAVA_OPTS: "-Xms512m -Xmx1024m"
117-
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
117+
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport"
118118
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
119119
docker:
120-
- image: circleci/android:api-28-node8-alpha
120+
- image: circleci/android:api-29-node
121121
steps:
122122
- checkout
123123
- attach_workspace:
124124
at: .
125125
- run:
126126
name: build:accept-android-licenses
127-
command: (echo y; echo y; echo y; echo y; echo y; echo y) | $ANDROID_HOME/tools/bin/sdkmanager --licenses
127+
command: sdkmanager --licenses
128128
- run:
129129
name: build:pre-release
130130
command:

CHANGELOG.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
## Current Develop Branch
44

5-
## v1.0.6 - Nov 12 2020]
6-
- [#1990](https://github.com/MetaMask/metamask-mobile/pull/1990): Fixed importing accounts when reseting password (#1988)
5+
## v1.0.7 - Nov 17 2020
6+
- [#2005](https://github.com/MetaMask/metamask-mobile/pull/2005): Fix activeTabUrl (#2005)
7+
- [#2003](https://github.com/MetaMask/metamask-mobile/pull/2003): Bugfix/android choose password (#2003)
8+
- [#1992](https://github.com/MetaMask/metamask-mobile/pull/1992): Android api level (#1992)
9+
- [#1993](https://github.com/MetaMask/metamask-mobile/pull/1993): Catch SVG Errors (#1993)
10+
- [#1970](https://github.com/MetaMask/metamask-mobile/pull/1970): Remove network status controller (#1970)
11+
- [#1968](https://github.com/MetaMask/metamask-mobile/pull/1968): Add MetaSwaps feature flag and initial nav stack (#1968)
12+
- [#1967](https://github.com/MetaMask/metamask-mobile/pull/1967): Add Keypad component (#1967)
13+
14+
15+
## v1.0.6 - Nov 12 2020
16+
- [#1990](https://github.com/MetaMask/metamask-mobile/pull/1990): Fixed importing accounts when reseting password (#1990)
717
- [#1988](https://github.com/MetaMask/metamask-mobile/pull/1988): bugfix/protect wallet modal (#1988)
818
- [#1985](https://github.com/MetaMask/metamask-mobile/pull/1985): Fix seedphrase handling in QRScanner (#1985)
919
- [#1982](https://github.com/MetaMask/metamask-mobile/pull/1982): Bugfix/approve modal (#1982)

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ android {
167167
minSdkVersion rootProject.ext.minSdkVersion
168168
targetSdkVersion rootProject.ext.targetSdkVersion
169169
versionCode 40
170-
versionName "1.0.6"
170+
versionName "1.0.7"
171171
multiDexEnabled true
172172
testBuildType System.getProperty('testBuildType', 'debug')
173173
missingDimensionStrategy "minReactNative", "minReactNative46"

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
android:theme="@style/AppTheme"
1919
android:hardwareAccelerated="true"
2020
android:usesCleartextTraffic="${isDebug}"
21-
tools:targetApi="28"
21+
tools:targetApi="29"
2222
tools:ignore="GoogleAppIndexingWarning"
2323
android:networkSecurityConfig="@xml/react_native_config"
2424
>

android/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
buildscript {
44

55
ext {
6-
buildToolsVersion = "28.0.3"
76
minSdkVersion = 19
87
compileSdkVersion = 29
9-
targetSdkVersion = 28
8+
targetSdkVersion = 29
109
kotlin_version = "1.3.50"
1110
kotlinVersion = "$kotlin_version"
1211
}
@@ -56,7 +55,6 @@ allprojects {
5655
if (project.hasProperty("android")) {
5756
android {
5857
compileSdkVersion = rootProject.ext.compileSdkVersion
59-
buildToolsVersion = rootProject.ext.buildToolsVersion
6058
}
6159
}
6260
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from 'react';
2+
import { shallow } from 'enzyme';
3+
import Keypad from '.';
4+
5+
describe('Keypad component', () => {
6+
test('should render correctly', () => {
7+
const dummyHandler = jest.fn();
8+
const wrapper = shallow(
9+
<Keypad>
10+
<Keypad.Row>
11+
<Keypad.Button onPress={dummyHandler}>1</Keypad.Button>
12+
<Keypad.Button onPress={dummyHandler}>2</Keypad.Button>
13+
<Keypad.Button onPress={dummyHandler}>3</Keypad.Button>
14+
</Keypad.Row>
15+
<Keypad.Row>
16+
<Keypad.Button onPress={dummyHandler}>4</Keypad.Button>
17+
<Keypad.Button onPress={dummyHandler}>5</Keypad.Button>
18+
<Keypad.Button onPress={dummyHandler}>6</Keypad.Button>
19+
</Keypad.Row>
20+
<Keypad.Row>
21+
<Keypad.Button onPress={dummyHandler}>7</Keypad.Button>
22+
<Keypad.Button onPress={dummyHandler}>8</Keypad.Button>
23+
<Keypad.Button onPress={dummyHandler}>9</Keypad.Button>
24+
</Keypad.Row>
25+
<Keypad.Row>
26+
<Keypad.Button onPress={dummyHandler}>.</Keypad.Button>
27+
<Keypad.Button onPress={dummyHandler}>0</Keypad.Button>
28+
<Keypad.DeleteButton onPress={dummyHandler} />
29+
</Keypad.Row>
30+
</Keypad>
31+
);
32+
expect(wrapper).toMatchSnapshot();
33+
});
34+
});
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Keypad component should render correctly 1`] = `
4+
<View
5+
style={
6+
Object {
7+
"paddingHorizontal": 25,
8+
}
9+
}
10+
>
11+
<KeypadRow>
12+
<KeypadButton
13+
onPress={[MockFunction]}
14+
>
15+
1
16+
</KeypadButton>
17+
<KeypadButton
18+
onPress={[MockFunction]}
19+
>
20+
2
21+
</KeypadButton>
22+
<KeypadButton
23+
onPress={[MockFunction]}
24+
>
25+
3
26+
</KeypadButton>
27+
</KeypadRow>
28+
<KeypadRow>
29+
<KeypadButton
30+
onPress={[MockFunction]}
31+
>
32+
4
33+
</KeypadButton>
34+
<KeypadButton
35+
onPress={[MockFunction]}
36+
>
37+
5
38+
</KeypadButton>
39+
<KeypadButton
40+
onPress={[MockFunction]}
41+
>
42+
6
43+
</KeypadButton>
44+
</KeypadRow>
45+
<KeypadRow>
46+
<KeypadButton
47+
onPress={[MockFunction]}
48+
>
49+
7
50+
</KeypadButton>
51+
<KeypadButton
52+
onPress={[MockFunction]}
53+
>
54+
8
55+
</KeypadButton>
56+
<KeypadButton
57+
onPress={[MockFunction]}
58+
>
59+
9
60+
</KeypadButton>
61+
</KeypadRow>
62+
<KeypadRow>
63+
<KeypadButton
64+
onPress={[MockFunction]}
65+
>
66+
.
67+
</KeypadButton>
68+
<KeypadButton
69+
onPress={[MockFunction]}
70+
>
71+
0
72+
</KeypadButton>
73+
<KeypadDeleteButton
74+
onPress={[MockFunction]}
75+
/>
76+
</KeypadRow>
77+
</View>
78+
`;

app/components/Base/Keypad/index.js

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
4+
import IonicIcon from 'react-native-vector-icons/Ionicons';
5+
import Device from '../../../util/Device';
6+
7+
import Text from '../Text';
8+
import { colors } from '../../../styles/common';
9+
10+
const styles = StyleSheet.create({
11+
keypad: {
12+
paddingHorizontal: 25
13+
},
14+
keypadRow: {
15+
flexDirection: 'row',
16+
justifyContent: 'space-around'
17+
},
18+
keypadButton: {
19+
paddingHorizontal: 20,
20+
paddingVertical: Device.isMediumDevice() ? (Device.isIphone5() ? 5 : 10) : 15,
21+
flex: 1,
22+
justifyContent: 'center',
23+
alignItems: 'center'
24+
},
25+
keypadButtonText: {
26+
color: colors.black,
27+
textAlign: 'center',
28+
fontSize: 30
29+
},
30+
deleteIcon: {
31+
fontSize: 25,
32+
marginTop: 5
33+
}
34+
});
35+
36+
const KeypadContainer = props => <View style={styles.keypad} {...props} />;
37+
const KeypadRow = props => <View style={styles.keypadRow} {...props} />;
38+
const KeypadButton = ({ children, ...props }) => (
39+
<TouchableOpacity style={styles.keypadButton} {...props}>
40+
<Text style={styles.keypadButtonText}>{children}</Text>
41+
</TouchableOpacity>
42+
);
43+
44+
KeypadButton.propTypes = {
45+
children: PropTypes.node
46+
};
47+
48+
const KeypadDeleteButton = props => (
49+
<TouchableOpacity style={styles.keypadButton} {...props}>
50+
<IonicIcon style={[styles.keypadButtonText, styles.deleteIcon]} name="md-arrow-back" />
51+
</TouchableOpacity>
52+
);
53+
54+
const Keypad = KeypadContainer;
55+
Keypad.Row = KeypadRow;
56+
Keypad.Button = KeypadButton;
57+
Keypad.DeleteButton = KeypadDeleteButton;
58+
59+
export default Keypad;
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`RemoteImage should render correctly 1`] = `
4-
<View
5-
style={Object {}}
4+
<ComponentErrorBoundary
5+
componentLabel="RemoteImage-SVG"
66
>
7-
<SvgCssUri
8-
height="100%"
9-
source={
10-
Object {
11-
"uri": "https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg",
7+
<View
8+
style={Object {}}
9+
>
10+
<SvgCssUri
11+
height="100%"
12+
source={
13+
Object {
14+
"uri": "https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg",
15+
}
1216
}
13-
}
14-
uri="https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg"
15-
width="100%"
16-
/>
17-
</View>
17+
uri="https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg"
18+
width="100%"
19+
/>
20+
</View>
21+
</ComponentErrorBoundary>
1822
`;

app/components/Base/RemoteImage/index.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import FadeIn from 'react-native-fade-in-image';
55
// eslint-disable-next-line import/default
66
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
77
import { SvgCssUri } from 'react-native-svg';
8+
import ComponentErrorBoundary from '../../UI/ComponentErrorBoundary';
89

910
const RemoteImage = props => {
1011
const source = resolveAssetSource(props.source);
@@ -19,9 +20,11 @@ const RemoteImage = props => {
1920
}
2021
}
2122
return (
22-
<View style={style}>
23-
<SvgCssUri {...props} uri={source.uri} width={'100%'} height={'100%'} />
24-
</View>
23+
<ComponentErrorBoundary onError={props.onError} componentLabel="RemoteImage-SVG">
24+
<View style={style}>
25+
<SvgCssUri {...props} uri={source.uri} width={'100%'} height={'100%'} />
26+
</View>
27+
</ComponentErrorBoundary>
2528
);
2629
}
2730

@@ -51,7 +54,11 @@ RemoteImage.propTypes = {
5154
/**
5255
* Style for the placeholder (used for fadeIn)
5356
*/
54-
placeholderStyle: ViewPropTypes.style
57+
placeholderStyle: ViewPropTypes.style,
58+
/**
59+
* Called when there is an error
60+
*/
61+
onError: PropTypes.func
5562
};
5663

5764
export default RemoteImage;

app/components/Nav/Main/MainNavigator.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import PaymentMethodSelector from '../../UI/FiatOrders/PaymentMethodSelector';
4949
import PaymentMethodApplePay from '../../UI/FiatOrders/PaymentMethodApplePay';
5050
import TransakWebView from '../../UI/FiatOrders/TransakWebView';
5151
import ActivityView from '../../Views/ActivityView';
52+
import SwapsAmountView from '../../UI/Swaps';
5253

5354
const styles = StyleSheet.create({
5455
headerLogo: {
@@ -272,6 +273,11 @@ export default createStackNavigator(
272273
TransakFlow: { screen: TransakWebView }
273274
})
274275
},
276+
Swaps: {
277+
screen: createStackNavigator({
278+
SwapsAmountView: { screen: SwapsAmountView }
279+
})
280+
},
275281
SetPasswordFlow: {
276282
screen: createStackNavigator(
277283
{

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,18 @@ exports[`Main should render correctly 1`] = `
248248
"getScreenOptions": [Function],
249249
"getStateForAction": [Function],
250250
},
251+
"Swaps": Object {
252+
"childRouters": Object {
253+
"SwapsAmountView": null,
254+
},
255+
"getActionCreators": [Function],
256+
"getActionForPathAndParams": [Function],
257+
"getComponentForRouteName": [Function],
258+
"getComponentForState": [Function],
259+
"getPathAndParamsForState": [Function],
260+
"getScreenOptions": [Function],
261+
"getStateForAction": [Function],
262+
},
251263
"Webview": Object {
252264
"childRouters": Object {
253265
"SimpleWebview": null,
@@ -570,6 +582,18 @@ exports[`Main should render correctly 1`] = `
570582
"getScreenOptions": [Function],
571583
"getStateForAction": [Function],
572584
},
585+
"Swaps": Object {
586+
"childRouters": Object {
587+
"SwapsAmountView": null,
588+
},
589+
"getActionCreators": [Function],
590+
"getActionForPathAndParams": [Function],
591+
"getComponentForRouteName": [Function],
592+
"getComponentForState": [Function],
593+
"getPathAndParamsForState": [Function],
594+
"getScreenOptions": [Function],
595+
"getStateForAction": [Function],
596+
},
573597
"Webview": Object {
574598
"childRouters": Object {
575599
"SimpleWebview": null,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`ApproveTransactionModal should render correctly 1`] = `
1010
}
1111
}
1212
accountsLength={1}
13-
activeTabUrl=""
13+
activeTabUrl="https://metamask.github.io/test-dapp/"
1414
conversionRate={5}
1515
primaryCurrency="fiat"
1616
providerType="ETH"

0 commit comments

Comments
 (0)