Merge pull request #2411 from BlueWallet/modalmultisiug

FIX: Hide modal when scanning
This commit is contained in:
GLaDOS 2020-12-23 19:06:51 +00:00 committed by GitHub
commit decc881f99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -311,7 +311,6 @@ const WalletsAddMultisigStep2 = () => {
};
const onBarScanned = ret => {
setIsProvideMnemonicsModalVisible(false);
if (!isDesktop) navigation.dangerouslyGetParent().pop();
if (!ret.data) ret = { data: ret };
if (ret.data.toUpperCase().startsWith('UR')) {
@ -322,7 +321,7 @@ const WalletsAddMultisigStep2 = () => {
} else {
let cosigner = new MultisigCosigner(ret.data);
if (!cosigner.isValid()) return alert(loc.multisig.invalid_cosigner);
setIsProvideMnemonicsModalVisible(false);
if (cosigner.howManyCosignersWeHave() > 1) {
// lets look for the correct cosigner. thats probably gona be the one with specific corresponding path,
// for example m/48'/0'/0'/2' if user chose to setup native segwit in BW
@ -390,8 +389,9 @@ const WalletsAddMultisigStep2 = () => {
const scanOrOpenFile = () => {
if (isDesktop) {
fs.showActionSheet().then(data => onBarScanned({ data }));
fs.showActionSheet().then(onBarScanned);
} else {
setIsProvideMnemonicsModalVisible(false);
navigation.navigate('ScanQRCodeRoot', {
screen: 'ScanQRCode',
params: {