From e9b2b20efaf5a71eebd5e3cc4397e9314044b29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Thu, 16 Sep 2021 23:28:33 -0400 Subject: [PATCH] FIX: Add timeouts for modal navigation --- App.js | 2 +- .../BlueWalletWatch (Notification).xcscheme | 25 ++++------------ .../xcschemes/BlueWalletWatch.xcscheme | 25 ++++------------ screen/wallets/addMultisigStep2.js | 18 ++++++----- screen/wallets/viewEditMultisigCosigners.js | 30 +++++++++++-------- 5 files changed, 41 insertions(+), 59 deletions(-) diff --git a/App.js b/App.js index 15eeae204..b5f48242b 100644 --- a/App.js +++ b/App.js @@ -333,7 +333,7 @@ const App = () => { onPress={async () => { setIsClipboardContentModalVisible(false); const clipboard = await BlueClipboard.getClipboardContent(); - setTimeout(() => handleOpenURL({ url: clipboard }), 100); + setTimeout(() => handleOpenURL({ url: clipboard }), 650); }} /> diff --git a/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch (Notification).xcscheme b/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch (Notification).xcscheme index 78505ec4c..ce67c26c8 100644 --- a/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch (Notification).xcscheme +++ b/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch (Notification).xcscheme @@ -65,10 +65,8 @@ allowLocationSimulation = "YES" launchAutomaticallySubstyle = "8" notificationPayloadFile = "BlueWalletWatch Extension/PushNotificationPayload.apns"> - + - + - + - - - - - + diff --git a/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme b/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme index 876b91430..772e95fd0 100644 --- a/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme +++ b/ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme @@ -64,10 +64,8 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" notificationPayloadFile = "BlueWalletWatch Extension/PushNotificationPayload.apns"> - + - + - + - - - - - + diff --git a/screen/wallets/addMultisigStep2.js b/screen/wallets/addMultisigStep2.js index 6139264c5..1aca74911 100644 --- a/screen/wallets/addMultisigStep2.js +++ b/screen/wallets/addMultisigStep2.js @@ -412,13 +412,17 @@ const WalletsAddMultisigStep2 = () => { fs.showActionSheet({ anchor: findNodeHandle(openScannerButton.current) }).then(onBarScanned); } else { setIsProvideMnemonicsModalVisible(false); - navigation.navigate('ScanQRCodeRoot', { - screen: 'ScanQRCode', - params: { - onBarScanned: onBarScanned, - showFileImportButton: true, - }, - }); + setTimeout( + () => + navigation.navigate('ScanQRCodeRoot', { + screen: 'ScanQRCode', + params: { + onBarScanned: onBarScanned, + showFileImportButton: true, + }, + }), + 650, + ); } }; diff --git a/screen/wallets/viewEditMultisigCosigners.js b/screen/wallets/viewEditMultisigCosigners.js index 5a609d489..1454b3dfc 100644 --- a/screen/wallets/viewEditMultisigCosigners.js +++ b/screen/wallets/viewEditMultisigCosigners.js @@ -463,19 +463,23 @@ const ViewEditMultisigCosigners = () => { }); } else { setIsProvideMnemonicsModalVisible(false); - navigate('ScanQRCodeRoot', { - screen: 'ScanQRCode', - params: { - launchedBy: route.name, - onBarScanned: result => { - // Triggers FlatList re-render - setImportText(result); - // - _handleUseMnemonicPhrase(result); - }, - showFileImportButton: true, - }, - }); + setTimeout( + () => + navigate('ScanQRCodeRoot', { + screen: 'ScanQRCode', + params: { + launchedBy: route.name, + onBarScanned: result => { + // Triggers FlatList re-render + setImportText(result); + // + _handleUseMnemonicPhrase(result); + }, + showFileImportButton: true, + }, + }), + 650, + ); } };