bump lbry-sdk and fix build warning
This commit is contained in:
parent
1251262e22
commit
af4e1afd59
3 changed files with 11 additions and 6 deletions
|
@ -224,7 +224,7 @@
|
||||||
"yarn": "^1.3"
|
"yarn": "^1.3"
|
||||||
},
|
},
|
||||||
"lbrySettings": {
|
"lbrySettings": {
|
||||||
"lbrynetDaemonVersion": "0.88.0",
|
"lbrynetDaemonVersion": "0.92.0",
|
||||||
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
|
||||||
"lbrynetDaemonDir": "static/daemon",
|
"lbrynetDaemonDir": "static/daemon",
|
||||||
"lbrynetDaemonFileName": "lbrynet",
|
"lbrynetDaemonFileName": "lbrynet",
|
||||||
|
|
|
@ -3,8 +3,10 @@ import * as ICONS from 'constants/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Yrbl from 'component/yrbl';
|
import Yrbl from 'component/yrbl';
|
||||||
import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance';
|
|
||||||
import { SITE_HELP_EMAIL } from 'config';
|
import { SITE_HELP_EMAIL } from 'config';
|
||||||
|
// @if TARGET='web'
|
||||||
|
import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance';
|
||||||
|
// @endif
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
lbryTvApiStatus: string,
|
lbryTvApiStatus: string,
|
||||||
|
@ -13,9 +15,12 @@ type Props = {
|
||||||
export default function SyncFatalError(props: Props) {
|
export default function SyncFatalError(props: Props) {
|
||||||
const { lbryTvApiStatus } = props;
|
const { lbryTvApiStatus } = props;
|
||||||
|
|
||||||
const downTime =
|
let downTime = false;
|
||||||
|
// @if TARGET='web'
|
||||||
|
downTime =
|
||||||
IS_WEB &&
|
IS_WEB &&
|
||||||
(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN);
|
(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN);
|
||||||
|
// @endif
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="main--empty">
|
<div className="main--empty">
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const STATUS_DEGRADED = 'degraded';
|
||||||
export const STATUS_FAILING = 'failing';
|
export const STATUS_FAILING = 'failing';
|
||||||
export const STATUS_DOWN = 'down';
|
export const STATUS_DOWN = 'down';
|
||||||
|
|
||||||
const getParams = user => {
|
const getParams = (user) => {
|
||||||
const headers = {};
|
const headers = {};
|
||||||
const token = getAuthToken();
|
const token = getAuthToken();
|
||||||
if (token && user.has_verified_email) {
|
if (token && user.has_verified_email) {
|
||||||
|
@ -31,8 +31,8 @@ export function useDegradedPerformance(onDegradedPerformanceCallback, user) {
|
||||||
const STATUS_ENDPOINT = `${SDK_API_PATH}/status`.replace('v1', 'v2');
|
const STATUS_ENDPOINT = `${SDK_API_PATH}/status`.replace('v1', 'v2');
|
||||||
|
|
||||||
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(STATUS_ENDPOINT, getParams(user)))
|
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(STATUS_ENDPOINT, getParams(user)))
|
||||||
.then(response => response.json())
|
.then((response) => response.json())
|
||||||
.then(status => {
|
.then((status) => {
|
||||||
if (status.general_state !== STATUS_OK) {
|
if (status.general_state !== STATUS_OK) {
|
||||||
onDegradedPerformanceCallback(STATUS_FAILING);
|
onDegradedPerformanceCallback(STATUS_FAILING);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue