mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 22:25:21 +01:00
chore: bump deps
This commit is contained in:
parent
3ecf7c5646
commit
ab72b1607f
77 changed files with 10062 additions and 8277 deletions
16466
package-lock.json
generated
16466
package-lock.json
generated
File diff suppressed because it is too large
Load diff
154
package.json
154
package.json
|
@ -34,20 +34,20 @@
|
|||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.7.1",
|
||||
"@apollo/client": "^3.7.14",
|
||||
"@fullerstack/nax-ipware": "^0.10.0",
|
||||
"@nestjs/apollo": "^10.1.6",
|
||||
"@nestjs/common": "^9.2.1",
|
||||
"@nestjs/config": "^2.2.0",
|
||||
"@nestjs/core": "^9.2.1",
|
||||
"@nestjs/graphql": "^10.1.6",
|
||||
"@nestjs/jwt": "^9.0.0",
|
||||
"@nestjs/passport": "^9.0.0",
|
||||
"@nestjs/platform-express": "^9.2.1",
|
||||
"@nestjs/platform-socket.io": "^9.2.1",
|
||||
"@nestjs/schedule": "^2.1.0",
|
||||
"@nestjs/throttler": "^3.1.0",
|
||||
"@nestjs/websockets": "^9.2.1",
|
||||
"@nestjs/apollo": "^11.0.6",
|
||||
"@nestjs/common": "^9.4.2",
|
||||
"@nestjs/config": "^2.3.2",
|
||||
"@nestjs/core": "^9.4.2",
|
||||
"@nestjs/graphql": "^11.0.6",
|
||||
"@nestjs/jwt": "^10.0.3",
|
||||
"@nestjs/passport": "^9.0.3",
|
||||
"@nestjs/platform-express": "^9.4.2",
|
||||
"@nestjs/platform-socket.io": "^9.4.2",
|
||||
"@nestjs/schedule": "^2.2.2",
|
||||
"@nestjs/throttler": "^4.0.0",
|
||||
"@nestjs/websockets": "^9.4.2",
|
||||
"@visx/axis": "^2.12.2",
|
||||
"@visx/chord": "^2.10.0",
|
||||
"@visx/event": "^2.6.0",
|
||||
|
@ -56,124 +56,124 @@
|
|||
"@visx/scale": "^2.2.2",
|
||||
"@visx/shape": "^2.12.2",
|
||||
"@visx/tooltip": "^2.16.0",
|
||||
"apollo-server-express": "^3.11.1",
|
||||
"balanceofsatoshis": "^13.10.4",
|
||||
"apollo-server-express": "^3.12.0",
|
||||
"balanceofsatoshis": "^15.8.2",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"bech32": "^2.0.0",
|
||||
"big.js": "^6.2.1",
|
||||
"bip32": "^3.1.0",
|
||||
"bip39": "^3.0.4",
|
||||
"bitcoinjs-lib": "^6.0.2",
|
||||
"boltz-core": "^0.5.0",
|
||||
"bip32": "^4.0.0",
|
||||
"bip39": "^3.1.0",
|
||||
"bitcoinjs-lib": "^6.1.1",
|
||||
"boltz-core": "^0.6.2",
|
||||
"cookie": "^0.5.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"d3-array": "^3.2.1",
|
||||
"d3-array": "^3.2.3",
|
||||
"d3-time-format": "^4.1.0",
|
||||
"date-fns": "^2.29.3",
|
||||
"date-fns": "^2.30.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"ecpair": "^2.0.1",
|
||||
"graphql": "^16.6.0",
|
||||
"jest-fetch-mock": "^3.0.3",
|
||||
"js-cookie": "^3.0.1",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lightning": "^6.3.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"lightning": "^9.4.0",
|
||||
"lodash": "^4.17.21",
|
||||
"nest-winston": "^1.8.0",
|
||||
"next": "^12.1.0",
|
||||
"node-fetch": "^3.3.0",
|
||||
"nest-winston": "^1.9.2",
|
||||
"next": "^13.4.4",
|
||||
"node-fetch": "^3.3.1",
|
||||
"numeral": "^2.0.6",
|
||||
"otplib": "^12.0.1",
|
||||
"passport": "^0.6.0",
|
||||
"passport-jwt": "^4.0.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"qrcode.react": "^3.1.0",
|
||||
"react": "^17.0.2",
|
||||
"react": "^18.2.0",
|
||||
"react-circular-progressbar": "^2.1.0",
|
||||
"react-copy-to-clipboard": "^5.1.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-feather": "^2.0.10",
|
||||
"react-grid-layout": "^1.3.4",
|
||||
"react-is": "^17.0.2",
|
||||
"react-select": "^5.7.0",
|
||||
"react-slider": "^1.3.1",
|
||||
"react-spinners": "^0.13.7",
|
||||
"react-is": "^18.2.0",
|
||||
"react-select": "^5.7.3",
|
||||
"react-slider": "^2.0.4",
|
||||
"react-spinners": "^0.13.8",
|
||||
"react-table": "^7.8.0",
|
||||
"react-toastify": "^9.1.1",
|
||||
"react-tooltip": "^4.5.1",
|
||||
"react-toastify": "^9.1.3",
|
||||
"react-tooltip": "^5.13.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rimraf": "^5.0.1",
|
||||
"rxjs": "^7.5.6",
|
||||
"secp256k1": "^4.0.3",
|
||||
"socket.io-client": "^4.5.4",
|
||||
"socks-proxy-agent": "^7.0.0",
|
||||
"styled-components": "^5.3.6",
|
||||
"styled-react-modal": "^3.0.0",
|
||||
"secp256k1": "^5.0.0",
|
||||
"socket.io-client": "^4.6.1",
|
||||
"socks-proxy-agent": "^8.0.1",
|
||||
"styled-components": "^5.3.11",
|
||||
"styled-react-modal": "^3.0.1",
|
||||
"styled-theming": "^2.2.0",
|
||||
"tiny-secp256k1": "^2.2.1",
|
||||
"uuid": "^9.0.0",
|
||||
"winston": "^3.8.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/cli": "^2.15.0",
|
||||
"@graphql-codegen/fragment-matcher": "^3.3.1",
|
||||
"@graphql-codegen/introspection": "^2.2.1",
|
||||
"@graphql-codegen/near-operation-file-preset": "^2.4.4",
|
||||
"@graphql-codegen/typescript": "^2.8.3",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.8",
|
||||
"@graphql-codegen/cli": "^4.0.0",
|
||||
"@graphql-codegen/fragment-matcher": "^5.0.0",
|
||||
"@graphql-codegen/introspection": "^4.0.0",
|
||||
"@graphql-codegen/near-operation-file-preset": "^2.5.0",
|
||||
"@graphql-codegen/typescript": "^4.0.0",
|
||||
"@graphql-codegen/typescript-operations": "^4.0.0",
|
||||
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
|
||||
"@graphql-codegen/typescript-resolvers": "^2.7.8",
|
||||
"@nestjs/cli": "^9.1.5",
|
||||
"@graphql-codegen/typescript-resolvers": "^4.0.0",
|
||||
"@nestjs/cli": "^9.5.0",
|
||||
"@nestjs/schematics": "^9.0.3",
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/big.js": "^6.1.6",
|
||||
"@types/cookie": "^0.5.1",
|
||||
"@types/cron": "^2.0.0",
|
||||
"@types/cron": "^2.0.1",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/d3-array": "^3.0.3",
|
||||
"@types/d3-array": "^3.0.5",
|
||||
"@types/d3-time-format": "^4.0.0",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/jest": "^29.2.4",
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/js-cookie": "^3.0.3",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/jsonwebtoken": "^8.5.9",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.11.11",
|
||||
"@types/jsonwebtoken": "^9.0.2",
|
||||
"@types/lodash": "^4.14.195",
|
||||
"@types/node": "^20.2.4",
|
||||
"@types/numeral": "^2.0.2",
|
||||
"@types/qrcode.react": "^1.0.2",
|
||||
"@types/react": "^17.0.43",
|
||||
"@types/react": "^18.2.7",
|
||||
"@types/react-copy-to-clipboard": "^5.0.4",
|
||||
"@types/react-grid-layout": "^1.3.2",
|
||||
"@types/react-qr-reader": "^2.1.4",
|
||||
"@types/react-slider": "^1.3.1",
|
||||
"@types/react-table": "^7.7.12",
|
||||
"@types/react-table": "^7.7.14",
|
||||
"@types/secp256k1": "^4.0.3",
|
||||
"@types/styled-components": "^5.1.26",
|
||||
"@types/styled-react-modal": "^1.2.2",
|
||||
"@types/styled-theming": "^2.2.5",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@types/uuid": "^9.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.1",
|
||||
"@typescript-eslint/parser": "^5.45.1",
|
||||
"apollo-server": "^3.11.1",
|
||||
"@types/uuid": "^9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
||||
"@typescript-eslint/parser": "^5.59.7",
|
||||
"apollo-server": "^3.12.0",
|
||||
"babel-plugin-styled-components": "^2.0.7",
|
||||
"eslint": "^8.29.0",
|
||||
"eslint-config-next": "^13.0.6",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-next": "^13.4.4",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"husky": "^8.0.2",
|
||||
"jest": "^29.3.1",
|
||||
"lint-staged": "^13.1.0",
|
||||
"prettier": "^2.8.0",
|
||||
"husky": "^8.0.3",
|
||||
"jest": "^29.5.0",
|
||||
"lint-staged": "^13.2.2",
|
||||
"prettier": "^2.8.8",
|
||||
"source-map-support": "^0.5.21",
|
||||
"standard-version": "^9.5.0",
|
||||
"supertest": "^6.3.2",
|
||||
"ts-jest": "^29.0.3",
|
||||
"ts-loader": "^9.4.2",
|
||||
"supertest": "^6.3.3",
|
||||
"ts-jest": "^29.1.0",
|
||||
"ts-loader": "^9.4.3",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.1",
|
||||
"typescript": "^4.9.3",
|
||||
"ws": "^8.11.0"
|
||||
"tsconfig-paths": "^4.2.0",
|
||||
"typescript": "^5.0.4",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
|
|
@ -425,7 +425,7 @@ type Mutation {
|
|||
bosRebalance(avoid: [String!], in_through: String, max_fee: Float, max_fee_rate: Float, max_rebalance: Float, node: String, out_inbound: Float, out_through: String, timeout_minutes: Float): BosRebalanceResult!
|
||||
claimBoltzTransaction(destination: String!, fee: Float!, preimage: String!, privateKey: String!, redeem: String!, transaction: String!): String!
|
||||
closeChannel(forceClose: Boolean, id: String!, targetConfirmations: Float, tokensPerVByte: Float): OpenOrCloseChannel!
|
||||
createAddress(type: String = "p2wpkh"): String!
|
||||
createAddress(type: String! = "p2wpkh"): String!
|
||||
createBaseInvoice(amount: Float!): BaseInvoice!
|
||||
createBoltzReverseSwap(address: String, amount: Float!): CreateBoltzReverseSwapType!
|
||||
createInvoice(amount: Float!, description: String, includePrivate: Boolean, secondsUntil: Float): CreateInvoice!
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useEffect, VFC } from 'react';
|
||||
import { FC, ReactNode, useEffect } from 'react';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
import { ModalProvider, BaseModalBackground } from 'styled-react-modal';
|
||||
import { AppProps } from 'next/app';
|
||||
|
@ -36,12 +36,12 @@ const NotAuthenticated: React.FC = () => {
|
|||
return null;
|
||||
};
|
||||
|
||||
const Listener: VFC<{ isRoot: boolean }> = ({ isRoot }) => {
|
||||
const Listener: FC<{ isRoot: boolean }> = ({ isRoot }) => {
|
||||
useListener(isRoot);
|
||||
return null;
|
||||
};
|
||||
|
||||
const Wrapper: React.FC<{ authenticated: boolean }> = ({
|
||||
const Wrapper: React.FC<{ authenticated: boolean; children?: ReactNode }> = ({
|
||||
children,
|
||||
authenticated,
|
||||
}) => {
|
||||
|
|
|
@ -44,90 +44,6 @@ export default class MyDocument extends Document {
|
|||
content="Manage and monitor your lightning network node right inside your browser"
|
||||
key="description"
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Thin.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-ThinItalic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Light.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-LightItalic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Regular.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Italic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Medium.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-MediumItalic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Bold.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-BoldItalic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-Black.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/fonts/roboto/Roboto-BlackItalic.ttf"
|
||||
as="font"
|
||||
type="font/ttf"
|
||||
crossOrigin=""
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { ChevronRight } from 'react-feather';
|
||||
import ScaleLoader from 'react-spinners/ScaleLoader';
|
||||
|
@ -131,6 +131,7 @@ export interface ColorButtonProps {
|
|||
mobileFullWidth?: boolean;
|
||||
width?: string;
|
||||
backgroundColor?: string | ThemeSet;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const ColorButton: React.FC<ColorButtonProps> = ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import {
|
||||
multiSelectColor,
|
||||
|
@ -41,6 +41,7 @@ interface SingleButtonProps {
|
|||
color?: string;
|
||||
withPadding?: string;
|
||||
onClick?: () => void;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const SingleButton: React.FC<SingleButtonProps> = ({
|
||||
|
@ -86,6 +87,7 @@ interface MultiButtonProps {
|
|||
margin?: string;
|
||||
loading?: boolean;
|
||||
width?: string;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const MultiButton: React.FC<MultiButtonProps> = ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import {
|
||||
colorButtonBackground,
|
||||
|
@ -39,6 +39,7 @@ const StyledCheckbox = styled.div<{ checked: boolean }>`
|
|||
type CheckboxProps = {
|
||||
checked: boolean;
|
||||
onChange: (state: boolean) => void;
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
export const Checkbox: React.FC<CheckboxProps> = ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { BitcoinFees } from '../../../src/components/bitcoinInfo/BitcoinFees';
|
||||
import { BitcoinPrice } from '../../../src/components/bitcoinInfo/BitcoinPrice';
|
||||
|
@ -8,6 +8,7 @@ import { Navigation } from '../../layouts/navigation/Navigation';
|
|||
|
||||
type GridProps = {
|
||||
noNavigation?: boolean;
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
const Container = styled.div<GridProps>`
|
||||
|
@ -31,11 +32,9 @@ const ContentStyle = styled.div`
|
|||
grid-area: content;
|
||||
`;
|
||||
|
||||
export const GridWrapper: React.FC<GridProps & { centerContent?: boolean }> = ({
|
||||
children,
|
||||
centerContent = true,
|
||||
noNavigation,
|
||||
}) => (
|
||||
export const GridWrapper: React.FC<
|
||||
GridProps & { centerContent?: boolean; children?: ReactNode }
|
||||
> = ({ children, centerContent = true, noNavigation }) => (
|
||||
<Section padding={'16px 16px 32px'}>
|
||||
<Container noNavigation={noNavigation}>
|
||||
<BitcoinPrice />
|
||||
|
|
|
@ -50,6 +50,7 @@ type InputWithDecoProps = {
|
|||
blurCallback?: (value: string) => void;
|
||||
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
||||
onEnter?: () => void;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const InputWithDeco: React.FC<InputWithDecoProps> = ({
|
||||
|
@ -72,7 +73,7 @@ export const InputWithDeco: React.FC<InputWithDecoProps> = ({
|
|||
const showAmount = !!amount || customAmount;
|
||||
let correctValue = value ? value : '';
|
||||
|
||||
if (inputType === 'number' && value) {
|
||||
if (inputType === 'number' && typeof value === 'number') {
|
||||
correctValue = value && value > 0 ? value : '';
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { ThemeSet } from 'styled-theming';
|
||||
import RouterLink from 'next/link';
|
||||
|
@ -48,6 +48,7 @@ interface LinkProps {
|
|||
fullWidth?: boolean;
|
||||
noStyling?: boolean;
|
||||
newTab?: boolean;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const Link: React.FC<LinkProps> = ({
|
||||
|
@ -81,7 +82,7 @@ export const Link: React.FC<LinkProps> = ({
|
|||
|
||||
if (to) {
|
||||
return (
|
||||
<RouterLink href={to} passHref>
|
||||
<RouterLink href={to} passHref legacyBehavior>
|
||||
<CorrectLink {...props}>{children}</CorrectLink>
|
||||
</RouterLink>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, useEffect } from 'react';
|
||||
import React, { FC, ReactNode, useEffect } from 'react';
|
||||
import { LogOut } from 'react-feather';
|
||||
import { useLogoutMutation } from '../../../src/graphql/mutations/__generated__/logout.generated';
|
||||
import { useApolloClient } from '@apollo/client';
|
||||
|
@ -25,7 +25,7 @@ const LogoutWrapperStyled = styled(Logout)`
|
|||
width: 100%;
|
||||
`;
|
||||
|
||||
export const LogoutWrapper: FC = ({ children }) => {
|
||||
export const LogoutWrapper: FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const client = useApolloClient();
|
||||
|
||||
const dispatchChat = useChatDispatch();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { ThemeSet } from 'styled-theming';
|
||||
import { backgroundColor, mediaWidths } from '../../styles/Themes';
|
||||
|
@ -44,6 +44,7 @@ type SectionProps = {
|
|||
color?: string | ThemeSet;
|
||||
textColor?: string | ThemeSet;
|
||||
padding?: string;
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
export const Section: React.FC<SectionProps> = ({
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { mediaWidths, themeColors } from '../../../src/styles/Themes';
|
||||
import ScaleLoader from 'react-spinners/ScaleLoader';
|
||||
import { SingleLine } from '../generic/Styled';
|
||||
import { Select, SelectWithValue, ValueProp } from '.';
|
||||
import { FC, ReactNode } from 'react';
|
||||
|
||||
const NoWrapText = styled.div`
|
||||
white-space: nowrap;
|
||||
|
@ -38,9 +38,10 @@ type InputWithDecoProps = {
|
|||
loading?: boolean;
|
||||
maxWidth?: string;
|
||||
callback: (value: ValueProp[]) => void;
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
export const SelectWithDeco: React.FC<InputWithDecoProps> = ({
|
||||
export const SelectWithDeco: FC<InputWithDecoProps> = ({
|
||||
children,
|
||||
title,
|
||||
noInput,
|
||||
|
@ -86,6 +87,7 @@ type InputWithDecoAndValueProps = {
|
|||
noInput?: boolean;
|
||||
loading?: boolean;
|
||||
callback: (value: ValueProp[]) => void;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const SelectWithDecoAndValue: React.FC<InputWithDecoAndValueProps> = ({
|
||||
|
|
|
@ -15,6 +15,7 @@ import { Settings, X } from 'react-feather';
|
|||
import { ColorButton } from '../buttons/colorButton/ColorButton';
|
||||
import { DarkSubTitle, SubCard } from '../generic/Styled';
|
||||
import { groupBy } from 'lodash';
|
||||
import 'regenerator-runtime/runtime';
|
||||
|
||||
type StyledTableProps = {
|
||||
withBorder?: boolean;
|
||||
|
@ -259,7 +260,7 @@ export const Table: React.FC<TableProps> = ({
|
|||
type={'checkbox'}
|
||||
{...item.getToggleHiddenProps()}
|
||||
/>
|
||||
{item.Header}
|
||||
{item.Header as any}
|
||||
</label>
|
||||
</S.option>
|
||||
);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { mediaWidths } from '../../styles/Themes';
|
||||
|
||||
|
@ -17,6 +17,7 @@ const HideDesktop = styled.div`
|
|||
|
||||
interface ViewSwitchProps {
|
||||
hideMobile?: boolean;
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const ViewSwitch: React.FC<ViewSwitchProps> = ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useContext, useReducer } from 'react';
|
||||
import React, { ReactNode, createContext, useContext, useReducer } from 'react';
|
||||
|
||||
type State = {
|
||||
hasToken: boolean;
|
||||
|
@ -23,10 +23,10 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const BaseProvider: React.FC<{ initialHasToken: boolean }> = ({
|
||||
children,
|
||||
initialHasToken = false,
|
||||
}) => {
|
||||
const BaseProvider: React.FC<{
|
||||
initialHasToken: boolean;
|
||||
children?: ReactNode;
|
||||
}> = ({ children, initialHasToken = false }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, {
|
||||
hasToken: initialHasToken,
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useContext, useReducer } from 'react';
|
||||
import React, { ReactNode, createContext, useContext, useReducer } from 'react';
|
||||
import { Message } from '../../src/graphql/types';
|
||||
|
||||
export interface SentChatProps extends Message {
|
||||
|
@ -92,7 +92,7 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const ChatProvider: React.FC = ({ children }) => {
|
||||
const ChatProvider: React.FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import React, { createContext, useContext, useReducer, useEffect } from 'react';
|
||||
import React, {
|
||||
createContext,
|
||||
useContext,
|
||||
useReducer,
|
||||
useEffect,
|
||||
ReactNode,
|
||||
} from 'react';
|
||||
import getConfig from 'next/config';
|
||||
import Cookies from 'js-cookie';
|
||||
import { omit } from 'lodash';
|
||||
|
@ -53,6 +59,7 @@ type State = {
|
|||
|
||||
type ConfigInitProps = {
|
||||
initialConfig: { theme: string };
|
||||
children?: ReactNode;
|
||||
};
|
||||
|
||||
type ActionType =
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
import React from 'react';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { PriceProvider } from './PriceContext';
|
||||
import { ChatProvider } from './ChatContext';
|
||||
import { RebalanceProvider } from './RebalanceContext';
|
||||
import { DashProvider } from './DashContext';
|
||||
import { NotificationProvider } from './NotificationContext';
|
||||
|
||||
export const ContextProvider: React.FC = ({ children }) => (
|
||||
export const ContextProvider: React.FC<{ children?: ReactNode }> = ({
|
||||
children,
|
||||
}) => (
|
||||
<NotificationProvider>
|
||||
<DashProvider>
|
||||
<PriceProvider>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useContext, useReducer } from 'react';
|
||||
import React, { ReactNode, createContext, useContext, useReducer } from 'react';
|
||||
|
||||
type State = {
|
||||
modalType: string;
|
||||
|
@ -23,7 +23,7 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const DashProvider: React.FC = ({ children }) => {
|
||||
const DashProvider: React.FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, {
|
||||
modalType: '',
|
||||
});
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import React, { createContext, useContext, useReducer, useEffect } from 'react';
|
||||
import React, {
|
||||
createContext,
|
||||
useContext,
|
||||
useReducer,
|
||||
useEffect,
|
||||
ReactNode,
|
||||
} from 'react';
|
||||
|
||||
const STORAGE_KEY = 'notificationSettings-v2';
|
||||
|
||||
|
@ -57,7 +63,9 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const NotificationProvider: React.FC = ({ children }) => {
|
||||
const NotificationProvider: React.FC<{ children?: ReactNode }> = ({
|
||||
children,
|
||||
}) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import React, { createContext, useContext, useReducer, useEffect } from 'react';
|
||||
import React, {
|
||||
createContext,
|
||||
useContext,
|
||||
useReducer,
|
||||
useEffect,
|
||||
ReactNode,
|
||||
} from 'react';
|
||||
|
||||
type PriceProps = {
|
||||
last: number;
|
||||
|
@ -57,7 +63,7 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const PriceProvider: React.FC = ({ children }) => {
|
||||
const PriceProvider: React.FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useContext, useReducer } from 'react';
|
||||
import React, { ReactNode, createContext, useContext, useReducer } from 'react';
|
||||
import { Channel } from '../../src/graphql/types';
|
||||
|
||||
type State = {
|
||||
|
@ -42,7 +42,9 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const RebalanceProvider: React.FC = ({ children }) => {
|
||||
const RebalanceProvider: React.FC<{ children?: ReactNode }> = ({
|
||||
children,
|
||||
}) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FC, useCallback, useRef, useState } from 'react';
|
||||
import React, { FC, ReactNode, useCallback, useRef, useState } from 'react';
|
||||
import io from 'socket.io-client';
|
||||
import { Socket } from 'socket.io-client';
|
||||
import getConfig from 'next/config';
|
||||
|
@ -28,7 +28,7 @@ type Context = {
|
|||
|
||||
const SocketContext = React.createContext<Context | undefined>(undefined);
|
||||
|
||||
const SocketProvider: FC<{ authToken?: string }> = ({
|
||||
const SocketProvider: FC<{ authToken?: string; children?: ReactNode }> = ({
|
||||
children,
|
||||
authToken,
|
||||
}) => {
|
||||
|
|
|
@ -4,10 +4,10 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type AddPeerMutationVariables = Types.Exact<{
|
||||
url?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
publicKey?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
socket?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
isTemporary?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
url?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
publicKey?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
socket?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
isTemporary?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type AddPeerMutation = { __typename?: 'Mutation'; addPeer: boolean };
|
||||
|
|
|
@ -5,16 +5,16 @@ import * as Apollo from '@apollo/client';
|
|||
const defaultOptions = {} as const;
|
||||
export type BosRebalanceMutationVariables = Types.Exact<{
|
||||
avoid?: Types.InputMaybe<
|
||||
Array<Types.Scalars['String']> | Types.Scalars['String']
|
||||
Array<Types.Scalars['String']['input']> | Types.Scalars['String']['input']
|
||||
>;
|
||||
in_through?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
max_fee?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
max_fee_rate?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
max_rebalance?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
timeout_minutes?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
node?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
out_through?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
out_inbound?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
in_through?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
max_fee?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
max_fee_rate?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
max_rebalance?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
timeout_minutes?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
node?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
out_through?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
out_inbound?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type BosRebalanceMutation = {
|
||||
|
|
|
@ -4,12 +4,12 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ClaimBoltzTransactionMutationVariables = Types.Exact<{
|
||||
redeem: Types.Scalars['String'];
|
||||
transaction: Types.Scalars['String'];
|
||||
preimage: Types.Scalars['String'];
|
||||
privateKey: Types.Scalars['String'];
|
||||
destination: Types.Scalars['String'];
|
||||
fee: Types.Scalars['Float'];
|
||||
redeem: Types.Scalars['String']['input'];
|
||||
transaction: Types.Scalars['String']['input'];
|
||||
preimage: Types.Scalars['String']['input'];
|
||||
privateKey: Types.Scalars['String']['input'];
|
||||
destination: Types.Scalars['String']['input'];
|
||||
fee: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type ClaimBoltzTransactionMutation = {
|
||||
|
|
|
@ -4,10 +4,10 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CloseChannelMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
forceClose?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
target?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
id: Types.Scalars['String']['input'];
|
||||
forceClose?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
target?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type CloseChannelMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CreateAddressMutationVariables = Types.Exact<{
|
||||
type?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
type?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type CreateAddressMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CreateBaseInvoiceMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type CreateBaseInvoiceMutation = {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CreateBoltzReverseSwapMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
address?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
address?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type CreateBoltzReverseSwapMutation = {
|
||||
|
|
|
@ -4,10 +4,10 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CreateInvoiceMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
description?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
secondsUntil?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
includePrivate?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
description?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
secondsUntil?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
includePrivate?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type CreateInvoiceMutation = {
|
||||
|
|
|
@ -4,10 +4,12 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CreateThunderPointsMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
alias: Types.Scalars['String'];
|
||||
uris: Array<Types.Scalars['String']> | Types.Scalars['String'];
|
||||
public_key: Types.Scalars['String'];
|
||||
id: Types.Scalars['String']['input'];
|
||||
alias: Types.Scalars['String']['input'];
|
||||
uris:
|
||||
| Array<Types.Scalars['String']['input']>
|
||||
| Types.Scalars['String']['input'];
|
||||
public_key: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type CreateThunderPointsMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetAuthTokenMutationVariables = Types.Exact<{
|
||||
cookie?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
cookie?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetAuthTokenMutation = {
|
||||
|
|
|
@ -4,9 +4,9 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetSessionTokenMutationVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
password: Types.Scalars['String'];
|
||||
token?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
id: Types.Scalars['String']['input'];
|
||||
password: Types.Scalars['String']['input'];
|
||||
token?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetSessionTokenMutation = {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type KeysendMutationVariables = Types.Exact<{
|
||||
destination: Types.Scalars['String'];
|
||||
tokens: Types.Scalars['Float'];
|
||||
destination: Types.Scalars['String']['input'];
|
||||
tokens: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type KeysendMutation = {
|
||||
|
|
|
@ -17,7 +17,7 @@ export type LnMarketsLoginMutation = {
|
|||
};
|
||||
|
||||
export type LnMarketsWithdrawMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type LnMarketsWithdrawMutation = {
|
||||
|
@ -26,7 +26,7 @@ export type LnMarketsWithdrawMutation = {
|
|||
};
|
||||
|
||||
export type LnMarketsDepositMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type LnMarketsDepositMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type FetchLnUrlMutationVariables = Types.Exact<{
|
||||
url: Types.Scalars['String'];
|
||||
url: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type FetchLnUrlMutation = {
|
||||
|
@ -38,7 +38,7 @@ export type FetchLnUrlMutation = {
|
|||
};
|
||||
|
||||
export type AuthLnUrlMutationVariables = Types.Exact<{
|
||||
url: Types.Scalars['String'];
|
||||
url: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type AuthLnUrlMutation = {
|
||||
|
@ -47,9 +47,9 @@ export type AuthLnUrlMutation = {
|
|||
};
|
||||
|
||||
export type PayLnUrlMutationVariables = Types.Exact<{
|
||||
callback: Types.Scalars['String'];
|
||||
amount: Types.Scalars['Float'];
|
||||
comment?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
callback: Types.Scalars['String']['input'];
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
comment?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type PayLnUrlMutation = {
|
||||
|
@ -66,10 +66,10 @@ export type PayLnUrlMutation = {
|
|||
};
|
||||
|
||||
export type WithdrawLnUrlMutationVariables = Types.Exact<{
|
||||
callback: Types.Scalars['String'];
|
||||
amount: Types.Scalars['Float'];
|
||||
k1: Types.Scalars['String'];
|
||||
description?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
callback: Types.Scalars['String']['input'];
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
k1: Types.Scalars['String']['input'];
|
||||
description?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type WithdrawLnUrlMutation = {
|
||||
|
@ -78,9 +78,9 @@ export type WithdrawLnUrlMutation = {
|
|||
};
|
||||
|
||||
export type ChannelLnUrlMutationVariables = Types.Exact<{
|
||||
callback: Types.Scalars['String'];
|
||||
k1: Types.Scalars['String'];
|
||||
uri: Types.Scalars['String'];
|
||||
callback: Types.Scalars['String']['input'];
|
||||
k1: Types.Scalars['String']['input'];
|
||||
uri: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type ChannelLnUrlMutation = {
|
||||
|
|
|
@ -4,11 +4,11 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type OpenChannelMutationVariables = Types.Exact<{
|
||||
amount: Types.Scalars['Float'];
|
||||
partnerPublicKey: Types.Scalars['String'];
|
||||
tokensPerVByte?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
isPrivate?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
pushTokens?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
amount: Types.Scalars['Float']['input'];
|
||||
partnerPublicKey: Types.Scalars['String']['input'];
|
||||
tokensPerVByte?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
isPrivate?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
pushTokens?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type OpenChannelMutation = {
|
||||
|
|
|
@ -4,12 +4,12 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type PayMutationVariables = Types.Exact<{
|
||||
max_fee: Types.Scalars['Float'];
|
||||
max_paths: Types.Scalars['Float'];
|
||||
max_fee: Types.Scalars['Float']['input'];
|
||||
max_paths: Types.Scalars['Float']['input'];
|
||||
out?: Types.InputMaybe<
|
||||
Array<Types.Scalars['String']> | Types.Scalars['String']
|
||||
Array<Types.Scalars['String']['input']> | Types.Scalars['String']['input']
|
||||
>;
|
||||
request: Types.Scalars['String'];
|
||||
request: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type PayMutation = { __typename?: 'Mutation'; pay: boolean };
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type RemovePeerMutationVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
publicKey: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type RemovePeerMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type RemoveTwofaSecretMutationVariables = Types.Exact<{
|
||||
token: Types.Scalars['String'];
|
||||
token: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type RemoveTwofaSecretMutation = {
|
||||
|
|
|
@ -4,11 +4,11 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type SendMessageMutationVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
message: Types.Scalars['String'];
|
||||
messageType?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
maxFee?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
publicKey: Types.Scalars['String']['input'];
|
||||
message: Types.Scalars['String']['input'];
|
||||
messageType?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
maxFee?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
}>;
|
||||
|
||||
export type SendMessageMutation = {
|
||||
|
|
|
@ -4,11 +4,11 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type PayAddressMutationVariables = Types.Exact<{
|
||||
address: Types.Scalars['String'];
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
fee?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
target?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
sendAll?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
address: Types.Scalars['String']['input'];
|
||||
tokens?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
fee?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
target?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
sendAll?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type PayAddressMutation = {
|
||||
|
|
|
@ -4,13 +4,13 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type UpdateFeesMutationVariables = Types.Exact<{
|
||||
transaction_id?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
transaction_vout?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
base_fee_tokens?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
fee_rate?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
cltv_delta?: Types.InputMaybe<Types.Scalars['Float']>;
|
||||
max_htlc_mtokens?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
min_htlc_mtokens?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
transaction_id?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
transaction_vout?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
base_fee_tokens?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
fee_rate?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
cltv_delta?: Types.InputMaybe<Types.Scalars['Float']['input']>;
|
||||
max_htlc_mtokens?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
min_htlc_mtokens?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type UpdateFeesMutation = {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type UpdateTwofaSecretMutationVariables = Types.Exact<{
|
||||
secret: Types.Scalars['String'];
|
||||
token: Types.Scalars['String'];
|
||||
secret: Types.Scalars['String']['input'];
|
||||
token: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type UpdateTwofaSecretMutation = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type DecodeRequestQueryVariables = Types.Exact<{
|
||||
request: Types.Scalars['String'];
|
||||
request: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type DecodeRequestQuery = {
|
||||
|
|
|
@ -4,11 +4,11 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetAccountingReportQueryVariables = Types.Exact<{
|
||||
category?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
currency?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
fiat?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
month?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
year?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
category?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
currency?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
fiat?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
month?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
year?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetAccountingReportQuery = {
|
||||
|
|
|
@ -4,7 +4,9 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetBoltzSwapStatusQueryVariables = Types.Exact<{
|
||||
ids: Array<Types.Scalars['String']> | Types.Scalars['String'];
|
||||
ids:
|
||||
| Array<Types.Scalars['String']['input']>
|
||||
| Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetBoltzSwapStatusQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetChannelQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
id: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetChannelQuery = {
|
||||
|
@ -26,7 +26,7 @@ export type GetChannelQuery = {
|
|||
};
|
||||
|
||||
export type GetChannelInfoQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
id: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetChannelInfoQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetChannelsQueryVariables = Types.Exact<{
|
||||
active?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
active?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetChannelsQuery = {
|
||||
|
@ -70,7 +70,7 @@ export type GetChannelsQuery = {
|
|||
};
|
||||
|
||||
export type GetChannelsWithPeersQueryVariables = Types.Exact<{
|
||||
active?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
active?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetChannelsWithPeersQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetForwardsQueryVariables = Types.Exact<{
|
||||
days: Types.Scalars['Float'];
|
||||
days: Types.Scalars['Float']['input'];
|
||||
}>;
|
||||
|
||||
export type GetForwardsQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetInvoiceStatusChangeQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['String'];
|
||||
id: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetInvoiceStatusChangeQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetInvoicesQueryVariables = Types.Exact<{
|
||||
token?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
token?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetInvoicesQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetLightningAddressInfoQueryVariables = Types.Exact<{
|
||||
address: Types.Scalars['String'];
|
||||
address: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetLightningAddressInfoQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetMessagesQueryVariables = Types.Exact<{
|
||||
initialize?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
initialize?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetMessagesQuery = {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetNodeQueryVariables = Types.Exact<{
|
||||
publicKey: Types.Scalars['String'];
|
||||
withoutChannels?: Types.InputMaybe<Types.Scalars['Boolean']>;
|
||||
publicKey: Types.Scalars['String']['input'];
|
||||
withoutChannels?: Types.InputMaybe<Types.Scalars['Boolean']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetNodeQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetNodeSocialInfoQueryVariables = Types.Exact<{
|
||||
pubkey: Types.Scalars['String'];
|
||||
pubkey: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type GetNodeSocialInfoQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type GetPaymentsQueryVariables = Types.Exact<{
|
||||
token?: Types.InputMaybe<Types.Scalars['String']>;
|
||||
token?: Types.InputMaybe<Types.Scalars['String']['input']>;
|
||||
}>;
|
||||
|
||||
export type GetPaymentsQuery = {
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type RecoverFundsQueryVariables = Types.Exact<{
|
||||
backup: Types.Scalars['String'];
|
||||
backup: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type RecoverFundsQuery = { __typename?: 'Query'; recoverFunds: boolean };
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type SignMessageQueryVariables = Types.Exact<{
|
||||
message: Types.Scalars['String'];
|
||||
message: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type SignMessageQuery = { __typename?: 'Query'; signMessage: string };
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type VerifyBackupQueryVariables = Types.Exact<{
|
||||
backup: Types.Scalars['String'];
|
||||
backup: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type VerifyBackupQuery = { __typename?: 'Query'; verifyBackup: boolean };
|
||||
|
|
|
@ -4,7 +4,7 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type VerifyBackupsQueryVariables = Types.Exact<{
|
||||
backup: Types.Scalars['String'];
|
||||
backup: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type VerifyBackupsQuery = {
|
||||
|
|
|
@ -4,8 +4,8 @@ import { gql } from '@apollo/client';
|
|||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type VerifyMessageQueryVariables = Types.Exact<{
|
||||
message: Types.Scalars['String'];
|
||||
signature: Types.Scalars['String'];
|
||||
message: Types.Scalars['String']['input'];
|
||||
signature: Types.Scalars['String']['input'];
|
||||
}>;
|
||||
|
||||
export type VerifyMessageQuery = {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { Zap, Anchor, Circle } from 'react-feather';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { Tooltip as ReactTooltip } from 'react-tooltip';
|
||||
import styled from 'styled-components';
|
||||
import { getPrice, Price } from '../../../components/price/Price';
|
||||
import { addEllipsis, renderLine } from '../../../components/generic/helpers';
|
||||
|
@ -169,13 +169,13 @@ export const NodeInfo = ({ isOpen, isBurger }: NodeInfoProps) => {
|
|||
</div>
|
||||
</Closed>
|
||||
<Separation lineColor={unSelectedNavButton} />
|
||||
<ReactTooltip id={'full_balance_tip'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip id={'full_balance_tip'} place={'right'}>
|
||||
{renderLine('Channel Balance', formatCCB)}
|
||||
{renderLine('Pending Channel Balance', formatPCB)}
|
||||
{renderLine('Chain Balance', formatCB)}
|
||||
{renderLine('Pending Chain Balance', formatPB)}
|
||||
</ReactTooltip>
|
||||
<ReactTooltip id={'full_node_tip'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip id={'full_node_tip'} place={'right'}>
|
||||
{renderLine('Active Channels', activeChannelCount)}
|
||||
{renderLine('Pending Channels', pendingChannelCount)}
|
||||
{renderLine('Closed Channels', closedChannelCount)}
|
||||
|
@ -211,8 +211,8 @@ export const NodeInfo = ({ isOpen, isBurger }: NodeInfoProps) => {
|
|||
</Info>
|
||||
</Balance>
|
||||
<Separation lineColor={unSelectedNavButton} />
|
||||
<ReactTooltip effect={'solid'} place={'right'} />
|
||||
<ReactTooltip id={'balance_tip'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip place={'right'} />
|
||||
<ReactTooltip id={'balance_tip'} place={'right'}>
|
||||
<div>
|
||||
{'Channel Balance: '}
|
||||
{formatCCB}
|
||||
|
@ -222,7 +222,7 @@ export const NodeInfo = ({ isOpen, isBurger }: NodeInfoProps) => {
|
|||
{formatPCB}
|
||||
</div>
|
||||
</ReactTooltip>
|
||||
<ReactTooltip id={'chain_balance_tip'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip id={'chain_balance_tip'} place={'right'}>
|
||||
<div>
|
||||
{'Chain Balance: '}
|
||||
{formatCB}
|
||||
|
@ -232,7 +232,7 @@ export const NodeInfo = ({ isOpen, isBurger }: NodeInfoProps) => {
|
|||
{formatPB}
|
||||
</div>
|
||||
</ReactTooltip>
|
||||
<ReactTooltip id={'node_tip'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip id={'node_tip'} place={'right'}>
|
||||
<div>{`Active Channels: ${activeChannelCount}`}</div>
|
||||
<div>{`Pending Channels: ${pendingChannelCount}`}</div>
|
||||
<div>{`Closed Channels: ${closedChannelCount}`}</div>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import { createGlobalStyle } from 'styled-components';
|
||||
import { backgroundColor, textColor } from './Themes';
|
||||
import { Inter } from 'next/font/google';
|
||||
|
||||
const inter = Inter({ subsets: ['latin'] });
|
||||
|
||||
export const GlobalStyles = createGlobalStyle`
|
||||
html, body {
|
||||
|
@ -8,7 +11,7 @@ export const GlobalStyles = createGlobalStyle`
|
|||
}
|
||||
* {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-family: 'Inter', sans-serif;
|
||||
font-family: ${inter.style.fontFamily}, sans-serif;
|
||||
}
|
||||
*, *::after, *::before {
|
||||
box-sizing: border-box;
|
||||
|
@ -16,6 +19,8 @@ export const GlobalStyles = createGlobalStyle`
|
|||
body {
|
||||
background: ${backgroundColor};
|
||||
color: ${textColor};
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-family: ${inter.style.fontFamily}, sans-serif;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useReducer, useState } from 'react';
|
||||
import { ReactNode, useReducer, useState } from 'react';
|
||||
import { useBosRebalanceMutation } from '../../graphql/mutations/__generated__/bosRebalance.generated';
|
||||
import { toast } from 'react-toastify';
|
||||
import { getErrorContent } from '../../utils/error';
|
||||
|
@ -139,7 +139,10 @@ const reducer = (state: StateType, action: ActionType): StateType => {
|
|||
}
|
||||
};
|
||||
|
||||
const SettingLine: React.FC<{ title: string }> = ({ children, title }) => (
|
||||
const SettingLine: React.FC<{ title: string; children?: ReactNode }> = ({
|
||||
children,
|
||||
title,
|
||||
}) => (
|
||||
<RebalanceLine>
|
||||
<RebalanceSubTitle>{title}</RebalanceSubTitle>
|
||||
<SingleLine>{children}</SingleLine>
|
||||
|
|
|
@ -27,10 +27,10 @@ export const RebalanceLogs: FC<RebalanceProps> = ({
|
|||
}, [lastMessage, setMessages]);
|
||||
|
||||
const renderContent = () => {
|
||||
return messages.map(m => {
|
||||
return messages.map((m, index) => {
|
||||
if ('rebalance_target_amount' in m) {
|
||||
return (
|
||||
<SubCard>
|
||||
<SubCard key={index}>
|
||||
{renderLine(
|
||||
'Amount',
|
||||
formatSats(btcToSat(m.rebalance_target_amount))
|
||||
|
@ -42,14 +42,14 @@ export const RebalanceLogs: FC<RebalanceProps> = ({
|
|||
}
|
||||
if ('circular_rebalance_for' in m) {
|
||||
return (
|
||||
<SubCard>
|
||||
<SubCard key={index}>
|
||||
{renderLine('Rebalancing peer', m.circular_rebalance_for)}
|
||||
</SubCard>
|
||||
);
|
||||
}
|
||||
if ('evaluating' in m) {
|
||||
return (
|
||||
<SubCard>
|
||||
<SubCard key={index}>
|
||||
{m.evaluating.map((s: string, index: number) =>
|
||||
renderLine(index + 1, s)
|
||||
)}
|
||||
|
@ -58,13 +58,15 @@ export const RebalanceLogs: FC<RebalanceProps> = ({
|
|||
}
|
||||
if ('evaluating_amount' in m) {
|
||||
return (
|
||||
<SubCard>
|
||||
<SubCard key={index}>
|
||||
{renderLine('Evaluating amount', formatSats(m.evaluating_amount))}
|
||||
</SubCard>
|
||||
);
|
||||
}
|
||||
if ('failure' in m) {
|
||||
return <SubCard>{renderLine('Failure', m.failure)}</SubCard>;
|
||||
return (
|
||||
<SubCard key={index}>{renderLine('Failure', m.failure)}</SubCard>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
|
|
@ -84,7 +84,9 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
|
||||
const isDay = time <= 1;
|
||||
|
||||
const today = isDay ? new Date().setMinutes(0, 0, 0) : new Date().setHours(0, 0, 0, 0);
|
||||
const today = isDay
|
||||
? new Date().setMinutes(0, 0, 0)
|
||||
: new Date().setHours(0, 0, 0, 0);
|
||||
|
||||
array.forEach((transaction: ArrayType[0]) => {
|
||||
if (!transaction?.__typename) return;
|
||||
|
@ -93,8 +95,14 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
if (!transaction.is_confirmed || !transaction.confirmed_at) return;
|
||||
|
||||
const difference = isDay
|
||||
? differenceInHours(today, new Date(transaction.confirmed_at).setMinutes(0, 0, 0))
|
||||
: differenceInDays(today, new Date(transaction.confirmed_at).setHours(0, 0, 0, 0));
|
||||
? differenceInHours(
|
||||
today,
|
||||
new Date(transaction.confirmed_at).setMinutes(0, 0, 0)
|
||||
)
|
||||
: differenceInDays(
|
||||
today,
|
||||
new Date(transaction.confirmed_at).setHours(0, 0, 0, 0)
|
||||
);
|
||||
|
||||
transactions.push({
|
||||
difference,
|
||||
|
@ -105,8 +113,14 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
if (!transaction.is_confirmed) return;
|
||||
|
||||
const difference = isDay
|
||||
? differenceInHours(today, new Date(transaction.created_at).setMinutes(0, 0, 0))
|
||||
: differenceInDays(today, new Date(transaction.created_at).setHours(0, 0, 0, 0));
|
||||
? differenceInHours(
|
||||
today,
|
||||
new Date(transaction.created_at).setMinutes(0, 0, 0)
|
||||
)
|
||||
: differenceInDays(
|
||||
today,
|
||||
new Date(transaction.created_at).setHours(0, 0, 0, 0)
|
||||
);
|
||||
|
||||
transactions.push({
|
||||
difference,
|
||||
|
@ -115,8 +129,14 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
});
|
||||
} else if (transaction.__typename === 'Forward') {
|
||||
const difference = isDay
|
||||
? differenceInHours(today, new Date(transaction.created_at).setMinutes(0, 0, 0))
|
||||
: differenceInDays(today, new Date(transaction.created_at).setHours(0, 0, 0, 0));
|
||||
? differenceInHours(
|
||||
today,
|
||||
new Date(transaction.created_at).setMinutes(0, 0, 0)
|
||||
)
|
||||
: differenceInDays(
|
||||
today,
|
||||
new Date(transaction.created_at).setHours(0, 0, 0, 0)
|
||||
);
|
||||
|
||||
transactions.push({
|
||||
difference,
|
||||
|
@ -132,10 +152,7 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
const grouped = groupBy(transactions, 'difference');
|
||||
|
||||
const final: any[] = [];
|
||||
const differences = Array.from(
|
||||
{ length: isDay ? 24 : time },
|
||||
(_, i) => i
|
||||
);
|
||||
const differences = Array.from({ length: isDay ? 24 : time }, (_, i) => i);
|
||||
|
||||
differences.forEach(key => {
|
||||
const group = grouped[key];
|
||||
|
@ -160,8 +177,8 @@ export const getByTime = (array: ArrayType, time: number): any[] => {
|
|||
date: total.date
|
||||
? total.date
|
||||
: isDay
|
||||
? subHours(today, Number(key)).toISOString()
|
||||
: subDays(today, Number(key)).toISOString(),
|
||||
? subHours(today, Number(key)).toISOString()
|
||||
: subDays(today, Number(key)).toISOString(),
|
||||
};
|
||||
},
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ import ScaleLoader from 'react-spinners/ScaleLoader';
|
|||
import { useGetChannelQuery } from '../../../../graphql/queries/__generated__/getChannel.generated';
|
||||
import { useGetClosedChannelsQuery } from '../../../../graphql/queries/__generated__/getClosedChannels.generated';
|
||||
import { themeColors } from '../../../../styles/Themes';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { Tooltip as ReactTooltip } from 'react-tooltip';
|
||||
import { Info } from 'react-feather';
|
||||
import styled from 'styled-components';
|
||||
import { getAliasFromClosedChannels } from './helpers';
|
||||
|
@ -51,7 +51,7 @@ export const ChannelAlias: FC<{ id: string }> = ({ id }) => {
|
|||
<S.icon>
|
||||
<Info size={16} data-tip data-for={'channel_info'} />
|
||||
</S.icon>
|
||||
<ReactTooltip id={'channel_info'} effect={'solid'} place={'right'}>
|
||||
<ReactTooltip id={'channel_info'} place={'right'}>
|
||||
This channel has been closed.
|
||||
</ReactTooltip>
|
||||
</>
|
||||
|
|
|
@ -5,6 +5,7 @@ import { StatHeaderLine } from './styles';
|
|||
|
||||
type StatWrapperProps = {
|
||||
title: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const StatWrapper: React.FC<StatWrapperProps> = ({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { createContext, useContext, useReducer } from 'react';
|
||||
import React, { ReactNode, createContext, useContext, useReducer } from 'react';
|
||||
|
||||
type State = {
|
||||
volumeScore: number | null;
|
||||
|
@ -37,7 +37,7 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const StatsProvider: React.FC = ({ children }) => {
|
||||
const StatsProvider: React.FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
import React, { createContext, useContext, useReducer, useEffect } from 'react';
|
||||
import React, {
|
||||
createContext,
|
||||
useContext,
|
||||
useReducer,
|
||||
useEffect,
|
||||
ReactNode,
|
||||
} from 'react';
|
||||
import { toast } from 'react-toastify';
|
||||
import { CreateBoltzReverseSwap } from './types';
|
||||
|
||||
|
@ -74,7 +80,7 @@ const stateReducer = (state: State, action: ActionType): State => {
|
|||
}
|
||||
};
|
||||
|
||||
const SwapsProvider: React.FC = ({ children }) => {
|
||||
const SwapsProvider: React.FC<{ children?: ReactNode }> = ({ children }) => {
|
||||
const [state, dispatch] = useReducer(stateReducer, initialState);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Fragment, useEffect, useState } from 'react';
|
||||
import { Trash } from 'react-feather';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { Tooltip as ReactTooltip } from 'react-tooltip';
|
||||
import { ColorButton } from '../../components/buttons/colorButton/ColorButton';
|
||||
import { getTransactionLink } from '../../components/generic/helpers';
|
||||
import {
|
||||
|
@ -262,7 +262,7 @@ export const SwapStatus = () => {
|
|||
</Fragment>
|
||||
))}
|
||||
</Card>
|
||||
<ReactTooltip id={`cleanup`} effect={'solid'}>
|
||||
<ReactTooltip id={`cleanup`}>
|
||||
Cleanup expired, refunded and completed swaps.
|
||||
</ReactTooltip>
|
||||
<Modal
|
||||
|
|
|
@ -16,13 +16,12 @@ export class GqlThrottlerGuard extends ThrottlerGuard {
|
|||
const request = connection?.context?.req ? connection.context.req : req;
|
||||
const ip = getIp(request);
|
||||
const key = this.generateKey(context, ip);
|
||||
const ttls = await this.storageService.getRecord(key);
|
||||
const { totalHits } = await this.storageService.increment(key, ttl);
|
||||
|
||||
if (ttls.length >= limit) {
|
||||
if (totalHits >= limit) {
|
||||
throw new ThrottlerException();
|
||||
}
|
||||
|
||||
await this.storageService.addRecord(key, ttl);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue