Skip to content

Commit 8d5bec6

Browse files
authored
Release 1.0.8
Release 1.0.8
2 parents af7c39f + 326df28 commit 8d5bec6

File tree

31 files changed

+101
-48
lines changed

31 files changed

+101
-48
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Current Develop Branch
44

5+
## v1.0.8 - Dec 2 2020
6+
- [#2040](https://github.com/MetaMask/metamask-mobile/pull/2040): Update vault error message (#2040)
7+
- [#2034](https://github.com/MetaMask/metamask-mobile/pull/2034): Fix asyncstorage limit (#2034)
8+
- [#2038](https://github.com/MetaMask/metamask-mobile/pull/2038): metamask wc deeplink (#2038)
9+
- [#2023](https://github.com/MetaMask/metamask-mobile/pull/2023): @metamask/contract-metadata (#2023)
10+
- [#2019](https://github.com/MetaMask/metamask-mobile/pull/2019): bugfix/qr code (#2019)
11+
- [#2008](https://github.com/MetaMask/metamask-mobile/pull/2008): Add Apple Pay correct label (#2008)
12+
513
## v1.0.7 - Nov 17 2020
614
- [#2005](https://github.com/MetaMask/metamask-mobile/pull/2005): Fix activeTabUrl (#2005)
715
- [#2003](https://github.com/MetaMask/metamask-mobile/pull/2003): Bugfix/android choose password (#2003)

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ android {
166166
applicationId "io.metamask"
167167
minSdkVersion rootProject.ext.minSdkVersion
168168
targetSdkVersion rootProject.ext.targetSdkVersion
169-
versionCode 40
170-
versionName "1.0.7"
169+
versionCode 41
170+
versionName "1.0.8"
171171
multiDexEnabled true
172172
testBuildType System.getProperty('testBuildType', 'debug')
173173
missingDimensionStrategy "minReactNative", "minReactNative46"

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
import androidx.multidex.MultiDexApplication;
2222

23+
import android.database.CursorWindow;
24+
import java.lang.reflect.Field;
2325

2426
public class MainApplication extends MultiDexApplication implements ShareApplication, ReactApplication {
2527

@@ -55,6 +57,15 @@ public ReactNativeHost getReactNativeHost() {
5557
@Override
5658
public void onCreate() {
5759
super.onCreate();
60+
61+
try {
62+
Field field = CursorWindow.class.getDeclaredField("sCursorWindowSize");
63+
field.setAccessible(true);
64+
field.set(null, 10 * 1024 * 1024); //the 10MB is the new size
65+
} catch (Exception e) {
66+
e.printStackTrace();
67+
}
68+
5869
if (BuildConfig.DEBUG)
5970
{ WebView.setWebContentsDebuggingEnabled(true); }
6071
SoLoader.init(this, /* native exopackage */ false);

app/components/Base/RemoteImage/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ exports[`RemoteImage should render correctly 1`] = `
1111
height="100%"
1212
source={
1313
Object {
14-
"uri": "https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg",
14+
"uri": "https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/dai.svg",
1515
}
1616
}
17-
uri="https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg"
17+
uri="https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/dai.svg"
1818
width="100%"
1919
/>
2020
</View>

app/components/Base/RemoteImage/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('RemoteImage', () => {
77
const wrapper = shallow(
88
<RemoteImage
99
source={{
10-
uri: `https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/master/images/dai.svg`
10+
uri: `https://raw.githubusercontent.com/MetaMask/contract-metadata/master/images/dai.svg`
1111
}}
1212
/>
1313
);

app/components/Nav/Main/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
import { BN, isValidAddress } from 'ethereumjs-util';
4444
import { isENS, safeToChecksumAddress } from '../../../util/address';
4545
import Logger from '../../../util/Logger';
46-
import contractMap from 'eth-contract-metadata';
46+
import contractMap from '@metamask/contract-metadata';
4747
import MessageSign from '../../UI/MessageSign';
4848
import Approve from '../../Views/ApproveView/Approve';
4949
import TransactionTypes from '../../../core/TransactionTypes';

app/components/UI/ApproveTransactionReview/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getApproveNavbar } from '../../UI/Navbar';
77
import { colors, fontStyles, baseStyles } from '../../../styles/common';
88
import { connect } from 'react-redux';
99
import { getHost } from '../../../util/browser';
10-
import contractMap from 'eth-contract-metadata';
10+
import contractMap from '@metamask/contract-metadata';
1111
import { safeToChecksumAddress, renderShortAddress } from '../../../util/address';
1212
import Engine from '../../../core/Engine';
1313
import { strings } from '../../../../locales/i18n';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`AssetIcon should render correctly 1`] = `
1010
}
1111
source={
1212
Object {
13-
"uri": "https://raw.githubusercontent.com/metamask/eth-contract-metadata/v1.16.0/images/metamark.svg",
13+
"uri": "https://raw.githubusercontent.com/metamask/contract-metadata/v1.19.0/images/metamark.svg",
1414
}
1515
}
1616
style={

app/components/UI/AssetIcon/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AssetIcon.propTypes = {
2929
*/
3030
logo: PropTypes.string,
3131
/**
32-
* Whether logo has to be fetched from eth-contract-metadata
32+
* Whether logo has to be fetched from @metamask/contract-metadata
3333
*/
3434
watchedAsset: PropTypes.bool,
3535
/**

app/components/UI/AssetSearch/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { TextInput, View, StyleSheet } from 'react-native';
33
import { colors, fontStyles } from '../../../styles/common';
44
import PropTypes from 'prop-types';
55
import { strings } from '../../../../locales/i18n';
6-
import contractMap from 'eth-contract-metadata';
6+
import contractMap from '@metamask/contract-metadata';
77
import Fuse from 'fuse.js';
88
import Icon from 'react-native-vector-icons/FontAwesome';
99

app/components/UI/FiatOrders/orderProcessor/wyreApplePay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ const getPaymentDetails = (cryptoCurrency, amount, fee, total) => ({
297297
],
298298
total: {
299299
amount: { currency: USD_CURRENCY_CODE, value: `${total}` },
300-
label: 'Wyre'
300+
label: strings('fiat_on_ramp.wyre_total_label')
301301
}
302302
});
303303

app/components/UI/PaymentRequest/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { connect } from 'react-redux';
1313
import { colors, fontStyles, baseStyles } from '../../../styles/common';
1414
import { getPaymentRequestOptionsTitle } from '../../UI/Navbar';
1515
import FeatherIcon from 'react-native-vector-icons/Feather';
16-
import contractMap from 'eth-contract-metadata';
16+
import contractMap from '@metamask/contract-metadata';
1717
import Fuse from 'fuse.js';
1818
import AssetList from './AssetList';
1919
import PropTypes from 'prop-types';

app/components/UI/TokenImage/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import { StyleSheet, View } from 'react-native';
44
import AssetIcon from '../AssetIcon';
55
import Identicon from '../Identicon';
6-
import contractMap from 'eth-contract-metadata';
6+
import contractMap from '@metamask/contract-metadata';
77
import { toChecksumAddress } from 'ethereumjs-util';
88

99
const styles = StyleSheet.create({

app/components/UI/Tokens/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import TokenImage from '../TokenImage';
55
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
66
import { colors, fontStyles } from '../../../styles/common';
77
import { strings } from '../../../../locales/i18n';
8-
import contractMap from 'eth-contract-metadata';
8+
import contractMap from '@metamask/contract-metadata';
99
import ActionSheet from 'react-native-actionsheet';
1010
import { renderFromTokenMinimalUnit, balanceToFiat } from '../../../util/number';
1111
import Engine from '../../../core/Engine';

app/components/UI/TransactionEditor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { getBasicGasEstimates, apiEstimateModifiedToWEI } from '../../../util/cu
1515
import { setTransactionObject } from '../../../actions/transaction';
1616
import Engine from '../../../core/Engine';
1717
import collectiblesTransferInformation from '../../../util/collectibles-transfer';
18-
import contractMap from 'eth-contract-metadata';
18+
import contractMap from '@metamask/contract-metadata';
1919
import PaymentChannelsClient from '../../../core/PaymentChannelsClient';
2020
import { safeToChecksumAddress } from '../../../util/address';
2121
import TransactionTypes from '../../../core/TransactionTypes';

app/components/UI/TransactionElement/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
getActionKey,
2323
TRANSACTION_TYPES
2424
} from '../../../util/transactions';
25-
import contractMap from 'eth-contract-metadata';
25+
import contractMap from '@metamask/contract-metadata';
2626
import { toChecksumAddress } from 'ethereumjs-util';
2727

2828
const {

app/components/UI/TransactionReview/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
} from '../../../util/number';
2121
import { safeToChecksumAddress } from '../../../util/address';
2222
import Device from '../../../util/Device';
23-
import contractMap from 'eth-contract-metadata';
23+
import contractMap from '@metamask/contract-metadata';
2424
import DefaultTabBar from 'react-native-scrollable-tab-view/DefaultTabBar';
2525
import TransactionReviewInformation from './TransactionReviewInformation';
2626
import TransactionReviewSummary from './TransactionReviewSummary';

app/components/Views/BrowserTab/index.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,12 +1059,10 @@ export const BrowserTab = props => {
10591059

10601060
props.updateTabInfo(getMaskedUrl(siteInfo.url), props.id);
10611061

1062-
if (type !== 'start') {
1063-
props.addToBrowserHistory({
1064-
name: siteInfo.title,
1065-
url: getMaskedUrl(siteInfo.url)
1066-
});
1067-
}
1062+
props.addToBrowserHistory({
1063+
name: siteInfo.title,
1064+
url: getMaskedUrl(siteInfo.url)
1065+
});
10681066
};
10691067

10701068
/**
@@ -1187,6 +1185,7 @@ export const BrowserTab = props => {
11871185
* When website finished loading
11881186
*/
11891187
const onLoadEnd = ({ nativeEvent }) => {
1188+
if (nativeEvent.loading) return;
11901189
const { current } = webviewRef;
11911190

11921191
current && current.injectJavaScript(JS_WEBVIEW_URL);
@@ -1197,7 +1196,9 @@ export const BrowserTab = props => {
11971196
const promise = current ? new Promise(promiseResolver) : Promise.resolve(url.current);
11981197

11991198
promise.then(info => {
1200-
if (info.url === nativeEvent.url) {
1199+
const { hostname: currentHostname } = new URL(url.current);
1200+
const { hostname } = new URL(nativeEvent.url);
1201+
if (info.url === nativeEvent.url && currentHostname === hostname) {
12011202
changeUrl({ ...nativeEvent, icon: info.icon }, 'end-promise');
12021203
}
12031204
});
@@ -1206,7 +1207,9 @@ export const BrowserTab = props => {
12061207
/**
12071208
* Handle message from website
12081209
*/
1209-
const onMessage = ({ nativeEvent: { data } }) => {
1210+
const onMessage = ({ nativeEvent }) => {
1211+
let data = nativeEvent.data;
1212+
12101213
try {
12111214
data = typeof data === 'string' ? JSON.parse(data) : data;
12121215
if (!data || (!data.type && !data.name)) {
@@ -1232,9 +1235,12 @@ export const BrowserTab = props => {
12321235
onFrameLoadStarted(url);
12331236
break;
12341237
}*/
1235-
case 'GET_WEBVIEW_URL':
1236-
webviewUrlPostMessagePromiseResolve.current &&
1237-
webviewUrlPostMessagePromiseResolve.current(data.payload);
1238+
case 'GET_WEBVIEW_URL': {
1239+
const { url } = data.payload;
1240+
if (url === nativeEvent.url)
1241+
webviewUrlPostMessagePromiseResolve.current &&
1242+
webviewUrlPostMessagePromiseResolve.current(data.payload);
1243+
}
12381244
}
12391245
} catch (e) {
12401246
Logger.error(e, `Browser::onMessage on ${url.current}`);

app/components/Views/Login/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ const styles = StyleSheet.create({
101101
}
102102
});
103103

104+
/* TODO: we should have translation strings for these */
104105
const PASSCODE_NOT_SET_ERROR = 'Error: Passcode not set.';
105106
const WRONG_PASSWORD_ERROR = 'Error: Decrypt failed';
106107
const WRONG_PASSWORD_ERROR_ANDROID = 'Error: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT';
108+
const VAULT_ERROR = 'Error: Cannot unlock without a previous vault.';
109+
const CLEAN_VAULT_ERROR =
110+
'MetaMask encountered an error due to reaching a storage limit. The local data has been corrupted. Please reinstall MetaMask and restore with your seed phrase.';
107111

108112
/**
109113
* View where returning users can authenticate
@@ -234,6 +238,11 @@ class Login extends PureComponent {
234238
'In order to proceed, you need to turn Passcode on or any biometrics authentication method supported in your device (FaceID, TouchID or Fingerprint)'
235239
);
236240
this.setState({ loading: false });
241+
} else if (error.toLowerCase() === VAULT_ERROR.toLowerCase()) {
242+
this.setState({
243+
loading: false,
244+
error: CLEAN_VAULT_ERROR
245+
});
237246
} else {
238247
this.setState({ loading: false, error });
239248
}

app/components/Views/PaymentChannel/PaymentChannelDeposit/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
import { renderAccountName } from '../../../../util/address';
3434
import Identicon from '../../../UI/Identicon';
3535
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
36-
import contractMap from 'eth-contract-metadata';
36+
import contractMap from '@metamask/contract-metadata';
3737
import AssetIcon from '../../../UI/AssetIcon';
3838
import { getTicker } from '../../../../util/transactions';
3939
import Device from '../../../../util/Device';

app/components/Views/Send/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { resetTransaction, setTransactionObject } from '../../../actions/transac
1414
import { toggleDappTransactionModal } from '../../../actions/modals';
1515
import NotificationManager from '../../../core/NotificationManager';
1616
import NetworkList, { getNetworkTypeById } from '../../../util/networks';
17-
import contractMap from 'eth-contract-metadata';
17+
import contractMap from '@metamask/contract-metadata';
1818
import { showAlert } from '../../../actions/alert';
1919
import Analytics from '../../../core/Analytics';
2020
import { ANALYTICS_EVENT_OPTS } from '../../../util/analytics';

app/components/Views/TransactionDirection/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { colors, fontStyles } from '../../../styles/common';
66
import { connect } from 'react-redux';
77
import { safeToChecksumAddress, renderAccountName } from '../../../util/address';
88
import { getNormalizedTxState } from '../../../util/transactions';
9-
import contractMap from 'eth-contract-metadata';
9+
import contractMap from '@metamask/contract-metadata';
1010
import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
1111
import Identicon from '../../UI/Identicon';
1212
import { strings } from '../../../../locales/i18n';

app/core/DeeplinkManager.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ class DeeplinkManager {
3333
}
3434

3535
const functionName = ethUrl.function_name;
36-
if (!functionName || functionName === 'transfer') {
36+
if (!functionName) {
3737
const txMeta = { ...ethUrl, source: url };
38-
if (ethUrl.parameters?.value || ethUrl.parameters?.uint256) {
38+
if (ethUrl.parameters?.value) {
3939
this.navigation.navigate('SendView', {
40-
txMeta: { ...txMeta, action: !functionName ? 'send-eth' : 'send-token' }
40+
txMeta: { ...txMeta, action: 'send-eth' }
4141
});
4242
} else {
4343
this.navigation.navigate('SendFlowView', { txMeta });
4444
}
45+
} else if (functionName === 'transfer') {
46+
const txMeta = { ...ethUrl, source: url };
47+
this.navigation.navigate('SendView', {
48+
txMeta: { ...txMeta, action: 'send-token' }
49+
});
4550
} else if (functionName === 'approve') {
4651
// add approve transaction
4752
const {
@@ -92,7 +97,6 @@ class DeeplinkManager {
9297
const handled = () => onHandled?.();
9398

9499
const { MM_UNIVERSAL_LINK_HOST } = AppConstants;
95-
96100
switch (urlObj.protocol.replace(':', '')) {
97101
case 'http':
98102
case 'https':
@@ -170,6 +174,14 @@ class DeeplinkManager {
170174
// For ex. go to settings
171175
case 'metamask':
172176
handled();
177+
if (urlObj.origin === 'metamask://wc') {
178+
const cleanUrlObj = new URL(urlObj.query.replace('?uri=', ''));
179+
const href = cleanUrlObj.href;
180+
if (!WalletConnect.isValidUri(href)) return;
181+
const redirect = params && params.redirect;
182+
const autosign = params && params.autosign;
183+
WalletConnect.newSession(href, redirect, autosign);
184+
}
173185
break;
174186
default:
175187
return false;

app/core/Engine.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import AppConstants from './AppConstants';
2727
import { store } from '../store';
2828
import { renderFromTokenMinimalUnit, balanceToFiatNumber, weiToFiatNumber } from '../util/number';
2929
import NotificationManager from './NotificationManager';
30-
import contractMap from 'eth-contract-metadata';
30+
import contractMap from '@metamask/contract-metadata';
3131
import Logger from '../util/Logger';
3232
import { LAST_INCOMING_TX_BLOCK_INFO } from '../constants/storage';
3333

app/util/assets.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* Utility function to return corresponding eth-contract-metadata logo
2+
* Utility function to return corresponding @metamask/contract-metadata logo
33
*
4-
* @param {string} logo - Logo path from eth-contract-metadata
4+
* @param {string} logo - Logo path from @metamask/contract-metadata
55
*/
66
export default function getAssetLogoPath(logo) {
77
if (!logo) return;
8-
const path = 'https://raw.githubusercontent.com/metamask/eth-contract-metadata/v1.16.0/images/';
8+
const path = 'https://raw.githubusercontent.com/metamask/contract-metadata/v1.19.0/images/';
99
const uri = path + logo;
1010
return uri;
1111
}

app/util/transactions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { addHexPrefix, toChecksumAddress, BN } from 'ethereumjs-util';
22
import { rawEncode, rawDecode } from 'ethereumjs-abi';
33
import Engine from '../core/Engine';
44
import { strings } from '../../locales/i18n';
5-
import contractMap from 'eth-contract-metadata';
5+
import contractMap from '@metamask/contract-metadata';
66
import { safeToChecksumAddress } from './address';
77
import { util } from '@metamask/controllers';
88
import { hexToBN } from './number';

0 commit comments

Comments
 (0)