Skip to content

Commit cd5feb9

Browse files
authored
Release 1.0.3
Release 1.0.3
2 parents ee1d41a + 85d3365 commit cd5feb9

File tree

123 files changed

+3908
-6123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3908
-6123
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _A clear and concise description of what you expected to happen_
2626
**Smartphone (please complete the following information):**
2727
- Device: [e.g. iPhone6]
2828
- OS: [e.g. iOS8.1]
29-
- Version [e.g. 22]
29+
- App Version [e.g. 1.0.0] - find version number in app from Settings > About MetaMask
3030

3131

3232
-------------------------------------------------------------

CHANGELOG.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,41 @@
22

33
## Current Develop Branch
44

5-
## v1.0.1
5+
## v1.0.3 - Sept 30 2020
6+
- [#1865](https://github.com/MetaMask/metamask-mobile/pull/1865): bugfix/login (#1865)
7+
- [#1863](https://github.com/MetaMask/metamask-mobile/pull/1863): transak countries update (#1863)
8+
- [#1829](https://github.com/MetaMask/metamask-mobile/pull/1829): Improvement/browser refactor (#1829)
9+
- [#1848](https://github.com/MetaMask/metamask-mobile/pull/1848): Allow for 24 length seedphrase on import (#1848)
10+
- [#1857](https://github.com/MetaMask/metamask-mobile/pull/1857): bugfix/splash screen (#1857)
11+
- [#1852](https://github.com/MetaMask/metamask-mobile/pull/1852): Bugfix/sentry v1 (#1852)
12+
- [#1846](https://github.com/MetaMask/metamask-mobile/pull/1846): Amount: fix 'data' value for transaction info not being populated with ERC20 tokens (#1846)
13+
- [#1851](https://github.com/MetaMask/metamask-mobile/pull/1851): Detox/ Update e2e based on v1 updates (#1851)
14+
- [#1853](https://github.com/MetaMask/metamask-mobile/pull/1853): fixed typo on country name (#1853)
15+
- [#1815](https://github.com/MetaMask/metamask-mobile/pull/1815): Add ScrollView so we can scroll to errorMessage (#1815)
16+
- [#1752](https://github.com/MetaMask/metamask-mobile/pull/1752): Send caught errors to sentry (#1752)
17+
- [#1794](https://github.com/MetaMask/metamask-mobile/pull/1794): Feature/hide seedphrase on import (#1794)
18+
- [#1841](https://github.com/MetaMask/metamask-mobile/pull/1841): Fixing typo in onboarding flow (#1841)
19+
- [#1845](https://github.com/MetaMask/metamask-mobile/pull/1845): Share address from sidebar (#1845)
20+
- [#1835](https://github.com/MetaMask/metamask-mobile/pull/1835): UI/CustomGas: fix inconsistent low gas error (#1835)
21+
- [#1758](https://github.com/MetaMask/metamask-mobile/pull/1758): Fix wallet_scanQRCode rpc method (#1758)
22+
- [#1831](https://github.com/MetaMask/metamask-mobile/pull/1831): Get paste context working for password fields (onboarding) (#1831)
23+
- [#1837](https://github.com/MetaMask/metamask-mobile/pull/1837): Add gms:play-services-wallet (#1837)
24+
- [#1830](https://github.com/MetaMask/metamask-mobile/pull/1830): Use FlatList for scan steps modal (#1830)
25+
- [#1797](https://github.com/MetaMask/metamask-mobile/pull/1797): Bugfixes/post v1 aug 2020 (#1797)
26+
- [#1801](https://github.com/MetaMask/metamask-mobile/pull/1801): Update gradle (#1801)
27+
- [#1757](https://github.com/MetaMask/metamask-mobile/pull/1757): Add option to use Blockies Identicon and use Jazz Icons as default (#1757)
28+
- [#1816](https://github.com/MetaMask/metamask-mobile/pull/1816): Update about to inclue "Contact Us" link (#1816)
29+
- [#1775](https://github.com/MetaMask/metamask-mobile/pull/1775): WalletConnect: fix WC not respecting gas limit (#1775)
30+
- [#1800](https://github.com/MetaMask/metamask-mobile/pull/1800): Feature/improve nav browser title (#1800)
31+
- [#1781](https://github.com/MetaMask/metamask-mobile/pull/1781): Bugfix/Use translations for steps (#1781)
32+
- [#1759](https://github.com/MetaMask/metamask-mobile/pull/1759): Bugfix/Display correct balance from state when creating an account that already holds funds (#1759)
33+
- [#1728](https://github.com/MetaMask/metamask-mobile/pull/1728): Add /constants (#1728)
34+
- [#1787](https://github.com/MetaMask/metamask-mobile/pull/1787): Add missing currency conversions (#1787)
35+
36+
## v1.0.2 - Sept 2 2020
37+
- [#1812](https://github.com/MetaMask/metamask-mobile/pull/1812): Add logger on login (#1812)
38+
39+
## v1.0.1 - Sept 1 2020
640
- [#1795](https://github.com/MetaMask/metamask-mobile/pull/1795): Update react native aes crypto forked (#1795)
741
- [#1796](https://github.com/MetaMask/metamask-mobile/pull/1796): bugfix/mixpanel android in app notifications (#1796)
842

android/app/build.gradle

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
151151
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
152152
* and the benefits of using Hermes will therefore be sharply reduced.
153153
*/
154-
def enableHermes = project.ext.react.get("enableHermes", false);
154+
def enableHermes = project.ext.react.get("enableHermes", false)
155155

156156
android {
157157

@@ -166,8 +166,8 @@ android {
166166
applicationId "io.metamask"
167167
minSdkVersion rootProject.ext.minSdkVersion
168168
targetSdkVersion rootProject.ext.targetSdkVersion
169-
versionCode 35
170-
versionName "1.0.1"
169+
versionCode 37
170+
versionName "1.0.3"
171171
multiDexEnabled true
172172
testBuildType System.getProperty('testBuildType', 'debug')
173173
missingDimensionStrategy "minReactNative", "minReactNative46"
@@ -250,17 +250,19 @@ android {
250250
}
251251
}
252252

253-
dependencies {
253+
dependencies {
254254
implementation project(':lottie-react-native')
255255

256256
implementation project(':react-native-gesture-handler')
257-
258-
implementation 'androidx.multidex:multidex:2.0.0'
257+
258+
implementation 'androidx.multidex:multidex:2.0.1'
259259
implementation 'androidx.annotation:annotation:1.1.0'
260-
implementation 'androidx.appcompat:appcompat:1.0.0'
260+
implementation 'androidx.appcompat:appcompat:1.2.0'
261261
implementation "com.facebook.react:react-native:+" // From node_modules
262262
implementation 'org.chromium:v8-android:+'
263263

264+
implementation 'com.google.android.gms:play-services-wallet:18.0.0'
265+
264266
implementation "io.branch.sdk.android:library:5.+"
265267

266268
implementation 'com.mixpanel.android:mixpanel-android:5.+'
@@ -294,4 +296,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
294296
into 'libs'
295297
}
296298

297-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
299+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/app/src/main/java/io/metamask/MainApplication.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.metamask;
22

33
import com.facebook.react.ReactApplication;
4-
import com.reactnativecommunity.webviewforked.RNCWebViewForkedPackage;
54
import com.cmcewen.blurview.BlurViewPackage;
65
import android.content.Context;
76
import com.facebook.react.PackageList;

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ buildscript {
1616
}
1717

1818
dependencies {
19-
classpath("com.android.tools.build:gradle:3.5.2")
19+
classpath('com.android.tools.build:gradle:4.0.1')
2020
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
2121
// NOTE: Do not place your application dependencies here; they belong
2222
// in the individual module build.gradle files
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

android/settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
rootProject.name = 'MetaMask'
2-
include ':react-native-webview-forked'
3-
project(':react-native-webview-forked').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-webview-forked/android')
42
include ':@react-native-community_blur'
53
project(':@react-native-community_blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android')
64
include ':lottie-react-native'
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
show: jest.fn().mockImplementation(() => {
3+
console.log('show splash screen');
4+
}),
5+
hide: jest.fn().mockImplementation(() => {
6+
console.log('hide splash screen');
7+
})
8+
};

app/actions/settings/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@ export function setEnablePaymentChannels(paymentChannelsEnabled) {
3232
paymentChannelsEnabled
3333
};
3434
}
35+
36+
export function setUseBlockieIcon(useBlockieIcon) {
37+
return {
38+
type: 'SET_USE_BLOCKIE_ICON',
39+
useBlockieIcon
40+
};
41+
}

app/components/Nav/Main/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,7 @@ class Main extends PureComponent {
777777
Alert.alert(strings('transactions.transaction_error'), error && error.message, [
778778
{ text: strings('navigation.ok') }
779779
]);
780+
Logger.error(error, 'error while trying to send transaction (Main)');
780781
this.setState({ transactionHandled: false });
781782
}
782783
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`AccountInfoCard should render correctly 1`] = `
1313
}
1414
}
1515
>
16-
<Component
16+
<Connect(Component)
1717
address="0x0"
1818
customStyle={
1919
Object {
@@ -87,7 +87,7 @@ exports[`AccountInfoCard should render correctly 1`] = `
8787
>
8888
Balance:
8989
90-
0 undefined
90+
0 INR
9191
9292
(&lt; 0.00001 eth)
9393
</Text>

app/components/UI/AccountInfoCard/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class AccountInfoCard extends PureComponent {
100100
const balance = `(${renderFromWei(weiBalance)} ${getTicker(ticker)})`;
101101
const accountLabel = renderAccountName(selectedAddress, identities);
102102
const address = renderShortAddress(selectedAddress);
103-
const dollarBalance = weiToFiat(weiBalance, conversionRate, currentCurrency, 2);
103+
const dollarBalance = weiToFiat(weiBalance, conversionRate, currentCurrency, 2).toUpperCase();
104104
return (
105105
<View style={styles.accountInformation}>
106106
<Identicon address={selectedAddress} diameter={40} customStyle={styles.identicon} />

app/components/UI/AccountInfoCard/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ describe('AccountInfoCard', () => {
2525
}
2626
},
2727
CurrencyRateController: {
28-
conversionRate: 10
28+
conversionRate: 10,
29+
currentCurrency: 'inr'
2930
},
3031
NetworkController: {
3132
provider: {

app/components/UI/AccountList/AccountElement/index.js

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import { renderFromWei } from '../../../../util/number';
77
import { getTicker } from '../../../../util/transactions';
88
import { strings } from '../../../../../locales/i18n';
99
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
10+
import { connect } from 'react-redux';
11+
12+
const EMPTY = '0x0';
13+
const BALANCE_KEY = 'balance';
1014

1115
const styles = StyleSheet.create({
1216
account: {
@@ -76,7 +80,7 @@ const styles = StyleSheet.create({
7680
/**
7781
* View that renders specific account element in AccountList
7882
*/
79-
export default class AccountElement extends PureComponent {
83+
class AccountElement extends PureComponent {
8084
static propTypes = {
8185
/**
8286
* Callback to be called onPress
@@ -94,7 +98,11 @@ export default class AccountElement extends PureComponent {
9498
* Whether the account element should be disabled (opaque and not clickable)
9599
*/
96100
disabled: PropTypes.bool,
97-
item: PropTypes.object
101+
item: PropTypes.object,
102+
/**
103+
* Updated balance using stored in state
104+
*/
105+
updatedBalanceFromStore: PropTypes.string
98106
};
99107

100108
onPress = () => {
@@ -110,8 +118,8 @@ export default class AccountElement extends PureComponent {
110118
};
111119

112120
render() {
113-
const { disabled } = this.props;
114-
const { address, balance, ticker, name, isSelected, isImported, balanceError } = this.props.item;
121+
const { disabled, updatedBalanceFromStore } = this.props;
122+
const { address, ticker, name, isSelected, isImported, balanceError } = this.props.item;
115123
const selected = isSelected ? <Icon name="check-circle" size={30} color={colors.blue} /> : null;
116124
const imported = isImported ? (
117125
<View style={styles.importedWrapper}>
@@ -120,6 +128,7 @@ export default class AccountElement extends PureComponent {
120128
</Text>
121129
</View>
122130
) : null;
131+
123132
return (
124133
<TouchableOpacity
125134
style={[styles.account, disabled ? styles.disabledAccount : null]}
@@ -136,7 +145,7 @@ export default class AccountElement extends PureComponent {
136145
</Text>
137146
<View style={styles.accountBalanceWrapper}>
138147
<Text style={styles.accountBalance}>
139-
{renderFromWei(balance)} {getTicker(ticker)}
148+
{renderFromWei(updatedBalanceFromStore)} {getTicker(ticker)}
140149
</Text>
141150
{!!balanceError && (
142151
<Text style={[styles.accountBalance, styles.accountBalanceError]}>{balanceError}</Text>
@@ -150,3 +159,27 @@ export default class AccountElement extends PureComponent {
150159
);
151160
}
152161
}
162+
163+
const mapStateToProps = (
164+
{
165+
engine: {
166+
backgroundState: { PreferencesController, AccountTrackerController }
167+
}
168+
},
169+
{ item: { balance, address } }
170+
) => {
171+
const { selectedAddress } = PreferencesController;
172+
const { accounts } = AccountTrackerController;
173+
const selectedAccount = accounts[selectedAddress];
174+
const selectedAccountHasBalance =
175+
selectedAccount && Object.prototype.hasOwnProperty.call(selectedAccount, BALANCE_KEY);
176+
const updatedBalanceFromStore =
177+
balance === EMPTY && selectedAddress === address && selectedAccount && selectedAccountHasBalance
178+
? selectedAccount[BALANCE_KEY]
179+
: balance;
180+
return {
181+
updatedBalanceFromStore
182+
};
183+
};
184+
185+
export default connect(mapStateToProps)(AccountElement);

app/components/UI/AccountOverview/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class AccountOverview extends PureComponent {
228228
onPress={this.toggleAccountsModal}
229229
testID={'wallet-account-identicon'}
230230
>
231-
<Identicon address={address} size="38" noFadeIn={onboardingWizard} />
231+
<Identicon address={address} diameter={38} noFadeIn={onboardingWizard} />
232232
</TouchableOpacity>
233233
<View ref={this.editableLabelRef} style={styles.data} collapsable={false}>
234234
{accountLabelEditable ? (

app/components/UI/AssetOverview/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ const styles = StyleSheet.create({
4242
amount: {
4343
fontSize: 30,
4444
color: colors.fontPrimary,
45-
...fontStyles.normal
45+
...fontStyles.normal,
46+
textTransform: 'uppercase'
4647
},
4748
amountFiat: {
4849
fontSize: 18,
4950
color: colors.fontSecondary,
50-
...fontStyles.light
51+
...fontStyles.light,
52+
textTransform: 'uppercase'
5153
}
5254
});
5355

@@ -140,7 +142,7 @@ class AssetOverview extends PureComponent {
140142
render() {
141143
const {
142144
accounts,
143-
asset,
145+
asset: { address, isETH = undefined, decimals, symbol },
144146
primaryCurrency,
145147
selectedAddress,
146148
tokenExchangeRates,
@@ -149,26 +151,24 @@ class AssetOverview extends PureComponent {
149151
currentCurrency
150152
} = this.props;
151153
let mainBalance, secondaryBalance;
152-
const itemAddress = safeToChecksumAddress(asset.address);
154+
const itemAddress = safeToChecksumAddress(address);
153155
let balance, balanceFiat;
154-
if (asset.isETH) {
156+
if (isETH) {
155157
balance = renderFromWei(accounts[selectedAddress] && accounts[selectedAddress].balance);
156158
balanceFiat = weiToFiat(hexToBN(accounts[selectedAddress].balance), conversionRate, currentCurrency);
157159
} else {
158160
const exchangeRate = itemAddress in tokenExchangeRates ? tokenExchangeRates[itemAddress] : undefined;
159161
balance =
160-
itemAddress in tokenBalances
161-
? renderFromTokenMinimalUnit(tokenBalances[itemAddress], asset.decimals)
162-
: 0;
162+
itemAddress in tokenBalances ? renderFromTokenMinimalUnit(tokenBalances[itemAddress], decimals) : 0;
163163
balanceFiat = balanceToFiat(balance, conversionRate, exchangeRate, currentCurrency);
164164
}
165165
// choose balances depending on 'primaryCurrency'
166166
if (primaryCurrency === 'ETH') {
167-
mainBalance = `${balance} ${asset.symbol}`;
167+
mainBalance = `${balance} ${symbol}`;
168168
secondaryBalance = balanceFiat;
169169
} else {
170-
mainBalance = !balanceFiat ? `${balance} ${asset.symbol}` : balanceFiat;
171-
secondaryBalance = !balanceFiat ? balanceFiat : `${balance} ${asset.symbol}`;
170+
mainBalance = !balanceFiat ? `${balance} ${symbol}` : balanceFiat;
171+
secondaryBalance = !balanceFiat ? balanceFiat : `${balance} ${symbol}`;
172172
}
173173

174174
return (

app/components/UI/BackupAlert/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class BackupAlert extends PureComponent {
143143
inBrowserView ? styles.modalViewInBrowserView : styles.modalViewNotInBrowserView
144144
]}
145145
>
146-
<View style={styles.touchableView}>
146+
<View style={styles.touchableView} testID={'backup-alert'}>
147147
<View style={styles.backupAlertIconWrapper}>
148148
<EvilIcons name="bell" style={styles.backupAlertIcon} />
149149
</View>
@@ -156,7 +156,9 @@ class BackupAlert extends PureComponent {
156156
</Text>
157157
</TouchableOpacity>
158158
<TouchableOpacity onPress={this.props.backUpSeedphraseAlertNotVisible}>
159-
<Text style={styles.backupAlertMessage}>{strings('backup_alert.left_button')}</Text>
159+
<Text style={styles.backupAlertMessage} testID={'notification-remind-later-button'}>
160+
{strings('backup_alert.left_button')}
161+
</Text>
160162
</TouchableOpacity>
161163
</View>
162164
</View>

app/components/UI/CustomGas/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ class CustomGas extends PureComponent {
453453
const gasPriceBNWei = apiEstimateModifiedToWEI(gasPrice);
454454
const warningSufficientFunds = this.hasSufficientFunds(customGasLimitBN, gasPriceBNWei);
455455
let warningGasPrice;
456-
if (value < this.props.basicGasEstimates.safeLowGwei) warningGasPrice = strings('transaction.low_gas_price');
456+
if (parseInt(gasPrice) < parseInt(this.props.basicGasEstimates.safeLowGwei))
457+
warningGasPrice = strings('transaction.low_gas_price');
457458
if (!value || value === '' || !isDecimal(value) || value <= 0)
458459
warningGasPrice = strings('transaction.invalid_gas_price');
459460
if (gasPriceBNWei && !isBN(gasPriceBNWei)) warningGasPrice = strings('transaction.invalid_gas_price');

0 commit comments

Comments
 (0)