Merge pull request #4789 from BlueWallet/fix-4244

FIX: cant open block explorer in browser (closes #4244)
This commit is contained in:
GLaDOS 2022-06-09 22:23:56 +01:00 committed by GitHub
commit ea9635d1df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View file

@ -101,4 +101,14 @@
<meta-data android:name="com.bugsnag.android.API_KEY" android:value="17ba9059f676f1cc4f45d98182388b01" />
</application>
<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="http"/>
</intent>
</queries>
</manifest>

View file

@ -1,6 +1,6 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ScrollView, View, StyleSheet } from 'react-native';
import { ScrollView, View, StyleSheet, Linking } from 'react-native';
import wif from 'wif';
import bip38 from 'bip38';
import BIP32Factory from 'bip32';
@ -241,6 +241,14 @@ export default class Selftest extends Component {
}
//
if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {
assertStrictEqual(await Linking.canOpenURL('https://github.com/BlueWallet/BlueWallet/'), true, 'Linking can not open https url');
} else {
// skipping RN-specific test'
}
//
} catch (Err) {
errorMessage += Err;
isOk = false;