diff --git a/e2e/ganacheTransactionFlow.spec.js b/e2e/ganacheTransactionFlow.spec.js index a0516b81548..985f7cefa42 100644 --- a/e2e/ganacheTransactionFlow.spec.js +++ b/e2e/ganacheTransactionFlow.spec.js @@ -73,6 +73,18 @@ describe('Ganache Transaction Flow', () => { await Helpers.checkIfVisible('developer-settings-modal'); }); + if (device.getPlatform() === 'ios') { + it('Should show Applied alert after pressing Alert', async () => { + await Helpers.tap('alert-section'); + await Helpers.delay(5000); + await Helpers.checkIfElementByTextIsVisible('APPLIED'); + await Helpers.delay(1000); + await Helpers.tapAlertWithButton('OK'); + await Helpers.checkIfVisible('developer-settings-modal'); + await Helpers.delay(2000); + }); + } + it('Should show Ganache Toast after pressing Connect To Ganache', async () => { await Helpers.tap('ganache-section'); await Helpers.delay(10000); diff --git a/src/components/settings-menu/DevSection.js b/src/components/settings-menu/DevSection.js index 7ef0b4705b4..e1ec9d11548 100644 --- a/src/components/settings-menu/DevSection.js +++ b/src/components/settings-menu/DevSection.js @@ -45,6 +45,19 @@ const DevSection = () => { navigate(Routes.PROFILE_SCREEN); }, [navigate]); + const checkAlert = useCallback(async () => { + try { + const request = await fetch( + 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest' + ); + // eslint-disable-next-line no-unused-vars + const response = request.json(); + Alert.alert('Status', 'NOT APPLIED'); + } catch (e) { + Alert.alert('Status', 'APPLIED'); + } + }, []); + const removeBackups = async () => { const newWallets = { ...wallets }; Object.keys(newWallets).forEach(key => { @@ -86,6 +99,7 @@ const DevSection = () => { onPress={connectToGanache} testID="ganache-section" /> + {Object.keys(config)