Skip to content

Commit

Permalink
Merge pull request #9220 from Expensify/nat-requestcallpage
Browse files Browse the repository at this point in the history
[NewDot API] Command Refactor - Inbox_CallUser_WaitTime
  • Loading branch information
MariaHCD authored Jun 1, 2022
2 parents d18d7bc + 5e1f26b commit 9a28393
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
10 changes: 4 additions & 6 deletions src/libs/actions/Inbox.js
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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,
};
10 changes: 0 additions & 10 deletions src/libs/deprecatedAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -952,7 +943,6 @@ export {
GetRequestCountryCode,
Graphite_Timer,
Inbox_CallUser,
Inbox_CallUser_WaitTime,
PayIOU,
PayWithWallet,
PersonalDetails_GetForEmails,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RequestCallPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class RequestCallPage extends Component {
return;
}

Inbox.getInboxCallWaitTime();
Inbox.openRequestCallPage();
}

validatePhoneInput() {
Expand Down

0 comments on commit 9a28393

Please sign in to comment.