Pass app version info to internal APIs #1583
1 changed files with 10 additions and 13 deletions
|
@ -37,21 +37,18 @@ export function doFetchInviteStatus() {
|
|||
}
|
||||
|
||||
export function doInstallNew() {
|
||||
return dispatch => {
|
||||
const payload = {app_version: pjson.version};
|
||||
Lbry.status().then(status => {
|
||||
payload.app_id = status.installation_id;
|
||||
Lbry.version().then(version => {
|
||||
payload.daemon_version = version.lbrynet_version;
|
||||
payload.operating_system = version.os_system;
|
||||
payload.platform = version.platform;
|
||||
Lbryio.call('install', 'new', payload);
|
||||
});
|
||||
const payload = { app_version: pjson.version };
|
||||
Lbry.status().then(status => {
|
||||
payload.app_id = status.installation_id;
|
||||
Lbry.version().then(version => {
|
||||
payload.daemon_version = version.lbrynet_version;
|
||||
payload.operating_system = version.os_system;
|
||||
payload.platform = version.platform;
|
||||
Lbryio.call('install', 'new', payload);
|
||||
});
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function doAuthenticate() {
|
||||
return dispatch => {
|
||||
dispatch({
|
||||
|
@ -66,7 +63,7 @@ export function doAuthenticate() {
|
|||
});
|
||||
dispatch(doRewardList());
|
||||
dispatch(doFetchInviteStatus());
|
||||
|
||||
dispatch(doInstallNew());
|
||||
doInstallNew();
|
||||
})
|
||||
.catch(error => {
|
||||
dispatch(doNotify({ id: MODALS.AUTHENTICATION_FAILURE }));
|
||||
|
|
Loading…
Add table
Reference in a new issue
Since we aren't storing this in the store, we don't need to wrap this call in a
dispatch
. You can just calldoInstallNew()
after.