chore: bump deps

This commit is contained in:
apotdevin 2021-06-21 11:34:26 +02:00
parent 30cea785a6
commit acb96ff3df
No known key found for this signature in database
GPG key ID: 4403F1DFBE779457
43 changed files with 2097 additions and 3003 deletions

View file

@ -34,8 +34,8 @@ module.exports = {
'plugin:import/errors',
'plugin:import/warnings',
'plugin:jest/recommended',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
'prettier',
],
rules: {
'react/react-in-jsx-scope': 'off',

View file

@ -51,8 +51,9 @@ import {
declare module 'react-table' {
// take this file as-is, or comment out the sections that don't apply to your plugin configuration
export interface TableOptions<D extends Record<string, unknown>>
extends UseExpandedOptions<D>,
export interface TableOptions<
D extends Record<string, unknown>
> extends UseExpandedOptions<D>,
UseFiltersOptions<D>,
UseGlobalFiltersOptions<D>,
UseGroupByOptions<D>,
@ -68,16 +69,14 @@ declare module 'react-table' {
export interface Hooks<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseExpandedHooks<D>,
> extends UseExpandedHooks<D>,
UseGroupByHooks<D>,
UseRowSelectHooks<D>,
UseSortByHooks<D> {}
export interface TableInstance<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseColumnOrderInstanceProps<D>,
> extends UseColumnOrderInstanceProps<D>,
UseExpandedInstanceProps<D>,
UseFiltersInstanceProps<D>,
UseGlobalFiltersInstanceProps<D>,
@ -89,8 +88,7 @@ declare module 'react-table' {
export interface TableState<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseColumnOrderState<D>,
> extends UseColumnOrderState<D>,
UseExpandedState<D>,
UseFiltersState<D>,
UseGlobalFiltersState<D>,
@ -103,8 +101,7 @@ declare module 'react-table' {
export interface ColumnInterface<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseFiltersColumnOptions<D>,
> extends UseFiltersColumnOptions<D>,
UseGlobalFiltersColumnOptions<D>,
UseGroupByColumnOptions<D>,
UseResizeColumnsColumnOptions<D>,
@ -112,8 +109,7 @@ declare module 'react-table' {
export interface ColumnInstance<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseFiltersColumnProps<D>,
> extends UseFiltersColumnProps<D>,
UseGroupByColumnProps<D>,
UseResizeColumnsColumnProps<D>,
UseSortByColumnProps<D> {}
@ -121,12 +117,12 @@ declare module 'react-table' {
export interface Cell<
D extends Record<string, unknown> = Record<string, unknown>,
V = any
> extends UseGroupByCellProps<D>, UseRowStateCellProps<D> {}
> extends UseGroupByCellProps<D>,
UseRowStateCellProps<D> {}
export interface Row<
D extends Record<string, unknown> = Record<string, unknown>
>
extends UseExpandedRowProps<D>,
> extends UseExpandedRowProps<D>,
UseGroupByRowProps<D>,
UseRowSelectRowProps<D>,
UseRowStateRowProps<D> {}

4666
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -34,9 +34,9 @@
"author": "",
"license": "MIT",
"dependencies": {
"@apollo/client": "^3.3.19",
"@apollo/client": "^3.3.20",
"@emotion/babel-plugin": "^11.3.0",
"@next/bundle-analyzer": "^10.2.3",
"@next/bundle-analyzer": "^11.0.0",
"@visx/axis": "^1.12.0",
"@visx/chord": "^1.7.0",
"@visx/curve": "^1.7.0",
@ -46,8 +46,8 @@
"@visx/scale": "^1.11.1",
"@visx/shape": "^1.11.1",
"@visx/tooltip": "^1.7.2",
"apollo-server-micro": "^2.25.0",
"balanceofsatoshis": "^8.0.14",
"apollo-server-micro": "^2.25.1",
"balanceofsatoshis": "^10.1.0",
"bcryptjs": "^2.4.3",
"bech32": "^2.0.0",
"bip32": "^2.0.6",
@ -59,7 +59,7 @@
"d3-array": "^2.12.1",
"d3-time-format": "^3.0.0",
"date-fns": "^2.22.1",
"graphql": "^15.5.0",
"graphql": "^15.5.1",
"graphql-iso-date": "^3.6.1",
"graphql-middleware": "^6.0.10",
"graphql-rate-limit": "^3.1.0",
@ -67,12 +67,12 @@
"js-cookie": "^2.2.1",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^8.5.1",
"ln-service": "^51.8.2",
"ln-service": "^51.8.4",
"lodash.debounce": "^4.0.8",
"lodash.groupby": "^4.6.0",
"lodash.merge": "^4.6.2",
"lodash.omit": "^4.5.0",
"next": "^10.2.3",
"next": "^11.0.0",
"node-fetch": "^2.6.1",
"numeral": "^2.0.6",
"qrcode.react": "^1.0.1",
@ -85,9 +85,9 @@
"react-intersection-observer": "^8.32.0",
"react-qr-reader": "^2.2.1",
"react-select": "^4.3.1",
"react-slider": "^1.1.4",
"react-slider": "^1.3.1",
"react-spinners": "^0.11.0",
"react-spring": "^9.2.1",
"react-spring": "^9.2.3",
"react-table": "^7.7.0",
"react-toastify": "^7.0.4",
"react-tooltip": "^4.2.21",
@ -96,26 +96,26 @@
"styled-components": "^5.3.0",
"styled-react-modal": "^2.1.0",
"styled-theming": "^2.2.0",
"typescript": "^4.3.2",
"typescript": "^4.3.4",
"underscore": "^1.13.1",
"uuid": "^8.3.2",
"victory": "^35.8.4",
"victory": "^35.8.6",
"winston": "^3.3.3"
},
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/core": "^7.14.6",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@graphql-codegen/add": "^2.0.2",
"@graphql-codegen/cli": "^1.21.5",
"@graphql-codegen/fragment-matcher": "^2.0.1",
"@graphql-codegen/introspection": "^1.18.2",
"@graphql-codegen/near-operation-file-preset": "^1.18.1",
"@graphql-codegen/typescript": "^1.22.1",
"@graphql-codegen/typescript-operations": "^1.18.0",
"@graphql-codegen/typescript-react-apollo": "^2.2.5",
"@graphql-codegen/typescript-resolvers": "^1.19.2",
"@testing-library/jest-dom": "^5.12.0",
"@graphql-codegen/near-operation-file-preset": "^1.18.2",
"@graphql-codegen/typescript": "^1.22.2",
"@graphql-codegen/typescript-operations": "^1.18.1",
"@graphql-codegen/typescript-react-apollo": "^2.2.6",
"@graphql-codegen/typescript-resolvers": "^1.19.3",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@types/bcryptjs": "^2.4.2",
"@types/cookie": "^0.4.0",
@ -125,39 +125,40 @@
"@types/graphql-iso-date": "^3.4.0",
"@types/js-cookie": "^2.2.6",
"@types/js-yaml": "^4.0.1",
"@types/jsonwebtoken": "^8.5.1",
"@types/jsonwebtoken": "^8.5.2",
"@types/lodash.groupby": "^4.6.6",
"@types/lodash.merge": "^4.6.6",
"@types/lodash.omit": "^4.5.6",
"@types/lodash.sortby": "^4.7.6",
"@types/node": "^15.6.1",
"@types/node": "^15.12.4",
"@types/node-fetch": "^2.5.10",
"@types/numeral": "^2.0.1",
"@types/qrcode.react": "^1.0.1",
"@types/react": "^17.0.8",
"@types/react": "^17.0.11",
"@types/react-copy-to-clipboard": "^5.0.0",
"@types/react-grid-layout": "^1.1.1",
"@types/react-qr-reader": "^2.1.3",
"@types/react-select": "^4.0.15",
"@types/react-slider": "^1.1.2",
"@types/react-slider": "^1.3.0",
"@types/react-table": "^7.7.1",
"@types/secp256k1": "^4.0.2",
"@types/styled-components": "^5.1.9",
"@types/styled-components": "^5.1.10",
"@types/styled-react-modal": "^1.2.0",
"@types/styled-theming": "^2.2.5",
"@types/underscore": "^1.11.2",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^4.26.0",
"@typescript-eslint/parser": "^4.26.0",
"apollo-server": "^2.25.0",
"apollo-server-testing": "^2.25.0",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"apollo-server": "^2.25.1",
"apollo-server-testing": "^2.25.1",
"babel-jest": "^27.0.2",
"babel-loader": "^8.2.2",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-plugin-styled-components": "^1.12.0",
"babel-preset-react-app": "^10.0.0",
"devmoji": "^2.2.1",
"eslint": "^7.27.0",
"devmoji": "^2.3.0",
"eslint": "^7.29.0",
"eslint-config-next": "^11.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
@ -166,10 +167,10 @@
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^6.0.0",
"jest": "^27.0.3",
"jest": "^27.0.4",
"jest-fetch-mock": "^3.0.3",
"lint-staged": "^11.0.0",
"prettier": "^2.3.0",
"prettier": "^2.3.1",
"standard-version": "^9.3.0"
},
"husky": {

View file

@ -3,6 +3,7 @@ import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
import { Version } from 'src/components/version/Version';
import { NextPageContext } from 'next';
import { getProps } from 'src/utils/ssr';
import { MempoolReport } from 'src/views/home/reports/mempool';
import { NetworkInfo } from '../src/views/home/networkInfo/NetworkInfo';
import { AccountInfo } from '../src/views/home/account/AccountInfo';
import { QuickActions } from '../src/views/home/quickActions/QuickActions';
@ -10,7 +11,6 @@ import { FlowBox } from '../src/views/home/reports/flow';
import { ForwardBox } from '../src/views/home/reports/forwardReport';
import { LiquidReport } from '../src/views/home/reports/liquidReport/LiquidReport';
import { ConnectCard } from '../src/views/home/connect/Connect';
import { MempoolReport } from 'src/views/home/reports/mempool';
const HomeView = () => (
<>

View file

@ -3,12 +3,12 @@ import styled from 'styled-components';
import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
import { NextPageContext } from 'next';
import { getProps } from 'src/utils/ssr';
import { DashboardSettings } from 'src/views/settings/Dashboard';
import { SingleLine } from '../../src/components/generic/Styled';
import { InterfaceSettings } from '../../src/views/settings/Interface';
import { DangerView } from '../../src/views/settings/Danger';
import { ChatSettings } from '../../src/views/settings/Chat';
import { PrivacySettings } from '../../src/views/settings/Privacy';
import { DashboardSettings } from 'src/views/settings/Dashboard';
export const ButtonRow = styled.div`
width: auto;

View file

@ -11,6 +11,13 @@ import { NextPageContext } from 'next';
import { getProps } from 'src/utils/ssr';
import { RefreshCw, Settings } from 'react-feather';
import styled, { css } from 'styled-components';
import { useLocalStorage } from 'src/hooks/UseLocalStorage';
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
import {
defaultSettings,
TransactionSettings,
} from 'src/views/transactions/Settings';
import { subDays, format } from 'date-fns';
import {
Card,
CardWithTitle,
@ -23,13 +30,6 @@ import { PaymentsCard } from '../src/views/transactions/PaymentsCards';
import { LoadingCard } from '../src/components/loading/LoadingCard';
import { ColorButton } from '../src/components/buttons/colorButton/ColorButton';
import { FlowBox } from '../src/views/home/reports/flow';
import { useLocalStorage } from 'src/hooks/UseLocalStorage';
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
import {
defaultSettings,
TransactionSettings,
} from 'src/views/transactions/Settings';
import { subDays, format } from 'date-fns';
type RotationProps = {
withRotation: boolean;

View file

@ -20,7 +20,6 @@ type PayType = {
type RebalanceType = {
avoid?: String[];
in_through?: String;
is_avoiding_high_inbound?: Boolean;
max_fee?: Number;
max_fee_rate?: Number;
max_rebalance?: Number;
@ -96,7 +95,6 @@ export const bosResolvers = {
{
avoid,
in_through,
is_avoiding_high_inbound,
max_fee,
max_fee_rate,
max_rebalance,
@ -110,7 +108,6 @@ export const bosResolvers = {
out_channels: [],
avoid,
...(in_through && { in_through }),
...(is_avoiding_high_inbound && { is_avoiding_high_inbound }),
...(max_fee && max_fee > 0 && { max_fee }),
...(max_fee_rate && max_fee_rate > 0 && { max_fee_rate }),
...(max_rebalance &&

View file

@ -55,11 +55,12 @@ export const chainResolvers = {
const { lnd } = context;
const pendingValue: PendingChainBalanceProps = await to<GetPendingChainBalanceType>(
getPendingChainBalance({
lnd,
})
);
const pendingValue: PendingChainBalanceProps =
await to<GetPendingChainBalanceType>(
getPendingChainBalance({
lnd,
})
);
const { pending_channels } = await to<GetPendingChannelsType>(
getPendingChannels({ lnd })

View file

@ -16,12 +16,8 @@ import { secret } from 'pages/api/v1';
import { ResolverContext } from 'config/client';
const { serverRuntimeConfig } = getConfig();
const {
macaroonPath,
lnCertPath,
lnServerUrl,
accountConfigPath,
} = serverRuntimeConfig;
const { macaroonPath, lnCertPath, lnServerUrl, accountConfigPath } =
serverRuntimeConfig;
const ssoMacaroon = readMacaroons(macaroonPath);
const ssoCert = readFile(lnCertPath);

View file

@ -25,9 +25,8 @@ export default async (_: undefined, __: undefined, context: ContextType) => {
getForwards({ lnd, after, before })
);
const channelVolume: { channel: string; tokens: number }[] = getChannelVolume(
forwards
);
const channelVolume: { channel: string; tokens: number }[] =
getChannelVolume(forwards);
const channelDetails = channels
.map(channel => {

View file

@ -175,7 +175,6 @@ export const mutationTypes = gql`
bosRebalance(
avoid: [String]
in_through: String
is_avoiding_high_inbound: Boolean
max_fee: Int
max_fee_rate: Int
max_rebalance: Int

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-half-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon><polygon fill="currentColor" points="12 2 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>

Before

Width:  |  Height:  |  Size: 438 B

View file

@ -8,8 +8,8 @@ import { chartColors } from 'src/styles/Themes';
import { ThemeContext } from 'styled-components';
import { useContext } from 'react';
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
import { Price } from '../price/Price';
import { localPoint } from '@visx/event';
import { Price } from '../price/Price';
type BarGroupProps = {
width: number;

View file

@ -7,8 +7,8 @@ import { chartColors } from 'src/styles/Themes';
import { ThemeContext } from 'styled-components';
import { useContext } from 'react';
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
import { Price } from '../price/Price';
import { localPoint } from '@visx/event';
import { Price } from '../price/Price';
type BarGroupProps = {
width: number;

View file

@ -33,7 +33,7 @@ export const shorten = (text: string): string => {
export const addEllipsis = (
text: string | null | undefined,
length: number = 14
length = 14
): string => {
if (!text) return '';

View file

@ -7,6 +7,7 @@ import { useBitcoinFees } from 'src/hooks/UseBitcoinFees';
import { useConfigState } from 'src/context/ConfigContext';
import { renderLine } from 'src/components/generic/helpers';
import { InputWithDeco } from 'src/components/input/InputWithDeco';
import { chartColors } from 'src/styles/Themes';
import {
Separation,
SingleLine,
@ -20,7 +21,6 @@ import {
MultiButton,
SingleButton,
} from '../../buttons/multiButton/MultiButton';
import { chartColors } from 'src/styles/Themes';
interface CloseChannelProps {
callback: () => void;

View file

@ -60,45 +60,47 @@ interface GetPriceProps {
export type FormatFnType = (options: GetPriceProps) => JSX.Element | string;
export const getPrice = (
currency: string,
displayValues: boolean,
priceContext: {
fiat: string;
dontShow: boolean;
prices?: { [key: string]: { last: number; symbol: string } };
}
) => ({
amount,
breakNumber = false,
override,
noUnit,
}: GetPriceProps): JSX.Element | string => {
if (!amount) return '-';
const { prices, dontShow, fiat } = priceContext;
export const getPrice =
(
currency: string,
displayValues: boolean,
priceContext: {
fiat: string;
dontShow: boolean;
prices?: { [key: string]: { last: number; symbol: string } };
}
) =>
({
amount,
breakNumber = false,
override,
noUnit,
}: GetPriceProps): JSX.Element | string => {
if (!amount) return '-';
const { prices, dontShow, fiat } = priceContext;
if (!displayValues) {
return '-';
}
if (!displayValues) {
return '-';
}
let priceProps: PriceProps = {
price: 0,
symbol: '',
currency: currency !== 'btc' && currency !== 'sat' ? 'sat' : currency,
};
if (currency === 'fiat' && prices && !dontShow) {
const current: { last: number; symbol: string } = prices[fiat] ?? {
last: 0,
let priceProps: PriceProps = {
price: 0,
symbol: '',
currency: currency !== 'btc' && currency !== 'sat' ? 'sat' : currency,
};
priceProps = {
price: current.last,
symbol: current.symbol,
currency,
};
}
if (currency === 'fiat' && prices && !dontShow) {
const current: { last: number; symbol: string } = prices[fiat] ?? {
last: 0,
symbol: '',
};
return getValue({ amount, ...priceProps, breakNumber, override, noUnit });
};
priceProps = {
price: current.last,
symbol: current.symbol,
currency,
};
}
return getValue({ amount, ...priceProps, breakNumber, override, noUnit });
};

View file

@ -1,62 +0,0 @@
import React from 'react';
import { Star } from 'react-feather';
import styled from 'styled-components';
import { HalfStar } from '../../assets/half-star.svg';
import { themeColors } from '../../styles/Themes';
const StyledStar = styled(Star)`
margin-bottom: -1px;
`;
const StyledHalfStar = styled(HalfStar)`
height: 18px;
width: 18px;
stroke-width: 2px;
margin-bottom: -1px;
`;
const StyledRatings = styled.div`
display: flex;
`;
interface RatingProps {
rating: number | null;
size?: string;
color?: string;
}
export const Rating = ({
rating,
size = '14px',
color = themeColors.blue3,
}: RatingProps) => {
if (!rating) {
return null;
}
const correctRating = Math.min(Math.max(Math.round(rating * 10), 0), 10);
const amount = (correctRating - (correctRating % 2)) / 2;
const hasHalf = correctRating % 2 > 0 ? true : false;
const stars = [];
const starConfig = {
size,
color,
};
for (let i = 0; i < 5; i += 1) {
if (i < amount) {
stars.push(
<StyledStar key={i} {...starConfig} fill={themeColors.blue3} />
);
} else if (hasHalf && i === amount) {
stars.push(<StyledHalfStar key={i} {...starConfig} />);
} else {
stars.push(<StyledStar key={i} {...starConfig} />);
}
}
return <StyledRatings>{stars.map(star => star)}</StyledRatings>;
};

View file

@ -7,7 +7,6 @@ const defaultOptions = {}
export type BosRebalanceMutationVariables = Types.Exact<{
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
in_through?: Types.Maybe<Types.Scalars['String']>;
is_avoiding_high_inbound?: Types.Maybe<Types.Scalars['Boolean']>;
max_fee?: Types.Maybe<Types.Scalars['Int']>;
max_fee_rate?: Types.Maybe<Types.Scalars['Int']>;
max_rebalance?: Types.Maybe<Types.Scalars['Int']>;
@ -36,11 +35,10 @@ export type BosRebalanceMutation = (
export const BosRebalanceDocument = gql`
mutation BosRebalance($avoid: [String], $in_through: String, $is_avoiding_high_inbound: Boolean, $max_fee: Int, $max_fee_rate: Int, $max_rebalance: Int, $node: String, $out_through: String, $out_inbound: Int) {
mutation BosRebalance($avoid: [String], $in_through: String, $max_fee: Int, $max_fee_rate: Int, $max_rebalance: Int, $node: String, $out_through: String, $out_inbound: Int) {
bosRebalance(
avoid: $avoid
in_through: $in_through
is_avoiding_high_inbound: $is_avoiding_high_inbound
max_fee: $max_fee
max_fee_rate: $max_fee_rate
max_rebalance: $max_rebalance
@ -90,7 +88,6 @@ export type BosRebalanceMutationFn = Apollo.MutationFunction<BosRebalanceMutatio
* variables: {
* avoid: // value for 'avoid'
* in_through: // value for 'in_through'
* is_avoiding_high_inbound: // value for 'is_avoiding_high_inbound'
* max_fee: // value for 'max_fee'
* max_fee_rate: // value for 'max_fee_rate'
* max_rebalance: // value for 'max_rebalance'

View file

@ -4,7 +4,6 @@ export const BOS_REBALANCE = gql`
mutation BosRebalance(
$avoid: [String]
$in_through: String
$is_avoiding_high_inbound: Boolean
$max_fee: Int
$max_fee_rate: Int
$max_rebalance: Int
@ -15,7 +14,6 @@ export const BOS_REBALANCE = gql`
bosRebalance(
avoid: $avoid
in_through: $in_through
is_avoiding_high_inbound: $is_avoiding_high_inbound
max_fee: $max_fee
max_fee_rate: $max_fee_rate
max_rebalance: $max_rebalance

View file

@ -380,7 +380,6 @@ export type MutationBosPayArgs = {
export type MutationBosRebalanceArgs = {
avoid?: Maybe<Array<Maybe<Scalars['String']>>>;
in_through?: Maybe<Scalars['String']>;
is_avoiding_high_inbound?: Maybe<Scalars['Boolean']>;
max_fee?: Maybe<Scalars['Int']>;
max_fee_rate?: Maybe<Scalars['Int']>;
max_rebalance?: Maybe<Scalars['Int']>;

View file

@ -8,6 +8,7 @@ import {
Star,
} from 'react-feather';
import styled from 'styled-components';
import { SatoshiSymbol } from 'src/components/satoshi/Satoshi';
import { Separation, SingleLine } from '../../../components/generic/Styled';
import {
useConfigState,
@ -20,7 +21,6 @@ import {
unSelectedNavButton,
} from '../../../styles/Themes';
import { usePriceState } from '../../../context/PriceContext';
import { SatoshiSymbol } from 'src/components/satoshi/Satoshi';
const SelectedIcon = styled.div<{ selected: boolean }>`
display: flex;

View file

@ -42,7 +42,6 @@ const defaultRebalanceId: RebalanceIdType = {
type StateType = {
avoid: RebalanceIdType[];
in_through: RebalanceIdType;
is_avoiding_high_inbound: boolean;
max_fee: number;
max_fee_rate: number;
max_rebalance: number;
@ -52,10 +51,6 @@ type StateType = {
};
export type ActionType =
| {
type: 'avoidHigh';
avoid: boolean;
}
| {
type: 'maxFee' | 'maxFeeRate' | 'maxRebalance' | 'out_inbound';
amount: number;
@ -87,7 +82,6 @@ export type ActionType =
const initialState: StateType = {
avoid: [],
in_through: defaultRebalanceId,
is_avoiding_high_inbound: false,
max_fee: 10,
max_fee_rate: 100,
max_rebalance: 0,
@ -98,8 +92,6 @@ const initialState: StateType = {
const reducer = (state: StateType, action: ActionType): StateType => {
switch (action.type) {
case 'avoidHigh':
return { ...state, is_avoiding_high_inbound: action.avoid };
case 'maxFee':
return { ...state, max_fee: action.amount };
case 'maxFeeRate':

View file

@ -34,10 +34,8 @@ export const ModalNodes: React.FC<ModalNodesType> = ({
const [newNode, newNodeSet] = React.useState<string>('');
const { loading, data } = useGetPeersQuery();
const [
getNode,
{ data: _data, loading: nodeLoading },
] = useGetNodeLazyQuery();
const [getNode, { data: _data, loading: nodeLoading }] =
useGetNodeLazyQuery();
const [nodeData, resetMutationResult] = useMutationResultWithReset(_data);
React.useEffect(() => {

View file

@ -65,8 +65,13 @@ export const PendingCard = ({
partner_node_info,
} = channelInfo;
const { alias, capacity, channel_count, color: nodeColor, updated_at } =
partner_node_info?.node || {};
const {
alias,
capacity,
channel_count,
color: nodeColor,
updated_at,
} = partner_node_info?.node || {};
const formatBalance = format({ amount: local_balance + remote_balance });
const formatLocal = format({ amount: local_balance });

View file

@ -35,9 +35,8 @@ export const ChatInput = ({
});
const [data, resetMutationResult] = useMutationResultWithReset(_data);
const [formattedMessage, contentType, tokens, canSend] = handleMessage(
message
);
const [formattedMessage, contentType, tokens, canSend] =
handleMessage(message);
React.useEffect(() => {
if (!loading && account && data?.sendMessage) {

View file

@ -5,13 +5,13 @@ import { useLocalStorage } from 'src/hooks/UseLocalStorage';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { useRef } from 'react';
import useElementSize from 'src/hooks/UseElementSize';
import { getWidgets } from './widgets/helpers';
import { Card, SubTitle } from 'src/components/generic/Styled';
import { textColor } from 'src/styles/Themes';
import { Link } from 'src/components/link/Link';
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
import { useDashDispatch, useDashState } from 'src/context/DashContext';
import Modal from 'src/components/modal/ReactModal';
import { getWidgets } from './widgets/helpers';
import { DashboardModal } from './modal';
const S = {

View file

@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useState } from 'react';
import { useMemo, useState } from 'react';
import { BarChart } from 'src/components/chart/BarChart';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { SmallSelectWithValue } from 'src/components/select';

View file

@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useState } from 'react';
import { useMemo, useState } from 'react';
import { BarChart } from 'src/components/chart/BarChart';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { SmallSelectWithValue } from 'src/components/select';

View file

@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { useState } from 'react';
import { useMemo, useState } from 'react';
import { BarChart } from 'src/components/chart/BarChart';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { SmallSelectWithValue } from 'src/components/select';

View file

@ -15,10 +15,10 @@ import { mediaWidths } from 'src/styles/Themes';
import { usePriceState } from 'src/context/PriceContext';
import { getPrice } from 'src/components/price/Price';
import { useConfigState } from 'src/context/ConfigContext';
import { ReportType } from '../home/reports/forwardReport/ForwardReport';
import { getChordMatrix } from './helpers';
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
import { ReportType } from '../home/reports/forwardReport/ForwardReport';
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
import { getChordMatrix } from './helpers';
const Wrapper = styled.div`
height: 800px;

View file

@ -1,7 +1,6 @@
import { toast } from 'react-toastify';
import { getErrorContent } from 'src/utils/error';
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
import { SingleLine, Separation } from '../../../../components/generic/Styled';
import { useEffect, useState } from 'react';
import { useBosPayMutation } from 'src/graphql/mutations/__generated__/bosPay.generated';
import { InputWithDeco } from 'src/components/input/InputWithDeco';
@ -13,6 +12,7 @@ import { Camera } from 'react-feather';
import Modal from 'src/components/modal/ReactModal';
import dynamic from 'next/dynamic';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { SingleLine, Separation } from '../../../../components/generic/Styled';
const QRCodeReader = dynamic(() => import('src/components/qrReader'), {
ssr: false,

View file

@ -32,13 +32,8 @@ type LnWithdrawProps = {
};
export const LnWithdraw: FC<LnWithdrawProps> = ({ request }) => {
const {
minWithdrawable,
maxWithdrawable,
callback,
defaultDescription,
k1,
} = request;
const { minWithdrawable, maxWithdrawable, callback, defaultDescription, k1 } =
request;
const min = Number(minWithdrawable) / 1000 || 0;
const max = Number(maxWithdrawable) / 1000 || 0;
@ -54,12 +49,10 @@ export const LnWithdraw: FC<LnWithdrawProps> = ({ request }) => {
const [withdraw, { data, loading }] = useWithdrawLnUrlMutation({
onError: error => toast.error(getErrorContent(error)),
});
const [
checkStatus,
{ data: statusData, loading: statusLoading, error },
] = useGetInvoiceStatusChangeLazyQuery({
onError: error => toast.error(getErrorContent(error)),
});
const [checkStatus, { data: statusData, loading: statusLoading, error }] =
useGetInvoiceStatusChangeLazyQuery({
onError: error => toast.error(getErrorContent(error)),
});
useEffect(() => {
if (!loading && data?.lnUrlWithdraw) {

View file

@ -8,6 +8,7 @@ import { useBitcoinFees } from 'src/hooks/UseBitcoinFees';
import { useConfigState } from 'src/context/ConfigContext';
import { PeerSelect } from 'src/components/select/specific/PeerSelect';
import { WarningText } from 'src/views/stats/styles';
import styled from 'styled-components';
import {
DarkSubTitle,
Separation,
@ -20,7 +21,6 @@ import {
SingleButton,
MultiButton,
} from '../../../../components/buttons/multiButton/MultiButton';
import styled from 'styled-components';
interface OpenChannelProps {
initialPublicKey?: string | undefined | null;

View file

@ -4,10 +4,10 @@ import { useGetChannelQuery } from 'src/graphql/queries/__generated__/getChannel
import { useGetClosedChannelsQuery } from 'src/graphql/queries/__generated__/getClosedChannels.generated';
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
import { themeColors } from 'src/styles/Themes';
import { getAliasFromClosedChannels } from './helpers';
import ReactTooltip from 'react-tooltip';
import { Info } from 'react-feather';
import styled from 'styled-components';
import { getAliasFromClosedChannels } from './helpers';
const S = {
icon: styled.span`

View file

@ -7,6 +7,7 @@ import {
} from 'src/components/buttons/multiButton/MultiButton';
import { Forward } from 'src/graphql/types';
import styled from 'styled-components';
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
import { getErrorContent } from '../../../../utils/error';
import { SingleLine, SubTitle } from '../../../../components/generic/Styled';
import { LoadingCard } from '../../../../components/loading/LoadingCard';
@ -19,7 +20,6 @@ import {
ChannelType,
} from './ForwardReportTables';
import { CardContent } from '.';
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
type Props = {
days: number;

View file

@ -10,6 +10,7 @@ import {
import { toast } from 'react-toastify';
import { renderLine } from 'src/components/generic/helpers';
import { Forward } from 'src/graphql/types';
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
import {
chartAxisColor,
chartBarColor,
@ -22,7 +23,6 @@ import { getPrice } from '../../../../components/price/Price';
import { usePriceState } from '../../../../context/PriceContext';
import { orderAndReducedArray } from './helpers';
import { CardContent } from '.';
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
export type ReportDuration =
| 'day'

View file

@ -84,10 +84,8 @@ export const Accounts = () => {
prefetch('/');
}, [prefetch]);
const {
data: accountData,
loading: loadingData,
} = useGetServerAccountsQuery();
const { data: accountData, loading: loadingData } =
useGetServerAccountsQuery();
const [getCanConnect, { data, loading }] = useGetCanConnectLazyQuery({
fetchPolicy: 'network-only',

View file

@ -49,12 +49,10 @@ export const StartSwap = ({ max, min }: StartSwapProps) => {
const dispatch = useSwapsDispatch();
const [
getQuote,
{ data: _data, loading },
] = useCreateBoltzReverseSwapMutation({
onError: error => toast.error(getErrorContent(error)),
});
const [getQuote, { data: _data, loading }] =
useCreateBoltzReverseSwapMutation({
onError: error => toast.error(getErrorContent(error)),
});
const [data, resetMutation] = useMutationResultWithReset(_data);
useEffect(() => {

View file

@ -49,12 +49,10 @@ export const SwapClaim = () => {
} = useSwapsState();
const dispatch = useSwapsDispatch();
const [
claimTransaction,
{ data, loading },
] = useClaimBoltzTransactionMutation({
onError: error => toast.error(getErrorContent(error)),
});
const [claimTransaction, { data, loading }] =
useClaimBoltzTransactionMutation({
onError: error => toast.error(getErrorContent(error)),
});
useEffect(() => {
if (!data?.claimBoltzTransaction || typeof claim !== 'number') return;

View file

@ -48,9 +48,8 @@ export const Bakery = () => {
const [isOpen, isOpenSet] = React.useState<boolean>(false);
const [newMacaroon, newMacaroonSet] = React.useState<string>('');
const [permissions, permissionSet] = React.useState<PermissionsType>(
InitPermissions
);
const [permissions, permissionSet] =
React.useState<PermissionsType>(InitPermissions);
let hasATrue = false;
Object.entries(permissions);

View file

@ -1,5 +1,23 @@
import React, { FC, Fragment } from 'react';
import { InvoiceType } from 'src/graphql/types';
import { MessageCircle } from 'react-feather';
import styled from 'styled-components';
import { themeColors } from 'src/styles/Themes';
import { useGetChannelQuery } from 'src/graphql/queries/__generated__/getChannel.generated';
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
import { LoadingCard } from 'src/components/loading/LoadingCard';
import { Price } from '../../components/price/Price';
import {
getStatusDot,
getDateDif,
getFormatDate,
renderLine,
} from '../../components/generic/helpers';
import {
StatusLine,
NodeTitle,
MainInfo,
} from '../../components/generic/CardGeneric';
import {
Separation,
SubCard,
@ -7,24 +25,6 @@ import {
ResponsiveLine,
DarkSubTitle,
} from '../../components/generic/Styled';
import {
StatusLine,
NodeTitle,
MainInfo,
} from '../../components/generic/CardGeneric';
import {
getStatusDot,
getDateDif,
getFormatDate,
renderLine,
} from '../../components/generic/helpers';
import { Price } from '../../components/price/Price';
import { MessageCircle } from 'react-feather';
import styled from 'styled-components';
import { themeColors } from 'src/styles/Themes';
import { useGetChannelQuery } from 'src/graphql/queries/__generated__/getChannel.generated';
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
import { LoadingCard } from 'src/components/loading/LoadingCard';
const S = {
icon: styled.span`