From 4adb59c36b9ac7d24ca0007ac8ebccd3660e3b8d Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Fri, 8 Jul 2022 16:26:03 +0530 Subject: [PATCH 1/2] removed usage of fetchCountryCodeByRequestIP --- src/libs/actions/App.js | 1 - src/libs/actions/GeoLocation.js | 18 ------------------ 2 files changed, 19 deletions(-) delete mode 100644 src/libs/actions/GeoLocation.js diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 4196ea1c3c19..7135dedbf4cb 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -96,7 +96,6 @@ function getAppData(shouldSyncPolicyList = true) { User.getBetas(); User.getDomainInfo(); PersonalDetails.fetchLocalCurrency(); - GeoLocation.fetchCountryCodeByRequestIP(); BankAccounts.fetchUserWallet(); if (shouldSyncPolicyList) { diff --git a/src/libs/actions/GeoLocation.js b/src/libs/actions/GeoLocation.js deleted file mode 100644 index dcf9e9a459bc..000000000000 --- a/src/libs/actions/GeoLocation.js +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable import/prefer-default-export */ -import Onyx from 'react-native-onyx'; -import * as DeprecatedAPI from '../deprecatedAPI'; -import ONYXKEYS from '../../ONYXKEYS'; - -/** - * Makes a request so that we can get the current country code by the users IP address. - */ -function fetchCountryCodeByRequestIP() { - DeprecatedAPI.GetRequestCountryCode() - .then((data) => { - Onyx.merge(ONYXKEYS.COUNTRY_CODE, data.countryCode || 1); - }); -} - -export { - fetchCountryCodeByRequestIP, -}; From d257f67635b35d2cad2b9076de3845f34f3ca8e1 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Mon, 11 Jul 2022 15:22:35 +0530 Subject: [PATCH 2/2] removed import of Geolocation --- src/libs/actions/App.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 7135dedbf4cb..6792392cae60 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -12,7 +12,6 @@ import Timing from './Timing'; import * as PersonalDetails from './PersonalDetails'; import * as User from './User'; import * as Report from './Report'; -import * as GeoLocation from './GeoLocation'; import * as BankAccounts from './BankAccounts'; import * as Policy from './Policy'; import NetworkConnection from '../NetworkConnection';