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",
|
"json-loader": "^0.5.4",
|
||||||
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
"lbry-format": "https://github.com/lbryio/lbry-format.git",
|
||||||
"lbry-redux": "lbryio/lbry-redux#6f9ee589a7834851b2fc9d97f807fbc0a0dd6451",
|
"lbry-redux": "lbryio/lbry-redux#6f9ee589a7834851b2fc9d97f807fbc0a0dd6451",
|
||||||
"lbryinc": "lbryio/lbryinc#6a59102c52673502569d2c43bd4ee58c315fb2e4",
|
"lbryinc": "lbryio/lbryinc#3fc653053128073e7824b6710582b65711bd258f",
|
||||||
"lint-staged": "^7.0.2",
|
"lint-staged": "^7.0.2",
|
||||||
"localforage": "^1.7.1",
|
"localforage": "^1.7.1",
|
||||||
"lodash-es": "^4.17.14",
|
"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",
|
"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.",
|
"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.",
|
"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>,
|
notifyUnlockWallet: (?boolean) => Promise<any>,
|
||||||
daemonVersionMatched: boolean,
|
daemonVersionMatched: boolean,
|
||||||
onReadyToLaunch: () => void,
|
onReadyToLaunch: () => void,
|
||||||
authenticate: () => void,
|
|
||||||
hideModal: () => void,
|
hideModal: () => void,
|
||||||
modal: ?{
|
modal: ?{
|
||||||
id: string,
|
id: string,
|
||||||
|
@ -58,7 +57,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
|
|
||||||
(this: any).renderModals = this.renderModals.bind(this);
|
(this: any).renderModals = this.renderModals.bind(this);
|
||||||
(this: any).runWithIncompatibleDaemon = this.runWithIncompatibleDaemon.bind(this);
|
(this: any).runWithIncompatibleDaemon = this.runWithIncompatibleDaemon.bind(this);
|
||||||
this.hasRecordedUser = false;
|
|
||||||
this.timeout = undefined;
|
this.timeout = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,18 +139,11 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateStatusCallback(status: StatusResponse, waitingForUnlock: boolean = false) {
|
updateStatusCallback(status: StatusResponse, waitingForUnlock: boolean = false) {
|
||||||
const { authenticate } = this.props;
|
|
||||||
|
|
||||||
if (status.connection_status.code !== 'connected') {
|
if (status.connection_status.code !== 'connected') {
|
||||||
this.setState({ error: true });
|
this.setState({ error: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.hasRecordedUser && status) {
|
|
||||||
authenticate();
|
|
||||||
this.hasRecordedUser = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { wallet, startup_status: startupStatus } = status;
|
const { wallet, startup_status: startupStatus } = status;
|
||||||
|
|
||||||
// If the wallet is locked, stop doing anything and make the user input their password
|
// 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;
|
timeout: ?TimeoutID;
|
||||||
|
|
||||||
renderModals() {
|
renderModals() {
|
||||||
|
|
|
@ -313,10 +313,7 @@ function AppWrapper() {
|
||||||
</ConnectedRouter>
|
</ConnectedRouter>
|
||||||
) : (
|
) : (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<SplashScreen
|
<SplashScreen onReadyToLaunch={() => setReadyToLaunch(true)} />
|
||||||
authenticate={() => app.store.dispatch(doAuthenticate(pjson.version))}
|
|
||||||
onReadyToLaunch={() => setReadyToLaunch(true)}
|
|
||||||
/>
|
|
||||||
<SnackBar />
|
<SnackBar />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -320,7 +320,10 @@ export function doAlertError(errorList) {
|
||||||
export function doDaemonReady() {
|
export function doDaemonReady() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch, getState) => {
|
||||||
const state = 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 });
|
dispatch({ type: ACTIONS.DAEMON_READY });
|
||||||
|
|
||||||
// @if TARGET='app'
|
// @if TARGET='app'
|
||||||
|
|
Loading…
Add table
Reference in a new issue