Remove unused firebase and domain parameter

This commit is contained in:
infinite-persistence 2021-12-20 13:35:32 +08:00 committed by Thomas Zarebczan
parent e5a2e3961e
commit 1f5f8f1213
3 changed files with 6 additions and 18 deletions

View file

@ -1,4 +1,3 @@
import { DOMAIN } from 'config';
import { connect } from 'react-redux';
import { doSetDaemonSetting } from 'redux/actions/settings';
import { doSetWelcomeVersion, doToggle3PAnalytics, doSignOut } from 'redux/actions/app';
@ -19,8 +18,7 @@ const perform = (dispatch) => ({
setShareDataInternal: (share) => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
setShareDataThirdParty: (share) => dispatch(doToggle3PAnalytics(share)),
signOut: () => dispatch(doSignOut()),
authenticateIfSharingData: () =>
dispatch(doAuthenticate(appVersion, undefined, undefined, true, undefined, undefined, DOMAIN)),
authenticateIfSharingData: () => dispatch(doAuthenticate(appVersion, true, undefined, undefined)),
});
export default connect(select, perform)(PrivacyAgreement);

View file

@ -9,7 +9,6 @@ import * as MODALS from 'constants/modal_types';
import * as SETTINGS from 'constants/settings';
import * as DAEMON_SETTINGS from 'constants/daemon_settings';
import * as SHARED_PREFERENCES from 'constants/shared_preferences';
import { DOMAIN } from 'config';
import Lbry from 'lbry';
import { doFetchChannelListMine, doFetchCollectionListMine, doCheckPendingClaims } from 'redux/actions/claims';
import { selectClaimForUri, selectClaimIsMineForUri, selectMyChannelClaims } from 'redux/selectors/claims';
@ -353,8 +352,6 @@ export function doDaemonReady() {
dispatch(
doAuthenticate(
appVersion,
undefined,
undefined,
shareUsageData,
(status) => {
const trendingAlgorithm =
@ -367,8 +364,7 @@ export function doDaemonReady() {
analytics.trendingAlgorithmEvent(trendingAlgorithm);
}
},
undefined,
DOMAIN
undefined
)
);
dispatch({ type: ACTIONS.DAEMON_READY });

View file

@ -48,11 +48,8 @@ export function doFetchInviteStatus(shouldCallRewardList = true) {
};
}
export function doInstallNew(appVersion, os = null, firebaseToken = null, callbackForUsersWhoAreSharingData, domain) {
export function doInstallNew(appVersion, callbackForUsersWhoAreSharingData, domain) {
const payload = { app_version: appVersion, domain };
if (firebaseToken) {
payload.firebase_token = firebaseToken;
}
Lbry.status().then((status) => {
payload.app_id =
@ -62,7 +59,7 @@ export function doInstallNew(appVersion, os = null, firebaseToken = null, callba
payload.node_id = status.lbry_id;
Lbry.version().then((version) => {
payload.daemon_version = version.lbrynet_version;
payload.operating_system = os || version.os_system;
payload.operating_system = version.os_system;
payload.platform = version.platform;
Lbryio.call('install', 'new', payload);
@ -107,12 +104,9 @@ function checkAuthBusy() {
// TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
export function doAuthenticate(
appVersion,
os = null,
firebaseToken = null,
shareUsageData = true,
callbackForUsersWhoAreSharingData,
callInstall = true,
domain = null
callInstall = true
) {
return (dispatch) => {
dispatch({
@ -134,7 +128,7 @@ export function doAuthenticate(
dispatch(doRewardList());
dispatch(doFetchInviteStatus(false));
if (callInstall) {
doInstallNew(appVersion, os, firebaseToken, callbackForUsersWhoAreSharingData, domain);
doInstallNew(appVersion, callbackForUsersWhoAreSharingData, DOMAIN);
}
}
});