don't call install/new, rewards, invite status, and referral code endpoints if user isn't sharing digonostics
This commit is contained in:
parent
af0a814a55
commit
49a6a8b8d9
5 changed files with 8 additions and 17 deletions
|
@ -132,7 +132,7 @@
|
|||
"json-loader": "^0.5.4",
|
||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||
"lbry-redux": "lbryio/lbry-redux#6f9ee589a7834851b2fc9d97f807fbc0a0dd6451",
|
||||
"lbryinc": "lbryio/lbryinc#6a59102c52673502569d2c43bd4ee58c315fb2e4",
|
||||
"lbryinc": "lbryio/lbryinc#3fc653053128073e7824b6710582b65711bd258f",
|
||||
"lint-staged": "^7.0.2",
|
||||
"localforage": "^1.7.1",
|
||||
"lodash-es": "^4.17.14",
|
||||
|
|
|
@ -984,5 +984,6 @@
|
|||
"A copy of your wallet is synced to lbry.tv": "A copy of your wallet is synced to lbry.tv",
|
||||
"Internal sharing is required while signed in.": "Internal sharing is required while signed in.",
|
||||
"Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.": "Your wallet is not currently synced with lbry.tv. You are in control of backing up your wallet.",
|
||||
"FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone."
|
||||
"FINAL WARNING: This action is permanent and cannot be undone.": "FINAL WARNING: This action is permanent and cannot be undone.",
|
||||
"Sign In to lbry.tv to Earn Rewards From Inviting Your Friends": "Sign In to lbry.tv to Earn Rewards From Inviting Your Friends"
|
||||
}
|
|
@ -21,7 +21,6 @@ type Props = {
|
|||
notifyUnlockWallet: (?boolean) => Promise<any>,
|
||||
daemonVersionMatched: boolean,
|
||||
onReadyToLaunch: () => void,
|
||||
authenticate: () => void,
|
||||
hideModal: () => void,
|
||||
modal: ?{
|
||||
id: string,
|
||||
|
@ -58,7 +57,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
|
||||
(this: any).renderModals = this.renderModals.bind(this);
|
||||
(this: any).runWithIncompatibleDaemon = this.runWithIncompatibleDaemon.bind(this);
|
||||
this.hasRecordedUser = false;
|
||||
this.timeout = undefined;
|
||||
}
|
||||
|
||||
|
@ -141,18 +139,11 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
updateStatusCallback(status: StatusResponse, waitingForUnlock: boolean = false) {
|
||||
const { authenticate } = this.props;
|
||||
|
||||
if (status.connection_status.code !== 'connected') {
|
||||
this.setState({ error: true });
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.hasRecordedUser && status) {
|
||||
authenticate();
|
||||
this.hasRecordedUser = true;
|
||||
}
|
||||
|
||||
const { wallet, startup_status: startupStatus } = status;
|
||||
|
||||
// If the wallet is locked, stop doing anything and make the user input their password
|
||||
|
@ -201,7 +192,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
hasRecordedUser: boolean;
|
||||
timeout: ?TimeoutID;
|
||||
|
||||
renderModals() {
|
||||
|
|
|
@ -313,10 +313,7 @@ function AppWrapper() {
|
|||
</ConnectedRouter>
|
||||
) : (
|
||||
<Fragment>
|
||||
<SplashScreen
|
||||
authenticate={() => app.store.dispatch(doAuthenticate(pjson.version))}
|
||||
onReadyToLaunch={() => setReadyToLaunch(true)}
|
||||
/>
|
||||
<SplashScreen onReadyToLaunch={() => setReadyToLaunch(true)} />
|
||||
<SnackBar />
|
||||
</Fragment>
|
||||
)}
|
||||
|
|
|
@ -320,7 +320,10 @@ export function doAlertError(errorList) {
|
|||
export function doDaemonReady() {
|
||||
return (dispatch, getState) => {
|
||||
const state = getState();
|
||||
dispatch(doAuthenticate(appVersion));
|
||||
const daemonSettings = selectDaemonSettings(state);
|
||||
const { share_usage_data: shareUsageData } = daemonSettings;
|
||||
|
||||
dispatch(doAuthenticate(appVersion, undefined, undefined, shareUsageData));
|
||||
dispatch({ type: ACTIONS.DAEMON_READY });
|
||||
|
||||
// @if TARGET='app'
|
||||
|
|
Loading…
Reference in a new issue