mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-21 14:04:03 +01:00
chore: bump deps
This commit is contained in:
parent
30cea785a6
commit
acb96ff3df
43 changed files with 2097 additions and 3003 deletions
|
@ -34,8 +34,8 @@ module.exports = {
|
||||||
'plugin:import/errors',
|
'plugin:import/errors',
|
||||||
'plugin:import/warnings',
|
'plugin:import/warnings',
|
||||||
'plugin:jest/recommended',
|
'plugin:jest/recommended',
|
||||||
'prettier/@typescript-eslint',
|
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
|
'prettier',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
'react/react-in-jsx-scope': 'off',
|
'react/react-in-jsx-scope': 'off',
|
||||||
|
|
26
@types/react-table-config.d.ts
vendored
26
@types/react-table-config.d.ts
vendored
|
@ -51,8 +51,9 @@ import {
|
||||||
declare module 'react-table' {
|
declare module 'react-table' {
|
||||||
// take this file as-is, or comment out the sections that don't apply to your plugin configuration
|
// 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>>
|
export interface TableOptions<
|
||||||
extends UseExpandedOptions<D>,
|
D extends Record<string, unknown>
|
||||||
|
> extends UseExpandedOptions<D>,
|
||||||
UseFiltersOptions<D>,
|
UseFiltersOptions<D>,
|
||||||
UseGlobalFiltersOptions<D>,
|
UseGlobalFiltersOptions<D>,
|
||||||
UseGroupByOptions<D>,
|
UseGroupByOptions<D>,
|
||||||
|
@ -68,16 +69,14 @@ declare module 'react-table' {
|
||||||
|
|
||||||
export interface Hooks<
|
export interface Hooks<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseExpandedHooks<D>,
|
||||||
extends UseExpandedHooks<D>,
|
|
||||||
UseGroupByHooks<D>,
|
UseGroupByHooks<D>,
|
||||||
UseRowSelectHooks<D>,
|
UseRowSelectHooks<D>,
|
||||||
UseSortByHooks<D> {}
|
UseSortByHooks<D> {}
|
||||||
|
|
||||||
export interface TableInstance<
|
export interface TableInstance<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseColumnOrderInstanceProps<D>,
|
||||||
extends UseColumnOrderInstanceProps<D>,
|
|
||||||
UseExpandedInstanceProps<D>,
|
UseExpandedInstanceProps<D>,
|
||||||
UseFiltersInstanceProps<D>,
|
UseFiltersInstanceProps<D>,
|
||||||
UseGlobalFiltersInstanceProps<D>,
|
UseGlobalFiltersInstanceProps<D>,
|
||||||
|
@ -89,8 +88,7 @@ declare module 'react-table' {
|
||||||
|
|
||||||
export interface TableState<
|
export interface TableState<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseColumnOrderState<D>,
|
||||||
extends UseColumnOrderState<D>,
|
|
||||||
UseExpandedState<D>,
|
UseExpandedState<D>,
|
||||||
UseFiltersState<D>,
|
UseFiltersState<D>,
|
||||||
UseGlobalFiltersState<D>,
|
UseGlobalFiltersState<D>,
|
||||||
|
@ -103,8 +101,7 @@ declare module 'react-table' {
|
||||||
|
|
||||||
export interface ColumnInterface<
|
export interface ColumnInterface<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseFiltersColumnOptions<D>,
|
||||||
extends UseFiltersColumnOptions<D>,
|
|
||||||
UseGlobalFiltersColumnOptions<D>,
|
UseGlobalFiltersColumnOptions<D>,
|
||||||
UseGroupByColumnOptions<D>,
|
UseGroupByColumnOptions<D>,
|
||||||
UseResizeColumnsColumnOptions<D>,
|
UseResizeColumnsColumnOptions<D>,
|
||||||
|
@ -112,8 +109,7 @@ declare module 'react-table' {
|
||||||
|
|
||||||
export interface ColumnInstance<
|
export interface ColumnInstance<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseFiltersColumnProps<D>,
|
||||||
extends UseFiltersColumnProps<D>,
|
|
||||||
UseGroupByColumnProps<D>,
|
UseGroupByColumnProps<D>,
|
||||||
UseResizeColumnsColumnProps<D>,
|
UseResizeColumnsColumnProps<D>,
|
||||||
UseSortByColumnProps<D> {}
|
UseSortByColumnProps<D> {}
|
||||||
|
@ -121,12 +117,12 @@ declare module 'react-table' {
|
||||||
export interface Cell<
|
export interface Cell<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>,
|
D extends Record<string, unknown> = Record<string, unknown>,
|
||||||
V = any
|
V = any
|
||||||
> extends UseGroupByCellProps<D>, UseRowStateCellProps<D> {}
|
> extends UseGroupByCellProps<D>,
|
||||||
|
UseRowStateCellProps<D> {}
|
||||||
|
|
||||||
export interface Row<
|
export interface Row<
|
||||||
D extends Record<string, unknown> = Record<string, unknown>
|
D extends Record<string, unknown> = Record<string, unknown>
|
||||||
>
|
> extends UseExpandedRowProps<D>,
|
||||||
extends UseExpandedRowProps<D>,
|
|
||||||
UseGroupByRowProps<D>,
|
UseGroupByRowProps<D>,
|
||||||
UseRowSelectRowProps<D>,
|
UseRowSelectRowProps<D>,
|
||||||
UseRowStateRowProps<D> {}
|
UseRowStateRowProps<D> {}
|
||||||
|
|
4666
package-lock.json
generated
4666
package-lock.json
generated
File diff suppressed because it is too large
Load diff
63
package.json
63
package.json
|
@ -34,9 +34,9 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.3.19",
|
"@apollo/client": "^3.3.20",
|
||||||
"@emotion/babel-plugin": "^11.3.0",
|
"@emotion/babel-plugin": "^11.3.0",
|
||||||
"@next/bundle-analyzer": "^10.2.3",
|
"@next/bundle-analyzer": "^11.0.0",
|
||||||
"@visx/axis": "^1.12.0",
|
"@visx/axis": "^1.12.0",
|
||||||
"@visx/chord": "^1.7.0",
|
"@visx/chord": "^1.7.0",
|
||||||
"@visx/curve": "^1.7.0",
|
"@visx/curve": "^1.7.0",
|
||||||
|
@ -46,8 +46,8 @@
|
||||||
"@visx/scale": "^1.11.1",
|
"@visx/scale": "^1.11.1",
|
||||||
"@visx/shape": "^1.11.1",
|
"@visx/shape": "^1.11.1",
|
||||||
"@visx/tooltip": "^1.7.2",
|
"@visx/tooltip": "^1.7.2",
|
||||||
"apollo-server-micro": "^2.25.0",
|
"apollo-server-micro": "^2.25.1",
|
||||||
"balanceofsatoshis": "^8.0.14",
|
"balanceofsatoshis": "^10.1.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"bech32": "^2.0.0",
|
"bech32": "^2.0.0",
|
||||||
"bip32": "^2.0.6",
|
"bip32": "^2.0.6",
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
"d3-array": "^2.12.1",
|
"d3-array": "^2.12.1",
|
||||||
"d3-time-format": "^3.0.0",
|
"d3-time-format": "^3.0.0",
|
||||||
"date-fns": "^2.22.1",
|
"date-fns": "^2.22.1",
|
||||||
"graphql": "^15.5.0",
|
"graphql": "^15.5.1",
|
||||||
"graphql-iso-date": "^3.6.1",
|
"graphql-iso-date": "^3.6.1",
|
||||||
"graphql-middleware": "^6.0.10",
|
"graphql-middleware": "^6.0.10",
|
||||||
"graphql-rate-limit": "^3.1.0",
|
"graphql-rate-limit": "^3.1.0",
|
||||||
|
@ -67,12 +67,12 @@
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^2.2.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
"ln-service": "^51.8.2",
|
"ln-service": "^51.8.4",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"lodash.groupby": "^4.6.0",
|
"lodash.groupby": "^4.6.0",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"lodash.omit": "^4.5.0",
|
"lodash.omit": "^4.5.0",
|
||||||
"next": "^10.2.3",
|
"next": "^11.0.0",
|
||||||
"node-fetch": "^2.6.1",
|
"node-fetch": "^2.6.1",
|
||||||
"numeral": "^2.0.6",
|
"numeral": "^2.0.6",
|
||||||
"qrcode.react": "^1.0.1",
|
"qrcode.react": "^1.0.1",
|
||||||
|
@ -85,9 +85,9 @@
|
||||||
"react-intersection-observer": "^8.32.0",
|
"react-intersection-observer": "^8.32.0",
|
||||||
"react-qr-reader": "^2.2.1",
|
"react-qr-reader": "^2.2.1",
|
||||||
"react-select": "^4.3.1",
|
"react-select": "^4.3.1",
|
||||||
"react-slider": "^1.1.4",
|
"react-slider": "^1.3.1",
|
||||||
"react-spinners": "^0.11.0",
|
"react-spinners": "^0.11.0",
|
||||||
"react-spring": "^9.2.1",
|
"react-spring": "^9.2.3",
|
||||||
"react-table": "^7.7.0",
|
"react-table": "^7.7.0",
|
||||||
"react-toastify": "^7.0.4",
|
"react-toastify": "^7.0.4",
|
||||||
"react-tooltip": "^4.2.21",
|
"react-tooltip": "^4.2.21",
|
||||||
|
@ -96,26 +96,26 @@
|
||||||
"styled-components": "^5.3.0",
|
"styled-components": "^5.3.0",
|
||||||
"styled-react-modal": "^2.1.0",
|
"styled-react-modal": "^2.1.0",
|
||||||
"styled-theming": "^2.2.0",
|
"styled-theming": "^2.2.0",
|
||||||
"typescript": "^4.3.2",
|
"typescript": "^4.3.4",
|
||||||
"underscore": "^1.13.1",
|
"underscore": "^1.13.1",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"victory": "^35.8.4",
|
"victory": "^35.8.6",
|
||||||
"winston": "^3.3.3"
|
"winston": "^3.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.6",
|
||||||
"@commitlint/cli": "^12.1.4",
|
"@commitlint/cli": "^12.1.4",
|
||||||
"@commitlint/config-conventional": "^12.1.4",
|
"@commitlint/config-conventional": "^12.1.4",
|
||||||
"@graphql-codegen/add": "^2.0.2",
|
"@graphql-codegen/add": "^2.0.2",
|
||||||
"@graphql-codegen/cli": "^1.21.5",
|
"@graphql-codegen/cli": "^1.21.5",
|
||||||
"@graphql-codegen/fragment-matcher": "^2.0.1",
|
"@graphql-codegen/fragment-matcher": "^2.0.1",
|
||||||
"@graphql-codegen/introspection": "^1.18.2",
|
"@graphql-codegen/introspection": "^1.18.2",
|
||||||
"@graphql-codegen/near-operation-file-preset": "^1.18.1",
|
"@graphql-codegen/near-operation-file-preset": "^1.18.2",
|
||||||
"@graphql-codegen/typescript": "^1.22.1",
|
"@graphql-codegen/typescript": "^1.22.2",
|
||||||
"@graphql-codegen/typescript-operations": "^1.18.0",
|
"@graphql-codegen/typescript-operations": "^1.18.1",
|
||||||
"@graphql-codegen/typescript-react-apollo": "^2.2.5",
|
"@graphql-codegen/typescript-react-apollo": "^2.2.6",
|
||||||
"@graphql-codegen/typescript-resolvers": "^1.19.2",
|
"@graphql-codegen/typescript-resolvers": "^1.19.3",
|
||||||
"@testing-library/jest-dom": "^5.12.0",
|
"@testing-library/jest-dom": "^5.14.1",
|
||||||
"@testing-library/react": "^11.2.7",
|
"@testing-library/react": "^11.2.7",
|
||||||
"@types/bcryptjs": "^2.4.2",
|
"@types/bcryptjs": "^2.4.2",
|
||||||
"@types/cookie": "^0.4.0",
|
"@types/cookie": "^0.4.0",
|
||||||
|
@ -125,39 +125,40 @@
|
||||||
"@types/graphql-iso-date": "^3.4.0",
|
"@types/graphql-iso-date": "^3.4.0",
|
||||||
"@types/js-cookie": "^2.2.6",
|
"@types/js-cookie": "^2.2.6",
|
||||||
"@types/js-yaml": "^4.0.1",
|
"@types/js-yaml": "^4.0.1",
|
||||||
"@types/jsonwebtoken": "^8.5.1",
|
"@types/jsonwebtoken": "^8.5.2",
|
||||||
"@types/lodash.groupby": "^4.6.6",
|
"@types/lodash.groupby": "^4.6.6",
|
||||||
"@types/lodash.merge": "^4.6.6",
|
"@types/lodash.merge": "^4.6.6",
|
||||||
"@types/lodash.omit": "^4.5.6",
|
"@types/lodash.omit": "^4.5.6",
|
||||||
"@types/lodash.sortby": "^4.7.6",
|
"@types/lodash.sortby": "^4.7.6",
|
||||||
"@types/node": "^15.6.1",
|
"@types/node": "^15.12.4",
|
||||||
"@types/node-fetch": "^2.5.10",
|
"@types/node-fetch": "^2.5.10",
|
||||||
"@types/numeral": "^2.0.1",
|
"@types/numeral": "^2.0.1",
|
||||||
"@types/qrcode.react": "^1.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-copy-to-clipboard": "^5.0.0",
|
||||||
"@types/react-grid-layout": "^1.1.1",
|
"@types/react-grid-layout": "^1.1.1",
|
||||||
"@types/react-qr-reader": "^2.1.3",
|
"@types/react-qr-reader": "^2.1.3",
|
||||||
"@types/react-select": "^4.0.15",
|
"@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/react-table": "^7.7.1",
|
||||||
"@types/secp256k1": "^4.0.2",
|
"@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-react-modal": "^1.2.0",
|
||||||
"@types/styled-theming": "^2.2.5",
|
"@types/styled-theming": "^2.2.5",
|
||||||
"@types/underscore": "^1.11.2",
|
"@types/underscore": "^1.11.2",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/uuid": "^8.3.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.26.0",
|
"@typescript-eslint/eslint-plugin": "^4.27.0",
|
||||||
"@typescript-eslint/parser": "^4.26.0",
|
"@typescript-eslint/parser": "^4.27.0",
|
||||||
"apollo-server": "^2.25.0",
|
"apollo-server": "^2.25.1",
|
||||||
"apollo-server-testing": "^2.25.0",
|
"apollo-server-testing": "^2.25.1",
|
||||||
"babel-jest": "^27.0.2",
|
"babel-jest": "^27.0.2",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.2",
|
||||||
"babel-plugin-inline-react-svg": "^2.0.1",
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
||||||
"babel-plugin-styled-components": "^1.12.0",
|
"babel-plugin-styled-components": "^1.12.0",
|
||||||
"babel-preset-react-app": "^10.0.0",
|
"babel-preset-react-app": "^10.0.0",
|
||||||
"devmoji": "^2.2.1",
|
"devmoji": "^2.3.0",
|
||||||
"eslint": "^7.27.0",
|
"eslint": "^7.29.0",
|
||||||
|
"eslint-config-next": "^11.0.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.23.4",
|
"eslint-plugin-import": "^2.23.4",
|
||||||
"eslint-plugin-jest": "^24.3.6",
|
"eslint-plugin-jest": "^24.3.6",
|
||||||
|
@ -166,10 +167,10 @@
|
||||||
"eslint-plugin-react": "^7.24.0",
|
"eslint-plugin-react": "^7.24.0",
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"jest": "^27.0.3",
|
"jest": "^27.0.4",
|
||||||
"jest-fetch-mock": "^3.0.3",
|
"jest-fetch-mock": "^3.0.3",
|
||||||
"lint-staged": "^11.0.0",
|
"lint-staged": "^11.0.0",
|
||||||
"prettier": "^2.3.0",
|
"prettier": "^2.3.1",
|
||||||
"standard-version": "^9.3.0"
|
"standard-version": "^9.3.0"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
|
||||||
import { Version } from 'src/components/version/Version';
|
import { Version } from 'src/components/version/Version';
|
||||||
import { NextPageContext } from 'next';
|
import { NextPageContext } from 'next';
|
||||||
import { getProps } from 'src/utils/ssr';
|
import { getProps } from 'src/utils/ssr';
|
||||||
|
import { MempoolReport } from 'src/views/home/reports/mempool';
|
||||||
import { NetworkInfo } from '../src/views/home/networkInfo/NetworkInfo';
|
import { NetworkInfo } from '../src/views/home/networkInfo/NetworkInfo';
|
||||||
import { AccountInfo } from '../src/views/home/account/AccountInfo';
|
import { AccountInfo } from '../src/views/home/account/AccountInfo';
|
||||||
import { QuickActions } from '../src/views/home/quickActions/QuickActions';
|
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 { ForwardBox } from '../src/views/home/reports/forwardReport';
|
||||||
import { LiquidReport } from '../src/views/home/reports/liquidReport/LiquidReport';
|
import { LiquidReport } from '../src/views/home/reports/liquidReport/LiquidReport';
|
||||||
import { ConnectCard } from '../src/views/home/connect/Connect';
|
import { ConnectCard } from '../src/views/home/connect/Connect';
|
||||||
import { MempoolReport } from 'src/views/home/reports/mempool';
|
|
||||||
|
|
||||||
const HomeView = () => (
|
const HomeView = () => (
|
||||||
<>
|
<>
|
||||||
|
|
|
@ -3,12 +3,12 @@ import styled from 'styled-components';
|
||||||
import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
|
import { GridWrapper } from 'src/components/gridWrapper/GridWrapper';
|
||||||
import { NextPageContext } from 'next';
|
import { NextPageContext } from 'next';
|
||||||
import { getProps } from 'src/utils/ssr';
|
import { getProps } from 'src/utils/ssr';
|
||||||
|
import { DashboardSettings } from 'src/views/settings/Dashboard';
|
||||||
import { SingleLine } from '../../src/components/generic/Styled';
|
import { SingleLine } from '../../src/components/generic/Styled';
|
||||||
import { InterfaceSettings } from '../../src/views/settings/Interface';
|
import { InterfaceSettings } from '../../src/views/settings/Interface';
|
||||||
import { DangerView } from '../../src/views/settings/Danger';
|
import { DangerView } from '../../src/views/settings/Danger';
|
||||||
import { ChatSettings } from '../../src/views/settings/Chat';
|
import { ChatSettings } from '../../src/views/settings/Chat';
|
||||||
import { PrivacySettings } from '../../src/views/settings/Privacy';
|
import { PrivacySettings } from '../../src/views/settings/Privacy';
|
||||||
import { DashboardSettings } from 'src/views/settings/Dashboard';
|
|
||||||
|
|
||||||
export const ButtonRow = styled.div`
|
export const ButtonRow = styled.div`
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
|
@ -11,6 +11,13 @@ import { NextPageContext } from 'next';
|
||||||
import { getProps } from 'src/utils/ssr';
|
import { getProps } from 'src/utils/ssr';
|
||||||
import { RefreshCw, Settings } from 'react-feather';
|
import { RefreshCw, Settings } from 'react-feather';
|
||||||
import styled, { css } from 'styled-components';
|
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 {
|
import {
|
||||||
Card,
|
Card,
|
||||||
CardWithTitle,
|
CardWithTitle,
|
||||||
|
@ -23,13 +30,6 @@ import { PaymentsCard } from '../src/views/transactions/PaymentsCards';
|
||||||
import { LoadingCard } from '../src/components/loading/LoadingCard';
|
import { LoadingCard } from '../src/components/loading/LoadingCard';
|
||||||
import { ColorButton } from '../src/components/buttons/colorButton/ColorButton';
|
import { ColorButton } from '../src/components/buttons/colorButton/ColorButton';
|
||||||
import { FlowBox } from '../src/views/home/reports/flow';
|
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 = {
|
type RotationProps = {
|
||||||
withRotation: boolean;
|
withRotation: boolean;
|
||||||
|
|
|
@ -20,7 +20,6 @@ type PayType = {
|
||||||
type RebalanceType = {
|
type RebalanceType = {
|
||||||
avoid?: String[];
|
avoid?: String[];
|
||||||
in_through?: String;
|
in_through?: String;
|
||||||
is_avoiding_high_inbound?: Boolean;
|
|
||||||
max_fee?: Number;
|
max_fee?: Number;
|
||||||
max_fee_rate?: Number;
|
max_fee_rate?: Number;
|
||||||
max_rebalance?: Number;
|
max_rebalance?: Number;
|
||||||
|
@ -96,7 +95,6 @@ export const bosResolvers = {
|
||||||
{
|
{
|
||||||
avoid,
|
avoid,
|
||||||
in_through,
|
in_through,
|
||||||
is_avoiding_high_inbound,
|
|
||||||
max_fee,
|
max_fee,
|
||||||
max_fee_rate,
|
max_fee_rate,
|
||||||
max_rebalance,
|
max_rebalance,
|
||||||
|
@ -110,7 +108,6 @@ export const bosResolvers = {
|
||||||
out_channels: [],
|
out_channels: [],
|
||||||
avoid,
|
avoid,
|
||||||
...(in_through && { in_through }),
|
...(in_through && { in_through }),
|
||||||
...(is_avoiding_high_inbound && { is_avoiding_high_inbound }),
|
|
||||||
...(max_fee && max_fee > 0 && { max_fee }),
|
...(max_fee && max_fee > 0 && { max_fee }),
|
||||||
...(max_fee_rate && max_fee_rate > 0 && { max_fee_rate }),
|
...(max_fee_rate && max_fee_rate > 0 && { max_fee_rate }),
|
||||||
...(max_rebalance &&
|
...(max_rebalance &&
|
||||||
|
|
|
@ -55,11 +55,12 @@ export const chainResolvers = {
|
||||||
|
|
||||||
const { lnd } = context;
|
const { lnd } = context;
|
||||||
|
|
||||||
const pendingValue: PendingChainBalanceProps = await to<GetPendingChainBalanceType>(
|
const pendingValue: PendingChainBalanceProps =
|
||||||
getPendingChainBalance({
|
await to<GetPendingChainBalanceType>(
|
||||||
lnd,
|
getPendingChainBalance({
|
||||||
})
|
lnd,
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const { pending_channels } = await to<GetPendingChannelsType>(
|
const { pending_channels } = await to<GetPendingChannelsType>(
|
||||||
getPendingChannels({ lnd })
|
getPendingChannels({ lnd })
|
||||||
|
|
|
@ -16,12 +16,8 @@ import { secret } from 'pages/api/v1';
|
||||||
import { ResolverContext } from 'config/client';
|
import { ResolverContext } from 'config/client';
|
||||||
|
|
||||||
const { serverRuntimeConfig } = getConfig();
|
const { serverRuntimeConfig } = getConfig();
|
||||||
const {
|
const { macaroonPath, lnCertPath, lnServerUrl, accountConfigPath } =
|
||||||
macaroonPath,
|
serverRuntimeConfig;
|
||||||
lnCertPath,
|
|
||||||
lnServerUrl,
|
|
||||||
accountConfigPath,
|
|
||||||
} = serverRuntimeConfig;
|
|
||||||
|
|
||||||
const ssoMacaroon = readMacaroons(macaroonPath);
|
const ssoMacaroon = readMacaroons(macaroonPath);
|
||||||
const ssoCert = readFile(lnCertPath);
|
const ssoCert = readFile(lnCertPath);
|
||||||
|
|
|
@ -25,9 +25,8 @@ export default async (_: undefined, __: undefined, context: ContextType) => {
|
||||||
getForwards({ lnd, after, before })
|
getForwards({ lnd, after, before })
|
||||||
);
|
);
|
||||||
|
|
||||||
const channelVolume: { channel: string; tokens: number }[] = getChannelVolume(
|
const channelVolume: { channel: string; tokens: number }[] =
|
||||||
forwards
|
getChannelVolume(forwards);
|
||||||
);
|
|
||||||
|
|
||||||
const channelDetails = channels
|
const channelDetails = channels
|
||||||
.map(channel => {
|
.map(channel => {
|
||||||
|
|
|
@ -175,7 +175,6 @@ export const mutationTypes = gql`
|
||||||
bosRebalance(
|
bosRebalance(
|
||||||
avoid: [String]
|
avoid: [String]
|
||||||
in_through: String
|
in_through: String
|
||||||
is_avoiding_high_inbound: Boolean
|
|
||||||
max_fee: Int
|
max_fee: Int
|
||||||
max_fee_rate: Int
|
max_fee_rate: Int
|
||||||
max_rebalance: Int
|
max_rebalance: Int
|
||||||
|
|
|
@ -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 |
|
@ -8,8 +8,8 @@ import { chartColors } from 'src/styles/Themes';
|
||||||
import { ThemeContext } from 'styled-components';
|
import { ThemeContext } from 'styled-components';
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
|
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
|
||||||
import { Price } from '../price/Price';
|
|
||||||
import { localPoint } from '@visx/event';
|
import { localPoint } from '@visx/event';
|
||||||
|
import { Price } from '../price/Price';
|
||||||
|
|
||||||
type BarGroupProps = {
|
type BarGroupProps = {
|
||||||
width: number;
|
width: number;
|
||||||
|
|
|
@ -7,8 +7,8 @@ import { chartColors } from 'src/styles/Themes';
|
||||||
import { ThemeContext } from 'styled-components';
|
import { ThemeContext } from 'styled-components';
|
||||||
import { useContext } from 'react';
|
import { useContext } from 'react';
|
||||||
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
|
import { TooltipWithBounds, defaultStyles, useTooltip } from '@visx/tooltip';
|
||||||
import { Price } from '../price/Price';
|
|
||||||
import { localPoint } from '@visx/event';
|
import { localPoint } from '@visx/event';
|
||||||
|
import { Price } from '../price/Price';
|
||||||
|
|
||||||
type BarGroupProps = {
|
type BarGroupProps = {
|
||||||
width: number;
|
width: number;
|
||||||
|
|
|
@ -33,7 +33,7 @@ export const shorten = (text: string): string => {
|
||||||
|
|
||||||
export const addEllipsis = (
|
export const addEllipsis = (
|
||||||
text: string | null | undefined,
|
text: string | null | undefined,
|
||||||
length: number = 14
|
length = 14
|
||||||
): string => {
|
): string => {
|
||||||
if (!text) return '';
|
if (!text) return '';
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { useBitcoinFees } from 'src/hooks/UseBitcoinFees';
|
||||||
import { useConfigState } from 'src/context/ConfigContext';
|
import { useConfigState } from 'src/context/ConfigContext';
|
||||||
import { renderLine } from 'src/components/generic/helpers';
|
import { renderLine } from 'src/components/generic/helpers';
|
||||||
import { InputWithDeco } from 'src/components/input/InputWithDeco';
|
import { InputWithDeco } from 'src/components/input/InputWithDeco';
|
||||||
|
import { chartColors } from 'src/styles/Themes';
|
||||||
import {
|
import {
|
||||||
Separation,
|
Separation,
|
||||||
SingleLine,
|
SingleLine,
|
||||||
|
@ -20,7 +21,6 @@ import {
|
||||||
MultiButton,
|
MultiButton,
|
||||||
SingleButton,
|
SingleButton,
|
||||||
} from '../../buttons/multiButton/MultiButton';
|
} from '../../buttons/multiButton/MultiButton';
|
||||||
import { chartColors } from 'src/styles/Themes';
|
|
||||||
|
|
||||||
interface CloseChannelProps {
|
interface CloseChannelProps {
|
||||||
callback: () => void;
|
callback: () => void;
|
||||||
|
|
|
@ -60,45 +60,47 @@ interface GetPriceProps {
|
||||||
|
|
||||||
export type FormatFnType = (options: GetPriceProps) => JSX.Element | string;
|
export type FormatFnType = (options: GetPriceProps) => JSX.Element | string;
|
||||||
|
|
||||||
export const getPrice = (
|
export const getPrice =
|
||||||
currency: string,
|
(
|
||||||
displayValues: boolean,
|
currency: string,
|
||||||
priceContext: {
|
displayValues: boolean,
|
||||||
fiat: string;
|
priceContext: {
|
||||||
dontShow: boolean;
|
fiat: string;
|
||||||
prices?: { [key: string]: { last: number; symbol: string } };
|
dontShow: boolean;
|
||||||
}
|
prices?: { [key: string]: { last: number; symbol: string } };
|
||||||
) => ({
|
}
|
||||||
amount,
|
) =>
|
||||||
breakNumber = false,
|
({
|
||||||
override,
|
amount,
|
||||||
noUnit,
|
breakNumber = false,
|
||||||
}: GetPriceProps): JSX.Element | string => {
|
override,
|
||||||
if (!amount) return '-';
|
noUnit,
|
||||||
const { prices, dontShow, fiat } = priceContext;
|
}: GetPriceProps): JSX.Element | string => {
|
||||||
|
if (!amount) return '-';
|
||||||
|
const { prices, dontShow, fiat } = priceContext;
|
||||||
|
|
||||||
if (!displayValues) {
|
if (!displayValues) {
|
||||||
return '-';
|
return '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
let priceProps: PriceProps = {
|
let priceProps: PriceProps = {
|
||||||
price: 0,
|
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,
|
|
||||||
symbol: '',
|
symbol: '',
|
||||||
|
currency: currency !== 'btc' && currency !== 'sat' ? 'sat' : currency,
|
||||||
};
|
};
|
||||||
|
|
||||||
priceProps = {
|
if (currency === 'fiat' && prices && !dontShow) {
|
||||||
price: current.last,
|
const current: { last: number; symbol: string } = prices[fiat] ?? {
|
||||||
symbol: current.symbol,
|
last: 0,
|
||||||
currency,
|
symbol: '',
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
return getValue({ amount, ...priceProps, breakNumber, override, noUnit });
|
priceProps = {
|
||||||
};
|
price: current.last,
|
||||||
|
symbol: current.symbol,
|
||||||
|
currency,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return getValue({ amount, ...priceProps, breakNumber, override, noUnit });
|
||||||
|
};
|
||||||
|
|
|
@ -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>;
|
|
||||||
};
|
|
|
@ -7,7 +7,6 @@ const defaultOptions = {}
|
||||||
export type BosRebalanceMutationVariables = Types.Exact<{
|
export type BosRebalanceMutationVariables = Types.Exact<{
|
||||||
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
|
avoid?: Types.Maybe<Array<Types.Maybe<Types.Scalars['String']>> | Types.Maybe<Types.Scalars['String']>>;
|
||||||
in_through?: 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?: Types.Maybe<Types.Scalars['Int']>;
|
||||||
max_fee_rate?: Types.Maybe<Types.Scalars['Int']>;
|
max_fee_rate?: Types.Maybe<Types.Scalars['Int']>;
|
||||||
max_rebalance?: Types.Maybe<Types.Scalars['Int']>;
|
max_rebalance?: Types.Maybe<Types.Scalars['Int']>;
|
||||||
|
@ -36,11 +35,10 @@ export type BosRebalanceMutation = (
|
||||||
|
|
||||||
|
|
||||||
export const BosRebalanceDocument = gql`
|
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(
|
bosRebalance(
|
||||||
avoid: $avoid
|
avoid: $avoid
|
||||||
in_through: $in_through
|
in_through: $in_through
|
||||||
is_avoiding_high_inbound: $is_avoiding_high_inbound
|
|
||||||
max_fee: $max_fee
|
max_fee: $max_fee
|
||||||
max_fee_rate: $max_fee_rate
|
max_fee_rate: $max_fee_rate
|
||||||
max_rebalance: $max_rebalance
|
max_rebalance: $max_rebalance
|
||||||
|
@ -90,7 +88,6 @@ export type BosRebalanceMutationFn = Apollo.MutationFunction<BosRebalanceMutatio
|
||||||
* variables: {
|
* variables: {
|
||||||
* avoid: // value for 'avoid'
|
* avoid: // value for 'avoid'
|
||||||
* in_through: // value for 'in_through'
|
* in_through: // value for 'in_through'
|
||||||
* is_avoiding_high_inbound: // value for 'is_avoiding_high_inbound'
|
|
||||||
* max_fee: // value for 'max_fee'
|
* max_fee: // value for 'max_fee'
|
||||||
* max_fee_rate: // value for 'max_fee_rate'
|
* max_fee_rate: // value for 'max_fee_rate'
|
||||||
* max_rebalance: // value for 'max_rebalance'
|
* max_rebalance: // value for 'max_rebalance'
|
||||||
|
|
|
@ -4,7 +4,6 @@ export const BOS_REBALANCE = gql`
|
||||||
mutation BosRebalance(
|
mutation BosRebalance(
|
||||||
$avoid: [String]
|
$avoid: [String]
|
||||||
$in_through: String
|
$in_through: String
|
||||||
$is_avoiding_high_inbound: Boolean
|
|
||||||
$max_fee: Int
|
$max_fee: Int
|
||||||
$max_fee_rate: Int
|
$max_fee_rate: Int
|
||||||
$max_rebalance: Int
|
$max_rebalance: Int
|
||||||
|
@ -15,7 +14,6 @@ export const BOS_REBALANCE = gql`
|
||||||
bosRebalance(
|
bosRebalance(
|
||||||
avoid: $avoid
|
avoid: $avoid
|
||||||
in_through: $in_through
|
in_through: $in_through
|
||||||
is_avoiding_high_inbound: $is_avoiding_high_inbound
|
|
||||||
max_fee: $max_fee
|
max_fee: $max_fee
|
||||||
max_fee_rate: $max_fee_rate
|
max_fee_rate: $max_fee_rate
|
||||||
max_rebalance: $max_rebalance
|
max_rebalance: $max_rebalance
|
||||||
|
|
|
@ -380,7 +380,6 @@ export type MutationBosPayArgs = {
|
||||||
export type MutationBosRebalanceArgs = {
|
export type MutationBosRebalanceArgs = {
|
||||||
avoid?: Maybe<Array<Maybe<Scalars['String']>>>;
|
avoid?: Maybe<Array<Maybe<Scalars['String']>>>;
|
||||||
in_through?: Maybe<Scalars['String']>;
|
in_through?: Maybe<Scalars['String']>;
|
||||||
is_avoiding_high_inbound?: Maybe<Scalars['Boolean']>;
|
|
||||||
max_fee?: Maybe<Scalars['Int']>;
|
max_fee?: Maybe<Scalars['Int']>;
|
||||||
max_fee_rate?: Maybe<Scalars['Int']>;
|
max_fee_rate?: Maybe<Scalars['Int']>;
|
||||||
max_rebalance?: Maybe<Scalars['Int']>;
|
max_rebalance?: Maybe<Scalars['Int']>;
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {
|
||||||
Star,
|
Star,
|
||||||
} from 'react-feather';
|
} from 'react-feather';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { SatoshiSymbol } from 'src/components/satoshi/Satoshi';
|
||||||
import { Separation, SingleLine } from '../../../components/generic/Styled';
|
import { Separation, SingleLine } from '../../../components/generic/Styled';
|
||||||
import {
|
import {
|
||||||
useConfigState,
|
useConfigState,
|
||||||
|
@ -20,7 +21,6 @@ import {
|
||||||
unSelectedNavButton,
|
unSelectedNavButton,
|
||||||
} from '../../../styles/Themes';
|
} from '../../../styles/Themes';
|
||||||
import { usePriceState } from '../../../context/PriceContext';
|
import { usePriceState } from '../../../context/PriceContext';
|
||||||
import { SatoshiSymbol } from 'src/components/satoshi/Satoshi';
|
|
||||||
|
|
||||||
const SelectedIcon = styled.div<{ selected: boolean }>`
|
const SelectedIcon = styled.div<{ selected: boolean }>`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -42,7 +42,6 @@ const defaultRebalanceId: RebalanceIdType = {
|
||||||
type StateType = {
|
type StateType = {
|
||||||
avoid: RebalanceIdType[];
|
avoid: RebalanceIdType[];
|
||||||
in_through: RebalanceIdType;
|
in_through: RebalanceIdType;
|
||||||
is_avoiding_high_inbound: boolean;
|
|
||||||
max_fee: number;
|
max_fee: number;
|
||||||
max_fee_rate: number;
|
max_fee_rate: number;
|
||||||
max_rebalance: number;
|
max_rebalance: number;
|
||||||
|
@ -52,10 +51,6 @@ type StateType = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ActionType =
|
export type ActionType =
|
||||||
| {
|
|
||||||
type: 'avoidHigh';
|
|
||||||
avoid: boolean;
|
|
||||||
}
|
|
||||||
| {
|
| {
|
||||||
type: 'maxFee' | 'maxFeeRate' | 'maxRebalance' | 'out_inbound';
|
type: 'maxFee' | 'maxFeeRate' | 'maxRebalance' | 'out_inbound';
|
||||||
amount: number;
|
amount: number;
|
||||||
|
@ -87,7 +82,6 @@ export type ActionType =
|
||||||
const initialState: StateType = {
|
const initialState: StateType = {
|
||||||
avoid: [],
|
avoid: [],
|
||||||
in_through: defaultRebalanceId,
|
in_through: defaultRebalanceId,
|
||||||
is_avoiding_high_inbound: false,
|
|
||||||
max_fee: 10,
|
max_fee: 10,
|
||||||
max_fee_rate: 100,
|
max_fee_rate: 100,
|
||||||
max_rebalance: 0,
|
max_rebalance: 0,
|
||||||
|
@ -98,8 +92,6 @@ const initialState: StateType = {
|
||||||
|
|
||||||
const reducer = (state: StateType, action: ActionType): StateType => {
|
const reducer = (state: StateType, action: ActionType): StateType => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case 'avoidHigh':
|
|
||||||
return { ...state, is_avoiding_high_inbound: action.avoid };
|
|
||||||
case 'maxFee':
|
case 'maxFee':
|
||||||
return { ...state, max_fee: action.amount };
|
return { ...state, max_fee: action.amount };
|
||||||
case 'maxFeeRate':
|
case 'maxFeeRate':
|
||||||
|
|
|
@ -34,10 +34,8 @@ export const ModalNodes: React.FC<ModalNodesType> = ({
|
||||||
const [newNode, newNodeSet] = React.useState<string>('');
|
const [newNode, newNodeSet] = React.useState<string>('');
|
||||||
const { loading, data } = useGetPeersQuery();
|
const { loading, data } = useGetPeersQuery();
|
||||||
|
|
||||||
const [
|
const [getNode, { data: _data, loading: nodeLoading }] =
|
||||||
getNode,
|
useGetNodeLazyQuery();
|
||||||
{ data: _data, loading: nodeLoading },
|
|
||||||
] = useGetNodeLazyQuery();
|
|
||||||
const [nodeData, resetMutationResult] = useMutationResultWithReset(_data);
|
const [nodeData, resetMutationResult] = useMutationResultWithReset(_data);
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|
|
@ -65,8 +65,13 @@ export const PendingCard = ({
|
||||||
partner_node_info,
|
partner_node_info,
|
||||||
} = channelInfo;
|
} = channelInfo;
|
||||||
|
|
||||||
const { alias, capacity, channel_count, color: nodeColor, updated_at } =
|
const {
|
||||||
partner_node_info?.node || {};
|
alias,
|
||||||
|
capacity,
|
||||||
|
channel_count,
|
||||||
|
color: nodeColor,
|
||||||
|
updated_at,
|
||||||
|
} = partner_node_info?.node || {};
|
||||||
|
|
||||||
const formatBalance = format({ amount: local_balance + remote_balance });
|
const formatBalance = format({ amount: local_balance + remote_balance });
|
||||||
const formatLocal = format({ amount: local_balance });
|
const formatLocal = format({ amount: local_balance });
|
||||||
|
|
|
@ -35,9 +35,8 @@ export const ChatInput = ({
|
||||||
});
|
});
|
||||||
const [data, resetMutationResult] = useMutationResultWithReset(_data);
|
const [data, resetMutationResult] = useMutationResultWithReset(_data);
|
||||||
|
|
||||||
const [formattedMessage, contentType, tokens, canSend] = handleMessage(
|
const [formattedMessage, contentType, tokens, canSend] =
|
||||||
message
|
handleMessage(message);
|
||||||
);
|
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
if (!loading && account && data?.sendMessage) {
|
if (!loading && account && data?.sendMessage) {
|
||||||
|
|
|
@ -5,13 +5,13 @@ import { useLocalStorage } from 'src/hooks/UseLocalStorage';
|
||||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||||
import { useRef } from 'react';
|
import { useRef } from 'react';
|
||||||
import useElementSize from 'src/hooks/UseElementSize';
|
import useElementSize from 'src/hooks/UseElementSize';
|
||||||
import { getWidgets } from './widgets/helpers';
|
|
||||||
import { Card, SubTitle } from 'src/components/generic/Styled';
|
import { Card, SubTitle } from 'src/components/generic/Styled';
|
||||||
import { textColor } from 'src/styles/Themes';
|
import { textColor } from 'src/styles/Themes';
|
||||||
import { Link } from 'src/components/link/Link';
|
import { Link } from 'src/components/link/Link';
|
||||||
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
|
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
|
||||||
import { useDashDispatch, useDashState } from 'src/context/DashContext';
|
import { useDashDispatch, useDashState } from 'src/context/DashContext';
|
||||||
import Modal from 'src/components/modal/ReactModal';
|
import Modal from 'src/components/modal/ReactModal';
|
||||||
|
import { getWidgets } from './widgets/helpers';
|
||||||
import { DashboardModal } from './modal';
|
import { DashboardModal } from './modal';
|
||||||
|
|
||||||
const S = {
|
const S = {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
import { BarChart } from 'src/components/chart/BarChart';
|
import { BarChart } from 'src/components/chart/BarChart';
|
||||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||||
import { SmallSelectWithValue } from 'src/components/select';
|
import { SmallSelectWithValue } from 'src/components/select';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
import { BarChart } from 'src/components/chart/BarChart';
|
import { BarChart } from 'src/components/chart/BarChart';
|
||||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||||
import { SmallSelectWithValue } from 'src/components/select';
|
import { SmallSelectWithValue } from 'src/components/select';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo, useState } from 'react';
|
||||||
import { useState } from 'react';
|
|
||||||
import { BarChart } from 'src/components/chart/BarChart';
|
import { BarChart } from 'src/components/chart/BarChart';
|
||||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||||
import { SmallSelectWithValue } from 'src/components/select';
|
import { SmallSelectWithValue } from 'src/components/select';
|
||||||
|
|
|
@ -15,10 +15,10 @@ import { mediaWidths } from 'src/styles/Themes';
|
||||||
import { usePriceState } from 'src/context/PriceContext';
|
import { usePriceState } from 'src/context/PriceContext';
|
||||||
import { getPrice } from 'src/components/price/Price';
|
import { getPrice } from 'src/components/price/Price';
|
||||||
import { useConfigState } from 'src/context/ConfigContext';
|
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 { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||||
|
import { ReportType } from '../home/reports/forwardReport/ForwardReport';
|
||||||
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
|
import { ChannelAlias } from '../home/reports/forwardReport/ChannelAlias';
|
||||||
|
import { getChordMatrix } from './helpers';
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
height: 800px;
|
height: 800px;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { getErrorContent } from 'src/utils/error';
|
import { getErrorContent } from 'src/utils/error';
|
||||||
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
|
import { ColorButton } from 'src/components/buttons/colorButton/ColorButton';
|
||||||
import { SingleLine, Separation } from '../../../../components/generic/Styled';
|
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useBosPayMutation } from 'src/graphql/mutations/__generated__/bosPay.generated';
|
import { useBosPayMutation } from 'src/graphql/mutations/__generated__/bosPay.generated';
|
||||||
import { InputWithDeco } from 'src/components/input/InputWithDeco';
|
import { InputWithDeco } from 'src/components/input/InputWithDeco';
|
||||||
|
@ -13,6 +12,7 @@ import { Camera } from 'react-feather';
|
||||||
import Modal from 'src/components/modal/ReactModal';
|
import Modal from 'src/components/modal/ReactModal';
|
||||||
import dynamic from 'next/dynamic';
|
import dynamic from 'next/dynamic';
|
||||||
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
import { LoadingCard } from 'src/components/loading/LoadingCard';
|
||||||
|
import { SingleLine, Separation } from '../../../../components/generic/Styled';
|
||||||
|
|
||||||
const QRCodeReader = dynamic(() => import('src/components/qrReader'), {
|
const QRCodeReader = dynamic(() => import('src/components/qrReader'), {
|
||||||
ssr: false,
|
ssr: false,
|
||||||
|
|
|
@ -32,13 +32,8 @@ type LnWithdrawProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LnWithdraw: FC<LnWithdrawProps> = ({ request }) => {
|
export const LnWithdraw: FC<LnWithdrawProps> = ({ request }) => {
|
||||||
const {
|
const { minWithdrawable, maxWithdrawable, callback, defaultDescription, k1 } =
|
||||||
minWithdrawable,
|
request;
|
||||||
maxWithdrawable,
|
|
||||||
callback,
|
|
||||||
defaultDescription,
|
|
||||||
k1,
|
|
||||||
} = request;
|
|
||||||
|
|
||||||
const min = Number(minWithdrawable) / 1000 || 0;
|
const min = Number(minWithdrawable) / 1000 || 0;
|
||||||
const max = Number(maxWithdrawable) / 1000 || 0;
|
const max = Number(maxWithdrawable) / 1000 || 0;
|
||||||
|
@ -54,12 +49,10 @@ export const LnWithdraw: FC<LnWithdrawProps> = ({ request }) => {
|
||||||
const [withdraw, { data, loading }] = useWithdrawLnUrlMutation({
|
const [withdraw, { data, loading }] = useWithdrawLnUrlMutation({
|
||||||
onError: error => toast.error(getErrorContent(error)),
|
onError: error => toast.error(getErrorContent(error)),
|
||||||
});
|
});
|
||||||
const [
|
const [checkStatus, { data: statusData, loading: statusLoading, error }] =
|
||||||
checkStatus,
|
useGetInvoiceStatusChangeLazyQuery({
|
||||||
{ data: statusData, loading: statusLoading, error },
|
onError: error => toast.error(getErrorContent(error)),
|
||||||
] = useGetInvoiceStatusChangeLazyQuery({
|
});
|
||||||
onError: error => toast.error(getErrorContent(error)),
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading && data?.lnUrlWithdraw) {
|
if (!loading && data?.lnUrlWithdraw) {
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { useBitcoinFees } from 'src/hooks/UseBitcoinFees';
|
||||||
import { useConfigState } from 'src/context/ConfigContext';
|
import { useConfigState } from 'src/context/ConfigContext';
|
||||||
import { PeerSelect } from 'src/components/select/specific/PeerSelect';
|
import { PeerSelect } from 'src/components/select/specific/PeerSelect';
|
||||||
import { WarningText } from 'src/views/stats/styles';
|
import { WarningText } from 'src/views/stats/styles';
|
||||||
|
import styled from 'styled-components';
|
||||||
import {
|
import {
|
||||||
DarkSubTitle,
|
DarkSubTitle,
|
||||||
Separation,
|
Separation,
|
||||||
|
@ -20,7 +21,6 @@ import {
|
||||||
SingleButton,
|
SingleButton,
|
||||||
MultiButton,
|
MultiButton,
|
||||||
} from '../../../../components/buttons/multiButton/MultiButton';
|
} from '../../../../components/buttons/multiButton/MultiButton';
|
||||||
import styled from 'styled-components';
|
|
||||||
|
|
||||||
interface OpenChannelProps {
|
interface OpenChannelProps {
|
||||||
initialPublicKey?: string | undefined | null;
|
initialPublicKey?: string | undefined | null;
|
||||||
|
|
|
@ -4,10 +4,10 @@ import { useGetChannelQuery } from 'src/graphql/queries/__generated__/getChannel
|
||||||
import { useGetClosedChannelsQuery } from 'src/graphql/queries/__generated__/getClosedChannels.generated';
|
import { useGetClosedChannelsQuery } from 'src/graphql/queries/__generated__/getClosedChannels.generated';
|
||||||
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
|
import { useNodeInfo } from 'src/hooks/UseNodeInfo';
|
||||||
import { themeColors } from 'src/styles/Themes';
|
import { themeColors } from 'src/styles/Themes';
|
||||||
import { getAliasFromClosedChannels } from './helpers';
|
|
||||||
import ReactTooltip from 'react-tooltip';
|
import ReactTooltip from 'react-tooltip';
|
||||||
import { Info } from 'react-feather';
|
import { Info } from 'react-feather';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { getAliasFromClosedChannels } from './helpers';
|
||||||
|
|
||||||
const S = {
|
const S = {
|
||||||
icon: styled.span`
|
icon: styled.span`
|
||||||
|
|
|
@ -7,6 +7,7 @@ import {
|
||||||
} from 'src/components/buttons/multiButton/MultiButton';
|
} from 'src/components/buttons/multiButton/MultiButton';
|
||||||
import { Forward } from 'src/graphql/types';
|
import { Forward } from 'src/graphql/types';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||||
import { getErrorContent } from '../../../../utils/error';
|
import { getErrorContent } from '../../../../utils/error';
|
||||||
import { SingleLine, SubTitle } from '../../../../components/generic/Styled';
|
import { SingleLine, SubTitle } from '../../../../components/generic/Styled';
|
||||||
import { LoadingCard } from '../../../../components/loading/LoadingCard';
|
import { LoadingCard } from '../../../../components/loading/LoadingCard';
|
||||||
|
@ -19,7 +20,6 @@ import {
|
||||||
ChannelType,
|
ChannelType,
|
||||||
} from './ForwardReportTables';
|
} from './ForwardReportTables';
|
||||||
import { CardContent } from '.';
|
import { CardContent } from '.';
|
||||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
days: number;
|
days: number;
|
||||||
|
|
|
@ -10,6 +10,7 @@ import {
|
||||||
import { toast } from 'react-toastify';
|
import { toast } from 'react-toastify';
|
||||||
import { renderLine } from 'src/components/generic/helpers';
|
import { renderLine } from 'src/components/generic/helpers';
|
||||||
import { Forward } from 'src/graphql/types';
|
import { Forward } from 'src/graphql/types';
|
||||||
|
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
||||||
import {
|
import {
|
||||||
chartAxisColor,
|
chartAxisColor,
|
||||||
chartBarColor,
|
chartBarColor,
|
||||||
|
@ -22,7 +23,6 @@ import { getPrice } from '../../../../components/price/Price';
|
||||||
import { usePriceState } from '../../../../context/PriceContext';
|
import { usePriceState } from '../../../../context/PriceContext';
|
||||||
import { orderAndReducedArray } from './helpers';
|
import { orderAndReducedArray } from './helpers';
|
||||||
import { CardContent } from '.';
|
import { CardContent } from '.';
|
||||||
import { useGetForwardsQuery } from 'src/graphql/queries/__generated__/getForwards.generated';
|
|
||||||
|
|
||||||
export type ReportDuration =
|
export type ReportDuration =
|
||||||
| 'day'
|
| 'day'
|
||||||
|
|
|
@ -84,10 +84,8 @@ export const Accounts = () => {
|
||||||
prefetch('/');
|
prefetch('/');
|
||||||
}, [prefetch]);
|
}, [prefetch]);
|
||||||
|
|
||||||
const {
|
const { data: accountData, loading: loadingData } =
|
||||||
data: accountData,
|
useGetServerAccountsQuery();
|
||||||
loading: loadingData,
|
|
||||||
} = useGetServerAccountsQuery();
|
|
||||||
|
|
||||||
const [getCanConnect, { data, loading }] = useGetCanConnectLazyQuery({
|
const [getCanConnect, { data, loading }] = useGetCanConnectLazyQuery({
|
||||||
fetchPolicy: 'network-only',
|
fetchPolicy: 'network-only',
|
||||||
|
|
|
@ -49,12 +49,10 @@ export const StartSwap = ({ max, min }: StartSwapProps) => {
|
||||||
|
|
||||||
const dispatch = useSwapsDispatch();
|
const dispatch = useSwapsDispatch();
|
||||||
|
|
||||||
const [
|
const [getQuote, { data: _data, loading }] =
|
||||||
getQuote,
|
useCreateBoltzReverseSwapMutation({
|
||||||
{ data: _data, loading },
|
onError: error => toast.error(getErrorContent(error)),
|
||||||
] = useCreateBoltzReverseSwapMutation({
|
});
|
||||||
onError: error => toast.error(getErrorContent(error)),
|
|
||||||
});
|
|
||||||
const [data, resetMutation] = useMutationResultWithReset(_data);
|
const [data, resetMutation] = useMutationResultWithReset(_data);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -49,12 +49,10 @@ export const SwapClaim = () => {
|
||||||
} = useSwapsState();
|
} = useSwapsState();
|
||||||
const dispatch = useSwapsDispatch();
|
const dispatch = useSwapsDispatch();
|
||||||
|
|
||||||
const [
|
const [claimTransaction, { data, loading }] =
|
||||||
claimTransaction,
|
useClaimBoltzTransactionMutation({
|
||||||
{ data, loading },
|
onError: error => toast.error(getErrorContent(error)),
|
||||||
] = useClaimBoltzTransactionMutation({
|
});
|
||||||
onError: error => toast.error(getErrorContent(error)),
|
|
||||||
});
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!data?.claimBoltzTransaction || typeof claim !== 'number') return;
|
if (!data?.claimBoltzTransaction || typeof claim !== 'number') return;
|
||||||
|
|
|
@ -48,9 +48,8 @@ export const Bakery = () => {
|
||||||
const [isOpen, isOpenSet] = React.useState<boolean>(false);
|
const [isOpen, isOpenSet] = React.useState<boolean>(false);
|
||||||
const [newMacaroon, newMacaroonSet] = React.useState<string>('');
|
const [newMacaroon, newMacaroonSet] = React.useState<string>('');
|
||||||
|
|
||||||
const [permissions, permissionSet] = React.useState<PermissionsType>(
|
const [permissions, permissionSet] =
|
||||||
InitPermissions
|
React.useState<PermissionsType>(InitPermissions);
|
||||||
);
|
|
||||||
|
|
||||||
let hasATrue = false;
|
let hasATrue = false;
|
||||||
Object.entries(permissions);
|
Object.entries(permissions);
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
import React, { FC, Fragment } from 'react';
|
import React, { FC, Fragment } from 'react';
|
||||||
import { InvoiceType } from 'src/graphql/types';
|
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 {
|
import {
|
||||||
Separation,
|
Separation,
|
||||||
SubCard,
|
SubCard,
|
||||||
|
@ -7,24 +25,6 @@ import {
|
||||||
ResponsiveLine,
|
ResponsiveLine,
|
||||||
DarkSubTitle,
|
DarkSubTitle,
|
||||||
} from '../../components/generic/Styled';
|
} 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 = {
|
const S = {
|
||||||
icon: styled.span`
|
icon: styled.span`
|
||||||
|
|
Loading…
Add table
Reference in a new issue