diff --git a/src/libs/actions/Inbox.js b/src/libs/actions/Inbox.js index 84662dba8a2b..4bd92abdf0bf 100644 --- a/src/libs/actions/Inbox.js +++ b/src/libs/actions/Inbox.js @@ -1,5 +1,6 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; +import * as API from '../API'; import * as DeprecatedAPI from '../deprecatedAPI'; import Growl from '../Growl'; import * as Localize from '../Localize'; @@ -46,14 +47,11 @@ function requestInboxCall({ }); } -function getInboxCallWaitTime() { - DeprecatedAPI.Inbox_CallUser_WaitTime() - .then((data) => { - Onyx.set(ONYXKEYS.INBOX_CALL_USER_WAIT_TIME, data.waitTime); - }); +function openRequestCallPage() { + API.read('OpenRequestCallPage'); } export { requestInboxCall, - getInboxCallWaitTime, + openRequestCallPage, }; diff --git a/src/libs/deprecatedAPI.js b/src/libs/deprecatedAPI.js index d154ee6c0472..67333741f0a7 100644 --- a/src/libs/deprecatedAPI.js +++ b/src/libs/deprecatedAPI.js @@ -843,15 +843,6 @@ function Inbox_CallUser(parameters) { return Network.post(commandName, parameters); } -/** - * Get the current wait time in minutes for an inbox call - * @returns {Promise} - */ -function Inbox_CallUser_WaitTime() { - const commandName = 'Inbox_CallUser_WaitTime'; - return Network.post(commandName); -} - /** * @param {Object} parameters * @param {String} parameters.reportIDList @@ -952,7 +943,6 @@ export { GetRequestCountryCode, Graphite_Timer, Inbox_CallUser, - Inbox_CallUser_WaitTime, PayIOU, PayWithWallet, PersonalDetails_GetForEmails, diff --git a/src/pages/RequestCallPage.js b/src/pages/RequestCallPage.js index b42ecfc57332..84617412d833 100644 --- a/src/pages/RequestCallPage.js +++ b/src/pages/RequestCallPage.js @@ -234,7 +234,7 @@ class RequestCallPage extends Component { return; } - Inbox.getInboxCallWaitTime(); + Inbox.openRequestCallPage(); } validatePhoneInput() {