bump lbry-sdk and fix build warning

This commit is contained in:
Sean Yesmunt 2021-03-15 15:47:48 -04:00
parent 1251262e22
commit af4e1afd59
3 changed files with 11 additions and 6 deletions

View file

@ -224,7 +224,7 @@
"yarn": "^1.3"
},
"lbrySettings": {
"lbrynetDaemonVersion": "0.88.0",
"lbrynetDaemonVersion": "0.92.0",
"lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip",
"lbrynetDaemonDir": "static/daemon",
"lbrynetDaemonFileName": "lbrynet",

View file

@ -3,8 +3,10 @@ import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
import Yrbl from 'component/yrbl';
import { STATUS_DEGRADED, STATUS_FAILING, STATUS_DOWN } from 'web/effects/use-degraded-performance';
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 = {
lbryTvApiStatus: string,
@ -13,9 +15,12 @@ type Props = {
export default function SyncFatalError(props: Props) {
const { lbryTvApiStatus } = props;
const downTime =
let downTime = false;
// @if TARGET='web'
downTime =
IS_WEB &&
(lbryTvApiStatus === STATUS_DEGRADED || lbryTvApiStatus === STATUS_FAILING || lbryTvApiStatus === STATUS_DOWN);
// @endif
return (
<div className="main--empty">

View file

@ -11,7 +11,7 @@ export const STATUS_DEGRADED = 'degraded';
export const STATUS_FAILING = 'failing';
export const STATUS_DOWN = 'down';
const getParams = user => {
const getParams = (user) => {
const headers = {};
const token = getAuthToken();
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');
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(STATUS_ENDPOINT, getParams(user)))
.then(response => response.json())
.then(status => {
.then((response) => response.json())
.then((status) => {
if (status.general_state !== STATUS_OK) {
onDegradedPerformanceCallback(STATUS_FAILING);
}