Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NewDot API] Command Refactor - Inbox_CallUser_WaitTime #9220

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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