diff --git a/android/app/build.gradle b/android/app/build.gradle
index a634379c5f9..1d2e4cb89b6 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -174,8 +174,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 6
- versionName "0.1.5"
+ versionCode 7
+ versionName "0.1.6"
multiDexEnabled true
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy "minReactNative", "minReactNative46"
diff --git a/app/components/Views/ImportWallet/index.js b/app/components/Views/ImportWallet/index.js
index 1e3c8791c63..a41be3a5c64 100644
--- a/app/components/Views/ImportWallet/index.js
+++ b/app/components/Views/ImportWallet/index.js
@@ -155,10 +155,17 @@ class ImportWallet extends Component {
showQrCode = () => {
this.props.navigation.push('QRScanner', {
onScanSuccess: data => {
- const result = data.content.replace('metamask-sync:', '').split('|@|');
- this.channelName = result[0];
- this.cipherKey = result[1];
- this.initWebsockets();
+ if (data.content && data.content.search('metamask-sync:') !== -1) {
+ const result = data.content.replace('metamask-sync:', '').split('|@|');
+ this.channelName = result[0];
+ this.cipherKey = result[1];
+ this.initWebsockets();
+ } else {
+ Alert.alert(
+ strings('sync_with_extension.invalid_qr_code'),
+ strings('sync_with_extension.invalid_qr_code_desc')
+ );
+ }
}
});
};
diff --git a/app/components/Views/SyncWithExtension/index.js b/app/components/Views/SyncWithExtension/index.js
index 1977efc366b..941a92c842b 100644
--- a/app/components/Views/SyncWithExtension/index.js
+++ b/app/components/Views/SyncWithExtension/index.js
@@ -141,10 +141,17 @@ class SyncWithExtension extends Component {
showQrCode = () => {
this.props.navigation.push('QRScanner', {
onScanSuccess: data => {
- const result = data.content.replace('metamask-sync:', '').split('|@|');
- this.channelName = result[0];
- this.cipherKey = result[1];
- this.initWebsockets();
+ if (data.content && data.content.search('metamask-sync:') !== -1) {
+ const result = data.content.replace('metamask-sync:', '').split('|@|');
+ this.channelName = result[0];
+ this.cipherKey = result[1];
+ this.initWebsockets();
+ } else {
+ Alert.alert(
+ strings('sync_with_extension.invalid_qr_code'),
+ strings('sync_with_extension.invalid_qr_code_desc')
+ );
+ }
}
});
};
diff --git a/ios/MetaMask/Info.plist b/ios/MetaMask/Info.plist
index d1c6027c94b..f8d5e891300 100644
--- a/ios/MetaMask/Info.plist
+++ b/ios/MetaMask/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.1.5
+ 0.1.6
CFBundleSignature
????
CFBundleURLTypes
diff --git a/locales/en.json b/locales/en.json
index 0ca94c46360..d87a344f592 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -422,7 +422,9 @@
"warning_title": "Warning!",
"warning_message": "This will override all your current accounts and transaction history in your mobile phone. Are you sure?",
"warning_ok_button": "YES",
- "warning_cancel_button": "NO"
+ "warning_cancel_button": "NO",
+ "invalid_qr_code": "Invalid QR Code",
+ "invalid_qr_code_desc": "This isn't the right QR code! To sync with your browser extension, go to Settings --> Sync with Mobile in the browser extension and scan the QR there"
},
"sync_with_extension_success": {
"title": "Sync completed",
diff --git a/locales/es.json b/locales/es.json
index aa615fd669d..2a3f07a9cc3 100644
--- a/locales/es.json
+++ b/locales/es.json
@@ -419,7 +419,9 @@
"warning_title": "Advertencia!",
"warning_message": "Esto eliminará todas tus cuentas y historial de transactiones en tu dispositivo. Estás seguro?",
"warning_ok_button": "SI",
- "warning_cancel_button": "NO"
+ "warning_cancel_button": "NO",
+ "invalid_qr_code": "Código QR inválido",
+ "invalid_qr_code_desc": "Este no es el código QR correcto! Para sincronizar con la extensión del navegador, accede a Ajustes --> Syncronizar con el móvil en la extensión del navegador y escanea el código QR que aparece ahí"
},
"sync_with_extension_success": {
"title": "Sincronización completa",
diff --git a/package.json b/package.json
index aad1c723aed..a082eef9c21 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "metamask",
- "version": "0.1.5",
+ "version": "0.1.6",
"private": true,
"scripts": {
"restart-packager-clean": "watchman watch-del-all && rm -rf $TMPDIR/react-* && npm start -- --reset-cache",