commit
367d987e1f
3 changed files with 23 additions and 7 deletions
11
dist/bundle.es.js
vendored
11
dist/bundle.es.js
vendored
|
@ -1161,10 +1161,15 @@ function doFetchInviteStatus() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function doInstallNew(appVersion, os = null) {
|
function doInstallNew(appVersion, os = null, firebaseToken = null) {
|
||||||
const payload = {
|
const payload = {
|
||||||
app_version: appVersion
|
app_version: appVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (firebaseToken) {
|
||||||
|
payload.firebase_token = firebaseToken;
|
||||||
|
}
|
||||||
|
|
||||||
lbryRedux.Lbry.status().then(status => {
|
lbryRedux.Lbry.status().then(status => {
|
||||||
payload.app_id = status.installation_id;
|
payload.app_id = status.installation_id;
|
||||||
payload.node_id = status.lbry_id;
|
payload.node_id = status.lbry_id;
|
||||||
|
@ -1177,7 +1182,7 @@ function doInstallNew(appVersion, os = null) {
|
||||||
});
|
});
|
||||||
} // TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
} // TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
||||||
|
|
||||||
function doAuthenticate(appVersion, os = null) {
|
function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: AUTHENTICATION_STARTED
|
type: AUTHENTICATION_STARTED
|
||||||
|
@ -1192,7 +1197,7 @@ function doAuthenticate(appVersion, os = null) {
|
||||||
});
|
});
|
||||||
dispatch(doRewardList());
|
dispatch(doRewardList());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os);
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: AUTHENTICATION_FAILURE,
|
type: AUTHENTICATION_FAILURE,
|
||||||
|
|
9
dist/bundle.js
vendored
9
dist/bundle.js
vendored
|
@ -2631,9 +2631,15 @@ function doFetchInviteStatus() {
|
||||||
}
|
}
|
||||||
function doInstallNew(appVersion) {
|
function doInstallNew(appVersion) {
|
||||||
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||||
|
var firebaseToken = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||||||
var payload = {
|
var payload = {
|
||||||
app_version: appVersion
|
app_version: appVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (firebaseToken) {
|
||||||
|
payload.firebase_token = firebaseToken;
|
||||||
|
}
|
||||||
|
|
||||||
lbry_redux__WEBPACK_IMPORTED_MODULE_0__["Lbry"].status().then(function (status) {
|
lbry_redux__WEBPACK_IMPORTED_MODULE_0__["Lbry"].status().then(function (status) {
|
||||||
payload.app_id = status.installation_id;
|
payload.app_id = status.installation_id;
|
||||||
payload.node_id = status.lbry_id;
|
payload.node_id = status.lbry_id;
|
||||||
|
@ -2648,6 +2654,7 @@ function doInstallNew(appVersion) {
|
||||||
|
|
||||||
function doAuthenticate(appVersion) {
|
function doAuthenticate(appVersion) {
|
||||||
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
var os = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||||
|
var firebaseToken = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
||||||
return function (dispatch) {
|
return function (dispatch) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
|
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_STARTED"]
|
||||||
|
@ -2662,7 +2669,7 @@ function doAuthenticate(appVersion) {
|
||||||
});
|
});
|
||||||
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
dispatch(Object(redux_actions_rewards__WEBPACK_IMPORTED_MODULE_2__["doRewardList"])());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os);
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
})["catch"](function (error) {
|
})["catch"](function (error) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_FAILURE"],
|
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["AUTHENTICATION_FAILURE"],
|
||||||
|
|
|
@ -37,8 +37,12 @@ export function doFetchInviteStatus() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doInstallNew(appVersion, os = null) {
|
export function doInstallNew(appVersion, os = null, firebaseToken = null) {
|
||||||
const payload = { app_version: appVersion };
|
const payload = { app_version: appVersion };
|
||||||
|
if (firebaseToken) {
|
||||||
|
payload.firebase_token = firebaseToken;
|
||||||
|
}
|
||||||
|
|
||||||
Lbry.status().then(status => {
|
Lbry.status().then(status => {
|
||||||
payload.app_id = status.installation_id;
|
payload.app_id = status.installation_id;
|
||||||
payload.node_id = status.lbry_id;
|
payload.node_id = status.lbry_id;
|
||||||
|
@ -52,7 +56,7 @@ export function doInstallNew(appVersion, os = null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
// TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
|
||||||
export function doAuthenticate(appVersion, os = null) {
|
export function doAuthenticate(appVersion, os = null, firebaseToken = null) {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.AUTHENTICATION_STARTED,
|
type: ACTIONS.AUTHENTICATION_STARTED,
|
||||||
|
@ -67,7 +71,7 @@ export function doAuthenticate(appVersion, os = null) {
|
||||||
});
|
});
|
||||||
dispatch(doRewardList());
|
dispatch(doRewardList());
|
||||||
dispatch(doFetchInviteStatus());
|
dispatch(doFetchInviteStatus());
|
||||||
doInstallNew(appVersion, os);
|
doInstallNew(appVersion, os, firebaseToken);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
Loading…
Reference in a new issue