From 0bfbdc1949d77dd18f7113680a7bf4f0cdfcdf95 Mon Sep 17 00:00:00 2001 From: Lantt Date: Mon, 28 Jun 2021 17:04:50 +0800 Subject: [PATCH 1/2] chore: remove control-flow and enum in shared --- packages/dashboard/package.json | 2 +- packages/maskbook/package.json | 2 +- .../DecryptedPost/DecryptedPost.tsx | 9 +- .../shared-settings/useSettingsUI.tsx | 3 +- .../src/database/Persona/consistency.ts | 4 +- .../CryptoServices/prepareRecipientDetail.ts | 4 +- .../EthereumServices/send.ts | 2 +- .../EthereumServices/web3.ts | 2 +- .../DatabasePreviewCard.tsx | 4 +- .../Wallet/HideTokenConfirm.tsx | 6 +- .../Collectible/SNSAdaptor/Collectible.tsx | 8 +- .../SNSAdaptor/CollectibleProviderIcon.tsx | 2 +- .../src/plugins/Collectible/hooks/useAsset.ts | 2 +- .../plugins/Collectible/hooks/useOrders.ts | 2 +- .../src/plugins/Collectible/pipes/index.ts | 2 +- .../Trader/UI/trader/DataProviderIcon.tsx | 2 +- .../Trader/UI/trader/SelectPoolPanel.tsx | 4 +- .../Trader/UI/trader/SelectProviderPanel.tsx | 4 +- .../Trader/UI/trader/SettingsDialog.tsx | 17 +- .../Trader/UI/trader/TradeProviderIcon.tsx | 2 +- .../src/plugins/Trader/apis/trader/index.ts | 2 +- .../src/plugins/Trader/apis/trending/index.ts | 12 +- packages/maskbook/src/plugins/Trader/pipes.ts | 2 +- .../maskbook/src/plugins/Trader/settings.ts | 2 +- .../src/plugins/Trader/trader/0x/useTrade.ts | 2 +- .../plugins/Trader/trader/useTradeCallback.ts | 2 +- .../plugins/Trader/trader/useTradeComputed.ts | 3 +- .../plugins/Trader/trader/useTradeContext.ts | 2 +- .../SNSAdaptor/ConnectWalletDialog/index.tsx | 12 +- .../SNSAdaptor/SelectProviderDialog/index.tsx | 21 +- .../plugins/Wallet/hooks/useTransactions.ts | 3 +- .../src/plugins/Wallet/pipes/index.ts | 2 +- .../src/plugins/Wallet/services/assets.ts | 3 +- .../facebook.com/ui-provider.ts | 3 +- .../minds.com/ui-provider.ts | 2 +- .../twitter.com/ui-provider.ts | 4 +- packages/maskbook/src/utils/native-rpc/Web.ts | 2 +- packages/maskbook/src/utils/theme.ts | 3 +- .../JSON/DBRecord-JSON/PostRecord.ts | 6 +- .../UI/EthereumERC20TokenApprovedBoundary.tsx | 3 +- packages/shared/package.json | 1 + packages/shared/src/utils/control-flow.ts | 8 - packages/shared/src/utils/enum.ts | 8 - packages/shared/src/utils/index.ts | 2 - packages/web3-shared/package.json | 1 + .../src/hooks/useTokenAssetDetailed.ts | 6 +- .../web3-shared/src/hooks/useTokenBalance.ts | 2 +- .../web3-shared/src/hooks/useTokenDetailed.ts | 4 +- .../src/hooks/useTokenTransferCallback.ts | 2 +- packages/web3-shared/src/pipes/index.ts | 3 +- packages/web3-shared/src/utils/index.ts | 2 +- pnpm-lock.yaml | 860 ++++++++---------- 52 files changed, 496 insertions(+), 577 deletions(-) delete mode 100644 packages/shared/src/utils/control-flow.ts delete mode 100644 packages/shared/src/utils/enum.ts diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json index 3d1f871bb863..6a1dbf665430 100644 --- a/packages/dashboard/package.json +++ b/packages/dashboard/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@dimensiondev/holoflows-kit": "0.8.0-20210317064617-6c4792c", - "@dimensiondev/kit": "^0.0.0-20210221102734-0b4a937", + "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", "@masknet/icons": "workspace:*", "@masknet/plugin-example": "workspace:*", "@masknet/plugin-infra": "workspace:*", diff --git a/packages/maskbook/package.json b/packages/maskbook/package.json index 0960dc09aff2..ad16f47f013a 100644 --- a/packages/maskbook/package.json +++ b/packages/maskbook/package.json @@ -9,7 +9,7 @@ "@balancer-labs/sor": "^1.0.0", "@dimensiondev/common-protocols": "1.6.0-20201027083702-d0ae6e2", "@dimensiondev/holoflows-kit": "0.8.0-20210317064617-6c4792c", - "@dimensiondev/kit": "0.0.0-20210221102734-0b4a937", + "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", "@dimensiondev/metamask-extension-provider": "3.0.6-20210519045409-1835d4d", "@dimensiondev/stego-js": "=0.11.1-20201027083223-8ab41be", "@dimensiondev/uniswap-sdk": "=3.0.4-20210619092641-a270dc0", diff --git a/packages/maskbook/src/components/InjectedComponents/DecryptedPost/DecryptedPost.tsx b/packages/maskbook/src/components/InjectedComponents/DecryptedPost/DecryptedPost.tsx index 1e72e6c047d4..0e3f7e5c9f05 100644 --- a/packages/maskbook/src/components/InjectedComponents/DecryptedPost/DecryptedPost.tsx +++ b/packages/maskbook/src/components/InjectedComponents/DecryptedPost/DecryptedPost.tsx @@ -1,5 +1,6 @@ -import { useMemo, useState, useEffect, useReducer, Fragment } from 'react' -import { unreachable, makeTypedMessageTuple, TypedMessageTuple } from '@masknet/shared' +import { Fragment, useEffect, useMemo, useReducer, useState } from 'react' +import { makeTypedMessageTuple, TypedMessageTuple } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { delay } from '../../../utils/utils' import { ServicesWithProgress } from '../../../extension/service' @@ -11,8 +12,8 @@ import type { SuccessDecryption, } from '../../../extension/background-script/CryptoServices/decryptFrom' import { DecryptPostSuccess, DecryptPostSuccessProps } from './DecryptedPostSuccess' -import { DecryptPostAwaitingProps, DecryptPostAwaiting } from './DecryptPostAwaiting' -import { DecryptPostFailedProps, DecryptPostFailed } from './DecryptPostFailed' +import { DecryptPostAwaiting, DecryptPostAwaitingProps } from './DecryptPostAwaiting' +import { DecryptPostFailed, DecryptPostFailedProps } from './DecryptPostFailed' import { DecryptedPostDebug } from './DecryptedPostDebug' import { usePostClaimedAuthor, usePostInfoDetails, usePostInfoSharedPublic } from '../../DataSource/usePostInfo' import { asyncIteratorWithResult } from '../../../utils/type-transform/asyncIteratorHelpers' diff --git a/packages/maskbook/src/components/shared-settings/useSettingsUI.tsx b/packages/maskbook/src/components/shared-settings/useSettingsUI.tsx index 11b707b2f152..fba3c0bb6f7b 100644 --- a/packages/maskbook/src/components/shared-settings/useSettingsUI.tsx +++ b/packages/maskbook/src/components/shared-settings/useSettingsUI.tsx @@ -1,5 +1,6 @@ import type { ValueRef } from '@dimensiondev/holoflows-kit' -import { useValueRef, getEnumAsArray } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' +import { getEnumAsArray } from '@dimensiondev/kit' import { ListItem, ListItemIcon, diff --git a/packages/maskbook/src/database/Persona/consistency.ts b/packages/maskbook/src/database/Persona/consistency.ts index a3ba6ad193e0..5903cc5ebad1 100644 --- a/packages/maskbook/src/database/Persona/consistency.ts +++ b/packages/maskbook/src/database/Persona/consistency.ts @@ -1,8 +1,8 @@ import type { FullPersonaDBTransaction } from './Persona.db' -import { ProfileIdentifier, PersonaIdentifier, Identifier, ECKeyIdentifier } from '../type' +import { ECKeyIdentifier, Identifier, PersonaIdentifier, ProfileIdentifier } from '../type' import type { IdentifierMap } from '../IdentifierMap' import { restorePrototype } from '../../utils/type' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' type ReadwriteFullPersonaDBTransaction = FullPersonaDBTransaction<'readwrite'> diff --git a/packages/maskbook/src/extension/background-script/CryptoServices/prepareRecipientDetail.ts b/packages/maskbook/src/extension/background-script/CryptoServices/prepareRecipientDetail.ts index c6082f555b78..68255b46b2e2 100644 --- a/packages/maskbook/src/extension/background-script/CryptoServices/prepareRecipientDetail.ts +++ b/packages/maskbook/src/extension/background-script/CryptoServices/prepareRecipientDetail.ts @@ -1,10 +1,10 @@ -import { ProfileIdentifier, GroupIdentifier } from '../../../database/type' +import { GroupIdentifier, ProfileIdentifier } from '../../../database/type' import { queryPublicKey } from '../../../database' import { IdentifierMap } from '../../../database/IdentifierMap' import type { RecipientDetail, RecipientReason } from '../../../database/post' import { queryUserGroup } from '../UserGroupService' import type { EC_Public_JsonWebKey } from '../../../modules/CryptoAlgorithm/interfaces/utils' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' export async function prepareRecipientDetail(to: (ProfileIdentifier | GroupIdentifier)[]) { const recipients = new IdentifierMap(new Map(), ProfileIdentifier) diff --git a/packages/maskbook/src/extension/background-script/EthereumServices/send.ts b/packages/maskbook/src/extension/background-script/EthereumServices/send.ts index eb754c083cde..2f132072af77 100644 --- a/packages/maskbook/src/extension/background-script/EthereumServices/send.ts +++ b/packages/maskbook/src/extension/background-script/EthereumServices/send.ts @@ -2,7 +2,7 @@ import type { HttpProvider, TransactionConfig } from 'web3-core' import type { JsonRpcPayload, JsonRpcResponse } from 'web3-core-helpers' import { addGasMargin, EthereumMethodType, ProviderType } from '@masknet/web3-shared' import type { IJsonRpcRequest } from '@walletconnect/types' -import { safeUnreachable } from '@masknet/shared' +import { safeUnreachable } from '@dimensiondev/kit' import { createWeb3 } from './web3' import * as WalletConnect from './providers/WalletConnect' import { currentAccountSettings, currentProviderSettings } from '../../../plugins/Wallet/settings' diff --git a/packages/maskbook/src/extension/background-script/EthereumServices/web3.ts b/packages/maskbook/src/extension/background-script/EthereumServices/web3.ts index 4e275fcf4bed..17266775f1ba 100644 --- a/packages/maskbook/src/extension/background-script/EthereumServices/web3.ts +++ b/packages/maskbook/src/extension/background-script/EthereumServices/web3.ts @@ -1,5 +1,5 @@ import { ProviderType } from '@masknet/web3-shared' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import * as Maskbook from './providers/Maskbook' import * as MetaMask from './providers/MetaMask' import * as WalletConnect from './providers/WalletConnect' diff --git a/packages/maskbook/src/extension/options-page/DashboardComponents/DatabasePreviewCard.tsx b/packages/maskbook/src/extension/options-page/DashboardComponents/DatabasePreviewCard.tsx index b62a2f807b72..9996c7301092 100644 --- a/packages/maskbook/src/extension/options-page/DashboardComponents/DatabasePreviewCard.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardComponents/DatabasePreviewCard.tsx @@ -1,8 +1,8 @@ import classNames from 'classnames' import CheckCircleOutlineIcon from '@material-ui/icons/CheckCircleOutline' import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked' -import { Table, TableBody, TableRow, TableCell, Typography, makeStyles, Theme } from '@material-ui/core' -import { unreachable } from '@masknet/shared' +import { makeStyles, Table, TableBody, TableCell, TableRow, Theme, Typography } from '@material-ui/core' +import { unreachable } from '@dimensiondev/kit' import { useI18N } from '../../../utils' import { useStylesExtends } from '../../../components/custom-ui-helper' diff --git a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/HideTokenConfirm.tsx b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/HideTokenConfirm.tsx index 5f304ed9b44c..b8264bbd6612 100644 --- a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/HideTokenConfirm.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/HideTokenConfirm.tsx @@ -1,14 +1,14 @@ import { Trash2 as TrashIcon } from 'react-feather' import { Button } from '@material-ui/core' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { - isNative, ERC1155TokenDetailed, ERC20TokenDetailed, ERC721TokenDetailed, + EthereumTokenType, FungibleTokenDetailed, + isNative, NonFungibleTokenDetailed, - EthereumTokenType, } from '@masknet/web3-shared' import { WalletRPC } from '../../../../plugins/Wallet/messages' import { useI18N } from '../../../../utils' diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/Collectible.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/Collectible.tsx index e4abbaae783e..eb3f7c1b8886 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/Collectible.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/Collectible.tsx @@ -1,13 +1,13 @@ import { useCallback } from 'react' import { - makeStyles, Avatar, Box, Button, - CardHeader, - CardContent, CardActions, + CardContent, + CardHeader, Link, + makeStyles, Paper, Tab, Tabs, @@ -36,7 +36,7 @@ import { resolveAssetLinkOnOpenSea, resolveCollectibleProviderName } from '../pi import { Markdown } from '../../Snapshot/SNSAdaptor/Markdown' import { ActionBar } from './ActionBar' import { useChainId } from '@masknet/web3-shared' -import { getEnumAsArray } from '@masknet/shared' +import { getEnumAsArray } from '@dimensiondev/kit' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/CollectibleProviderIcon.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/CollectibleProviderIcon.tsx index 4c679ed4309c..d7d6ed2e8854 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/CollectibleProviderIcon.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/CollectibleProviderIcon.tsx @@ -1,7 +1,7 @@ import { makeStyles } from '@material-ui/core' import { OpenSeaIcon } from '../../../resources/OpenSeaIcon' import { RaribleIcon } from '../../../resources/RaribleIcon' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { CollectibleProvider } from '../types' const useStyles = makeStyles((theme) => { diff --git a/packages/maskbook/src/plugins/Collectible/hooks/useAsset.ts b/packages/maskbook/src/plugins/Collectible/hooks/useAsset.ts index 8a90a32c84e1..7f394f677d56 100644 --- a/packages/maskbook/src/plugins/Collectible/hooks/useAsset.ts +++ b/packages/maskbook/src/plugins/Collectible/hooks/useAsset.ts @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { currySameAddress, EthereumTokenType, diff --git a/packages/maskbook/src/plugins/Collectible/hooks/useOrders.ts b/packages/maskbook/src/plugins/Collectible/hooks/useOrders.ts index c8a12a3dddaf..e25214399c0e 100644 --- a/packages/maskbook/src/plugins/Collectible/hooks/useOrders.ts +++ b/packages/maskbook/src/plugins/Collectible/hooks/useOrders.ts @@ -1,7 +1,7 @@ import { useAsyncRetry } from 'react-use' import BigNumber from 'bignumber.js' import { OrderSide } from 'opensea-js/lib/types' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import type { CollectibleToken, NFTOrder, OpenSeaCustomAccount } from '../types' import { CollectibleProvider } from '../types' import { PluginCollectibleRPC } from '../messages' diff --git a/packages/maskbook/src/plugins/Collectible/pipes/index.ts b/packages/maskbook/src/plugins/Collectible/pipes/index.ts index e90e6b79d9f8..4a8e035a42e5 100644 --- a/packages/maskbook/src/plugins/Collectible/pipes/index.ts +++ b/packages/maskbook/src/plugins/Collectible/pipes/index.ts @@ -1,5 +1,5 @@ import { Network } from 'opensea-js' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { ChainId } from '@masknet/web3-shared' import { NullAddress, RaribleRopstenUserURL, RaribleUserURL } from '../constants' import { CollectibleProvider, OpenSeaAssetEventType, RaribleEventType } from '../types' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/DataProviderIcon.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/DataProviderIcon.tsx index 3afa42f5a539..781c0f3b8703 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/DataProviderIcon.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/DataProviderIcon.tsx @@ -2,7 +2,7 @@ import { makeStyles } from '@material-ui/core' import { CoinMarketCapIcon } from '../../../../resources/CoinMarketCapIcon' import { CoinGeckoIcon } from '../../../../resources/CoinGeckoIcon' import { UniswapIcon } from '../../../../resources/UniswapIcon' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { DataProvider } from '../../types' const useStyles = makeStyles((theme) => { diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/SelectPoolPanel.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/SelectPoolPanel.tsx index f8cbe5bf5159..5ea0186857d3 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/SelectPoolPanel.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/SelectPoolPanel.tsx @@ -1,8 +1,8 @@ import { useCallback } from 'react' import { difference } from 'lodash-es' -import { makeStyles, Checkbox, FormControlLabel } from '@material-ui/core' +import { Checkbox, FormControlLabel, makeStyles } from '@material-ui/core' import { ZrxTradePool } from '../../types' -import { getEnumAsArray } from '@masknet/shared' +import { getEnumAsArray } from '@dimensiondev/kit' import { resolveZrxTradePoolName } from '../../pipes' const useStyles = makeStyles((theme) => { diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/SelectProviderPanel.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/SelectProviderPanel.tsx index 5da7c3c84bb2..16559508e525 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/SelectProviderPanel.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/SelectProviderPanel.tsx @@ -1,5 +1,5 @@ -import { makeStyles, Chip } from '@material-ui/core' -import { getEnumAsArray } from '@masknet/shared' +import { Chip, makeStyles } from '@material-ui/core' +import { getEnumAsArray } from '@dimensiondev/kit' import { TradeProvider } from '../../types' import { resolveTradeProviderName } from '../../pipes' import { TradeProviderIcon } from './TradeProviderIcon' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/SettingsDialog.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/SettingsDialog.tsx index 0306d33afedd..5d42de8f174d 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/SettingsDialog.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/SettingsDialog.tsx @@ -1,20 +1,21 @@ import { useCallback } from 'react' import { - makeStyles, Accordion, - AccordionSummary, - Typography, AccordionDetails, - Paper, + AccordionSummary, + Button, Card, - CardContent, CardActions, - Button, + CardContent, DialogContent, + makeStyles, + Paper, + Typography, } from '@material-ui/core' -import { useValueRef, getEnumAsArray } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' +import { getEnumAsArray } from '@dimensiondev/kit' import { useI18N, useRemoteControlledDialog } from '../../../../utils' -import { ZrxTradePool, TradeProvider } from '../../types' +import { TradeProvider, ZrxTradePool } from '../../types' import { SelectPoolPanel } from './SelectPoolPanel' import { SlippageSlider } from './SlippageSlider' import { useStylesExtends } from '../../../../components/custom-ui-helper' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/TradeProviderIcon.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/TradeProviderIcon.tsx index c367694c852b..3dcc2cb18d97 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/TradeProviderIcon.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/TradeProviderIcon.tsx @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { makeStyles } from '@material-ui/core' import { BalancerIcon } from '../../../../resources/BalancerIcon' import { SashimiSwapIcon } from '../../../../resources/SashimiSwapIcon' diff --git a/packages/maskbook/src/plugins/Trader/apis/trader/index.ts b/packages/maskbook/src/plugins/Trader/apis/trader/index.ts index c89ab3fc49ff..b083df161c24 100644 --- a/packages/maskbook/src/plugins/Trader/apis/trader/index.ts +++ b/packages/maskbook/src/plugins/Trader/apis/trader/index.ts @@ -1,4 +1,4 @@ -import { safeUnreachable } from '@masknet/shared' +import { safeUnreachable } from '@dimensiondev/kit' import { getNetworkTypeFromChainId, NetworkType } from '@masknet/web3-shared' import { currentChainIdSettings } from '../../../Wallet/settings' import { TagType, TradeProvider } from '../../types' diff --git a/packages/maskbook/src/plugins/Trader/apis/trending/index.ts b/packages/maskbook/src/plugins/Trader/apis/trending/index.ts index e210f60091d3..f9b223c84100 100644 --- a/packages/maskbook/src/plugins/Trader/apis/trending/index.ts +++ b/packages/maskbook/src/plugins/Trader/apis/trending/index.ts @@ -1,19 +1,19 @@ import { first, groupBy } from 'lodash-es' -import { DataProvider, Currency, Coin, Trending, Stat, TagType } from '../../types' +import { Coin, Currency, DataProvider, Stat, TagType, Trending } from '../../types' import * as coinGeckoAPI from '../coingecko' import * as coinMarketCapAPI from '../coinmarketcap' import * as uniswapAPI from '../uniswap' import { Days } from '../../UI/trending/PriceChartDaysControl' -import { getEnumAsArray, unreachable } from '@masknet/shared' +import { getEnumAsArray, unreachable } from '@dimensiondev/kit' import { BTC_FIRST_LEGER_DATE, CRYPTOCURRENCY_MAP_EXPIRES_AT } from '../../constants' import { - resolveAlias, - resolveCoinId, - resolveCoinAddress, - resolveNetworkType, isBlockedId, isBlockedKeyword, isMirroredKeyword, + resolveAlias, + resolveCoinAddress, + resolveCoinId, + resolveNetworkType, } from './hotfix' import { NetworkType } from '@masknet/web3-shared' import { currentNetworkSettings } from '../../../Wallet/settings' diff --git a/packages/maskbook/src/plugins/Trader/pipes.ts b/packages/maskbook/src/plugins/Trader/pipes.ts index 09dae02f376b..35ad22fc55bf 100644 --- a/packages/maskbook/src/plugins/Trader/pipes.ts +++ b/packages/maskbook/src/plugins/Trader/pipes.ts @@ -1,6 +1,6 @@ import type BigNumber from 'bignumber.js' import { Currency, DataProvider, TradeProvider, WarningLevel, ZrxTradePool } from './types' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { BIPS_BASE, PRICE_IMPACT_HIGH, diff --git a/packages/maskbook/src/plugins/Trader/settings.ts b/packages/maskbook/src/plugins/Trader/settings.ts index 60da2c851220..9735db053d9b 100644 --- a/packages/maskbook/src/plugins/Trader/settings.ts +++ b/packages/maskbook/src/plugins/Trader/settings.ts @@ -1,4 +1,4 @@ -import { getEnumAsArray, unreachable } from '@masknet/shared' +import { getEnumAsArray, unreachable } from '@dimensiondev/kit' import stringify from 'json-stable-stringify' import { createGlobalSettings, createInternalSettings } from '../../settings/createSettings' import { i18n } from '../../utils/i18n-next' diff --git a/packages/maskbook/src/plugins/Trader/trader/0x/useTrade.ts b/packages/maskbook/src/plugins/Trader/trader/0x/useTrade.ts index c4c6b35a3dbf..ac7d0efb5ed2 100644 --- a/packages/maskbook/src/plugins/Trader/trader/0x/useTrade.ts +++ b/packages/maskbook/src/plugins/Trader/trader/0x/useTrade.ts @@ -1,4 +1,4 @@ -import { getEnumAsArray } from '@masknet/shared' +import { getEnumAsArray } from '@dimensiondev/kit' import { FungibleTokenDetailed, isNative, useBlockNumber, useTokenConstants } from '@masknet/web3-shared' import { difference } from 'lodash-es' import { useAsyncRetry } from 'react-use' diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeCallback.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeCallback.ts index 3492ab9a3b08..c6f7d58df4a4 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeCallback.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeCallback.ts @@ -1,6 +1,6 @@ import { useContext } from 'react' import type { Trade } from '@uniswap/sdk' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { SwapQuoteResponse, SwapResponse, TradeComputed, TradeProvider } from '../types' import { useTradeCallback as useNativeTokenWrapperCallback } from './native/useTradeCallback' import { useTradeCallback as useZrxCallback } from './0x/useTradeCallback' diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts index 87f928d15084..51e6fb2451d6 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts @@ -10,7 +10,8 @@ import { useTradeComputed as useZrxTradeComputed } from './0x/useTradeComputed' import { useTradeComputed as useBalancerTradeComputed } from './balancer/useTradeComputed' import { useTrade as useZrxTrade } from './0x/useTrade' import { useTrade as useBalancerTrade } from './balancer/useTrade' -import { pow10, unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' +import { pow10 } from '@masknet/shared' import { TradeContext } from './useTradeContext' export function useTradeComputed( diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeContext.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeContext.ts index d83fe5073df0..d84150cc07f6 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeContext.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeContext.ts @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { getTraderConstants, useChainId } from '@masknet/web3-shared' import { createContext, useMemo } from 'react' import { diff --git a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx index 2f13510f8074..a7de422f909b 100644 --- a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx +++ b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/ConnectWalletDialog/index.tsx @@ -1,15 +1,15 @@ import { useCallback, useState } from 'react' import { useAsyncRetry } from 'react-use' -import { makeStyles, DialogContent } from '@material-ui/core' -import { safeUnreachable } from '@masknet/shared' +import { DialogContent, makeStyles } from '@material-ui/core' +import { safeUnreachable } from '@dimensiondev/kit' import { + ChainId, + getChainDetailedCAIP, + getChainIdFromNetworkType, NetworkType, ProviderType, - getChainIdFromNetworkType, - resolveProviderName, - ChainId, resolveNetworkName, - getChainDetailedCAIP, + resolveProviderName, } from '@masknet/web3-shared' import { useStylesExtends } from '../../../../components/custom-ui-helper' import { InjectedDialog } from '../../../../components/shared/InjectedDialog' diff --git a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/SelectProviderDialog/index.tsx b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/SelectProviderDialog/index.tsx index 39d2a34a5dea..e62e8f5087e3 100644 --- a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/SelectProviderDialog/index.tsx +++ b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/SelectProviderDialog/index.tsx @@ -1,22 +1,29 @@ -import { useCallback, useState, useEffect } from 'react' +import { useCallback, useEffect, useState } from 'react' import { Box, - makeStyles, - Theme, DialogContent, ImageList, ImageListItem, List, ListItem, + makeStyles, + Theme, Typography, } from '@material-ui/core' -import { unreachable, useValueRef } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { SuccessIcon } from '@masknet/icons' -import { isEnvironment, Environment } from '@dimensiondev/holoflows-kit' -import { useWallets, useAccount, getChainIdFromNetworkType, ProviderType, NetworkType } from '@masknet/web3-shared' +import { Environment, isEnvironment } from '@dimensiondev/holoflows-kit' +import { + getChainIdFromNetworkType, + NetworkType, + ProviderType, + useAccount, + useChainId, + useWallets, +} from '@masknet/web3-shared' import { useHistory } from 'react-router-dom' import classnames from 'classnames' -import { useChainId } from '@masknet/web3-shared' import { useI18N } from '../../../../utils/i18n-next-ui' import { useStylesExtends } from '../../../../components/custom-ui-helper' import { Provider } from '../Provider' diff --git a/packages/maskbook/src/plugins/Wallet/hooks/useTransactions.ts b/packages/maskbook/src/plugins/Wallet/hooks/useTransactions.ts index baedc0b9c38c..d2ed6e9ac3d8 100644 --- a/packages/maskbook/src/plugins/Wallet/hooks/useTransactions.ts +++ b/packages/maskbook/src/plugins/Wallet/hooks/useTransactions.ts @@ -1,4 +1,5 @@ -import { unreachable, useValueRef } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { useAsyncRetry } from 'react-use' import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' import { WalletRPC } from '../messages' diff --git a/packages/maskbook/src/plugins/Wallet/pipes/index.ts b/packages/maskbook/src/plugins/Wallet/pipes/index.ts index 28db9817b764..6f205760a4a5 100644 --- a/packages/maskbook/src/plugins/Wallet/pipes/index.ts +++ b/packages/maskbook/src/plugins/Wallet/pipes/index.ts @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { PortfolioProvider } from '../types' export function resolvePortfolioDataProviderName(provider: PortfolioProvider) { diff --git a/packages/maskbook/src/plugins/Wallet/services/assets.ts b/packages/maskbook/src/plugins/Wallet/services/assets.ts index 2112b3b43837..3f90f877de61 100644 --- a/packages/maskbook/src/plugins/Wallet/services/assets.ts +++ b/packages/maskbook/src/plugins/Wallet/services/assets.ts @@ -1,4 +1,5 @@ -import { formatEthereumAddress, pow10, unreachable } from '@masknet/shared' +import { formatEthereumAddress, pow10 } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { ChainId, createERC1155Token, diff --git a/packages/maskbook/src/social-network-adaptor/facebook.com/ui-provider.ts b/packages/maskbook/src/social-network-adaptor/facebook.com/ui-provider.ts index c0d206ad6020..10e47f99c813 100644 --- a/packages/maskbook/src/social-network-adaptor/facebook.com/ui-provider.ts +++ b/packages/maskbook/src/social-network-adaptor/facebook.com/ui-provider.ts @@ -23,7 +23,8 @@ import { injectPageInspectorDefault } from '../../social-network/defaults/inject import { createTaskStartSetupGuideDefault } from '../../social-network/defaults/inject/StartSetupGuide' import { GrayscaleAlgorithm } from '@dimensiondev/stego-js/esm/grayscale' import { currentSelectedIdentity } from '../../settings/settings' -import { ProfileIdentifier, unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' +import { ProfileIdentifier } from '@masknet/shared' import { globalUIState } from '../../social-network' const facebookUI: SocialNetworkUI.Definition = { diff --git a/packages/maskbook/src/social-network-adaptor/minds.com/ui-provider.ts b/packages/maskbook/src/social-network-adaptor/minds.com/ui-provider.ts index 59b7188243ba..2ce4d714ddac 100644 --- a/packages/maskbook/src/social-network-adaptor/minds.com/ui-provider.ts +++ b/packages/maskbook/src/social-network-adaptor/minds.com/ui-provider.ts @@ -6,7 +6,7 @@ import { injectPageInspectorDefault } from '../../social-network/defaults/inject import { createTaskStartSetupGuideDefault } from '../../social-network/defaults/inject/StartSetupGuide' import { InitAutonomousStateFriends } from '../../social-network/defaults/state/InitFriends' import { InitAutonomousStateProfiles } from '../../social-network/defaults/state/InitProfiles' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { pasteImageToCompositionMinds } from './automation/AttachImageToComposition' import { gotoNewsFeedPageMinds } from './automation/gotoNewsFeedPage' import { gotoProfilePageMinds } from './automation/gotoProfilePage' diff --git a/packages/maskbook/src/social-network-adaptor/twitter.com/ui-provider.ts b/packages/maskbook/src/social-network-adaptor/twitter.com/ui-provider.ts index 5ef2247ed9a2..a4fce07965c4 100644 --- a/packages/maskbook/src/social-network-adaptor/twitter.com/ui-provider.ts +++ b/packages/maskbook/src/social-network-adaptor/twitter.com/ui-provider.ts @@ -1,4 +1,4 @@ -import { stateCreator, SocialNetworkUI, globalUIState } from '../../social-network' +import { globalUIState, SocialNetworkUI, stateCreator } from '../../social-network' import { twitterBase } from './base' import getSearchedKeywordAtTwitter from './collecting/getSearchedKeyword' import { twitterShared } from './shared' @@ -31,7 +31,7 @@ import { pasteImageToCompositionDefault } from '../../social-network/defaults/au import { currentSelectedIdentity } from '../../settings/settings' import { injectPostInspectorAtTwitter } from './injection/PostInspector' import { ProfileIdentifier } from '../../database/type' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' const twitterUI: SocialNetworkUI.Definition = { ...twitterBase, diff --git a/packages/maskbook/src/utils/native-rpc/Web.ts b/packages/maskbook/src/utils/native-rpc/Web.ts index e1f787b8d931..69d1e7422538 100644 --- a/packages/maskbook/src/utils/native-rpc/Web.ts +++ b/packages/maskbook/src/utils/native-rpc/Web.ts @@ -3,7 +3,7 @@ import Services from '../../extension/service' import { definedSocialNetworkWorkers } from '../../social-network/define' import { launchPageSettings } from '../../settings/settings' import stringify from 'json-stable-stringify' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' export const WebviewAPI: WebviewAPIs = { web_echo: async (arg) => arg, diff --git a/packages/maskbook/src/utils/theme.ts b/packages/maskbook/src/utils/theme.ts index e38251175b4a..ca0076c7c391 100644 --- a/packages/maskbook/src/utils/theme.ts +++ b/packages/maskbook/src/utils/theme.ts @@ -1,5 +1,6 @@ import { ValueRef } from '@dimensiondev/holoflows-kit' -import { safeUnreachable, useValueRef } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' +import { safeUnreachable } from '@dimensiondev/kit' import { Appearance, Language } from '@masknet/theme' import { unstable_createMuiStrictModeTheme, useMediaQuery } from '@material-ui/core' import { blue, green, grey, orange, red } from '@material-ui/core/colors' diff --git a/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts b/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts index a839abd68685..ab39487bf96a 100644 --- a/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts +++ b/packages/maskbook/src/utils/type-transform/BackupFormat/JSON/DBRecord-JSON/PostRecord.ts @@ -1,9 +1,9 @@ -import type { PostRecord, RecipientReason, RecipientDetail } from '../../../../../database/post' +import type { PostRecord, RecipientDetail, RecipientReason } from '../../../../../database/post' import type { BackupJSONFileLatest } from '../latest' import type { RecipientReasonJSON } from '../version-2' -import { Identifier, GroupIdentifier, PostIVIdentifier, ProfileIdentifier } from '../../../../../database/type' +import { GroupIdentifier, Identifier, PostIVIdentifier, ProfileIdentifier } from '../../../../../database/type' import { IdentifierMap } from '../../../../../database/IdentifierMap' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' export function PostRecordToJSONFormat(post: PostRecord): BackupJSONFileLatest['posts'][0] { return { diff --git a/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx b/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx index 5f4af0671e90..fcd6de71cce9 100644 --- a/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx +++ b/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx @@ -1,7 +1,8 @@ import React, { useCallback, useEffect } from 'react' import { useSnackbar } from '@masknet/theme' import { Grid, makeStyles } from '@material-ui/core' -import { formatBalance, unreachable } from '@masknet/shared' +import { formatBalance } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { useI18N } from '../../utils' import ActionButton from '../../extension/options-page/DashboardComponents/ActionButton' import { diff --git a/packages/shared/package.json b/packages/shared/package.json index 78edc3fdd8d3..390720b7486c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -4,6 +4,7 @@ "types": "./dist/index.d.ts", "dependencies": { "@dimensiondev/holoflows-kit": "0.8.0-20210317064617-6c4792c", + "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", "@servie/events": "^3.0.0", "anchorme": "^2.1.2", "async-call-rpc": "^5.1.0", diff --git a/packages/shared/src/utils/control-flow.ts b/packages/shared/src/utils/control-flow.ts deleted file mode 100644 index d60731caf423..000000000000 --- a/packages/shared/src/utils/control-flow.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function unreachable(value: never): never { - console.error('Unhandled value: ', value) - throw new Error('Unreachable case:' + value) -} - -export function safeUnreachable(value: never) { - console.error('Unhandled value: ', value) -} diff --git a/packages/shared/src/utils/enum.ts b/packages/shared/src/utils/enum.ts deleted file mode 100644 index c29d6c787430..000000000000 --- a/packages/shared/src/utils/enum.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function getEnumAsArray(enumObject: T) { - return ( - Object.keys(enumObject) - // Leave only key of enum - .filter((x) => Number.isNaN(Number.parseInt(x))) - .map((key) => ({ key, value: enumObject[key as keyof T] })) - ) -} diff --git a/packages/shared/src/utils/index.ts b/packages/shared/src/utils/index.ts index 86069ef95f68..b2444077b70f 100644 --- a/packages/shared/src/utils/index.ts +++ b/packages/shared/src/utils/index.ts @@ -1,7 +1,5 @@ export * from './parseURL' export * from './delay' export * from './timeout' -export * from './control-flow' export * from './sessionStorageCache' export * from './number' -export * from './enum' diff --git a/packages/web3-shared/package.json b/packages/web3-shared/package.json index 985f14caa84f..ef7dec9c384f 100644 --- a/packages/web3-shared/package.json +++ b/packages/web3-shared/package.json @@ -3,6 +3,7 @@ "main": "./dist/index.js", "types": "./dist/index.d.ts", "dependencies": { + "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", "@masknet/constants": "workspace:*", "@masknet/contracts": "workspace:*", "@masknet/shared": "workspace:*", diff --git a/packages/web3-shared/src/hooks/useTokenAssetDetailed.ts b/packages/web3-shared/src/hooks/useTokenAssetDetailed.ts index ea2eec6a2f91..c97e266aaccb 100644 --- a/packages/web3-shared/src/hooks/useTokenAssetDetailed.ts +++ b/packages/web3-shared/src/hooks/useTokenAssetDetailed.ts @@ -1,13 +1,13 @@ import { - ERC721TokenAssetDetailed, ERC1155TokenAssetDetailed, - NonFungibleTokenDetailed, + ERC721TokenAssetDetailed, EthereumTokenType, + NonFungibleTokenDetailed, } from '../types' import { useERC721TokenAssetDetailed } from './useERC721TokenAssetDetailed' import { useERC1155TokenAssetDetailed } from './useERC1155TokenAssetDetailed' import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' export function useTokenAssetDetailed(token?: NonFungibleTokenDetailed) { const r1 = useERC721TokenAssetDetailed(token?.type === EthereumTokenType.ERC721 ? token : undefined) diff --git a/packages/web3-shared/src/hooks/useTokenBalance.ts b/packages/web3-shared/src/hooks/useTokenBalance.ts index a52edc9462a9..c25bef465746 100644 --- a/packages/web3-shared/src/hooks/useTokenBalance.ts +++ b/packages/web3-shared/src/hooks/useTokenBalance.ts @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { EthereumTokenType } from '../types' import { useERC20TokenBalance } from './useERC20TokenBalance' import { useERC721TokenBalance } from './useERC721TokenBalance' diff --git a/packages/web3-shared/src/hooks/useTokenDetailed.ts b/packages/web3-shared/src/hooks/useTokenDetailed.ts index a62f775e91fa..9dabf7ac5b17 100644 --- a/packages/web3-shared/src/hooks/useTokenDetailed.ts +++ b/packages/web3-shared/src/hooks/useTokenDetailed.ts @@ -1,6 +1,6 @@ import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' -import { unreachable } from '@masknet/shared' -import { ERC20TokenDetailed, ERC721TokenDetailed, EthereumTokenType, EthereumTokenDetailedType } from '../types' +import { unreachable } from '@dimensiondev/kit' +import { ERC20TokenDetailed, ERC721TokenDetailed, EthereumTokenDetailedType, EthereumTokenType } from '../types' import { useERC20TokenDetailed } from './useERC20TokenDetailed' import { useERC721TokenDetailed } from './useERC721TokenDetailed' import { useNativeTokenDetailed } from './useNativeTokenDetailed' diff --git a/packages/web3-shared/src/hooks/useTokenTransferCallback.ts b/packages/web3-shared/src/hooks/useTokenTransferCallback.ts index 7d3e45507938..a3edf9b07dbb 100644 --- a/packages/web3-shared/src/hooks/useTokenTransferCallback.ts +++ b/packages/web3-shared/src/hooks/useTokenTransferCallback.ts @@ -1,4 +1,4 @@ -import { unreachable } from '@masknet/shared' +import { unreachable } from '@dimensiondev/kit' import { EthereumTokenType } from '../types' import { useERC20TokenTransferCallback } from './useERC20TokenTransferCallback' import { useERC721TokenTransferCallback } from './useERC721TokenTransferCallback' diff --git a/packages/web3-shared/src/pipes/index.ts b/packages/web3-shared/src/pipes/index.ts index 49fca5e142ad..e5ad8e33559f 100644 --- a/packages/web3-shared/src/pipes/index.ts +++ b/packages/web3-shared/src/pipes/index.ts @@ -1,4 +1,5 @@ -import { formatEthereumAddress, safeUnreachable, unreachable } from '@masknet/shared' +import { formatEthereumAddress } from '@masknet/shared' +import { safeUnreachable, unreachable } from '@dimensiondev/kit' import { getTokenConstants } from '../constants' import { ChainId, diff --git a/packages/web3-shared/src/utils/index.ts b/packages/web3-shared/src/utils/index.ts index 69dc5ef456f5..03f24264c577 100644 --- a/packages/web3-shared/src/utils/index.ts +++ b/packages/web3-shared/src/utils/index.ts @@ -1,4 +1,4 @@ -import { getEnumAsArray, safeUnreachable } from '@masknet/shared' +import { getEnumAsArray, safeUnreachable } from '@dimensiondev/kit' import BigNumber from 'bignumber.js' import type Web3 from 'web3' import type { AbiOutput } from 'web3-utils' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55892f18dfcf..5ca5b48856ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -112,7 +112,7 @@ importers: '@types/lodash': 4.14.170 '@types/proper-lockfile': 4.1.1 gulp: 4.0.2 - ts-node: 10.0.0_typescript@4.3.2 + ts-node: 10.0.0 packages/constants: specifiers: {} @@ -127,7 +127,7 @@ importers: web3-eth-contract: ^1.3.4 dependencies: '@typechain/web3-v1': 3.0.0_typechain@5.0.0 - typechain: 5.0.0_typescript@4.3.2 + typechain: 5.0.0 devDependencies: bn.js: 4.12.0 promievent: 0.1.5 @@ -138,7 +138,7 @@ importers: specifiers: '@babel/core': ^7.14.3 '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c - '@dimensiondev/kit': ^0.0.0-20210221102734-0b4a937 + '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' '@masknet/icons': workspace:* '@masknet/plugin-example': workspace:* '@masknet/plugin-infra': workspace:* @@ -174,7 +174,7 @@ importers: wallet.ts: ^1.0.1 dependencies: '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c - '@dimensiondev/kit': 0.0.0-20210221102734-0b4a937 + '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 '@masknet/icons': link:../icons '@masknet/plugin-example': link:../plugins/example '@masknet/plugin-infra': link:../plugin-infra @@ -191,22 +191,22 @@ importers: history: 5.0.0 json-stable-stringify: 1.0.1 lodash-es: 4.17.21 - react-router: 6.0.0-beta.0_dd3df4049b9a65e1e2d003c7940c4871 - react-router-dom: 6.0.0-beta.0_66263521e705c985f663eeac15167a50 - react-use: 17.2.4_f991c289939c8299bed5e4a6a5a79a62 + react-router: 6.0.0-beta.0_history@5.0.0 + react-router-dom: 6.0.0-beta.0_history@5.0.0 + react-use: 17.2.4 unstated-next: 1.1.0 - use-subscription: 1.5.1_react@18.0.0-alpha-aecb3b6d1 + use-subscription: 1.5.1 wallet.ts: 1.0.1 devDependencies: '@babel/core': 7.14.3 '@snowpack/plugin-dotenv': 2.1.0 - '@snowpack/plugin-react-refresh': 2.5.0_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/addon-actions': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-essentials': 6.2.9_28f21dc8c1a5546eb8c1ee11e3d9daef - '@storybook/addon-links': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/react': 6.2.9_47956781722f535ef7d04bde54cd9359 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@snowpack/plugin-react-refresh': 2.5.0 + '@storybook/addon-actions': 6.2.9 + '@storybook/addon-essentials': 6.2.9_47c9174d34d2785cd2a159124842b5d5 + '@storybook/addon-links': 6.2.9 + '@storybook/addons': 6.2.9 + '@storybook/react': 6.2.9_@babel+core@7.14.3 + '@storybook/theming': 6.2.9 '@types/snowpack-env': 2.3.3 babel-loader: 8.2.2_@babel+core@7.14.3 snowpack: 3.5.1 @@ -236,7 +236,7 @@ importers: '@balancer-labs/sor': ^1.0.0 '@dimensiondev/common-protocols': 1.6.0-20201027083702-d0ae6e2 '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c - '@dimensiondev/kit': 0.0.0-20210221102734-0b4a937 + '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' '@dimensiondev/metamask-extension-provider': 3.0.6-20210519045409-1835d4d '@dimensiondev/stego-js': '=0.11.1-20201027083223-8ab41be' '@dimensiondev/uniswap-sdk': '=3.0.4-20210619092641-a270dc0' @@ -398,7 +398,7 @@ importers: '@balancer-labs/sor': 1.0.0 '@dimensiondev/common-protocols': 1.6.0-20201027083702-d0ae6e2 '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c_webextension-polyfill@0.8.0 - '@dimensiondev/kit': 0.0.0-20210221102734-0b4a937 + '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 '@dimensiondev/metamask-extension-provider': 3.0.6-20210519045409-1835d4d '@dimensiondev/stego-js': 0.11.1-20201027083223-8ab41be '@dimensiondev/uniswap-sdk': 3.0.4-20210619092641-a270dc0_418b2ad04426b02e1076b55b7e1862e2 @@ -476,14 +476,14 @@ importers: pvtsutils: 1.1.2 qrcode: 1.4.4 react-draggable: 4.4.3 - react-feather: 2.0.9_react@18.0.0-alpha-aecb3b6d1 - react-highlight-words: 0.17.0_react@18.0.0-alpha-aecb3b6d1 - react-middle-ellipsis: 1.2.1_f991c289939c8299bed5e4a6a5a79a62 - react-router: 5.2.0_react@18.0.0-alpha-aecb3b6d1 - react-router-dom: 5.2.0_react@18.0.0-alpha-aecb3b6d1 - react-use: 17.2.4_f991c289939c8299bed5e4a6a5a79a62 - react-virtualized-auto-sizer: 1.0.5_f991c289939c8299bed5e4a6a5a79a62 - react-window: 1.8.6_f991c289939c8299bed5e4a6a5a79a62 + react-feather: 2.0.9 + react-highlight-words: 0.17.0 + react-middle-ellipsis: 1.2.1 + react-router: 5.2.0 + react-router-dom: 5.2.0 + react-use: 17.2.4 + react-virtualized-auto-sizer: 1.0.5 + react-window: 1.8.6 remarkable: 2.0.1 scrypt-js: 3.0.1 socket.io-client: 2.4.0 @@ -493,7 +493,7 @@ importers: tiny-secp256k1: 1.1.6 ts-results: 3.3.0 unstated-next: 1.1.0 - use-subscription: 1.5.1_react@18.0.0-alpha-aecb3b6d1 + use-subscription: 1.5.1 uuid: 8.3.2 wallet.ts: 1.0.1 web-ext-types: 3.2.1 @@ -508,10 +508,10 @@ importers: webextension-polyfill: 0.8.0 z-schema: 5.0.1 devDependencies: - '@dimensiondev/webextension-shim': 0.0.3-20201120022530-b318b89_typescript@4.3.2 + '@dimensiondev/webextension-shim': 0.0.3-20201120022530-b318b89 '@pmmmwh/react-refresh-webpack-plugin': 0.5.0-rc.0_dae7018c5b5576f32207b1e2608a9d18 '@sinonjs/text-encoding': 0.7.1 - '@testing-library/react-hooks': 7.0.0_1959de3a9153879cff3acd96b46ed70f + '@testing-library/react-hooks': 7.0.0_react-test-renderer@17.0.2 '@types/enzyme': 3.10.8 '@types/enzyme-adapter-react-16': 1.0.6 '@types/expect-puppeteer': 4.4.5 @@ -522,19 +522,19 @@ importers: '@types/rimraf': 3.0.0 '@types/socket.io-client': 1.4.36 '@types/webpack-dev-server': 3.11.4 - '@typescript-eslint/eslint-plugin': 4.25.0_ec7770e83475322b368bff30b543badb - '@typescript-eslint/parser': 4.25.0_eslint@7.27.0+typescript@4.3.2 + '@typescript-eslint/eslint-plugin': 4.25.0_@typescript-eslint+parser@4.25.0 + '@typescript-eslint/parser': 4.25.0 babel-loader: 8.2.2_webpack@5.37.1 chrome-launcher: 0.14.0 copy-webpack-plugin: 9.0.0_webpack@5.37.1 dotenv: 10.0.0 enzyme: 3.11.0 - enzyme-adapter-react-16: 1.15.6_f15f970d9b179e8975516dda0497bdea + enzyme-adapter-react-16: 1.15.6_enzyme@3.11.0 expect-puppeteer: 5.0.4 fake-indexeddb: 3.1.2 file-loader: 6.2.0_webpack@5.37.1 html-webpack-plugin: 5.3.1_webpack@5.37.1 - jest: 27.0.1_ts-node@10.0.0 + jest: 27.0.1 jest-environment-jsdom-fourteen: 1.0.1 jest-esm-transformer: 1.0.0 jest-junit: 12.1.0 @@ -544,13 +544,13 @@ importers: react-dev-utils: 11.0.4 react-devtools-core: 4.13.5 react-refresh: 0.10.0 - react-refresh-typescript: 2.0.1_5fd9bdb32789d99f678b3c3315477f9a - react-test-renderer: 17.0.2_react@18.0.0-alpha-aecb3b6d1 + react-refresh-typescript: 2.0.1_react-refresh@0.10.0 + react-test-renderer: 17.0.2 rimraf: 3.0.2 source-map-loader: 3.0.0_webpack@5.37.1 - ts-jest: 27.0.1_jest@27.0.1+typescript@4.3.2 - ts-loader: 9.2.2_typescript@4.3.2+webpack@5.37.1 - type-coverage: 2.17.5_typescript@4.3.2 + ts-jest: 27.0.1_jest@27.0.1 + ts-loader: 9.2.2_webpack@5.37.1 + type-coverage: 2.17.5 webpack: 5.37.1_webpack-cli@4.7.0 webpack-cli: 4.7.0_73b101d6e7258082846183368a5d0f22 webpack-dev-server: 3.11.2_webpack-cli@4.7.0+webpack@5.37.1 @@ -576,7 +576,7 @@ importers: '@servie/events': 3.0.0 '@types/use-subscription': 1.0.0 ts-results: 3.3.0 - use-subscription: 1.5.1_react@18.0.0-alpha-aecb3b6d1 + use-subscription: 1.5.1 packages/plugins/example: specifiers: @@ -587,6 +587,7 @@ importers: packages/shared: specifiers: '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c + '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' '@servie/events': ^3.0.0 anchorme: ^2.1.2 async-call-rpc: ^5.1.0 @@ -600,6 +601,7 @@ importers: wallet.ts: ^1.0.1 dependencies: '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c + '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 '@servie/events': 3.0.0 anchorme: 2.1.2 async-call-rpc: 5.1.0 @@ -609,7 +611,7 @@ importers: ts-results: 3.3.0 typeson: 6.1.0 typeson-registry: 1.0.0-alpha.39 - use-subscription: 1.5.1_react@18.0.0-alpha-aecb3b6d1 + use-subscription: 1.5.1 wallet.ts: 1.0.1 packages/storybook-shared: @@ -617,8 +619,8 @@ importers: '@storybook/addons': ^6.2.9 '@storybook/react': ^6.2.9 devDependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/react': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 + '@storybook/addons': 6.2.9 + '@storybook/react': 6.2.9 packages/theme: specifiers: @@ -645,24 +647,25 @@ importers: '@masknet/storybook-shared': link:../storybook-shared classnames: 2.3.1 lodash-es: 4.17.21 - notistack: 1.0.9_132ff92e0fd7328580f6380de259b809 + notistack: 1.0.9 qrcode: 1.4.4 tinycolor2: 1.4.2 devDependencies: '@babel/core': 7.14.3 - '@storybook/addon-actions': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-essentials': 6.2.9_28f21dc8c1a5546eb8c1ee11e3d9daef - '@storybook/addon-links': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/react': 6.2.9_47956781722f535ef7d04bde54cd9359 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addon-actions': 6.2.9 + '@storybook/addon-essentials': 6.2.9_47c9174d34d2785cd2a159124842b5d5 + '@storybook/addon-links': 6.2.9 + '@storybook/addons': 6.2.9 + '@storybook/react': 6.2.9_@babel+core@7.14.3 + '@storybook/theming': 6.2.9 '@types/qrcode': 1.4.0 '@types/tinycolor2': 1.4.2 babel-loader: 8.2.2_@babel+core@7.14.3 - storybook-addon-matrix: 1.6.0_react-dom@18.0.0-alpha-aecb3b6d1 + storybook-addon-matrix: 1.6.0 packages/web3-shared: specifiers: + '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' '@masknet/constants': workspace:* '@masknet/contracts': workspace:* '@masknet/shared': workspace:* @@ -678,15 +681,16 @@ importers: web3-core: ^1.3.6 web3-utils: ^1.3.6 dependencies: + '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 '@masknet/constants': link:../constants '@masknet/contracts': link:../contracts '@masknet/shared': link:../shared bignumber.js: 9.0.1 ethereum-blockies: 0.1.1 lodash-es: 4.17.21 - react-use: 17.2.4_f991c289939c8299bed5e4a6a5a79a62 + react-use: 17.2.4 unstated-next: 1.1.0 - use-subscription: 1.5.1_react@18.0.0-alpha-aecb3b6d1 + use-subscription: 1.5.1 wallet.ts: 1.0.1 web3: 1.3.6 web3-core: 1.3.6 @@ -2841,8 +2845,8 @@ packages: webextension-polyfill: 0.8.0 dev: false - /@dimensiondev/kit/0.0.0-20210221102734-0b4a937: - resolution: {integrity: sha512-VV8LguRtjrfcp6syVpNFtLtppilOyIup7mqmhqrX/8pwFtXAaVeeEvNgrAO84u8quL0UuVJSuaZdiUfewENwow==, tarball: download/@dimensiondev/kit/0.0.0-20210221102734-0b4a937/91c0b12c97c71cfb7370b1649568df86ee3b24162f753e5420329f52a54502ae} + /@dimensiondev/kit/0.0.0-20210624142900-972fd05: + resolution: {integrity: sha512-afmIrZndLSgqg9hWUfwC10uAivJjImSlWMXbmYKhC/OUeHfyz6tbUO2PEKT1xz9L4ujFsAjgkvAKHnaeqNo9Qg==, tarball: download/@dimensiondev/kit/0.0.0-20210624142900-972fd05/2216af7740aa6220c4041d6d1b92e9124bdac3ca3594c0456ef603dfbcbf2387} dev: false /@dimensiondev/metamask-extension-provider/3.0.6-20210519045409-1835d4d: @@ -2886,7 +2890,7 @@ packages: toformat: 2.0.0 dev: false - /@dimensiondev/webextension-shim/0.0.3-20201120022530-b318b89_typescript@4.3.2: + /@dimensiondev/webextension-shim/0.0.3-20201120022530-b318b89: resolution: {integrity: sha512-f8Rmnc4RUTrBVMS7+edMu/J3S5pkM2DOY4nff5SHZKkDQUP5ES1/1YNkks2rXkeiVuyUTKbokKIV3o8XoeaNLw==, tarball: download/@dimensiondev/webextension-shim/0.0.3-20201120022530-b318b89/7cb726fb8ffa9cde3fa59a32c44c9ea981ba4820742bfaffc7e23e41a28bfffa} hasBin: true peerDependencies: @@ -2894,7 +2898,6 @@ packages: dependencies: async-call-rpc: 4.2.1 systemjs: 6.8.3 - typescript: 4.3.2 web-ext-types: 3.2.1 dev: true @@ -2965,7 +2968,7 @@ packages: react: 18.0.0-alpha-aecb3b6d1 dev: true - /@emotion/core/10.1.1_react@18.0.0-alpha-aecb3b6d1: + /@emotion/core/10.1.1: resolution: {integrity: sha512-ZMLG6qpXR8x031NXD8HJqugy/AZSkAuMxxqB46pmAR7ze47MhNJ56cdoX243QPZdGctrdfo+s08yZTiwaUcRKA==} peerDependencies: react: '>=16.3.0' @@ -2976,7 +2979,6 @@ packages: '@emotion/serialize': 0.11.16 '@emotion/sheet': 0.9.4 '@emotion/utils': 0.11.3 - react: 18.0.0-alpha-aecb3b6d1 dev: true /@emotion/css/10.0.27: @@ -3061,56 +3063,54 @@ packages: resolution: {integrity: sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g==} dev: false - /@emotion/styled-base/10.0.31_0969515b2e564c6f8da5ffe0dd24efb6: + /@emotion/styled-base/10.0.31_868fdfab3e8c9138cf50b7ab83aa28b0: resolution: {integrity: sha512-wTOE1NcXmqMWlyrtwdkqg87Mu6Rj1MaukEoEmEkHirO5IoHDJ8LgCQL4MjJODgxWxXibGR3opGp1p7YvkNEdXQ==} peerDependencies: '@emotion/core': ^10.0.28 react: '>=16.3.0' dependencies: '@babel/runtime': 7.13.17 - '@emotion/core': 10.1.1_react@18.0.0-alpha-aecb3b6d1 + '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 '@emotion/is-prop-valid': 0.8.8 '@emotion/serialize': 0.11.16 '@emotion/utils': 0.11.3 react: 18.0.0-alpha-aecb3b6d1 dev: true - /@emotion/styled-base/10.0.31_868fdfab3e8c9138cf50b7ab83aa28b0: + /@emotion/styled-base/10.0.31_@emotion+core@10.1.1: resolution: {integrity: sha512-wTOE1NcXmqMWlyrtwdkqg87Mu6Rj1MaukEoEmEkHirO5IoHDJ8LgCQL4MjJODgxWxXibGR3opGp1p7YvkNEdXQ==} peerDependencies: '@emotion/core': ^10.0.28 react: '>=16.3.0' dependencies: '@babel/runtime': 7.13.17 - '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 + '@emotion/core': 10.1.1 '@emotion/is-prop-valid': 0.8.8 '@emotion/serialize': 0.11.16 '@emotion/utils': 0.11.3 - react: 18.0.0-alpha-aecb3b6d1 dev: true - /@emotion/styled/10.0.27_0969515b2e564c6f8da5ffe0dd24efb6: + /@emotion/styled/10.0.27_868fdfab3e8c9138cf50b7ab83aa28b0: resolution: {integrity: sha512-iK/8Sh7+NLJzyp9a5+vIQIXTYxfT4yB/OJbjzQanB2RZpvmzBQOHZWhpAMZWYEKRNNbsD6WfBw5sVWkb6WzS/Q==} peerDependencies: '@emotion/core': ^10.0.27 react: '>=16.3.0' dependencies: - '@emotion/core': 10.1.1_react@18.0.0-alpha-aecb3b6d1 - '@emotion/styled-base': 10.0.31_0969515b2e564c6f8da5ffe0dd24efb6 + '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 + '@emotion/styled-base': 10.0.31_868fdfab3e8c9138cf50b7ab83aa28b0 babel-plugin-emotion: 10.2.2 react: 18.0.0-alpha-aecb3b6d1 dev: true - /@emotion/styled/10.0.27_868fdfab3e8c9138cf50b7ab83aa28b0: + /@emotion/styled/10.0.27_@emotion+core@10.1.1: resolution: {integrity: sha512-iK/8Sh7+NLJzyp9a5+vIQIXTYxfT4yB/OJbjzQanB2RZpvmzBQOHZWhpAMZWYEKRNNbsD6WfBw5sVWkb6WzS/Q==} peerDependencies: '@emotion/core': ^10.0.27 react: '>=16.3.0' dependencies: - '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 - '@emotion/styled-base': 10.0.31_868fdfab3e8c9138cf50b7ab83aa28b0 + '@emotion/core': 10.1.1 + '@emotion/styled-base': 10.0.31_@emotion+core@10.1.1 babel-plugin-emotion: 10.2.2 - react: 18.0.0-alpha-aecb3b6d1 dev: true /@emotion/styled/11.3.0_341102e1c4a97544e323fe37efb0cd92: @@ -3883,7 +3883,7 @@ packages: slash: 3.0.0 dev: true - /@jest/core/27.0.1_ts-node@10.0.0: + /@jest/core/27.0.1: resolution: {integrity: sha512-PiCbKSMf6t8PEfY3MAd0Ldn3aJAt5T+UcaFkAfMZ1VZgas35+fXk5uHIjAQHQLNIHZWX19TLv0wWNT03yvrw6w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: @@ -3904,13 +3904,13 @@ packages: exit: 0.1.2 graceful-fs: 4.2.6 jest-changed-files: 27.0.1 - jest-config: 27.0.1_ts-node@10.0.0 + jest-config: 27.0.1 jest-haste-map: 27.0.1 jest-message-util: 27.0.1 jest-regex-util: 27.0.1 jest-resolve: 27.0.1 jest-resolve-dependencies: 27.0.1 - jest-runner: 27.0.1_ts-node@10.0.0 + jest-runner: 27.0.1 jest-runtime: 27.0.1 jest-snapshot: 27.0.1 jest-util: 27.0.1 @@ -4077,14 +4077,14 @@ packages: collect-v8-coverage: 1.0.1 dev: true - /@jest/test-sequencer/27.0.1_ts-node@10.0.0: + /@jest/test-sequencer/27.0.1: resolution: {integrity: sha512-yK2c2iruJ35WgH4KH8whS72uH+FASJUrzwxzNKTzLAEWmNpWKNEPOsSEKsHynvz78bLHafrTg4adN7RrYNbEOA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/test-result': 27.0.1 graceful-fs: 4.2.6 jest-haste-map: 27.0.1 - jest-runner: 27.0.1_ts-node@10.0.0 + jest-runner: 27.0.1 jest-runtime: 27.0.1 transitivePeerDependencies: - bufferutil @@ -4462,11 +4462,11 @@ packages: react-is: 17.0.2 dev: false - /@mdx-js/loader/1.6.22_react@18.0.0-alpha-aecb3b6d1: + /@mdx-js/loader/1.6.22: resolution: {integrity: sha512-9CjGwy595NaxAYp0hF9B/A0lH6C8Rms97e2JS9d3jVUtILn6pT5i5IV965ra3lIWc7Rs1GG1tBdVF7dCowYe6Q==} dependencies: '@mdx-js/mdx': 1.6.22 - '@mdx-js/react': 1.6.22_react@18.0.0-alpha-aecb3b6d1 + '@mdx-js/react': 1.6.22 loader-utils: 2.0.0 transitivePeerDependencies: - react @@ -4499,12 +4499,10 @@ packages: - supports-color dev: true - /@mdx-js/react/1.6.22_react@18.0.0-alpha-aecb3b6d1: + /@mdx-js/react/1.6.22: resolution: {integrity: sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg==} peerDependencies: react: ^16.13.1 || ^17.0.0 - dependencies: - react: 18.0.0-alpha-aecb3b6d1 dev: true /@mdx-js/util/1.6.22: @@ -4770,7 +4768,19 @@ packages: /@popperjs/core/2.9.2: resolution: {integrity: sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==} - /@reach/router/1.3.4_f991c289939c8299bed5e4a6a5a79a62: + /@reach/router/1.3.4: + resolution: {integrity: sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==} + peerDependencies: + react: 15.x || 16.x || 16.4.0-alpha.0911da3 + react-dom: 15.x || 16.x || 16.4.0-alpha.0911da3 + dependencies: + create-react-context: 0.3.0_prop-types@15.7.2 + invariant: 2.2.4 + prop-types: 15.7.2 + react-lifecycles-compat: 3.0.4 + dev: true + + /@reach/router/1.3.4_react@18.0.0-alpha-aecb3b6d1: resolution: {integrity: sha512-+mtn9wjlB9NN2CNnnC/BRYtwdKBfSyyasPYraNAyvaV1occr/5NnB4CVzjEZipNHwYebQwcndGUmpFzxAUoqSA==} peerDependencies: react: 15.x || 16.x || 16.4.0-alpha.0911da3 @@ -4780,7 +4790,6 @@ packages: invariant: 2.2.4 prop-types: 15.7.2 react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 react-lifecycles-compat: 3.0.4 dev: true @@ -4840,7 +4849,7 @@ packages: dotenv-expand: 5.1.0 dev: true - /@snowpack/plugin-react-refresh/2.5.0_f991c289939c8299bed5e4a6a5a79a62: + /@snowpack/plugin-react-refresh/2.5.0: resolution: {integrity: sha512-3rYkwayAA+65IIYLXMEFqQwtBGbII9IidMJo1yXuj35kTEg9TdZrofoqcHaSts2sv2Nz0TD6v7BWRPdvCU0uIw==} peerDependencies: react: '>=16.9.0' @@ -4848,14 +4857,12 @@ packages: dependencies: '@babel/core': 7.14.3 '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.14.3 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 react-refresh: 0.9.0 transitivePeerDependencies: - supports-color dev: true - /@storybook/addon-actions/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/addon-actions/6.2.9: resolution: {integrity: sha512-CkUYSMt+fvuHfWvtDzlhhaeQBCWlUo99xdL88JTsTml05P43bIHZNIRv2QJ8DwhHuxdIPeHKLmz9y/ymOagOnw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4866,21 +4873,19 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 + '@storybook/client-api': 6.2.9 + '@storybook/components': 6.2.9 '@storybook/core-events': 6.2.9 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 core-js: 3.11.0 fast-deep-equal: 3.1.3 global: 4.4.0 lodash: 4.17.21 polished: 4.1.1 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-inspector: 5.1.1_react@18.0.0-alpha-aecb3b6d1 + react-inspector: 5.1.1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 util-deprecate: 1.0.2 @@ -4889,7 +4894,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-backgrounds/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/addon-backgrounds/6.2.9: resolution: {integrity: sha512-oPSdeoUuvaXshY5sQRagbYXpr6ZEVUuLhGYBnZTlvm19QMeNCXQE+rdlgzcgyafq4mc1FI/udE2MpJ1dhfS6pQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4900,17 +4905,15 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 '@storybook/client-logger': 6.2.9 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/components': 6.2.9 '@storybook/core-events': 6.2.9 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 core-js: 3.11.0 global: 4.4.0 memoizerific: 1.11.3 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 util-deprecate: 1.0.2 @@ -4918,7 +4921,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-controls/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/addon-controls/6.2.9: resolution: {integrity: sha512-NvXAJ7I5U4CLxv4wL3/Ne9rehJlgnSmQlLIG/z6dg5zm7JIb48LT4IY6GzjlUP5LkjmO9KJ8gJC249uRt2iPBQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4929,21 +4932,19 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 + '@storybook/client-api': 6.2.9 + '@storybook/components': 6.2.9 '@storybook/node-logger': 6.2.9 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 core-js: 3.11.0 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 ts-dedent: 2.1.1 transitivePeerDependencies: - '@types/react' dev: true - /@storybook/addon-docs/6.2.9_c0ca2bbb2cbc2137c3b354eedfd0ee8e: + /@storybook/addon-docs/6.2.9_babel-loader@8.2.2: resolution: {integrity: sha512-qOtwgiqI3LMqT0eXYNV6ykp7qSu0LQGeXxy3wOBGuDDqAizfgnAjomYEWGFcyKp5ahV7HCRCjxbixAklFPUmyw==} peerDependencies: '@storybook/angular': 6.2.9 @@ -4982,22 +4983,22 @@ packages: '@babel/plugin-transform-react-jsx': 7.13.12_@babel+core@7.13.16 '@babel/preset-env': 7.13.15_@babel+core@7.13.16 '@jest/transform': 26.6.2 - '@mdx-js/loader': 1.6.22_react@18.0.0-alpha-aecb3b6d1 + '@mdx-js/loader': 1.6.22 '@mdx-js/mdx': 1.6.22 - '@mdx-js/react': 1.6.22_react@18.0.0-alpha-aecb3b6d1 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/builder-webpack4': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@mdx-js/react': 1.6.22 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 + '@storybook/builder-webpack4': 6.2.9 + '@storybook/client-api': 6.2.9 '@storybook/client-logger': 6.2.9 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/core': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 + '@storybook/components': 6.2.9 + '@storybook/core': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/csf': 0.0.1 '@storybook/node-logger': 6.2.9 '@storybook/postinstall': 6.2.9 - '@storybook/source-loader': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/source-loader': 6.2.9 + '@storybook/theming': 6.2.9 acorn: 7.4.1 acorn-jsx: 5.3.1_acorn@7.4.1 acorn-walk: 7.2.0 @@ -5013,9 +5014,7 @@ packages: lodash: 4.17.21 prettier: 2.2.1 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-element-to-jsx-string: 14.3.2_f991c289939c8299bed5e4a6a5a79a62 + react-element-to-jsx-string: 14.3.2 regenerator-runtime: 0.13.7 remark-external-links: 8.0.0 remark-slug: 6.0.0 @@ -5030,7 +5029,7 @@ packages: - webpack-command dev: true - /@storybook/addon-essentials/6.2.9_28f21dc8c1a5546eb8c1ee11e3d9daef: + /@storybook/addon-essentials/6.2.9_47c9174d34d2785cd2a159124842b5d5: resolution: {integrity: sha512-zXsV4e1TCkHyDwi7hew4h9eJfDW++f2BNKzTif+DAcjPUVFDp7yC17gLjS5IhOjcQk+db0UUlFSx/OrTxhy7Xw==} peerDependencies: '@babel/core': ^7.9.6 @@ -5050,19 +5049,17 @@ packages: optional: true dependencies: '@babel/core': 7.14.3 - '@storybook/addon-actions': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-backgrounds': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-controls': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-docs': 6.2.9_c0ca2bbb2cbc2137c3b354eedfd0ee8e - '@storybook/addon-toolbars': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addon-viewport': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addon-actions': 6.2.9 + '@storybook/addon-backgrounds': 6.2.9 + '@storybook/addon-controls': 6.2.9 + '@storybook/addon-docs': 6.2.9_babel-loader@8.2.2 + '@storybook/addon-toolbars': 6.2.9 + '@storybook/addon-viewport': 6.2.9 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 '@storybook/node-logger': 6.2.9 babel-loader: 8.2.2_@babel+core@7.14.3 core-js: 3.11.0 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 transitivePeerDependencies: @@ -5079,7 +5076,7 @@ packages: - webpack-command dev: true - /@storybook/addon-links/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/addon-links/6.2.9: resolution: {integrity: sha512-pBiL6EUZI3c9qtCqnGx3RXF46kAxGMdo4xDC2y3mM132W//DzxkzLZRe4ZhxxGwaLzTNlNrypZ6Li6WyIaPZ/w==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5090,23 +5087,21 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/csf': 0.0.1 - '@storybook/router': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 6.2.9 '@types/qs': 6.9.6 core-js: 3.11.0 global: 4.4.0 prop-types: 15.7.2 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 dev: true - /@storybook/addon-toolbars/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/addon-toolbars/6.2.9: resolution: {integrity: sha512-4WjIofN5npBPNZ8v1UhzPeATB9RnAWRH/y1AVS1HB+zl6Ku92o7aOMqVxs8zR1oSSmtkHh/rcUcpATFKjuofdw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5117,18 +5112,16 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 + '@storybook/client-api': 6.2.9 + '@storybook/components': 6.2.9 core-js: 3.11.0 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 transitivePeerDependencies: - '@types/react' dev: true - /@storybook/addon-viewport/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/addon-viewport/6.2.9: resolution: {integrity: sha512-IK2mu5njmfcAT967SJtBOY2B6NPMikySZga9QuaLdSpQxPd3vXKNMVG1CjnduMLeDaAoUlvlJISeEPbYGuE+1A==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5139,27 +5132,25 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 '@storybook/client-logger': 6.2.9 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/components': 6.2.9 '@storybook/core-events': 6.2.9 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 core-js: 3.11.0 global: 4.4.0 memoizerific: 1.11.3 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 transitivePeerDependencies: - '@types/react' dev: true - /@storybook/addons/5.3.18_react-dom@18.0.0-alpha-aecb3b6d1: + /@storybook/addons/5.3.18: resolution: {integrity: sha512-ZQjDgTUDFRLvAiBg2d8FgPgghfQ+9uFyXQbtiGlTBLinrPCeQd7J86qiUES0fcGoohCCw0wWKtvB0WF2z1XNDg==} dependencies: - '@storybook/api': 5.3.18_react-dom@18.0.0-alpha-aecb3b6d1 + '@storybook/api': 5.3.18 '@storybook/channels': 5.3.18 '@storybook/client-logger': 5.3.18 '@storybook/core-events': 5.3.18 @@ -5171,37 +5162,35 @@ packages: - regenerator-runtime dev: true - /@storybook/addons/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/addons/6.2.9: resolution: {integrity: sha512-GnmEKbJwiN1jncN9NSA8CuR1i2XAlasPcl/Zn0jkfV9WitQeczVcJCPw86SGH84AD+tTBCyF2i9UC0KaOV1YBQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/api': 6.2.9 '@storybook/channels': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/core-events': 6.2.9 - '@storybook/router': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 6.2.9 + '@storybook/theming': 6.2.9 core-js: 3.11.0 global: 4.4.0 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 dev: true - /@storybook/api/5.3.18_react-dom@18.0.0-alpha-aecb3b6d1: + /@storybook/api/5.3.18: resolution: {integrity: sha512-QXaccNCARHzPWOuxYndiebGWBZmwiUvRgB9ji0XTJBS3y8K0ZPb5QyuqiKPaEWUj8dBA8rzdDtkW3Yt95Namaw==} peerDependencies: regenerator-runtime: '*' dependencies: - '@reach/router': 1.3.4_f991c289939c8299bed5e4a6a5a79a62 + '@reach/router': 1.3.4_react@18.0.0-alpha-aecb3b6d1 '@storybook/channels': 5.3.18 '@storybook/client-logger': 5.3.18 '@storybook/core-events': 5.3.18 '@storybook/csf': 0.0.1 - '@storybook/router': 5.3.18_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/theming': 5.3.18_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 5.3.18_react@18.0.0-alpha-aecb3b6d1 + '@storybook/theming': 5.3.18_react@18.0.0-alpha-aecb3b6d1 '@types/reach__router': 1.3.7 core-js: 3.10.0 fast-deep-equal: 2.0.1 @@ -5219,20 +5208,20 @@ packages: - react-dom dev: true - /@storybook/api/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/api/6.2.9: resolution: {integrity: sha512-okkA3HAScE9tGnYBrjTOcgzT+L1lRHNoEh3ZfGgh1u/XNEyHGNkj4grvkd6nX7BzRcYQ/l2VkcKCqmOjUnSkVQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@reach/router': 1.3.4_f991c289939c8299bed5e4a6a5a79a62 + '@reach/router': 1.3.4 '@storybook/channels': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/csf': 0.0.1 - '@storybook/router': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 6.2.9 '@storybook/semver': 7.3.2 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 '@types/reach__router': 1.3.7 core-js: 3.11.0 fast-deep-equal: 3.1.3 @@ -5240,8 +5229,6 @@ packages: lodash: 4.17.21 memoizerific: 1.11.3 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 store2: 2.12.0 telejson: 5.1.1 @@ -5249,7 +5236,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/builder-webpack4/6.2.9_7baed572bf2f4a171e7994a9ff64c932: + /@storybook/builder-webpack4/6.2.9: resolution: {integrity: sha512-swECic1huVdj+B+iRJIQ8ds59HuPVE4fmhI+j/nhw0CQCsgAEKqDlOQVYEimW6nZX8GO4WxNm6tiiRzxixejbw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5280,20 +5267,20 @@ packages: '@babel/preset-env': 7.13.15_@babel+core@7.13.16 '@babel/preset-react': 7.13.13_@babel+core@7.13.16 '@babel/preset-typescript': 7.13.0_@babel+core@7.13.16 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 '@storybook/channel-postmessage': 6.2.9 '@storybook/channels': 6.2.9 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/client-api': 6.2.9 '@storybook/client-logger': 6.2.9 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc - '@storybook/core-common': 6.2.9_0a9381bdf91aef92a8ad157f4a8c25c2 + '@storybook/components': 6.2.9 + '@storybook/core-common': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/node-logger': 6.2.9 - '@storybook/router': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 6.2.9 '@storybook/semver': 7.3.2 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/ui': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/theming': 6.2.9 + '@storybook/ui': 6.2.9 '@types/node': 14.14.41 '@types/webpack': 4.41.27 autoprefixer: 9.8.6 @@ -5312,19 +5299,16 @@ packages: glob-promise: 3.4.0_glob@7.1.6 global: 4.4.0 html-webpack-plugin: 4.5.2_webpack@4.46.0 - pnp-webpack-plugin: 1.6.4_typescript@4.3.2 + pnp-webpack-plugin: 1.6.4 postcss: 7.0.35 postcss-flexbugs-fixes: 4.2.1 postcss-loader: 4.2.0_postcss@7.0.35+webpack@4.46.0 raw-loader: 4.0.2_webpack@4.46.0 - react: 18.0.0-alpha-aecb3b6d1 react-dev-utils: 11.0.4 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 stable: 0.1.8 style-loader: 1.3.0_webpack@4.46.0 terser-webpack-plugin: 3.1.0_webpack@4.46.0 ts-dedent: 2.1.1 - typescript: 4.3.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 util-deprecate: 1.0.2 webpack: 4.46.0 @@ -5365,13 +5349,13 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/client-api/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/client-api/6.2.9: resolution: {integrity: sha512-aLvEUVkbvv6Qo/2mF4rFCecdqi2CGOUDdsV1a6EFIVS/9gXFdpirsOwKHo9qNjacGdWPlBYGCUcbrw+DvNaSFA==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 '@storybook/channel-postmessage': 6.2.9 '@storybook/channels': 6.2.9 '@storybook/client-logger': 6.2.9 @@ -5384,8 +5368,6 @@ packages: lodash: 4.17.21 memoizerific: 1.11.3 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 stable: 0.1.8 store2: 2.12.0 @@ -5406,7 +5388,7 @@ packages: global: 4.4.0 dev: true - /@storybook/components/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/components/6.2.9: resolution: {integrity: sha512-hnV1MI2aB2g1sJ7NJphpxi7TwrMZQ/tpCJeHnkjmzyC6ez1MXqcBXGrEEdSXzRfAxjQTOEpu6H1mnns0xMP0Ag==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5415,7 +5397,7 @@ packages: '@popperjs/core': 2.9.2 '@storybook/client-logger': 6.2.9 '@storybook/csf': 0.0.1 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 '@types/color-convert': 2.0.0 '@types/overlayscrollbars': 1.12.0 '@types/react-syntax-highlighter': 11.0.5 @@ -5424,17 +5406,15 @@ packages: fast-deep-equal: 3.1.3 global: 4.4.0 lodash: 4.17.21 - markdown-to-jsx: 7.1.2_react@18.0.0-alpha-aecb3b6d1 + markdown-to-jsx: 7.1.2 memoizerific: 1.11.3 overlayscrollbars: 1.13.1 polished: 4.1.1 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-colorful: 5.1.2_f991c289939c8299bed5e4a6a5a79a62 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-popper-tooltip: 3.1.1_f991c289939c8299bed5e4a6a5a79a62 - react-syntax-highlighter: 13.5.3_react@18.0.0-alpha-aecb3b6d1 - react-textarea-autosize: 8.3.2_5ec7ab1ee537e9220fe02de547882794 + react-colorful: 5.1.2 + react-popper-tooltip: 3.1.1 + react-syntax-highlighter: 13.5.3 + react-textarea-autosize: 8.3.2 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 util-deprecate: 1.0.2 @@ -5442,7 +5422,7 @@ packages: - '@types/react' dev: true - /@storybook/core-client/6.2.9_53e6227e4f40c752abf927cd17ffc644: + /@storybook/core-client/6.2.9: resolution: {integrity: sha512-jW841J5lCe1Ub5ZMtzYPgCy/OUddFxxVYeHLZyuNxlH5RoiQQxbDpuFlzuZMYGuIzD6eZw+ANE4w5vW/y5oBfA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5453,31 +5433,27 @@ packages: typescript: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 '@storybook/channel-postmessage': 6.2.9 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/client-api': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/csf': 0.0.1 - '@storybook/ui': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/ui': 6.2.9 ansi-to-html: 0.6.14 core-js: 3.11.0 global: 4.4.0 lodash: 4.17.21 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 - typescript: 4.3.2 unfetch: 4.2.0 util-deprecate: 1.0.2 - webpack: 4.46.0 transitivePeerDependencies: - '@types/react' dev: true - /@storybook/core-client/6.2.9_7baed572bf2f4a171e7994a9ff64c932: + /@storybook/core-client/6.2.9_webpack@4.46.0: resolution: {integrity: sha512-jW841J5lCe1Ub5ZMtzYPgCy/OUddFxxVYeHLZyuNxlH5RoiQQxbDpuFlzuZMYGuIzD6eZw+ANE4w5vW/y5oBfA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5488,30 +5464,28 @@ packages: typescript: optional: true dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 '@storybook/channel-postmessage': 6.2.9 - '@storybook/client-api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/client-api': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/core-events': 6.2.9 '@storybook/csf': 0.0.1 - '@storybook/ui': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/ui': 6.2.9 ansi-to-html: 0.6.14 core-js: 3.11.0 global: 4.4.0 lodash: 4.17.21 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 - typescript: 4.3.2 unfetch: 4.2.0 util-deprecate: 1.0.2 + webpack: 4.46.0 transitivePeerDependencies: - '@types/react' dev: true - /@storybook/core-common/6.2.9_0a9381bdf91aef92a8ad157f4a8c25c2: + /@storybook/core-common/6.2.9: resolution: {integrity: sha512-ve0Qb4EMit8jGibfZBprmaU2i4LtpB4vSMIzD9nB1YeBmw2cGhHubtmayZ0TwcV3fPQhtYH9wwRWuWyzzHyQyw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5565,11 +5539,8 @@ packages: micromatch: 4.0.4 pkg-dir: 5.0.0 pretty-hrtime: 1.0.3 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 resolve-from: 5.0.0 ts-dedent: 2.1.1 - typescript: 4.3.2 util-deprecate: 1.0.2 webpack: 4.46.0 transitivePeerDependencies: @@ -5590,7 +5561,7 @@ packages: core-js: 3.11.0 dev: true - /@storybook/core-server/6.2.9_7baed572bf2f4a171e7994a9ff64c932: + /@storybook/core-server/6.2.9: resolution: {integrity: sha512-DzihO73pj1Ro0Y4tq9hjw2mLMUYeSRPrx7CndCOBxcTHCKQ8Kd7Dee3wJ49t5/19V7TW1+4lYR59GAy73FeOAQ==} peerDependencies: '@storybook/builder-webpack5': 6.2.9 @@ -5606,14 +5577,14 @@ packages: '@babel/core': 7.13.16 '@babel/plugin-transform-template-literals': 7.13.0_@babel+core@7.13.16 '@babel/preset-react': 7.13.13_@babel+core@7.13.16 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/builder-webpack4': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 - '@storybook/core-client': 6.2.9_53e6227e4f40c752abf927cd17ffc644 - '@storybook/core-common': 6.2.9_0a9381bdf91aef92a8ad157f4a8c25c2 + '@storybook/addons': 6.2.9 + '@storybook/builder-webpack4': 6.2.9 + '@storybook/core-client': 6.2.9_webpack@4.46.0 + '@storybook/core-common': 6.2.9 '@storybook/node-logger': 6.2.9 '@storybook/semver': 7.3.2 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/ui': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/theming': 6.2.9 + '@storybook/ui': 6.2.9 '@types/node': 14.14.41 '@types/node-fetch': 2.5.10 '@types/pretty-hrtime': 1.0.0 @@ -5640,11 +5611,9 @@ packages: html-webpack-plugin: 4.5.2_webpack@4.46.0 ip: 1.1.5 node-fetch: 2.6.1 - pnp-webpack-plugin: 1.6.4_typescript@4.3.2 + pnp-webpack-plugin: 1.6.4 pretty-hrtime: 1.0.3 prompts: 2.4.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 read-pkg-up: 7.0.1 regenerator-runtime: 0.13.7 resolve-from: 5.0.0 @@ -5653,7 +5622,6 @@ packages: telejson: 5.1.1 terser-webpack-plugin: 3.1.0_webpack@4.46.0 ts-dedent: 2.1.1 - typescript: 4.3.2 url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 util-deprecate: 1.0.2 webpack: 4.46.0 @@ -5666,7 +5634,7 @@ packages: - webpack-command dev: true - /@storybook/core/6.2.9_53e6227e4f40c752abf927cd17ffc644: + /@storybook/core/6.2.9: resolution: {integrity: sha512-pzbyjWvj0t8m0kR2pC9GQne4sZn7Y/zfcbm6/31CL+yhzOQjfJEj3n4ZFUlxikXqQJPg1aWfypfyaeaLL0QyuA==} peerDependencies: '@storybook/builder-webpack5': 6.2.9 @@ -5679,11 +5647,8 @@ packages: typescript: optional: true dependencies: - '@storybook/core-client': 6.2.9_53e6227e4f40c752abf927cd17ffc644 - '@storybook/core-server': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - typescript: 4.3.2 + '@storybook/core-client': 6.2.9 + '@storybook/core-server': 6.2.9 transitivePeerDependencies: - '@types/react' - supports-color @@ -5692,7 +5657,7 @@ packages: - webpack-command dev: true - /@storybook/core/6.2.9_7baed572bf2f4a171e7994a9ff64c932: + /@storybook/core/6.2.9_webpack@4.46.0: resolution: {integrity: sha512-pzbyjWvj0t8m0kR2pC9GQne4sZn7Y/zfcbm6/31CL+yhzOQjfJEj3n4ZFUlxikXqQJPg1aWfypfyaeaLL0QyuA==} peerDependencies: '@storybook/builder-webpack5': 6.2.9 @@ -5705,11 +5670,8 @@ packages: typescript: optional: true dependencies: - '@storybook/core-client': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 - '@storybook/core-server': 6.2.9_7baed572bf2f4a171e7994a9ff64c932 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - typescript: 4.3.2 + '@storybook/core-client': 6.2.9_webpack@4.46.0 + '@storybook/core-server': 6.2.9 transitivePeerDependencies: - '@types/react' - supports-color @@ -5740,7 +5702,7 @@ packages: core-js: 3.11.0 dev: true - /@storybook/react/6.2.9_47956781722f535ef7d04bde54cd9359: + /@storybook/react/6.2.9: resolution: {integrity: sha512-glvw+o/Vek2oapYIXCYDK6gm3cuSnx0XdOpiJVcXk3KLb8JfLbdzGYYp6dcWUbyOBqGcGFRpXIgMmkcwgn+fvQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -5755,32 +5717,28 @@ packages: typescript: optional: true dependencies: - '@babel/core': 7.14.3 - '@babel/preset-flow': 7.13.13_@babel+core@7.14.3 - '@babel/preset-react': 7.13.13_@babel+core@7.14.3 + '@babel/preset-flow': 7.13.13 + '@babel/preset-react': 7.13.13 '@pmmmwh/react-refresh-webpack-plugin': 0.4.3_133f2312fd2dfba9fc3b3697533854a6 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/core': 6.2.9_53e6227e4f40c752abf927cd17ffc644 - '@storybook/core-common': 6.2.9_0a9381bdf91aef92a8ad157f4a8c25c2 + '@storybook/addons': 6.2.9 + '@storybook/core': 6.2.9_webpack@4.46.0 + '@storybook/core-common': 6.2.9 '@storybook/node-logger': 6.2.9 '@storybook/semver': 7.3.2 '@types/webpack-env': 1.16.0 babel-plugin-add-react-displayname: 0.0.5 - babel-plugin-named-asset-import: 0.3.7_@babel+core@7.14.3 + babel-plugin-named-asset-import: 0.3.7 babel-plugin-react-docgen: 4.2.1 core-js: 3.11.0 global: 4.4.0 lodash: 4.17.21 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 react-dev-utils: 11.0.4 - react-docgen-typescript-plugin: 0.6.3_typescript@4.3.2 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 + react-docgen-typescript-plugin: 0.6.3 react-refresh: 0.8.3 read-pkg-up: 7.0.1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 - typescript: 4.3.2 webpack: 4.46.0 transitivePeerDependencies: - '@storybook/builder-webpack5' @@ -5796,7 +5754,7 @@ packages: - webpack-plugin-serve dev: true - /@storybook/react/6.2.9_7baed572bf2f4a171e7994a9ff64c932: + /@storybook/react/6.2.9_@babel+core@7.14.3: resolution: {integrity: sha512-glvw+o/Vek2oapYIXCYDK6gm3cuSnx0XdOpiJVcXk3KLb8JfLbdzGYYp6dcWUbyOBqGcGFRpXIgMmkcwgn+fvQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -5811,31 +5769,29 @@ packages: typescript: optional: true dependencies: - '@babel/preset-flow': 7.13.13 - '@babel/preset-react': 7.13.13 + '@babel/core': 7.14.3 + '@babel/preset-flow': 7.13.13_@babel+core@7.14.3 + '@babel/preset-react': 7.13.13_@babel+core@7.14.3 '@pmmmwh/react-refresh-webpack-plugin': 0.4.3_133f2312fd2dfba9fc3b3697533854a6 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/core': 6.2.9_53e6227e4f40c752abf927cd17ffc644 - '@storybook/core-common': 6.2.9_0a9381bdf91aef92a8ad157f4a8c25c2 + '@storybook/addons': 6.2.9 + '@storybook/core': 6.2.9_webpack@4.46.0 + '@storybook/core-common': 6.2.9 '@storybook/node-logger': 6.2.9 '@storybook/semver': 7.3.2 '@types/webpack-env': 1.16.0 babel-plugin-add-react-displayname: 0.0.5 - babel-plugin-named-asset-import: 0.3.7 + babel-plugin-named-asset-import: 0.3.7_@babel+core@7.14.3 babel-plugin-react-docgen: 4.2.1 core-js: 3.11.0 global: 4.4.0 lodash: 4.17.21 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 react-dev-utils: 11.0.4 - react-docgen-typescript-plugin: 0.6.3_typescript@4.3.2 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 + react-docgen-typescript-plugin: 0.6.3 react-refresh: 0.8.3 read-pkg-up: 7.0.1 regenerator-runtime: 0.13.7 ts-dedent: 2.1.1 - typescript: 4.3.2 webpack: 4.46.0 transitivePeerDependencies: - '@storybook/builder-webpack5' @@ -5851,13 +5807,13 @@ packages: - webpack-plugin-serve dev: true - /@storybook/router/5.3.18_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/router/5.3.18_react@18.0.0-alpha-aecb3b6d1: resolution: {integrity: sha512-6B2U2C75KTSVaCuYYgcubeJGcCSnwsXuEf50hEd5mGqWgHZfojCtGvB7Ko4X+0h8rEC+eNA4p7YBOhlUv9WNrQ==} peerDependencies: react: '*' react-dom: '*' dependencies: - '@reach/router': 1.3.4_f991c289939c8299bed5e4a6a5a79a62 + '@reach/router': 1.3.4_react@18.0.0-alpha-aecb3b6d1 '@storybook/csf': 0.0.1 '@types/reach__router': 1.3.7 core-js: 3.10.0 @@ -5866,17 +5822,16 @@ packages: memoizerific: 1.11.3 qs: 6.10.1 react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 util-deprecate: 1.0.2 dev: true - /@storybook/router/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/router/6.2.9: resolution: {integrity: sha512-7Bn1OFoItCl8whXRT8N1qp1Lky7kzXJ3aslWp5E8HcM8rxh4OYXfbaeiyJEJxBTGC5zxgY+tAEXHFjsAviFROg==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@reach/router': 1.3.4_f991c289939c8299bed5e4a6a5a79a62 + '@reach/router': 1.3.4 '@storybook/client-logger': 6.2.9 '@types/reach__router': 1.3.7 core-js: 3.11.0 @@ -5885,8 +5840,6 @@ packages: lodash: 4.17.21 memoizerific: 1.11.3 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 ts-dedent: 2.1.1 dev: true @@ -5899,13 +5852,13 @@ packages: find-up: 4.1.0 dev: true - /@storybook/source-loader/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/source-loader/6.2.9: resolution: {integrity: sha512-cx499g7BG2oeXvRFx45r0W0p2gKEy/e88WsUFnqqfMKZBJ8K0R/lx5DI0l1hq+TzSrE6uGe0/uPlaLkJNIro7g==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/addons': 6.2.9 '@storybook/client-logger': 6.2.9 '@storybook/csf': 0.0.1 core-js: 3.11.0 @@ -5914,12 +5867,10 @@ packages: loader-utils: 2.0.0 lodash: 4.17.21 prettier: 2.2.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 regenerator-runtime: 0.13.7 dev: true - /@storybook/theming/5.3.18_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/theming/5.3.18_react@18.0.0-alpha-aecb3b6d1: resolution: {integrity: sha512-lfFTeLoYwLMKg96N3gn0umghMdAHgJBGuk2OM8Ll84yWtdl9RGnzfiI1Fl7Cr5k95dCF7drLJlJCao1VxUkFSA==} peerDependencies: react: '*' @@ -5936,67 +5887,62 @@ packages: polished: 3.7.1 prop-types: 15.7.2 react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 resolve-from: 5.0.0 ts-dedent: 1.2.0 dev: true - /@storybook/theming/6.2.9_f991c289939c8299bed5e4a6a5a79a62: + /@storybook/theming/6.2.9: resolution: {integrity: sha512-183oJW7AD7Fhqg5NT4ct3GJntwteAb9jZnQ6yhf9JSdY+fk8OhxRbPf7ov0au2gYACcGrWDd9K5pYQsvWlP5gA==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@emotion/core': 10.1.1_react@18.0.0-alpha-aecb3b6d1 + '@emotion/core': 10.1.1 '@emotion/is-prop-valid': 0.8.8 - '@emotion/styled': 10.0.27_0969515b2e564c6f8da5ffe0dd24efb6 + '@emotion/styled': 10.0.27_@emotion+core@10.1.1 '@storybook/client-logger': 6.2.9 core-js: 3.11.0 deep-object-diff: 1.1.0 - emotion-theming: 10.0.27_0969515b2e564c6f8da5ffe0dd24efb6 + emotion-theming: 10.0.27_@emotion+core@10.1.1 global: 4.4.0 memoizerific: 1.11.3 polished: 4.1.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 resolve-from: 5.0.0 ts-dedent: 2.1.1 dev: true - /@storybook/ui/6.2.9_1f407347b6533184bf697218ead413cc: + /@storybook/ui/6.2.9: resolution: {integrity: sha512-jq2xmw3reIqik/6ibUSbNKGR+Xvr9wkAEwexiOl+5WQ5BeYJpw4dmDmsFQf+SQuWaSEUUPolbzkakRQM778Kdg==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@emotion/core': 10.1.1_react@18.0.0-alpha-aecb3b6d1 - '@storybook/addons': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 - '@storybook/api': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@emotion/core': 10.1.1 + '@storybook/addons': 6.2.9 + '@storybook/api': 6.2.9 '@storybook/channels': 6.2.9 '@storybook/client-logger': 6.2.9 - '@storybook/components': 6.2.9_1f407347b6533184bf697218ead413cc + '@storybook/components': 6.2.9 '@storybook/core-events': 6.2.9 - '@storybook/router': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/router': 6.2.9 '@storybook/semver': 7.3.2 - '@storybook/theming': 6.2.9_f991c289939c8299bed5e4a6a5a79a62 + '@storybook/theming': 6.2.9 '@types/markdown-to-jsx': 6.11.3 copy-to-clipboard: 3.3.1 core-js: 3.11.0 core-js-pure: 3.11.0 - downshift: 6.1.3_react@18.0.0-alpha-aecb3b6d1 - emotion-theming: 10.0.27_0969515b2e564c6f8da5ffe0dd24efb6 + downshift: 6.1.3 + emotion-theming: 10.0.27_@emotion+core@10.1.1 fuse.js: 3.6.1 global: 4.4.0 lodash: 4.17.21 - markdown-to-jsx: 6.11.4_react@18.0.0-alpha-aecb3b6d1 + markdown-to-jsx: 6.11.4 memoizerific: 1.11.3 polished: 4.1.1 qs: 6.10.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 react-draggable: 4.4.3 - react-helmet-async: 1.0.9_f991c289939c8299bed5e4a6a5a79a62 - react-sizeme: 3.0.1_f991c289939c8299bed5e4a6a5a79a62 + react-helmet-async: 1.0.9 + react-sizeme: 3.0.1 regenerator-runtime: 0.13.7 resolve-from: 5.0.0 store2: 2.12.0 @@ -6088,7 +6034,7 @@ packages: defer-to-connect: 1.1.3 dev: false - /@testing-library/react-hooks/7.0.0_1959de3a9153879cff3acd96b46ed70f: + /@testing-library/react-hooks/7.0.0_react-test-renderer@17.0.2: resolution: {integrity: sha512-WFBGH8DWdIGGBHt6PBtQPe2v4Kbj9vQ1sQ9qLBTmwn1PNggngint4MTE/IiWCYhPbyTW3oc/7X62DObMn/AjQQ==} engines: {node: '>=12'} peerDependencies: @@ -6105,10 +6051,8 @@ packages: '@types/react': 17.0.3 '@types/react-dom': 17.0.3 '@types/react-test-renderer': 17.0.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-error-boundary: 3.1.1_react@18.0.0-alpha-aecb3b6d1 - react-test-renderer: 17.0.2_react@18.0.0-alpha-aecb3b6d1 + react-error-boundary: 3.1.1 + react-test-renderer: 17.0.2 dev: true /@tootallnate/once/1.1.2: @@ -6138,7 +6082,7 @@ packages: typechain: ^5.0.0 web3: ^1.0.0 dependencies: - typechain: 5.0.0_typescript@4.3.2 + typechain: 5.0.0 dev: false /@types/anymatch/1.3.1: @@ -7081,7 +7025,7 @@ packages: '@types/yargs-parser': 20.2.0 dev: true - /@typescript-eslint/eslint-plugin/4.25.0_ec7770e83475322b368bff30b543badb: + /@typescript-eslint/eslint-plugin/4.25.0_@typescript-eslint+parser@4.25.0: resolution: {integrity: sha512-Qfs3dWkTMKkKwt78xp2O/KZQB8MPS1UQ5D3YW2s6LQWBE1074BE+Rym+b1pXZIX3M3fSvPUDaCvZLKV2ylVYYQ==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -7092,22 +7036,20 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 4.25.0_eslint@7.27.0+typescript@4.3.2 - '@typescript-eslint/parser': 4.25.0_eslint@7.27.0+typescript@4.3.2 + '@typescript-eslint/experimental-utils': 4.25.0 + '@typescript-eslint/parser': 4.25.0 '@typescript-eslint/scope-manager': 4.25.0 debug: 4.3.1 - eslint: 7.27.0 functional-red-black-tree: 1.0.1 lodash: 4.17.21 regexpp: 3.1.0 semver: 7.3.5 - tsutils: 3.21.0_typescript@4.3.2 - typescript: 4.3.2 + tsutils: 3.21.0 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/experimental-utils/4.25.0_eslint@7.27.0+typescript@4.3.2: + /@typescript-eslint/experimental-utils/4.25.0: resolution: {integrity: sha512-f0doRE76vq7NEEU0tw+ajv6CrmPelw5wLoaghEHkA2dNLFb3T/zJQqGPQ0OYt5XlZaS13MtnN+GTPCuUVg338w==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -7116,8 +7058,7 @@ packages: '@types/json-schema': 7.0.7 '@typescript-eslint/scope-manager': 4.25.0 '@typescript-eslint/types': 4.25.0 - '@typescript-eslint/typescript-estree': 4.25.0_typescript@4.3.2 - eslint: 7.27.0 + '@typescript-eslint/typescript-estree': 4.25.0 eslint-scope: 5.1.1 eslint-utils: 2.1.0 transitivePeerDependencies: @@ -7125,7 +7066,7 @@ packages: - typescript dev: true - /@typescript-eslint/parser/4.25.0_eslint@7.27.0+typescript@4.3.2: + /@typescript-eslint/parser/4.25.0: resolution: {integrity: sha512-OZFa1SKyEJpAhDx8FcbWyX+vLwh7OEtzoo2iQaeWwxucyfbi0mT4DijbOSsTgPKzGHr6GrF2V5p/CEpUH/VBxg==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -7137,10 +7078,8 @@ packages: dependencies: '@typescript-eslint/scope-manager': 4.25.0 '@typescript-eslint/types': 4.25.0 - '@typescript-eslint/typescript-estree': 4.25.0_typescript@4.3.2 + '@typescript-eslint/typescript-estree': 4.25.0 debug: 4.3.1 - eslint: 7.27.0 - typescript: 4.3.2 transitivePeerDependencies: - supports-color dev: true @@ -7158,7 +7097,7 @@ packages: engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1} dev: true - /@typescript-eslint/typescript-estree/4.25.0_typescript@4.3.2: + /@typescript-eslint/typescript-estree/4.25.0: resolution: {integrity: sha512-1B8U07TGNAFMxZbSpF6jqiDs1cVGO0izVkf18Q/SPcUAc9LhHxzvSowXDTvkHMWUVuPpagupaW63gB6ahTXVlg==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -7173,8 +7112,7 @@ packages: globby: 11.0.3 is-glob: 4.0.1 semver: 7.3.5 - tsutils: 3.21.0_typescript@4.3.2 - typescript: 4.3.2 + tsutils: 3.21.0 transitivePeerDependencies: - supports-color dev: true @@ -7747,7 +7685,7 @@ packages: symbol.prototype.description: 1.0.4 dev: true - /airbnb-prop-types/2.16.0_react@18.0.0-alpha-aecb3b6d1: + /airbnb-prop-types/2.16.0: resolution: {integrity: sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg==} peerDependencies: react: ^0.14 || ^15.0.0 || ^16.0.0-alpha @@ -7760,7 +7698,6 @@ packages: object.entries: 1.1.3 prop-types: 15.7.2 prop-types-exact: 1.2.0 - react: 18.0.0-alpha-aecb3b6d1 react-is: 16.13.1 dev: true @@ -10502,6 +10439,17 @@ packages: warning: 4.0.3 dev: true + /create-react-context/0.3.0_prop-types@15.7.2: + resolution: {integrity: sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==} + peerDependencies: + prop-types: ^15.0.0 + react: ^0.14.0 || ^15.0.0 || ^16.0.0 + dependencies: + gud: 1.0.0 + prop-types: 15.7.2 + warning: 4.0.3 + dev: true + /create-require/1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} dev: true @@ -11431,7 +11379,7 @@ packages: minimatch: 3.0.4 dev: false - /downshift/6.1.3_react@18.0.0-alpha-aecb3b6d1: + /downshift/6.1.3: resolution: {integrity: sha512-RA1MuaNcTbt0j+sVLhSs8R2oZbBXYAtdQP/V+uHhT3DoDteZzJPjlC+LQVm9T07Wpvo84QXaZtUCePLDTDwGXg==} peerDependencies: react: '>=16.12.0' @@ -11439,7 +11387,6 @@ packages: '@babel/runtime': 7.13.17 compute-scroll-into-view: 1.0.17 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 react-is: 17.0.2 dev: true @@ -11567,30 +11514,29 @@ packages: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} - /emotion-theming/10.0.27_0969515b2e564c6f8da5ffe0dd24efb6: + /emotion-theming/10.0.27_868fdfab3e8c9138cf50b7ab83aa28b0: resolution: {integrity: sha512-MlF1yu/gYh8u+sLUqA0YuA9JX0P4Hb69WlKc/9OLo+WCXuX6sy/KoIa+qJimgmr2dWqnypYKYPX37esjDBbhdw==} peerDependencies: '@emotion/core': ^10.0.27 react: '>=16.3.0' dependencies: '@babel/runtime': 7.13.17 - '@emotion/core': 10.1.1_react@18.0.0-alpha-aecb3b6d1 + '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 '@emotion/weak-memoize': 0.2.5 hoist-non-react-statics: 3.3.2 react: 18.0.0-alpha-aecb3b6d1 dev: true - /emotion-theming/10.0.27_868fdfab3e8c9138cf50b7ab83aa28b0: + /emotion-theming/10.0.27_@emotion+core@10.1.1: resolution: {integrity: sha512-MlF1yu/gYh8u+sLUqA0YuA9JX0P4Hb69WlKc/9OLo+WCXuX6sy/KoIa+qJimgmr2dWqnypYKYPX37esjDBbhdw==} peerDependencies: '@emotion/core': ^10.0.27 react: '>=16.3.0' dependencies: '@babel/runtime': 7.13.17 - '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 + '@emotion/core': 10.1.1 '@emotion/weak-memoize': 0.2.5 hoist-non-react-statics: 3.3.2 - react: 18.0.0-alpha-aecb3b6d1 dev: true /enc-utils/3.0.0: @@ -11718,7 +11664,7 @@ packages: hasBin: true dev: true - /enzyme-adapter-react-16/1.15.6_f15f970d9b179e8975516dda0497bdea: + /enzyme-adapter-react-16/1.15.6_enzyme@3.11.0: resolution: {integrity: sha512-yFlVJCXh8T+mcQo8M6my9sPgeGzj85HSHi6Apgf1Cvq/7EL/J9+1JoJmJsRxZgyTvPMAqOEpRSu/Ii/ZpyOk0g==} peerDependencies: enzyme: ^3.0.0 @@ -11726,31 +11672,28 @@ packages: react-dom: ^16.0.0-0 dependencies: enzyme: 3.11.0 - enzyme-adapter-utils: 1.14.0_react@18.0.0-alpha-aecb3b6d1 + enzyme-adapter-utils: 1.14.0 enzyme-shallow-equal: 1.0.4 has: 1.0.3 object.assign: 4.1.2 object.values: 1.1.3 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 react-is: 16.13.1 - react-test-renderer: 16.14.0_react@18.0.0-alpha-aecb3b6d1 + react-test-renderer: 16.14.0 semver: 5.7.1 dev: true - /enzyme-adapter-utils/1.14.0_react@18.0.0-alpha-aecb3b6d1: + /enzyme-adapter-utils/1.14.0: resolution: {integrity: sha512-F/z/7SeLt+reKFcb7597IThpDp0bmzcH1E9Oabqv+o01cID2/YInlqHbFl7HzWBl4h3OdZYedtwNDOmSKkk0bg==} peerDependencies: react: 0.13.x || 0.14.x || ^15.0.0-0 || ^16.0.0-0 dependencies: - airbnb-prop-types: 2.16.0_react@18.0.0-alpha-aecb3b6d1 + airbnb-prop-types: 2.16.0 function.prototype.name: 1.1.4 has: 1.0.3 object.assign: 4.1.2 object.fromentries: 2.0.4 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 semver: 5.7.1 dev: true @@ -15290,7 +15233,7 @@ packages: throat: 6.0.1 dev: true - /jest-circus/27.0.1_ts-node@10.0.0: + /jest-circus/27.0.1: resolution: {integrity: sha512-Tz3ytmrsgxWlTwSyPYb8StF9J2IMjLlbBMKAjhL2UU9/0ZpYb2JiEGjXaAhnGauQRbbpyFbSH3yj5HIbdurmwQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: @@ -15306,7 +15249,7 @@ packages: jest-each: 27.0.1 jest-matcher-utils: 27.0.1 jest-message-util: 27.0.1 - jest-runner: 27.0.1_ts-node@10.0.0 + jest-runner: 27.0.1 jest-runtime: 27.0.1 jest-snapshot: 27.0.1 jest-util: 27.0.1 @@ -15321,7 +15264,7 @@ packages: - utf-8-validate dev: true - /jest-cli/27.0.1_ts-node@10.0.0: + /jest-cli/27.0.1: resolution: {integrity: sha512-plDsQQwpkKK1SZ5L5xqMa7v/sTwB5LTIeSJqb+cV+4EMlThdUQfg8jwMfHX8jHuUc9TPGLcdoZeBuZcGGn3Rlg==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -15331,14 +15274,14 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.0.1_ts-node@10.0.0 + '@jest/core': 27.0.1 '@jest/test-result': 27.0.1 '@jest/types': 27.0.1 chalk: 4.1.1 exit: 0.1.2 graceful-fs: 4.2.6 import-local: 3.0.2 - jest-config: 27.0.1_ts-node@10.0.0 + jest-config: 27.0.1 jest-util: 27.0.1 jest-validate: 27.0.1 prompts: 2.4.1 @@ -15351,7 +15294,7 @@ packages: - utf-8-validate dev: true - /jest-config/27.0.1_ts-node@10.0.0: + /jest-config/27.0.1: resolution: {integrity: sha512-V8O6+CZjGF0OMq4kxVR29ztV/LQqlAAcJLw7a94RndfRXkha4U84n50yZCXiPWtAHHTmb3g1y52US6rGPxA+3w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} peerDependencies: @@ -15361,7 +15304,7 @@ packages: optional: true dependencies: '@babel/core': 7.14.3 - '@jest/test-sequencer': 27.0.1_ts-node@10.0.0 + '@jest/test-sequencer': 27.0.1 '@jest/types': 27.0.1 babel-jest: 27.0.1_@babel+core@7.14.3 chalk: 4.1.1 @@ -15369,7 +15312,7 @@ packages: glob: 7.1.7 graceful-fs: 4.2.6 is-ci: 3.0.0 - jest-circus: 27.0.1_ts-node@10.0.0 + jest-circus: 27.0.1 jest-environment-jsdom: 27.0.1 jest-environment-node: 27.0.1 jest-get-type: 27.0.1 @@ -15380,7 +15323,6 @@ packages: jest-validate: 27.0.1 micromatch: 4.0.4 pretty-format: 27.0.1 - ts-node: 10.0.0_typescript@4.3.2 transitivePeerDependencies: - bufferutil - canvas @@ -15773,7 +15715,7 @@ packages: slash: 3.0.0 dev: true - /jest-runner/27.0.1_ts-node@10.0.0: + /jest-runner/27.0.1: resolution: {integrity: sha512-DUNizlD2D7J80G3VOrwfbtb7KYxiftMng82HNcKwTW0W3AwwNuBeq+1exoCnLO7Mxh7NP+k/1XQBlzLpjr/CnA==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: @@ -15787,7 +15729,7 @@ packages: emittery: 0.8.1 exit: 0.1.2 graceful-fs: 4.2.6 - jest-config: 27.0.1_ts-node@10.0.0 + jest-config: 27.0.1 jest-docblock: 27.0.1 jest-haste-map: 27.0.1 jest-leak-detector: 27.0.1 @@ -15990,7 +15932,7 @@ packages: supports-color: 8.1.1 dev: true - /jest/27.0.1_ts-node@10.0.0: + /jest/27.0.1: resolution: {integrity: sha512-lFEoUdXjbGAIxk/gZhcv98xOaH1hjqG5R/PQHs5GBfIK5iL3tnXCjHQf4HQLVZZ2rcXML3oeVg9+XrRZbooBdQ==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -16000,9 +15942,9 @@ packages: node-notifier: optional: true dependencies: - '@jest/core': 27.0.1_ts-node@10.0.0 + '@jest/core': 27.0.1 import-local: 3.0.2 - jest-cli: 27.0.1_ts-node@10.0.0 + jest-cli: 27.0.1 transitivePeerDependencies: - bufferutil - canvas @@ -17056,24 +16998,21 @@ packages: resolution: {integrity: sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==} dev: true - /markdown-to-jsx/6.11.4_react@18.0.0-alpha-aecb3b6d1: + /markdown-to-jsx/6.11.4: resolution: {integrity: sha512-3lRCD5Sh+tfA52iGgfs/XZiw33f7fFX9Bn55aNnVNUd2GzLDkOWyKYYD8Yju2B1Vn+feiEdgJs8T6Tg0xNokPw==} engines: {node: '>= 4'} peerDependencies: react: '>= 0.14.0' dependencies: prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 unquote: 1.1.1 dev: true - /markdown-to-jsx/7.1.2_react@18.0.0-alpha-aecb3b6d1: + /markdown-to-jsx/7.1.2: resolution: {integrity: sha512-O8DMCl32V34RrD+ZHxcAPc2+kYytuDIoQYjY36RVdsLK7uHjgNVvFec4yv0X6LgB4YEZgSvK5QtFi5YVqEpoMA==} engines: {node: '>= 4'} peerDependencies: react: '>= 0.14.0' - dependencies: - react: 18.0.0-alpha-aecb3b6d1 dev: true /marky/1.2.1: @@ -17380,7 +17319,7 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - /mini-create-react-context/0.4.1_d2630f1b5c5d613d08a8af07021f9fe5: + /mini-create-react-context/0.4.1_prop-types@15.7.2: resolution: {integrity: sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==} peerDependencies: prop-types: ^15.0.0 @@ -17388,7 +17327,6 @@ packages: dependencies: '@babel/runtime': 7.14.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 tiny-warning: 1.0.3 dev: false @@ -17696,7 +17634,7 @@ packages: /nan/2.14.2: resolution: {integrity: sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==} - /nano-css/5.3.1_f991c289939c8299bed5e4a6a5a79a62: + /nano-css/5.3.1: resolution: {integrity: sha512-ENPIyNzANQRyYVvb62ajDd7PAyIgS2LIUnT9ewih4yrXSZX4hKoUwssy8WjUH++kEOA5wUTMgNnV7ko5n34kUA==} peerDependencies: react: '*' @@ -17706,8 +17644,6 @@ packages: csstype: 3.0.8 fastest-stable-stringify: 2.0.2 inline-style-prefixer: 6.0.0 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 rtl-css-js: 1.14.1 sourcemap-codec: 1.4.8 stacktrace-js: 2.0.2 @@ -17928,6 +17864,17 @@ packages: engines: {node: '>=8'} dev: false + /notistack/1.0.9: + resolution: {integrity: sha512-Dal2HtTpWrdYCZ3t0HhJt47NJZwVSPee36WzORRbqUkFR0k9pxFszxBuPSWshBLwF6Av8s86XPP+ED5zRz0CGw==} + peerDependencies: + '@material-ui/core': ^4.0.0 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + dependencies: + clsx: 1.1.1 + hoist-non-react-statics: 3.3.2 + dev: false + /notistack/1.0.9_132ff92e0fd7328580f6380de259b809: resolution: {integrity: sha512-Dal2HtTpWrdYCZ3t0HhJt47NJZwVSPee36WzORRbqUkFR0k9pxFszxBuPSWshBLwF6Av8s86XPP+ED5zRz0CGw==} peerDependencies: @@ -18869,11 +18816,11 @@ packages: engines: {node: '>=4.0.0'} dev: false - /pnp-webpack-plugin/1.6.4_typescript@4.3.2: + /pnp-webpack-plugin/1.6.4: resolution: {integrity: sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==} engines: {node: '>=6'} dependencies: - ts-pnp: 1.2.0_typescript@4.3.2 + ts-pnp: 1.2.0 transitivePeerDependencies: - typescript dev: true @@ -19396,14 +19343,11 @@ packages: webpack: 4.46.0 dev: true - /react-colorful/5.1.2_f991c289939c8299bed5e4a6a5a79a62: + /react-colorful/5.1.2: resolution: {integrity: sha512-FRt9jz6xjiPqQ6bIAQ26kd0oJhHbGBwsA4BDz/F8FDCFuQJDiEl0wVUARNiqRyvQjwfKuhM42P/bMYI0l92hRw==} peerDependencies: react: '>=16.8.0' react-dom: '>=16.8.0' - dependencies: - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: true /react-dev-utils/11.0.4: @@ -19446,7 +19390,7 @@ packages: - utf-8-validate dev: true - /react-docgen-typescript-plugin/0.6.3_typescript@4.3.2: + /react-docgen-typescript-plugin/0.6.3: resolution: {integrity: sha512-av1S/fmWBNFGgNa4qtkidFjjOz23eEi6EdCtwSWo9WNhGzUMyMygbD/DosMWoeFlZpk9R3MXPkRE7PDH6j5GMQ==} peerDependencies: typescript: '>= 3.x' @@ -19454,19 +19398,16 @@ packages: debug: 4.3.1 endent: 2.0.1 micromatch: 4.0.4 - react-docgen-typescript: 1.22.0_typescript@4.3.2 + react-docgen-typescript: 1.22.0 tslib: 2.2.0 - typescript: 4.3.2 transitivePeerDependencies: - supports-color dev: true - /react-docgen-typescript/1.22.0_typescript@4.3.2: + /react-docgen-typescript/1.22.0: resolution: {integrity: sha512-MPLbF8vzRwAG3GcjdL+OHQlhgtWsLTXs+7uJiHfEeT3Ur7IsZaNYqRTLQ9sj2nB6M6jylcPCeCmH7qbszJmecg==} peerDependencies: typescript: '>= 3.x' - dependencies: - typescript: 4.3.2 dev: true /react-docgen/5.3.1: @@ -19503,7 +19444,7 @@ packages: classnames: 2.2.6 prop-types: 15.7.2 - /react-element-to-jsx-string/14.3.2_f991c289939c8299bed5e4a6a5a79a62: + /react-element-to-jsx-string/14.3.2: resolution: {integrity: sha512-WZbvG72cjLXAxV7VOuSzuHEaI3RHj10DZu8EcKQpkKcAj7+qAkG5XUeSdX5FXrA0vPrlx0QsnAzZEBJwzV0e+w==} peerDependencies: react: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 @@ -19511,18 +19452,15 @@ packages: dependencies: '@base2/pretty-print-object': 1.0.0 is-plain-object: 3.0.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: true - /react-error-boundary/3.1.1_react@18.0.0-alpha-aecb3b6d1: + /react-error-boundary/3.1.1: resolution: {integrity: sha512-W3xCd9zXnanqrTUeViceufD3mIW8Ut29BUD+S2f0eO2XCOU8b6UrJfY46RDGe5lxCJzfe4j0yvIfh0RbTZhKJw==} engines: {node: '>=10', npm: '>=6'} peerDependencies: react: '>=16.13.1' dependencies: '@babel/runtime': 7.13.17 - react: 18.0.0-alpha-aecb3b6d1 dev: true /react-error-overlay/6.0.9: @@ -19533,16 +19471,15 @@ packages: resolution: {integrity: sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==} dev: true - /react-feather/2.0.9_react@18.0.0-alpha-aecb3b6d1: + /react-feather/2.0.9: resolution: {integrity: sha512-yMfCGRkZdXwIs23Zw/zIWCJO3m3tlaUvtHiXlW+3FH7cIT6fiK1iJ7RJWugXq7Fso8ZaQyUm92/GOOHXvkiVUw==} peerDependencies: react: ^16.8.6 || ^17 dependencies: prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 dev: false - /react-helmet-async/1.0.9_f991c289939c8299bed5e4a6a5a79a62: + /react-helmet-async/1.0.9: resolution: {integrity: sha512-N+iUlo9WR3/u9qGMmP4jiYfaD6pe9IvDTapZLFJz2D3xlTlCM1Bzy4Ab3g72Nbajo/0ZyW+W9hdz8Hbe4l97pQ==} peerDependencies: react: ^16.6.0 || ^17.0.0 @@ -19551,13 +19488,11 @@ packages: '@babel/runtime': 7.13.17 invariant: 2.2.4 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 react-fast-compare: 3.2.0 shallowequal: 1.1.0 dev: true - /react-highlight-words/0.17.0_react@18.0.0-alpha-aecb3b6d1: + /react-highlight-words/0.17.0: resolution: {integrity: sha512-uX1Qh5IGjnLuJT0Zok234QDwRC8h4hcVMnB99Cb7aquB1NlPPDiWKm0XpSZOTdSactvnClCk8LOmVlP+75dgHA==} peerDependencies: react: ^0.14.0 || ^15.0.0 || ^16.0.0-0 || ^17.0.0-0 @@ -19565,7 +19500,6 @@ packages: highlight-words-core: 1.2.2 memoize-one: 4.0.3 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 dev: false /react-i18next/11.9.0_791d1630e18517ab8fc416422120449b: @@ -19580,7 +19514,7 @@ packages: react: 18.0.0-alpha-aecb3b6d1 dev: false - /react-inspector/5.1.1_react@18.0.0-alpha-aecb3b6d1: + /react-inspector/5.1.1: resolution: {integrity: sha512-GURDaYzoLbW8pMGXwYPDBIv6nqei4kK7LPRZ9q9HCZF54wqXz/dnylBp/kfE9XmekBhHvLDdcYeyIwSrvtOiWg==} peerDependencies: react: ^16.8.4 || ^17.0.0 @@ -19588,7 +19522,6 @@ packages: '@babel/runtime': 7.13.17 is-dom: 1.1.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 dev: true /react-is/16.13.1: @@ -19601,18 +19534,15 @@ packages: resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==} dev: true - /react-middle-ellipsis/1.2.1_f991c289939c8299bed5e4a6a5a79a62: + /react-middle-ellipsis/1.2.1: resolution: {integrity: sha512-BUQWVXIWwkY7qBqZx0qyeCnPIh188t0lLS0ftfBsU41HB6k769HyBwE23eP+qNXr4vEnmKTEmlicrypVdWYs0w==} engines: {node: '>=8', npm: '>=5'} peerDependencies: react: ^17.0.0 react-dom: ^17.0.0 - dependencies: - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: false - /react-popper-tooltip/3.1.1_f991c289939c8299bed5e4a6a5a79a62: + /react-popper-tooltip/3.1.1: resolution: {integrity: sha512-EnERAnnKRptQBJyaee5GJScWNUKQPDD2ywvzZyUjst/wj5U64C8/CnSYLNEmP2hG0IJ3ZhtDxE8oDN+KOyavXQ==} peerDependencies: react: ^16.6.0 || ^17.0.0 @@ -19620,31 +19550,27 @@ packages: dependencies: '@babel/runtime': 7.13.17 '@popperjs/core': 2.9.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-popper: 2.2.5_a60ee8f7a0810f3be1186b900eece7e1 + react-popper: 2.2.5_@popperjs+core@2.9.2 dev: true - /react-popper/2.2.5_a60ee8f7a0810f3be1186b900eece7e1: + /react-popper/2.2.5_@popperjs+core@2.9.2: resolution: {integrity: sha512-kxGkS80eQGtLl18+uig1UIf9MKixFSyPxglsgLBxlYnyDf65BiY9B3nZSc6C9XUNDgStROB0fMQlTEz1KxGddw==} peerDependencies: '@popperjs/core': ^2.0.0 react: ^16.8.0 || ^17 dependencies: '@popperjs/core': 2.9.2 - react: 18.0.0-alpha-aecb3b6d1 react-fast-compare: 3.2.0 warning: 4.0.3 dev: true - /react-refresh-typescript/2.0.1_5fd9bdb32789d99f678b3c3315477f9a: + /react-refresh-typescript/2.0.1_react-refresh@0.10.0: resolution: {integrity: sha512-hzn1GakEKnO5JmQ1/Av6kUFOq+2B62y0wvQndjeaRn/bDC+gEAYOYYO4T83iqr817fIbyttIicZiqpZUFum63A==} peerDependencies: react-refresh: 0.10.x typescript: ^4 dependencies: react-refresh: 0.10.0 - typescript: 4.3.2 dev: true /react-refresh/0.10.0: @@ -19662,7 +19588,7 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-router-dom/5.2.0_react@18.0.0-alpha-aecb3b6d1: + /react-router-dom/5.2.0: resolution: {integrity: sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==} peerDependencies: react: '>=15' @@ -19671,13 +19597,12 @@ packages: history: 4.10.1 loose-envify: 1.4.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-router: 5.2.0_react@18.0.0-alpha-aecb3b6d1 + react-router: 5.2.0 tiny-invariant: 1.1.0 tiny-warning: 1.0.3 dev: false - /react-router-dom/6.0.0-beta.0_66263521e705c985f663eeac15167a50: + /react-router-dom/6.0.0-beta.0_history@5.0.0: resolution: {integrity: sha512-36yNNGMT8RB9FRPL9nKJi6HKDkgOakU+o/2hHpSzR6e37gN70MpOU6QQlmif4oAWWBwjyGc3ZNOMFCsFuHUY5w==} peerDependencies: history: '>=5' @@ -19686,12 +19611,10 @@ packages: dependencies: history: 5.0.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-router: 6.0.0-beta.0_dd3df4049b9a65e1e2d003c7940c4871 + react-router: 6.0.0-beta.0_history@5.0.0 dev: false - /react-router/5.2.0_react@18.0.0-alpha-aecb3b6d1: + /react-router/5.2.0: resolution: {integrity: sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==} peerDependencies: react: '>=15' @@ -19700,16 +19623,15 @@ packages: history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 - mini-create-react-context: 0.4.1_d2630f1b5c5d613d08a8af07021f9fe5 + mini-create-react-context: 0.4.1_prop-types@15.7.2 path-to-regexp: 1.8.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 react-is: 16.13.1 tiny-invariant: 1.1.0 tiny-warning: 1.0.3 dev: false - /react-router/6.0.0-beta.0_dd3df4049b9a65e1e2d003c7940c4871: + /react-router/6.0.0-beta.0_history@5.0.0: resolution: {integrity: sha512-VgMdfpVcmFQki/LZuLh8E/MNACekDetz4xqft+a6fBZvvJnVqKbLqebF7hyoawGrV1HcO5tVaUang2Og4W2j1Q==} peerDependencies: history: '>=5' @@ -19717,20 +19639,18 @@ packages: dependencies: history: 5.0.0 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 dev: false - /react-shallow-renderer/16.14.1_react@18.0.0-alpha-aecb3b6d1: + /react-shallow-renderer/16.14.1: resolution: {integrity: sha512-rkIMcQi01/+kxiTE9D3fdS959U1g7gs+/rborw++42m1O9FAQiNI/UNRZExVUoAOprn4umcXf+pFRou8i4zuBg==} peerDependencies: react: ^16.0.0 || ^17.0.0 dependencies: object-assign: 4.1.1 - react: 18.0.0-alpha-aecb3b6d1 react-is: 17.0.2 dev: true - /react-sizeme/3.0.1_f991c289939c8299bed5e4a6a5a79a62: + /react-sizeme/3.0.1: resolution: {integrity: sha512-9Hf1NLgSbny1bha77l9HwvwwxQUJxFUqi44Ih+y3evA+PezBpGdCGlnvye6avss2cIgs9PgdYgMnfuzJWn/RUw==} peerDependencies: react: ^0.14.0 || ^15.0.0-0 || ^16.0.0 || ^17.0.0 @@ -19738,13 +19658,11 @@ packages: dependencies: element-resize-detector: 1.2.2 invariant: 2.2.4 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 shallowequal: 1.1.0 throttle-debounce: 3.0.1 dev: true - /react-syntax-highlighter/13.5.3_react@18.0.0-alpha-aecb3b6d1: + /react-syntax-highlighter/13.5.3: resolution: {integrity: sha512-crPaF+QGPeHNIblxxCdf2Lg936NAHKhNhuMzRL3F9ct6aYXL3NcZtCL0Rms9+qVo6Y1EQLdXGypBNSbPL/r+qg==} peerDependencies: react: '>= 0.14.0' @@ -19753,44 +19671,40 @@ packages: highlight.js: 10.7.2 lowlight: 1.20.0 prismjs: 1.23.0 - react: 18.0.0-alpha-aecb3b6d1 refractor: 3.3.1 dev: true - /react-test-renderer/16.14.0_react@18.0.0-alpha-aecb3b6d1: + /react-test-renderer/16.14.0: resolution: {integrity: sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg==} peerDependencies: react: ^16.14.0 dependencies: object-assign: 4.1.1 prop-types: 15.7.2 - react: 18.0.0-alpha-aecb3b6d1 react-is: 16.13.1 scheduler: 0.19.1 dev: true - /react-test-renderer/17.0.2_react@18.0.0-alpha-aecb3b6d1: + /react-test-renderer/17.0.2: resolution: {integrity: sha512-yaQ9cB89c17PUb0x6UfWRs7kQCorVdHlutU1boVPEsB8IDZH6n9tHxMacc3y0JoXOJUsZb/t/Mb8FUWMKaM7iQ==} peerDependencies: react: 17.0.2 dependencies: object-assign: 4.1.1 - react: 18.0.0-alpha-aecb3b6d1 react-is: 17.0.2 - react-shallow-renderer: 16.14.1_react@18.0.0-alpha-aecb3b6d1 + react-shallow-renderer: 16.14.1 scheduler: 0.20.2 dev: true - /react-textarea-autosize/8.3.2_5ec7ab1ee537e9220fe02de547882794: + /react-textarea-autosize/8.3.2: resolution: {integrity: sha512-JrMWVgQSaExQByP3ggI1eA8zF4mF0+ddVuX7acUeK2V7bmrpjVOY72vmLz2IXFJSAXoY3D80nEzrn0GWajWK3Q==} engines: {node: '>=10'} peerDependencies: react: ^16.8.0 || ^17.0.0 dependencies: '@babel/runtime': 7.13.17 - react: 18.0.0-alpha-aecb3b6d1 - use-composed-ref: 1.1.0_react@18.0.0-alpha-aecb3b6d1 - use-latest: 1.2.0_5ec7ab1ee537e9220fe02de547882794 + use-composed-ref: 1.1.0 + use-latest: 1.2.0 transitivePeerDependencies: - '@types/react' dev: true @@ -19809,17 +19723,16 @@ packages: react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: false - /react-universal-interface/0.6.2_f81ffae3c0d6edaa9e731142af3ae719: + /react-universal-interface/0.6.2_tslib@2.2.0: resolution: {integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==} peerDependencies: react: '*' tslib: '*' dependencies: - react: 18.0.0-alpha-aecb3b6d1 tslib: 2.2.0 dev: false - /react-use/17.2.4_f991c289939c8299bed5e4a6a5a79a62: + /react-use/17.2.4: resolution: {integrity: sha512-vQGpsAM0F5UIlshw5UI8ULGPS4yn5rm7/qvn3T1Gnkrz7YRMEEMh+ynKcmRloOyiIeLvKWiQjMiwRGtdbgs5qQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -19831,10 +19744,8 @@ packages: fast-deep-equal: 3.1.3 fast-shallow-equal: 1.0.0 js-cookie: 2.2.1 - nano-css: 5.3.1_f991c289939c8299bed5e4a6a5a79a62 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 - react-universal-interface: 0.6.2_f81ffae3c0d6edaa9e731142af3ae719 + nano-css: 5.3.1 + react-universal-interface: 0.6.2_tslib@2.2.0 resize-observer-polyfill: 1.5.1 screenfull: 5.1.0 set-harmonic-interval: 1.0.1 @@ -19843,18 +19754,15 @@ packages: tslib: 2.2.0 dev: false - /react-virtualized-auto-sizer/1.0.5_f991c289939c8299bed5e4a6a5a79a62: + /react-virtualized-auto-sizer/1.0.5: resolution: {integrity: sha512-kivjYVWX15TX2IUrm8F1jaCEX8EXrpy3DD+u41WGqJ1ZqbljWpiwscV+VxOM1l7sSIM1jwi2LADjhhAJkJ9dxA==} engines: {node: '>8.0.0'} peerDependencies: react: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 react-dom: ^15.3.0 || ^16.0.0-alpha || ^17.0.0 - dependencies: - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: false - /react-window/1.8.6_f991c289939c8299bed5e4a6a5a79a62: + /react-window/1.8.6: resolution: {integrity: sha512-8VwEEYyjz6DCnGBsd+MgkD0KJ2/OXFULyDtorIiTz+QzwoP94tBoA7CnbtyXMm+cCeAUER5KJcPtWl9cpKbOBg==} engines: {node: '>8.0.0'} peerDependencies: @@ -19863,8 +19771,6 @@ packages: dependencies: '@babel/runtime': 7.13.10 memoize-one: 5.1.1 - react: 18.0.0-alpha-aecb3b6d1 - react-dom: 18.0.0-alpha-aecb3b6d1_react@18.0.0-alpha-aecb3b6d1 dev: false /react/18.0.0-alpha-aecb3b6d1: @@ -21386,12 +21292,12 @@ packages: resolution: {integrity: sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw==} dev: true - /storybook-addon-matrix/1.6.0_react-dom@18.0.0-alpha-aecb3b6d1: + /storybook-addon-matrix/1.6.0: resolution: {integrity: sha512-2Fc2E3B2oqjWUMil4q5K13wjeH6uK+Ae7Y7647VNu8+qBEcXokAcL6RTc69+63fnXQeLA6ZhZYUjWmhE4NLxhg==} dependencies: '@emotion/core': 10.0.28_react@18.0.0-alpha-aecb3b6d1 '@emotion/styled': 10.0.27_868fdfab3e8c9138cf50b7ab83aa28b0 - '@storybook/addons': 5.3.18_react-dom@18.0.0-alpha-aecb3b6d1 + '@storybook/addons': 5.3.18 '@types/js-combinatorics': 0.5.31 '@types/styled-system': 5.1.9 js-combinatorics: 0.5.5 @@ -22261,15 +22167,13 @@ packages: resolution: {integrity: sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w==} dev: true - /ts-essentials/7.0.1_typescript@4.3.2: + /ts-essentials/7.0.1: resolution: {integrity: sha512-8lwh3QJtIc1UWhkQtr9XuksXu3O0YQdEE5g79guDfhCaU1FWTDIEDZ1ZSx4HTHUmlJZ8L812j3BZQ4a0aOUkSA==} peerDependencies: typescript: '>=3.7.0' - dependencies: - typescript: 4.3.2 dev: false - /ts-jest/27.0.1_jest@27.0.1+typescript@4.3.2: + /ts-jest/27.0.1_jest@27.0.1: resolution: {integrity: sha512-03qAt77QjhxyM5Bt2KrrT1WbdumiwLz989sD3IUznSp3GIFQrx76kQqSMLF7ynnxrF3/1ipzABnHxMlU8PD4Vw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} hasBin: true @@ -22280,18 +22184,17 @@ packages: bs-logger: 0.2.6 buffer-from: 1.1.1 fast-json-stable-stringify: 2.1.0 - jest: 27.0.1_ts-node@10.0.0 + jest: 27.0.1 jest-util: 27.0.1 json5: 2.2.0 lodash: 4.17.21 make-error: 1.3.6 mkdirp: 1.0.4 semver: 7.3.5 - typescript: 4.3.2 yargs-parser: 20.2.7 dev: true - /ts-loader/9.2.2_typescript@4.3.2+webpack@5.37.1: + /ts-loader/9.2.2_webpack@5.37.1: resolution: {integrity: sha512-hNIhGTQHtNKjOzR2ZtQ2OSVbXPykOae+zostf1IlHCf61Mt41GMJurKNqrYUbzHgpmj6UWRu8eBfb7q0XliV0g==} engines: {node: '>=12.0.0'} peerDependencies: @@ -22302,10 +22205,36 @@ packages: enhanced-resolve: 5.8.0 micromatch: 4.0.4 semver: 7.3.5 - typescript: 4.3.2 webpack: 5.37.1_webpack-cli@4.7.0 dev: true + /ts-node/10.0.0: + resolution: {integrity: sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg==} + engines: {node: '>=12.0.0'} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.45' + '@swc/wasm': '>=1.2.45' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@tsconfig/node10': 1.0.7 + '@tsconfig/node12': 1.0.7 + '@tsconfig/node14': 1.0.0 + '@tsconfig/node16': 1.0.1 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + source-map-support: 0.5.19 + yn: 3.1.1 + dev: true + /ts-node/10.0.0_typescript@4.3.2: resolution: {integrity: sha512-ROWeOIUvfFbPZkoDis0L/55Fk+6gFQNZwwKPLinacRl6tsxstTF1DbAcLKkovwnpKMVvOMHP1TIbnwXwtLg1gg==} engines: {node: '>=12.0.0'} @@ -22349,7 +22278,7 @@ packages: yn: 2.0.0 dev: false - /ts-pnp/1.2.0_typescript@4.3.2: + /ts-pnp/1.2.0: resolution: {integrity: sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==} engines: {node: '>=6'} peerDependencies: @@ -22357,8 +22286,6 @@ packages: peerDependenciesMeta: typescript: optional: true - dependencies: - typescript: 4.3.2 dev: true /ts-results/3.3.0: @@ -22436,14 +22363,13 @@ packages: typescript: 2.9.2 dev: false - /tsutils/3.21.0_typescript@4.3.2: + /tsutils/3.21.0: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.3.2 dev: true /tty-browserify/0.0.0: @@ -22482,7 +22408,7 @@ packages: prelude-ls: 1.2.1 dev: true - /type-coverage-core/2.17.5_typescript@4.3.2: + /type-coverage-core/2.17.5: resolution: {integrity: sha512-FfkH2kIgQkkgC47V2WHJZWBbjYjMw2ZpQRdRGTcMBAnkijmRCp9I1LpOuI+Gv4MDtniRLnkAo8htGGt2iExFgA==} peerDependencies: typescript: 2 || 3 || 4 @@ -22491,16 +22417,15 @@ packages: minimatch: 3.0.4 normalize-path: 3.0.0 tslib: 2.2.0 - tsutils: 3.21.0_typescript@4.3.2 - typescript: 4.3.2 + tsutils: 3.21.0 dev: true - /type-coverage/2.17.5_typescript@4.3.2: + /type-coverage/2.17.5: resolution: {integrity: sha512-Lqmvt4RVf1A+KE7x5PSRU7lM53HfyqeYmAuueHgJnol4omlZ4EnydodMkEc015cQohdqvLLz1vQ5Qhspg1hfRw==} hasBin: true dependencies: minimist: 1.2.5 - type-coverage-core: 2.17.5_typescript@4.3.2 + type-coverage-core: 2.17.5 transitivePeerDependencies: - typescript dev: true @@ -22550,7 +22475,7 @@ packages: /type/2.5.0: resolution: {integrity: sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==} - /typechain/5.0.0_typescript@4.3.2: + /typechain/5.0.0: resolution: {integrity: sha512-Ko2/8co0FUmPUkaXPcb8PC3ncWa5P72nvkiNMgcomd4OAInltJlITF0kcW2cZmI2sFkvmaHV5TZmCnOHgo+i5Q==} hasBin: true dependencies: @@ -22562,7 +22487,7 @@ packages: js-sha3: 0.8.0 lodash: 4.17.21 prettier: 2.3.0 - ts-essentials: 7.0.1_typescript@4.3.2 + ts-essentials: 7.0.1 transitivePeerDependencies: - supports-color - typescript @@ -22972,16 +22897,15 @@ packages: punycode: 1.3.2 querystring: 0.2.0 - /use-composed-ref/1.1.0_react@18.0.0-alpha-aecb3b6d1: + /use-composed-ref/1.1.0: resolution: {integrity: sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg==} peerDependencies: react: ^16.8.0 || ^17.0.0 dependencies: - react: 18.0.0-alpha-aecb3b6d1 ts-essentials: 2.0.12 dev: true - /use-isomorphic-layout-effect/1.1.1_5ec7ab1ee537e9220fe02de547882794: + /use-isomorphic-layout-effect/1.1.1: resolution: {integrity: sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ==} peerDependencies: '@types/react': '*' @@ -22989,12 +22913,9 @@ packages: peerDependenciesMeta: '@types/react': optional: true - dependencies: - '@types/react': 17.0.11 - react: 18.0.0-alpha-aecb3b6d1 dev: true - /use-latest/1.2.0_5ec7ab1ee537e9220fe02de547882794: + /use-latest/1.2.0: resolution: {integrity: sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==} peerDependencies: '@types/react': '*' @@ -23003,18 +22924,15 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 17.0.11 - react: 18.0.0-alpha-aecb3b6d1 - use-isomorphic-layout-effect: 1.1.1_5ec7ab1ee537e9220fe02de547882794 + use-isomorphic-layout-effect: 1.1.1 dev: true - /use-subscription/1.5.1_react@18.0.0-alpha-aecb3b6d1: + /use-subscription/1.5.1: resolution: {integrity: sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==} peerDependencies: react: ^16.8.0 || ^17.0.0 dependencies: object-assign: 4.1.1 - react: 18.0.0-alpha-aecb3b6d1 dev: false /use/3.1.1: From 0e1f50c5344855a1604457c72b8e99006d4bcb4d Mon Sep 17 00:00:00 2001 From: Lantt Date: Mon, 28 Jun 2021 18:29:46 +0800 Subject: [PATCH 2/2] chore: remove web3 method from shared --- .../components/CollectibleList/index.tsx | 6 +- .../Wallets/components/TokenTable/index.tsx | 15 +- .../components/TokenTableRow/index.tsx | 6 +- .../InjectedComponents/ToolboxHint.tsx | 11 +- .../shared/SelectWallet/WalletInList.tsx | 9 +- .../EthereumServices/tokenList.ts | 9 +- .../CollectibleList/index.tsx | 4 +- .../DashboardComponents/TokenIcon.tsx | 10 +- .../DashboardComponents/TokenInList.tsx | 2 +- .../DashboardComponents/WalletAssetsTable.tsx | 19 +- .../DashboardDialogs/Wallet/TransferNFT.tsx | 8 +- .../DashboardDialogs/Wallet/TransferTab.tsx | 16 +- .../Airdrop/SNSAdaptor/AirdropClaimCard.tsx | 13 +- .../plugins/Airdrop/hooks/useCheckCallback.ts | 2 +- .../Collectible/SNSAdaptor/HistoryTab/Row.tsx | 3 +- .../SNSAdaptor/ListingByHighestBidCard.tsx | 15 +- .../SNSAdaptor/ListingByPriceCard.tsx | 21 +- .../Collectible/SNSAdaptor/ListingTab.tsx | 3 +- .../Collectible/SNSAdaptor/OfferTab.tsx | 3 +- .../Collectible/SNSAdaptor/OrderRow.tsx | 5 +- .../src/plugins/Collectible/helpers.ts | 5 +- .../maskbook/src/plugins/Collectible/utils.ts | 3 +- .../Gitcoin/SNSAdaptor/DonateDialog.tsx | 3 +- .../src/plugins/ITO/UI/ClaimAllDialog.tsx | 10 +- .../src/plugins/ITO/UI/CompositionDialog.tsx | 6 +- .../src/plugins/ITO/UI/ConfirmDialog.tsx | 5 +- .../src/plugins/ITO/UI/CreateForm.tsx | 5 +- packages/maskbook/src/plugins/ITO/UI/ITO.tsx | 7 +- .../maskbook/src/plugins/ITO/UI/ITO_Card.tsx | 3 +- .../src/plugins/ITO/UI/PoolInList.tsx | 12 +- .../src/plugins/ITO/UI/ShareDialog.tsx | 6 +- .../src/plugins/ITO/UI/SwapDialog.tsx | 22 +- .../maskbook/src/plugins/ITO/UI/SwapGuide.tsx | 3 +- .../src/plugins/ITO/UI/UnlockDialog.tsx | 13 +- packages/maskbook/src/plugins/ITO/define.tsx | 2 +- .../src/plugins/ITO/hooks/useClaimCallback.ts | 4 +- .../maskbook/src/plugins/ITO/hooks/useFill.ts | 10 +- .../src/plugins/ITO/hooks/useSwapCallback.ts | 2 +- .../RedPacket/SNSAdaptor/RedPacket.tsx | 4 +- .../RedPacket/SNSAdaptor/RedPacketForm.tsx | 5 +- .../SNSAdaptor/RedPacketInHistoryList.tsx | 7 +- .../SNSAdaptor/hooks/useCreateCallback.ts | 2 +- .../plugins/RedPacket/SNSAdaptor/index.tsx | 3 +- .../Snapshot/SNSAdaptor/InformationCard.tsx | 2 +- .../plugins/Snapshot/SNSAdaptor/VotesCard.tsx | 3 +- .../plugins/Trader/UI/balancer/TradeRoute.tsx | 8 +- .../Trader/UI/trader/ConfirmDialog.tsx | 6 +- .../Trader/UI/trader/SlippageSlider.tsx | 4 +- .../plugins/Trader/UI/trader/TokenPanel.tsx | 4 +- .../plugins/Trader/UI/trader/TradeForm.tsx | 9 +- .../plugins/Trader/UI/trader/TradeSummary.tsx | 12 +- .../src/plugins/Trader/UI/trader/Trader.tsx | 6 +- .../plugins/Trader/UI/trending/LBPPanel.tsx | 3 +- .../Trader/UI/trending/TickersTable.tsx | 17 +- .../plugins/Trader/UI/uniswap/TradeRoute.tsx | 4 +- .../src/plugins/Trader/apis/balancer/index.ts | 3 +- .../src/plugins/Trader/apis/uniswap/index.ts | 14 +- .../src/plugins/Trader/constants/trader.ts | 3 +- .../src/plugins/Trader/helpers/uniswap.ts | 13 +- .../Trader/trader/0x/useTradeComputed.ts | 2 +- .../Trader/trader/balancer/useTradeAmount.ts | 2 +- .../trader/balancer/useTradeComputed.ts | 2 +- .../Trader/trader/native/useTradeComputed.ts | 3 +- .../Trader/trader/uniswap/useV2Trade.ts | 9 +- .../trader/uniswap/useV2TradeComputed.ts | 2 +- .../Trader/trader/useTradeApproveComputed.ts | 3 +- .../plugins/Trader/trader/useTradeComputed.ts | 2 +- .../Trader/trader/useTradeStateComputed.ts | 2 +- .../plugins/Transak/hooks/useTransakURL.ts | 2 +- .../Wallet/SNSAdaptor/GasNowDialog.tsx | 4 +- .../RecentTransactionList.tsx | 13 +- .../src/plugins/Wallet/services/assets.ts | 3 +- .../src/plugins/Wallet/services/erc1155.ts | 4 +- .../src/plugins/Wallet/services/erc20.ts | 5 +- .../src/plugins/Wallet/services/erc721.ts | 10 +- .../src/plugins/Wallet/services/helpers.ts | 11 +- .../Wallet/services/recentTransactions.ts | 3 +- .../plugins/Wallet/services/transactions.ts | 8 +- .../src/plugins/Wallet/services/wallet.ts | 7 +- .../src/plugins/dHEDGE/UI/InvestDialog.tsx | 4 +- .../src/plugins/dHEDGE/UI/PoolStats.tsx | 4 +- .../src/plugins/hooks/usePriceLineChart.ts | 2 +- .../src/web3/UI/EthereumAccountButton.tsx | 3 +- .../UI/EthereumERC20TokenApprovedBoundary.tsx | 8 +- .../UI/EthereumWalletConnectedBoundary.tsx | 6 +- .../maskbook/src/web3/UI/TokenAmountPanel.tsx | 9 +- .../maskbook/src/web3/UI/TxFeeEstimation.tsx | 17 +- packages/shared/package.json | 1 + packages/shared/src/utils/index.ts | 1 - packages/shared/src/wallet/components.tsx | 2 +- packages/shared/src/wallet/index.ts | 1 - packages/shared/tsconfig.json | 3 +- packages/web3-shared/package.json | 1 - packages/web3-shared/src/hooks/useAssets.ts | 2 +- .../web3-shared/src/hooks/useAssetsMerged.ts | 3 +- .../src/hooks/useERC20TokenApproveCallback.ts | 2 +- .../src/hooks/useERC20TokenDetailed.ts | 4 +- .../hooks/useERC20TokenTransferCallback.ts | 2 +- .../src/hooks/useERC721TokenDetailed.ts | 4 +- .../hooks/useNativeTokenTransferCallback.ts | 2 +- .../hooks/useNativeTokenWrapperCallback.ts | 2 +- .../src/hooks/useStableTokensDebank.ts | 3 +- packages/web3-shared/src/pipes/index.ts | 3 +- .../src/utils/formatter.ts} | 0 packages/web3-shared/src/utils/index.ts | 215 +----------------- .../src/utils/number.ts | 0 packages/web3-shared/src/utils/token.ts | 212 +++++++++++++++++ packages/web3-shared/tsconfig.json | 2 +- pnpm-lock.yaml | 4 +- 109 files changed, 564 insertions(+), 488 deletions(-) rename packages/{shared/src/wallet/formatter.tsx => web3-shared/src/utils/formatter.ts} (100%) rename packages/{shared => web3-shared}/src/utils/number.ts (100%) create mode 100644 packages/web3-shared/src/utils/token.ts diff --git a/packages/dashboard/src/pages/Wallets/components/CollectibleList/index.tsx b/packages/dashboard/src/pages/Wallets/components/CollectibleList/index.tsx index 1c44b5b5ab68..a4181aa33f3f 100644 --- a/packages/dashboard/src/pages/Wallets/components/CollectibleList/index.tsx +++ b/packages/dashboard/src/pages/Wallets/components/CollectibleList/index.tsx @@ -2,19 +2,19 @@ import { Dispatch, memo, SetStateAction, useState } from 'react' import { Box, makeStyles, TablePagination } from '@material-ui/core' import { ChainId, + CollectibleProvider, ERC1155TokenAssetDetailed, ERC721TokenAssetDetailed, EthereumTokenType, + formatEthereumAddress, useAccount, useChainId, - useWallet, - CollectibleProvider, useCollectibles, + useWallet, } from '@masknet/web3-shared' import { useCurrentCollectibleDataProvider } from '../../api' import { LoadingPlaceholder } from '../LoadingPlacholder' import { EmptyPlaceholder } from '../EmptyPlaceholder' -import { formatEthereumAddress } from '@masknet/shared' import { CollectibleCard } from '../CollectibleCard' import { useDashboardI18N } from '../../../../locales' diff --git a/packages/dashboard/src/pages/Wallets/components/TokenTable/index.tsx b/packages/dashboard/src/pages/Wallets/components/TokenTable/index.tsx index e5f70cb138c9..68b3cccdbf84 100644 --- a/packages/dashboard/src/pages/Wallets/components/TokenTable/index.tsx +++ b/packages/dashboard/src/pages/Wallets/components/TokenTable/index.tsx @@ -1,25 +1,24 @@ import { Dispatch, memo, SetStateAction, useState } from 'react' import { - Table, - TableContainer, - TableHead, - TableRow, - TableCell, Box, makeStyles, - TableBody, Pagination, PaginationItem, + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, } from '@material-ui/core' import { MaskColorVar } from '@masknet/theme' import { useDashboardI18N } from '../../../../locales' import { EmptyPlaceholder } from '../EmptyPlaceholder' import { LoadingPlaceholder } from '../LoadingPlacholder' import { TokenTableRow } from '../TokenTableRow' -import { formatBalance } from '@masknet/shared' +import { Asset, formatBalance, useAssets, useERC20TokensPaged } from '@masknet/web3-shared' import BigNumber from 'bignumber.js' import { ceil } from 'lodash-es' -import { Asset, useAssets, useERC20TokensPaged } from '@masknet/web3-shared' const useStyles = makeStyles((theme) => ({ container: { diff --git a/packages/dashboard/src/pages/Wallets/components/TokenTableRow/index.tsx b/packages/dashboard/src/pages/Wallets/components/TokenTableRow/index.tsx index 1e34cb91cd47..4662dc051467 100644 --- a/packages/dashboard/src/pages/Wallets/components/TokenTableRow/index.tsx +++ b/packages/dashboard/src/pages/Wallets/components/TokenTableRow/index.tsx @@ -1,8 +1,8 @@ import { memo } from 'react' -import { Box, TableRow, Typography, makeStyles, TableCell, Button } from '@material-ui/core' +import { Box, Button, makeStyles, TableCell, TableRow, Typography } from '@material-ui/core' import { TokenIcon } from '../TokenIcon' -import { formatBalance, formatCurrency, FormattedCurrency, pow10 } from '@masknet/shared' -import { CurrencyType, Asset, getTokenUSDValue } from '@masknet/web3-shared' +import { FormattedCurrency } from '@masknet/shared' +import { Asset, CurrencyType, formatBalance, formatCurrency, getTokenUSDValue, pow10 } from '@masknet/web3-shared' import BigNumber from 'bignumber.js' import { useNavigate } from 'react-router' import { RoutePaths } from '../../../../type' diff --git a/packages/maskbook/src/components/InjectedComponents/ToolboxHint.tsx b/packages/maskbook/src/components/InjectedComponents/ToolboxHint.tsx index b95f58f1c24b..783b1b5d2d0a 100644 --- a/packages/maskbook/src/components/InjectedComponents/ToolboxHint.tsx +++ b/packages/maskbook/src/components/InjectedComponents/ToolboxHint.tsx @@ -1,12 +1,13 @@ -import { makeStyles, Typography, MenuItem } from '@material-ui/core' +import { makeStyles, MenuItem, Typography } from '@material-ui/core' import classNames from 'classnames' import { - useAccount, - useChainId, + formatEthereumAddress, + NetworkType, resolveChainColor, + useAccount, useChainDetailed, + useChainId, useChainIdValid, - NetworkType, } from '@masknet/web3-shared' import FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord' import { MaskbookSharpIconOfSize, WalletSharp } from '../../resources/MaskbookIcon' @@ -27,7 +28,7 @@ import { Flags } from '../../utils/flags' import { useStylesExtends } from '../custom-ui-helper' import { ClaimAllDialog } from '../../plugins/ITO/UI/ClaimAllDialog' import { WalletIcon } from '../shared/WalletIcon' -import { formatEthereumAddress, useValueRef } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' import { useI18N } from '../../utils' import { currentNetworkSettings } from '../../plugins/Wallet/settings' diff --git a/packages/maskbook/src/components/shared/SelectWallet/WalletInList.tsx b/packages/maskbook/src/components/shared/SelectWallet/WalletInList.tsx index 995ed5a217b4..d9829ed557e9 100644 --- a/packages/maskbook/src/components/shared/SelectWallet/WalletInList.tsx +++ b/packages/maskbook/src/components/shared/SelectWallet/WalletInList.tsx @@ -1,17 +1,16 @@ import { Avatar, ListItem, + ListItemAvatar, + ListItemIcon, ListItemText, + ListTypeMap, makeStyles, Theme, - ListTypeMap, - ListItemAvatar, - ListItemIcon, } from '@material-ui/core' import CheckIcon from '@material-ui/icons/Check' import type { DefaultComponentProps } from '@material-ui/core/OverridableComponent' -import { Wallet, useBlockie } from '@masknet/web3-shared' -import { formatEthereumAddress } from '@masknet/shared' +import { formatEthereumAddress, useBlockie, Wallet } from '@masknet/web3-shared' import { useI18N } from '../../../utils' import { useStylesExtends } from '../../custom-ui-helper' diff --git a/packages/maskbook/src/extension/background-script/EthereumServices/tokenList.ts b/packages/maskbook/src/extension/background-script/EthereumServices/tokenList.ts index 64c7b5b3f341..b90c04537c05 100644 --- a/packages/maskbook/src/extension/background-script/EthereumServices/tokenList.ts +++ b/packages/maskbook/src/extension/background-script/EthereumServices/tokenList.ts @@ -1,6 +1,11 @@ import { memoizePromise } from '@dimensiondev/kit' -import { formatEthereumAddress } from '@masknet/shared' -import { EthereumTokenType, ChainId, ERC20TokenDetailed, getChainDetailed } from '@masknet/web3-shared' +import { + ChainId, + ERC20TokenDetailed, + EthereumTokenType, + formatEthereumAddress, + getChainDetailed, +} from '@masknet/web3-shared' interface TokenList { keywords: string[] diff --git a/packages/maskbook/src/extension/options-page/DashboardComponents/CollectibleList/index.tsx b/packages/maskbook/src/extension/options-page/DashboardComponents/CollectibleList/index.tsx index e33281d56dfa..9a757560994b 100644 --- a/packages/maskbook/src/extension/options-page/DashboardComponents/CollectibleList/index.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardComponents/CollectibleList/index.tsx @@ -1,5 +1,5 @@ -import { formatEthereumAddress, useValueRef } from '@masknet/shared' -import { EthereumTokenType, useAccount, Wallet } from '@masknet/web3-shared' +import { useValueRef } from '@masknet/shared' +import { EthereumTokenType, formatEthereumAddress, useAccount, Wallet } from '@masknet/web3-shared' import { Box, Button, makeStyles, Skeleton, TablePagination, Typography } from '@material-ui/core' import { createContext, useState } from 'react' import { useUpdateEffect } from 'react-use' diff --git a/packages/maskbook/src/extension/options-page/DashboardComponents/TokenIcon.tsx b/packages/maskbook/src/extension/options-page/DashboardComponents/TokenIcon.tsx index a8d8eb18ce6a..cd67c707cadb 100644 --- a/packages/maskbook/src/extension/options-page/DashboardComponents/TokenIcon.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardComponents/TokenIcon.tsx @@ -1,5 +1,11 @@ -import { formatEthereumAddress } from '@masknet/shared' -import { ChainId, getChainFullName, getTokenConstants, useBlockie, useChainDetailed } from '@masknet/web3-shared' +import { + ChainId, + formatEthereumAddress, + getChainFullName, + getTokenConstants, + useBlockie, + useChainDetailed, +} from '@masknet/web3-shared' import { Avatar, AvatarProps, makeStyles, Theme } from '@material-ui/core' import { useStylesExtends } from '../../../components/custom-ui-helper' import { useImageFailover } from '../../../utils/hooks/useImageFailover' diff --git a/packages/maskbook/src/extension/options-page/DashboardComponents/TokenInList.tsx b/packages/maskbook/src/extension/options-page/DashboardComponents/TokenInList.tsx index bdec2ad67476..7ae3ecf00e3a 100644 --- a/packages/maskbook/src/extension/options-page/DashboardComponents/TokenInList.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardComponents/TokenInList.tsx @@ -1,6 +1,6 @@ -import { formatEthereumAddress } from '@masknet/shared' import { currySameAddress, + formatEthereumAddress, FungibleTokenDetailed, resolveTokenLinkOnExplorer, useTokenConstants, diff --git a/packages/maskbook/src/extension/options-page/DashboardComponents/WalletAssetsTable.tsx b/packages/maskbook/src/extension/options-page/DashboardComponents/WalletAssetsTable.tsx index e3cc906eddcd..96e46e578665 100644 --- a/packages/maskbook/src/extension/options-page/DashboardComponents/WalletAssetsTable.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardComponents/WalletAssetsTable.tsx @@ -19,24 +19,27 @@ import BigNumber from 'bignumber.js' import classNames from 'classnames' import ExpandLessIcon from '@material-ui/icons/ExpandLess' import ExpandMoreIcon from '@material-ui/icons/ExpandMore' +import type { Asset } from '@masknet/web3-shared' import { CurrencyType, + currySameAddress, EthereumTokenType, - Wallet, - useStableTokensDebank, - useChainDetailed, + formatBalance, + formatCurrency, getChainIdFromName, - currySameAddress, + isGreaterThan, + useAssets, + useChainDetailed, + useStableTokensDebank, + Wallet, } from '@masknet/web3-shared' import { useStylesExtends } from '../../../components/custom-ui-helper' -import { formatBalance, formatCurrency, FormattedCurrency, isGreaterThan } from '@masknet/shared' -import { useMatchXS, useI18N } from '../../../utils' +import { FormattedCurrency } from '@masknet/shared' +import { useI18N, useMatchXS } from '../../../utils' import { TokenIcon } from './TokenIcon' import { ActionsBarFT } from './ActionsBarFT' import { useTrustedERC20TokensFromDB } from '../../../plugins/Wallet/hooks/useERC20Tokens' -import type { Asset } from '../../../plugins/Wallet/types' import { getTokenUSDValue } from '../../../plugins/Wallet/helpers' -import { useAssets } from '../../../plugins/Wallet/hooks/useAssets' const useStyles = makeStyles< Theme, diff --git a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferNFT.tsx b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferNFT.tsx index 48759d1e49d4..c826e53f25af 100644 --- a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferNFT.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferNFT.tsx @@ -2,15 +2,15 @@ import { Button, makeStyles, TextField } from '@material-ui/core' import { useCallback, useContext, useEffect, useMemo, useState } from 'react' import { EthereumAddress } from 'wallet.ts' import { - useTokenTransferCallback, - TransactionStateType, ERC1155TokenAssetDetailed, ERC721TokenAssetDetailed, + formatEthereumAddress, + TransactionStateType, + useTokenTransferCallback, } from '@masknet/web3-shared' -import { useRemoteControlledDialog, useI18N } from '../../../../utils' +import { useI18N, useRemoteControlledDialog } from '../../../../utils' import { Image } from '../../../../components/shared/Image' import { WalletMessages } from '../../../../plugins/Wallet/messages' -import { formatEthereumAddress } from '@masknet/shared' import { MaskbookIconOutlined } from '../../../../resources/MaskbookIcon' import { CollectibleContext } from '../../DashboardComponents/CollectibleList' import { DashboardDialogCore, DashboardDialogWrapper, WrappedDialogProps } from '../Base' diff --git a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferTab.tsx b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferTab.tsx index ee84a3bcdb4c..7069d161b75e 100644 --- a/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferTab.tsx +++ b/packages/maskbook/src/extension/options-page/DashboardDialogs/Wallet/TransferTab.tsx @@ -2,16 +2,20 @@ import { Button, makeStyles, TextField } from '@material-ui/core' import BigNumber from 'bignumber.js' import { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react' import { EthereumAddress } from 'wallet.ts' -import { formatBalance, formatEthereumAddress, isGreaterThan, isZero, pow10 } from '@masknet/shared' import { - Wallet, + EthereumTokenType, + formatBalance, + formatEthereumAddress, + FungibleTokenDetailed, + isGreaterThan, + isZero, + pow10, + TransactionStateType, useTokenBalance, useTokenTransferCallback, - TransactionStateType, - FungibleTokenDetailed, - EthereumTokenType, + Wallet, } from '@masknet/web3-shared' -import { useRemoteControlledDialog, useI18N } from '../../../../utils' +import { useI18N, useRemoteControlledDialog } from '../../../../utils' import { WalletMessages } from '../../../../plugins/Wallet/messages' import { TokenAmountPanel } from '../../../../web3/UI/TokenAmountPanel' diff --git a/packages/maskbook/src/plugins/Airdrop/SNSAdaptor/AirdropClaimCard.tsx b/packages/maskbook/src/plugins/Airdrop/SNSAdaptor/AirdropClaimCard.tsx index 713db6fc9d64..01fbdf5c02bb 100644 --- a/packages/maskbook/src/plugins/Airdrop/SNSAdaptor/AirdropClaimCard.tsx +++ b/packages/maskbook/src/plugins/Airdrop/SNSAdaptor/AirdropClaimCard.tsx @@ -6,10 +6,17 @@ import { useStylesExtends } from '../../../components/custom-ui-helper' import { usePostLink } from '../../../components/DataSource/usePostInfo' import { AirdropIcon } from '../../../resources/AirdropIcon' import { activatedSocialNetworkUI } from '../../../social-network' -import { useRemoteControlledDialog } from '../../../utils/hooks/useRemoteControlledDialog' -import { useAccount, TransactionStateType, ERC20TokenDetailed, useChainId } from '@masknet/web3-shared' +import { useRemoteControlledDialog } from '../../../utils' +import { + ERC20TokenDetailed, + formatPercentage, + isZero, + pow10, + TransactionStateType, + useAccount, + useChainId, +} from '@masknet/web3-shared' import { WalletMessages } from '../../Wallet/messages' -import { formatPercentage, isZero, pow10 } from '@masknet/shared' import { useAirdropPacket } from '../hooks/useAirdropPacket' import { useClaimCallback } from '../hooks/useClaimCallback' import { CheckStateType, useCheckCallback } from '../hooks/useCheckCallback' diff --git a/packages/maskbook/src/plugins/Airdrop/hooks/useCheckCallback.ts b/packages/maskbook/src/plugins/Airdrop/hooks/useCheckCallback.ts index 6facaa147b5c..304c0cdee117 100644 --- a/packages/maskbook/src/plugins/Airdrop/hooks/useCheckCallback.ts +++ b/packages/maskbook/src/plugins/Airdrop/hooks/useCheckCallback.ts @@ -1,7 +1,7 @@ import BigNumber from 'bignumber.js' import { useCallback, useState } from 'react' import { EthereumAddress } from 'wallet.ts' -import { formatEthereumAddress, isGreaterThan, ONE } from '@masknet/shared' +import { formatEthereumAddress, isGreaterThan, ONE } from '@masknet/web3-shared' import type { AirdropPacket } from '../apis' import { useAirdropContract } from '../contracts/useAirdropContract' import { AirdropRPC } from '../messages' diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx index 2db3932c6107..875c7a80eaa6 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx @@ -1,6 +1,7 @@ import { Avatar, Link, makeStyles, TableCell, TableRow, Typography } from '@material-ui/core' import LinkIcon from '@material-ui/icons/Link' -import { formatBalance, FormattedBalance } from '@masknet/shared' +import { FormattedBalance } from '@masknet/shared' +import { formatBalance } from '@masknet/web3-shared' import { formatElapsed } from '../../../Wallet/formatter' import BigNumber from 'bignumber.js' import { useMemo } from 'react' diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByHighestBidCard.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByHighestBidCard.tsx index 1ac30edae710..c0a9a9a2fb1f 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByHighestBidCard.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByHighestBidCard.tsx @@ -1,7 +1,15 @@ -import { useState, useMemo, useCallback, useEffect } from 'react' +import { useCallback, useEffect, useMemo, useState } from 'react' import { useSnackbar } from '@masknet/theme' -import { makeStyles, Card, CardContent, CardActions } from '@material-ui/core' -import { FungibleTokenDetailed, EthereumTokenType, useAccount, TokenWatched, isNative } from '@masknet/web3-shared' +import { Card, CardActions, CardContent, makeStyles } from '@material-ui/core' +import { + EthereumTokenType, + FungibleTokenDetailed, + isLessThan, + isNative, + isZero, + TokenWatched, + useAccount, +} from '@masknet/web3-shared' import { format as formatDateTime } from 'date-fns' import { useI18N } from '../../../utils' import { ActionButtonPromise } from '../../../extension/options-page/DashboardComponents/ActionButton' @@ -11,7 +19,6 @@ import { DateTimePanel } from '../../../web3/UI/DateTimePanel' import type { useAsset } from '../hooks/useAsset' import { PluginCollectibleRPC } from '../messages' import { toAsset, toUnixTimestamp } from '../helpers' -import { isLessThan, isZero } from '@masknet/shared' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByPriceCard.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByPriceCard.tsx index 9a277237f3c4..d47c27caa8fa 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByPriceCard.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingByPriceCard.tsx @@ -1,18 +1,26 @@ -import { ChangeEvent, useState, useMemo, useCallback, useEffect } from 'react' +import { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react' import { EthereumAddress } from 'wallet.ts' import { useSnackbar } from '@masknet/theme' import { - makeStyles, Box, - Checkbox, Card, - CardContent, CardActions, + CardContent, + Checkbox, FormControlLabel, - Typography, + makeStyles, TextField, + Typography, } from '@material-ui/core' -import { FungibleTokenDetailed, EthereumTokenType, useAccount, TokenWatched, isNative } from '@masknet/web3-shared' +import { + EthereumTokenType, + FungibleTokenDetailed, + isGreaterThan, + isNative, + isZero, + TokenWatched, + useAccount, +} from '@masknet/web3-shared' import { format as formatDateTime } from 'date-fns' import { useI18N } from '../../../utils' import { ActionButtonPromise } from '../../../extension/options-page/DashboardComponents/ActionButton' @@ -22,7 +30,6 @@ import { DateTimePanel } from '../../../web3/UI/DateTimePanel' import { PluginCollectibleRPC } from '../messages' import { toAsset, toUnixTimestamp } from '../helpers' import type { useAsset } from '../hooks/useAsset' -import { isGreaterThan, isZero } from '@masknet/shared' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingTab.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingTab.tsx index 5152699353cf..7c6ecd7331af 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingTab.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/ListingTab.tsx @@ -8,8 +8,7 @@ import { OrderRow } from './OrderRow' import { TableListPagination } from './Pagination' import { CollectibleProvider } from '../types' import { LoadingTable } from './LoadingTable' -import { useAccount } from '@masknet/web3-shared' -import { isZero } from '@masknet/shared' +import { isZero, useAccount } from '@masknet/web3-shared' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OfferTab.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OfferTab.tsx index be9ad81958e8..fdb18808dcdb 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OfferTab.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OfferTab.tsx @@ -8,8 +8,7 @@ import { OrderRow } from './OrderRow' import { TableListPagination } from './Pagination' import { CollectibleProvider } from '../types' import { LoadingTable } from './LoadingTable' -import { useAccount } from '@masknet/web3-shared' -import { isZero } from '@masknet/shared' +import { isZero, useAccount } from '@masknet/web3-shared' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OrderRow.tsx b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OrderRow.tsx index c5a774d50ad2..f772d80a6f56 100644 --- a/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OrderRow.tsx +++ b/packages/maskbook/src/plugins/Collectible/SNSAdaptor/OrderRow.tsx @@ -2,11 +2,10 @@ import { Avatar, Link, makeStyles, TableCell, TableRow, Typography } from '@mate import { CollectibleProvider, NFTOrder } from '../types' import formatDistanceToNow from 'date-fns/formatDistanceToNow' import BigNumber from 'bignumber.js' -import { resolveAddressLinkOnExplorer } from '@masknet/web3-shared' -import { ChainId } from '@masknet/web3-shared' +import { ChainId, isZero, resolveAddressLinkOnExplorer } from '@masknet/web3-shared' import { CollectibleState } from '../hooks/useCollectibleState' import { Account } from './Account' -import { FormattedBalance, isZero } from '@masknet/shared' +import { FormattedBalance } from '@masknet/shared' const useStyles = makeStyles((theme) => { return { diff --git a/packages/maskbook/src/plugins/Collectible/helpers.ts b/packages/maskbook/src/plugins/Collectible/helpers.ts index 7f200b804083..fbca561b3266 100644 --- a/packages/maskbook/src/plugins/Collectible/helpers.ts +++ b/packages/maskbook/src/plugins/Collectible/helpers.ts @@ -1,11 +1,10 @@ import type { Asset, OpenSeaFungibleToken, WyvernSchemaName } from 'opensea-js/lib/types' import BigNumber from 'bignumber.js' -import { createERC20Token, createNativeToken, ChainId } from '@masknet/web3-shared' -import { createTypedMessageMetadataReader, createRenderWithMetadata } from '../../protocols/typed-message' +import { ChainId, createERC20Token, createNativeToken, pow10 } from '@masknet/web3-shared' +import { createRenderWithMetadata, createTypedMessageMetadataReader } from '../../protocols/typed-message' import { PLUGIN_META_KEY, RaribleIPFSURL } from './constants' import type { CollectibleJSON_Payload, CollectibleToken } from './types' import schema from './schema.json' -import { pow10 } from '@masknet/shared' export const CollectibleMetadataReader = createTypedMessageMetadataReader( PLUGIN_META_KEY, diff --git a/packages/maskbook/src/plugins/Collectible/utils.ts b/packages/maskbook/src/plugins/Collectible/utils.ts index ec8a02d2cceb..52f542876008 100644 --- a/packages/maskbook/src/plugins/Collectible/utils.ts +++ b/packages/maskbook/src/plugins/Collectible/utils.ts @@ -7,8 +7,7 @@ import { raribleHostnames, rariblePathnameRegexMatcher, } from './constants' -import { formatBalance } from '@masknet/shared' -import { ChainId } from '@masknet/web3-shared' +import { ChainId, formatBalance } from '@masknet/web3-shared' export function checkUrl(url: string): boolean { const protocol = 'https://' diff --git a/packages/maskbook/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx b/packages/maskbook/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx index 772d93e4f37f..5bd87681614e 100644 --- a/packages/maskbook/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx +++ b/packages/maskbook/src/plugins/Gitcoin/SNSAdaptor/DonateDialog.tsx @@ -1,7 +1,8 @@ -import { formatBalance, pow10 } from '@masknet/shared' import { EthereumTokenType, + formatBalance, FungibleTokenDetailed, + pow10, TransactionStateType, useAccount, useChainId, diff --git a/packages/maskbook/src/plugins/ITO/UI/ClaimAllDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/ClaimAllDialog.tsx index a54a1decd26c..490be17cbd64 100644 --- a/packages/maskbook/src/plugins/ITO/UI/ClaimAllDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/ClaimAllDialog.tsx @@ -1,11 +1,11 @@ import { useCallback, useEffect } from 'react' -import { uniq, flatten } from 'lodash-es' +import { flatten, uniq } from 'lodash-es' import formatDateTime from 'date-fns/format' import { useSnackbar, VariantType } from '@masknet/theme' -import { formatBalance, FormattedBalance } from '@masknet/shared' -import { makeStyles, DialogContent, CircularProgress, Typography, List, ListItem } from '@material-ui/core' -import { TransactionStateType, resolveTransactionLinkOnExplorer, useChainId } from '@masknet/web3-shared' -import { useRemoteControlledDialog, useI18N } from '../../../utils' +import { FormattedBalance } from '@masknet/shared' +import { CircularProgress, DialogContent, List, ListItem, makeStyles, Typography } from '@material-ui/core' +import { formatBalance, resolveTransactionLinkOnExplorer, TransactionStateType, useChainId } from '@masknet/web3-shared' +import { useI18N, useRemoteControlledDialog } from '../../../utils' import { InjectedDialog } from '../../../components/shared/InjectedDialog' import { useClaimAll } from '../hooks/useClaimAll' import { WalletMessages } from '../../Wallet/messages' diff --git a/packages/maskbook/src/plugins/ITO/UI/CompositionDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/CompositionDialog.tsx index f76c1929943b..08ac4a6bc3df 100644 --- a/packages/maskbook/src/plugins/ITO/UI/CompositionDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/CompositionDialog.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useState } from 'react' import Web3Utils from 'web3-utils' import { DialogContent } from '@material-ui/core' -import { formatBalance, usePortalShadowRoot } from '@masknet/shared' +import { usePortalShadowRoot } from '@masknet/shared' import { useI18N, useRemoteControlledDialog } from '../../../utils' import { InjectedDialog, InjectedDialogProps } from '../../../components/shared/InjectedDialog' import { ITO_MetaKey, MSG_DELIMITER } from '../constants' @@ -13,10 +13,10 @@ import { payloadOutMask } from '../helpers' import { PoolList } from './PoolList' import { PluginITO_RPC } from '../messages' import Services from '../../../extension/service' -import { useChainId, useAccount, TransactionStateType } from '@masknet/web3-shared' +import { formatBalance, TransactionStateType, useAccount, useChainId } from '@masknet/web3-shared' import { PoolSettings, useFillCallback } from '../hooks/useFill' import { ConfirmDialog } from './ConfirmDialog' -import { currentGasPriceSettings, currentGasNowSettings } from '../../Wallet/settings' +import { currentGasNowSettings, currentGasPriceSettings } from '../../Wallet/settings' import { useITO_ContractAddress } from '../contracts/useITO_ContractAddress' import { WalletMessages } from '../../Wallet/messages' diff --git a/packages/maskbook/src/plugins/ITO/UI/ConfirmDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/ConfirmDialog.tsx index 02cd803da8f9..8955846c82ce 100644 --- a/packages/maskbook/src/plugins/ITO/UI/ConfirmDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/ConfirmDialog.tsx @@ -1,7 +1,10 @@ -import { formatAmountPrecision, formatBalance, FormattedAddress, FormattedBalance, ONE } from '@masknet/shared' +import { FormattedAddress, FormattedBalance } from '@masknet/shared' import { + formatAmountPrecision, + formatBalance, FungibleTokenDetailed, isNative, + ONE, resolveAddressLinkOnExplorer, resolveTokenLinkOnExplorer, useChainId, diff --git a/packages/maskbook/src/plugins/ITO/UI/CreateForm.tsx b/packages/maskbook/src/plugins/ITO/UI/CreateForm.tsx index 5721d6ec9cae..530190425007 100644 --- a/packages/maskbook/src/plugins/ITO/UI/CreateForm.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/CreateForm.tsx @@ -1,7 +1,10 @@ -import { formatAmount, formatBalance, isGreaterThan, isZero } from '@masknet/shared' import { ERC20TokenDetailed, EthereumTokenType, + formatAmount, + formatBalance, + isGreaterThan, + isZero, useAccount, useITOConstants, useTokenBalance, diff --git a/packages/maskbook/src/plugins/ITO/UI/ITO.tsx b/packages/maskbook/src/plugins/ITO/UI/ITO.tsx index 49536613146c..5783374db589 100644 --- a/packages/maskbook/src/plugins/ITO/UI/ITO.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/ITO.tsx @@ -1,14 +1,19 @@ -import { formatAmountPrecision, formatBalance, formatEthereumAddress, isZero, pow10, ZERO } from '@masknet/shared' import { + formatAmountPrecision, + formatBalance, + formatEthereumAddress, FungibleTokenDetailed, getChainDetailed, isSameAddress, + isZero, + pow10, resolveLinkOnExplorer, TransactionStateType, useAccount, useChainId, useChainIdValid, useTokenConstants, + ZERO, } from '@masknet/web3-shared' import { Box, Card, Grid, Link, makeStyles, Theme, Typography } from '@material-ui/core' import OpenInNewIcon from '@material-ui/icons/OpenInNew' diff --git a/packages/maskbook/src/plugins/ITO/UI/ITO_Card.tsx b/packages/maskbook/src/plugins/ITO/UI/ITO_Card.tsx index 281efd24fdd3..ceb9e6539f70 100644 --- a/packages/maskbook/src/plugins/ITO/UI/ITO_Card.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/ITO_Card.tsx @@ -1,5 +1,4 @@ -import { formatBalance } from '@masknet/shared' -import { ERC20TokenDetailed, TransactionStateType } from '@masknet/web3-shared' +import { ERC20TokenDetailed, formatBalance, TransactionStateType } from '@masknet/web3-shared' import { Alert, Box, Skeleton, Typography } from '@material-ui/core' import { makeStyles } from '@material-ui/core/styles' import { useCallback, useEffect } from 'react' diff --git a/packages/maskbook/src/plugins/ITO/UI/PoolInList.tsx b/packages/maskbook/src/plugins/ITO/UI/PoolInList.tsx index 6235f59e7c1f..3032d8c0bf93 100644 --- a/packages/maskbook/src/plugins/ITO/UI/PoolInList.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/PoolInList.tsx @@ -1,5 +1,13 @@ -import { formatBalance, FormattedBalance, isZero, pow10 } from '@masknet/shared' -import { getChainDetailed, isSameAddress, useAccount, useTokenConstants } from '@masknet/web3-shared' +import { FormattedBalance } from '@masknet/shared' +import { + formatBalance, + getChainDetailed, + isSameAddress, + isZero, + pow10, + useAccount, + useTokenConstants, +} from '@masknet/web3-shared' import { Box, Card, diff --git a/packages/maskbook/src/plugins/ITO/UI/ShareDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/ShareDialog.tsx index 460c33ae6242..4e1ddea2ce4c 100644 --- a/packages/maskbook/src/plugins/ITO/UI/ShareDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/ShareDialog.tsx @@ -1,9 +1,9 @@ import { useCallback } from 'react' -import { makeStyles, Typography, Box } from '@material-ui/core' -import { formatBalance, isZero } from '@masknet/shared' -import { useI18N, getAssetAsBlobURL } from '../../../utils' +import { Box, makeStyles, Typography } from '@material-ui/core' +import { getAssetAsBlobURL, useI18N } from '../../../utils' import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { formatBalance, isZero } from '@masknet/web3-shared' import { useStylesExtends } from '../../../components/custom-ui-helper' import type { BigNumber } from 'bignumber.js' diff --git a/packages/maskbook/src/plugins/ITO/UI/SwapDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/SwapDialog.tsx index 90c43fcc27b7..5ca5fcf4eaa0 100644 --- a/packages/maskbook/src/plugins/ITO/UI/SwapDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/SwapDialog.tsx @@ -1,22 +1,24 @@ -import { useState, useMemo, useCallback, useEffect } from 'react' +import { useCallback, useEffect, useMemo, useState } from 'react' import BigNumber from 'bignumber.js' import { v4 as uuid } from 'uuid' -import { makeStyles, Typography, Slider, CircularProgress } from '@material-ui/core' -import { formatBalance, pow10, ZERO } from '@masknet/shared' +import { CircularProgress, makeStyles, Slider, Typography } from '@material-ui/core' -import { useRemoteControlledDialog, useI18N } from '../../../utils' +import { useI18N, useRemoteControlledDialog } from '../../../utils' import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton' import { - FungibleTokenDetailed, + ChainId, + currySameAddress, ERC20TokenDetailed, EthereumTokenType, - ChainId, - TransactionStateType, - useTokenBalance, + formatBalance, + FungibleTokenDetailed, + isNative, + pow10, resolveTransactionLinkOnExplorer, + TransactionStateType, useChainId, - isNative, - currySameAddress, + useTokenBalance, + ZERO, } from '@masknet/web3-shared' import { SelectTokenDialogEvent, WalletMessages, WalletRPC } from '../../Wallet/messages' import { TokenAmountPanel } from '../../../web3/UI/TokenAmountPanel' diff --git a/packages/maskbook/src/plugins/ITO/UI/SwapGuide.tsx b/packages/maskbook/src/plugins/ITO/UI/SwapGuide.tsx index 84f3332a8a36..9acc665aa2af 100644 --- a/packages/maskbook/src/plugins/ITO/UI/SwapGuide.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/SwapGuide.tsx @@ -1,5 +1,4 @@ -import { ZERO } from '@masknet/shared' -import { ERC20TokenDetailed, EthereumTokenType, useAccount, useChainId } from '@masknet/web3-shared' +import { ERC20TokenDetailed, EthereumTokenType, useAccount, useChainId, ZERO } from '@masknet/web3-shared' import { DialogContent, makeStyles } from '@material-ui/core' import BigNumber from 'bignumber.js' import { useCallback, useEffect, useMemo, useState, useTransition } from 'react' diff --git a/packages/maskbook/src/plugins/ITO/UI/UnlockDialog.tsx b/packages/maskbook/src/plugins/ITO/UI/UnlockDialog.tsx index dcf1cfc7bd4d..2f36122e7a94 100644 --- a/packages/maskbook/src/plugins/ITO/UI/UnlockDialog.tsx +++ b/packages/maskbook/src/plugins/ITO/UI/UnlockDialog.tsx @@ -2,15 +2,18 @@ import { Link, makeStyles, Typography } from '@material-ui/core' import BigNumber from 'bignumber.js' import { useCallback, useState } from 'react' import { v4 as uuid } from 'uuid' -import { formatBalance, FormattedAddress, isGreaterThan, pow10 } from '@masknet/shared' -import { useRemoteControlledDialog, useI18N } from '../../../utils' +import { FormattedAddress } from '@masknet/shared' +import { useI18N, useRemoteControlledDialog } from '../../../utils' import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton' import { - useChainId, - useTokenBalance, - resolveAddressLinkOnExplorer, ERC20TokenDetailed, EthereumTokenType, + formatBalance, + isGreaterThan, + pow10, + resolveAddressLinkOnExplorer, + useChainId, + useTokenBalance, } from '@masknet/web3-shared' import { EthereumERC20TokenApprovedBoundary } from '../../../web3/UI/EthereumERC20TokenApprovedBoundary' import { EthereumWalletConnectedBoundary } from '../../../web3/UI/EthereumWalletConnectedBoundary' diff --git a/packages/maskbook/src/plugins/ITO/define.tsx b/packages/maskbook/src/plugins/ITO/define.tsx index d0cc0ab0eb50..2f78a721ae9f 100644 --- a/packages/maskbook/src/plugins/ITO/define.tsx +++ b/packages/maskbook/src/plugins/ITO/define.tsx @@ -1,5 +1,5 @@ import { makeStyles } from '@material-ui/core' -import { formatBalance, formatEthereumAddress } from '@masknet/shared' +import { formatBalance, formatEthereumAddress } from '@masknet/web3-shared' import { PostInspector } from './UI/PostInspector' import { PluginConfig, PluginScope, PluginStage } from '../types' import { ITO_MetaKey, ITO_PluginID } from './constants' diff --git a/packages/maskbook/src/plugins/ITO/hooks/useClaimCallback.ts b/packages/maskbook/src/plugins/ITO/hooks/useClaimCallback.ts index 8ce8339550e4..34ba8375aa08 100644 --- a/packages/maskbook/src/plugins/ITO/hooks/useClaimCallback.ts +++ b/packages/maskbook/src/plugins/ITO/hooks/useClaimCallback.ts @@ -2,16 +2,16 @@ import { useCallback } from 'react' import stringify from 'json-stable-stringify' import type { NonPayableTx } from '@masknet/contracts/types/types' import { + isZero, TransactionEventType, TransactionStateType, useAccount, useChainId, - useTransactionState, useGasPrice, useNonce, + useTransactionState, } from '@masknet/web3-shared' import { useITO_Contract } from '../contracts/useITO_Contract' -import { isZero } from '@masknet/shared' export function useClaimCallback(pids: string[], contractAddress?: string) { const nonce = useNonce() diff --git a/packages/maskbook/src/plugins/ITO/hooks/useFill.ts b/packages/maskbook/src/plugins/ITO/hooks/useFill.ts index 8d3a09c59fea..80eb4d152bb4 100644 --- a/packages/maskbook/src/plugins/ITO/hooks/useFill.ts +++ b/packages/maskbook/src/plugins/ITO/hooks/useFill.ts @@ -5,22 +5,24 @@ import BigNumber from 'bignumber.js' import Web3Utils from 'web3-utils' import type { ITO } from '@masknet/contracts/types/ITO' import type { NonPayableTx } from '@masknet/contracts/types/types' +import type { ERC20TokenDetailed, FungibleTokenDetailed, TransactionState } from '@masknet/web3-shared' import { + isGreaterThan, + ONE, + pow10, TransactionEventType, TransactionStateType, useAccount, useChainId, - useTransactionState, useGasPrice, useNonce, + useTransactionState, useWeb3, } from '@masknet/web3-shared' import { useITO_Contract } from '../contracts/useITO_Contract' -import type { FungibleTokenDetailed, ERC20TokenDetailed, TransactionState } from '@masknet/web3-shared' import { gcd, sortTokens } from '../helpers' -import { ITO_CONTRACT_BASE_TIMESTAMP, MSG_DELIMITER, FAKE_SIGN_PASSWORD } from '../constants' +import { FAKE_SIGN_PASSWORD, ITO_CONTRACT_BASE_TIMESTAMP, MSG_DELIMITER } from '../constants' import type { AdvanceSettingData } from '../UI/AdvanceSetting' -import { isGreaterThan, ONE, pow10 } from '@masknet/shared' import { useI18N } from '../../../utils/i18n-next-ui' export interface PoolSettings { diff --git a/packages/maskbook/src/plugins/ITO/hooks/useSwapCallback.ts b/packages/maskbook/src/plugins/ITO/hooks/useSwapCallback.ts index 9ce77a8caf30..0ee34c295674 100644 --- a/packages/maskbook/src/plugins/ITO/hooks/useSwapCallback.ts +++ b/packages/maskbook/src/plugins/ITO/hooks/useSwapCallback.ts @@ -1,10 +1,10 @@ import type { ITO } from '@masknet/contracts/types/ITO' import type { PayableTx } from '@masknet/contracts/types/types' -import { isZero } from '@masknet/shared' import { currySameAddress, EthereumTokenType, FungibleTokenDetailed, + isZero, TransactionEventType, TransactionStateType, useAccount, diff --git a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacket.tsx b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacket.tsx index 9c689ec20e50..21d96327eeeb 100644 --- a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacket.tsx +++ b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacket.tsx @@ -1,6 +1,6 @@ -import { formatBalance } from '@masknet/shared' import { ChainId, + formatBalance, getChainIdFromName, isDAI, isOKB, @@ -24,7 +24,7 @@ import { WalletMessages } from '../../Wallet/messages' import { useAvailabilityComputed } from './hooks/useAvailabilityComputed' import { useClaimCallback } from './hooks/useClaimCallback' import { useRefundCallback } from './hooks/useRefundCallback' -import type { RedPacketJSONPayload, RedPacketAvailability } from '../types' +import type { RedPacketAvailability, RedPacketJSONPayload } from '../types' import { RedPacketStatus } from '../types' const useStyles = makeStyles((theme) => ({ diff --git a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketForm.tsx b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketForm.tsx index 520b769551f1..1aec6c6de17b 100644 --- a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketForm.tsx +++ b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketForm.tsx @@ -1,9 +1,12 @@ -import { formatBalance, isGreaterThan, isZero, pow10 } from '@masknet/shared' import { EthereumTokenType, + formatBalance, FungibleTokenDetailed, getChainName, + isGreaterThan, + isZero, NetworkType, + pow10, TransactionStateType, useAccount, useChainId, diff --git a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketInHistoryList.tsx b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketInHistoryList.tsx index 4de68a13243f..74cdc26f9949 100644 --- a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketInHistoryList.tsx +++ b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/RedPacketInHistoryList.tsx @@ -1,13 +1,12 @@ import { useCallback, useEffect } from 'react' import BigNumber from 'bignumber.js' import classNames from 'classnames' -import { ListItem, makeStyles, Theme, Typography, Box } from '@material-ui/core' +import { Box, ListItem, makeStyles, Theme, Typography } from '@material-ui/core' import { Trans } from 'react-i18next' -import { RedPacketJSONPayload, RedPacketHistory, RedPacketStatus } from '../types' +import { RedPacketHistory, RedPacketJSONPayload, RedPacketStatus } from '../types' import { useRemoteControlledDialog } from '../../../utils/hooks/useRemoteControlledDialog' import { useI18N } from '../../../utils/i18n-next-ui' -import { formatBalance } from '@masknet/shared' -import { useAccount, TransactionStateType } from '@masknet/web3-shared' +import { formatBalance, TransactionStateType, useAccount } from '@masknet/web3-shared' import { TokenIcon } from '../../../extension/options-page/DashboardComponents/TokenIcon' import { dateTimeFormat } from '../../ITO/assets/formatDate' import ActionButton from '../../../extension/options-page/DashboardComponents/ActionButton' diff --git a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/hooks/useCreateCallback.ts b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/hooks/useCreateCallback.ts index 7c4f99ff91ad..2cd601d00dc7 100644 --- a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/hooks/useCreateCallback.ts +++ b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/hooks/useCreateCallback.ts @@ -1,9 +1,9 @@ import type { HappyRedPacketV2 } from '@masknet/contracts/types/HappyRedPacketV2' import type { PayableTx } from '@masknet/contracts/types/types' -import { isLessThan } from '@masknet/shared' import { EthereumTokenType, FungibleTokenDetailed, + isLessThan, TransactionEventType, TransactionStateType, useAccount, diff --git a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/index.tsx b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/index.tsx index 5944510e39a4..a330432e696b 100644 --- a/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/index.tsx +++ b/packages/maskbook/src/plugins/RedPacket/SNSAdaptor/index.tsx @@ -1,6 +1,5 @@ import type { Plugin } from '@masknet/plugin-infra' -import { formatBalance } from '@masknet/shared' -import { EthereumTokenType, getChainDetailed, getChainIdFromName } from '@masknet/web3-shared' +import { EthereumTokenType, formatBalance, getChainDetailed, getChainIdFromName } from '@masknet/web3-shared' import MaskbookPluginWrapper from '../../MaskbookPluginWrapper' import { base } from '../base' import { RedPacketMetaKey } from '../constants' diff --git a/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/InformationCard.tsx b/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/InformationCard.tsx index 7be6cd2f7977..b164b76cc699 100644 --- a/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/InformationCard.tsx +++ b/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/InformationCard.tsx @@ -1,5 +1,5 @@ -import { formatEthereumAddress } from '@masknet/shared' import { + formatEthereumAddress, resolveAddressLinkOnExplorer, resolveBlockLinkOnExplorer, resolveIPFSLink, diff --git a/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/VotesCard.tsx b/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/VotesCard.tsx index d43be400fbe2..c4ba3941b61f 100644 --- a/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/VotesCard.tsx +++ b/packages/maskbook/src/plugins/Snapshot/SNSAdaptor/VotesCard.tsx @@ -1,5 +1,4 @@ -import { formatEthereumAddress } from '@masknet/shared' -import { resolveAddressLinkOnExplorer, resolveIPFSLink, useChainId } from '@masknet/web3-shared' +import { formatEthereumAddress, resolveAddressLinkOnExplorer, resolveIPFSLink, useChainId } from '@masknet/web3-shared' import { Avatar, Badge, Box, Link, List, ListItem, makeStyles, Typography } from '@material-ui/core' import classNames from 'classnames' import millify from 'millify' diff --git a/packages/maskbook/src/plugins/Trader/UI/balancer/TradeRoute.tsx b/packages/maskbook/src/plugins/Trader/UI/balancer/TradeRoute.tsx index 3bd80a2e1edc..e4ee21426beb 100644 --- a/packages/maskbook/src/plugins/Trader/UI/balancer/TradeRoute.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/balancer/TradeRoute.tsx @@ -3,15 +3,15 @@ import { Breadcrumbs, makeStyles, Paper, - TableContainer, Table, + TableBody, + TableCell, + TableContainer, TableHead, TableRow, - TableCell, - TableBody, } from '@material-ui/core' import NavigateNextIcon from '@material-ui/icons/NavigateNext' -import { formatPercentage } from '@masknet/shared' +import { formatPercentage } from '@masknet/web3-shared' import { useI18N } from '../../../../utils' import { useStylesExtends } from '../../../../components/custom-ui-helper' import type { SwapResponse, TradeComputed } from '../../types' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/ConfirmDialog.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/ConfirmDialog.tsx index ddf9cdd4d2fd..c0804a9f929e 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/ConfirmDialog.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/ConfirmDialog.tsx @@ -1,5 +1,5 @@ -import { useState, useEffect } from 'react' -import { Button, makeStyles, DialogActions, DialogContent, Typography } from '@material-ui/core' +import { useEffect, useState } from 'react' +import { Button, DialogActions, DialogContent, makeStyles, Typography } from '@material-ui/core' import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward' import type BigNumber from 'bignumber.js' import { useStylesExtends } from '../../../../components/custom-ui-helper' @@ -8,8 +8,8 @@ import { TokenPanel } from './TokenPanel' import { PriceStaleWarnning } from './PriceStaleWarnning' import type { TradeComputed, TradeProvider } from '../../types' import { InjectedDialog } from '../../../../components/shared/InjectedDialog' -import { formatBalance } from '@masknet/shared' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { formatBalance } from '@masknet/web3-shared' const useStyles = makeStyles((theme) => ({ reverseIcon: { diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/SlippageSlider.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/SlippageSlider.tsx index a47bfe9c878b..f6ffc3bb3c29 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/SlippageSlider.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/SlippageSlider.tsx @@ -1,6 +1,6 @@ import { Slider } from '@material-ui/core' -import { formatPercentage } from '@masknet/shared' -import { SLIPPAGE_TOLERANCE_DEFAULT, SLIPPAGE_TOLERANCE_MIN, SLIPPAGE_TOLERANCE_MAX } from '../../constants' +import { formatPercentage } from '@masknet/web3-shared' +import { SLIPPAGE_TOLERANCE_DEFAULT, SLIPPAGE_TOLERANCE_MAX, SLIPPAGE_TOLERANCE_MIN } from '../../constants' import { toBips } from '../../helpers' export interface SlippageSliderProps { diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/TokenPanel.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/TokenPanel.tsx index 8514b648542f..399b9d372359 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/TokenPanel.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/TokenPanel.tsx @@ -1,7 +1,7 @@ -import { formatBalance } from '@masknet/shared' +import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { formatBalance } from '@masknet/web3-shared' import { Box, makeStyles, Theme, Typography } from '@material-ui/core' import { TokenIcon } from '../../../../extension/options-page/DashboardComponents/TokenIcon' -import type { FungibleTokenDetailed } from '@masknet/web3-shared' export interface TokenPanelProps { amount: string diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/TradeForm.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/TradeForm.tsx index b281460f245c..d60653f38e72 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/TradeForm.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/TradeForm.tsx @@ -2,20 +2,19 @@ import { useMemo } from 'react' import classNames from 'classnames' import { noop } from 'lodash-es' import BigNumber from 'bignumber.js' -import { makeStyles, Typography, IconButton } from '@material-ui/core' +import { IconButton, makeStyles, Typography } from '@material-ui/core' import ArrowDownwardIcon from '@material-ui/icons/ArrowDownward' import TuneIcon from '@material-ui/icons/Tune' import RefreshOutlined from '@material-ui/icons/RefreshOutlined' import { useStylesExtends } from '../../../../components/custom-ui-helper' import ActionButton from '../../../../extension/options-page/DashboardComponents/ActionButton' -import { TradeStrategy, TokenPanelType, TradeComputed, WarningLevel, TradeProvider } from '../../types' +import { TokenPanelType, TradeComputed, TradeProvider, TradeStrategy, WarningLevel } from '../../types' import { TokenAmountPanel } from '../../../../web3/UI/TokenAmountPanel' -import { useRemoteControlledDialog, useI18N } from '../../../../utils' -import { FungibleTokenDetailed, EthereumTokenType } from '@masknet/web3-shared' +import { useI18N, useRemoteControlledDialog } from '../../../../utils' +import { EthereumTokenType, formatPercentage, FungibleTokenDetailed, isLessThan, pow10 } from '@masknet/web3-shared' import { currentSlippageTolerance } from '../../settings' import { PluginTraderMessages } from '../../messages' import { isNativeTokenWrapper, toBips } from '../../helpers' -import { formatPercentage, isLessThan, pow10 } from '@masknet/shared' import { resolveUniswapWarningLevel } from '../../pipes' import { EthereumWalletConnectedBoundary } from '../../../../web3/UI/EthereumWalletConnectedBoundary' import { EthereumERC20TokenApprovedBoundary } from '../../../../web3/UI/EthereumERC20TokenApprovedBoundary' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/TradeSummary.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/TradeSummary.tsx index 839d47d1d2d1..20da9438f69f 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/TradeSummary.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/TradeSummary.tsx @@ -1,18 +1,18 @@ -import { useState, useContext } from 'react' +import { useContext, useState } from 'react' import BigNumber from 'bignumber.js' import { - makeStyles, - Paper, + IconButton, List, ListItem, - ListItemText, ListItemSecondaryAction, + ListItemText, + makeStyles, + Paper, Typography, - IconButton, } from '@material-ui/core' import LoopIcon from '@material-ui/icons/Loop' -import { formatBalance, formatPercentage, isGreaterThan, pow10 } from '@masknet/shared' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { formatBalance, formatPercentage, isGreaterThan, pow10 } from '@masknet/web3-shared' import { ONE_BIPS } from '../../constants' import { useStylesExtends } from '../../../../components/custom-ui-helper' import { SwapQuoteResponse, TradeComputed, TradeProvider, TradeStrategy } from '../../types' diff --git a/packages/maskbook/src/plugins/Trader/UI/trader/Trader.tsx b/packages/maskbook/src/plugins/Trader/UI/trader/Trader.tsx index 6bb2ea9ac9f2..0d3023766dc5 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trader/Trader.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trader/Trader.tsx @@ -1,4 +1,4 @@ -import { useState, useContext, useCallback, useEffect, useRef } from 'react' +import { useCallback, useContext, useEffect, useRef, useState } from 'react' import { useAsyncRetry, useTimeoutFn } from 'react-use' import { makeStyles } from '@material-ui/core' import type { Trade } from '@uniswap/sdk' @@ -9,6 +9,7 @@ import { createERC20Token, createNativeToken, EthereumTokenType, + formatBalance, FungibleTokenDetailed, TransactionStateType, useChainId, @@ -20,8 +21,7 @@ import { TradeRoute as BalancerTradeRoute } from '../balancer/TradeRoute' import { TradeSummary } from '../trader/TradeSummary' import { ConfirmDialog } from './ConfirmDialog' import { TradeActionType } from '../../trader/useTradeState' -import { SwapResponse, TokenPanelType, TradeComputed, TradeProvider, Coin } from '../../types' -import { formatBalance } from '@masknet/shared' +import { Coin, SwapResponse, TokenPanelType, TradeComputed, TradeProvider } from '../../types' import { TradePairViewer } from '../uniswap/TradePairViewer' import { useTradeCallback } from '../../trader/useTradeCallback' import { useTradeStateComputed } from '../../trader/useTradeStateComputed' diff --git a/packages/maskbook/src/plugins/Trader/UI/trending/LBPPanel.tsx b/packages/maskbook/src/plugins/Trader/UI/trending/LBPPanel.tsx index d5b5872ccbce..98fd92391c81 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trending/LBPPanel.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trending/LBPPanel.tsx @@ -1,6 +1,5 @@ -import { formatEthereumAddress } from '@masknet/shared' import type { ERC20TokenDetailed } from '@masknet/web3-shared' -import { useTokenConstants } from '@masknet/web3-shared' +import { formatEthereumAddress, useTokenConstants } from '@masknet/web3-shared' import { Button, CircularProgress, IconButton, Link, makeStyles, Theme, Typography } from '@material-ui/core' import RefreshIcon from '@material-ui/icons/Refresh' import { useStylesExtends } from '../../../../components/custom-ui-helper' diff --git a/packages/maskbook/src/plugins/Trader/UI/trending/TickersTable.tsx b/packages/maskbook/src/plugins/Trader/UI/trending/TickersTable.tsx index 9fbe7cebe0ae..588662e08493 100644 --- a/packages/maskbook/src/plugins/Trader/UI/trending/TickersTable.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/trending/TickersTable.tsx @@ -1,18 +1,19 @@ import { - TableContainer, - Table, + Link, makeStyles, - Theme, + Table, + TableBody, + TableCell, + TableContainer, TableHead, TableRow, - TableCell, - TableBody, - Link, + Theme, Typography, } from '@material-ui/core' -import { formatEthereumAddress, FormattedCurrency } from '@masknet/shared' +import { FormattedCurrency } from '@masknet/shared' +import { formatEthereumAddress } from '@masknet/web3-shared' import { useI18N } from '../../../../utils' -import { Ticker, DataProvider } from '../../types' +import { DataProvider, Ticker } from '../../types' import { formatElapsed } from '../../../Wallet/formatter' const useStyles = makeStyles((theme: Theme) => ({ diff --git a/packages/maskbook/src/plugins/Trader/UI/uniswap/TradeRoute.tsx b/packages/maskbook/src/plugins/Trader/UI/uniswap/TradeRoute.tsx index a3315ec79562..cb8061cc457e 100644 --- a/packages/maskbook/src/plugins/Trader/UI/uniswap/TradeRoute.tsx +++ b/packages/maskbook/src/plugins/Trader/UI/uniswap/TradeRoute.tsx @@ -1,9 +1,9 @@ -import { Box, Breadcrumbs, Typography, makeStyles, Paper, AvatarGroup } from '@material-ui/core' +import { AvatarGroup, Box, Breadcrumbs, makeStyles, Paper, Typography } from '@material-ui/core' import NavigateNextIcon from '@material-ui/icons/NavigateNext' import { TokenIcon } from '../../../../extension/options-page/DashboardComponents/TokenIcon' import { useStylesExtends } from '../../../../components/custom-ui-helper' import type { TradeComputed } from '../../types' -import { formatEthereumAddress } from '@masknet/shared' +import { formatEthereumAddress } from '@masknet/web3-shared' const useStyles = makeStyles((theme) => ({ root: { diff --git a/packages/maskbook/src/plugins/Trader/apis/balancer/index.ts b/packages/maskbook/src/plugins/Trader/apis/balancer/index.ts index 8fd5bedc5e70..22bc3c7926cd 100644 --- a/packages/maskbook/src/plugins/Trader/apis/balancer/index.ts +++ b/packages/maskbook/src/plugins/Trader/apis/balancer/index.ts @@ -1,7 +1,6 @@ import { SOR } from '@balancer-labs/sor' import { JsonRpcProvider } from '@ethersproject/providers' -import { ZERO } from '@masknet/shared' -import { ChainId, getChainDetailed, getTraderConstants, isSameAddress } from '@masknet/web3-shared' +import { ChainId, getChainDetailed, getTraderConstants, isSameAddress, ZERO } from '@masknet/web3-shared' import BigNumber from 'bignumber.js' import { first, memoize } from 'lodash-es' import { currentChainIdSettings } from '../../../Wallet/settings' diff --git a/packages/maskbook/src/plugins/Trader/apis/uniswap/index.ts b/packages/maskbook/src/plugins/Trader/apis/uniswap/index.ts index 0b3ab8b5a2dc..ee6abeffd7fb 100644 --- a/packages/maskbook/src/plugins/Trader/apis/uniswap/index.ts +++ b/packages/maskbook/src/plugins/Trader/apis/uniswap/index.ts @@ -1,23 +1,23 @@ import BigNumber from 'bignumber.js' import type { Coin, Currency, Stat } from '../../types' +import type { Pair } from '../uniswap-v2-subgraph' import { - fetchTokensByKeyword, - fetchTokenData, + fetchEtherPriceByBlockNumber, + fetchEtherPricesByBlockNumbers, + fetchPairData, fetchPairsBulk, fetchPairsHistoricalBulk, - fetchPairData, fetchPricesByBlocks, - fetchEtherPricesByBlockNumbers, - fetchEtherPriceByBlockNumber, + fetchTokenData, + fetchTokensByKeyword, } from '../uniswap-v2-subgraph' -import type { Pair } from '../uniswap-v2-subgraph' import { fetchBlockNumberByTimestamp, fetchBlockNumbersByTimestamps, fetchBlockNumbersObjectByTimestamps, } from '../blocks' import { fetchLatestBlocks } from '../uniswap-health' -import { isGreaterThan } from '@masknet/shared' +import { isGreaterThan } from '@masknet/web3-shared' type Value = string | number | BigNumber | undefined diff --git a/packages/maskbook/src/plugins/Trader/constants/trader.ts b/packages/maskbook/src/plugins/Trader/constants/trader.ts index 717c407eec9e..f706d6060f01 100644 --- a/packages/maskbook/src/plugins/Trader/constants/trader.ts +++ b/packages/maskbook/src/plugins/Trader/constants/trader.ts @@ -1,6 +1,5 @@ import BigNumber from 'bignumber.js' -import { ChainId, ERC20TokenDetailed, createERC20Tokens, getChainDetailed } from '@masknet/web3-shared' -import { ONE } from '@masknet/shared' +import { ChainId, createERC20Tokens, ERC20TokenDetailed, getChainDetailed, ONE } from '@masknet/web3-shared' export const USDC = createERC20Tokens('USDC_ADDRESS', 'USD Coin', 'USDC', 6) export const USDT = createERC20Tokens('USDT_ADDRESS', 'Tether USD', 'USDT', 6) diff --git a/packages/maskbook/src/plugins/Trader/helpers/uniswap.ts b/packages/maskbook/src/plugins/Trader/helpers/uniswap.ts index 0e55cbbfd1ca..72328593853d 100644 --- a/packages/maskbook/src/plugins/Trader/helpers/uniswap.ts +++ b/packages/maskbook/src/plugins/Trader/helpers/uniswap.ts @@ -1,16 +1,21 @@ import BigNumber from 'bignumber.js' import { - Token as UniswapToken, ChainId as UniswapChainId, Currency as UniswapCurrency, CurrencyAmount as UniswapCurrencyAmount, + JSBI, Percent as UniswapPercent, Price as UniswapPrice, - JSBI, + Token as UniswapToken, TokenAmount, } from '@uniswap/sdk' -import { formatEthereumAddress } from '@masknet/shared' -import { ChainId, EthereumTokenType, FungibleTokenDetailed, isNative } from '@masknet/web3-shared' +import { + ChainId, + EthereumTokenType, + formatEthereumAddress, + FungibleTokenDetailed, + isNative, +} from '@masknet/web3-shared' import { WETH } from '../constants' export function toUniswapChainId(chainId: ChainId): UniswapChainId { diff --git a/packages/maskbook/src/plugins/Trader/trader/0x/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/0x/useTradeComputed.ts index e8797b584138..6a6a545453d1 100644 --- a/packages/maskbook/src/plugins/Trader/trader/0x/useTradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/0x/useTradeComputed.ts @@ -1,8 +1,8 @@ import BigNumber from 'bignumber.js' import { useMemo } from 'react' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { ZERO } from '@masknet/web3-shared' import type { SwapQuoteResponse, TradeComputed, TradeStrategy } from '../../types' -import { ZERO } from '@masknet/shared' export function useTradeComputed( trade: SwapQuoteResponse | null, diff --git a/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeAmount.ts b/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeAmount.ts index 7406837bee6f..6cb74fb696b8 100644 --- a/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeAmount.ts +++ b/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeAmount.ts @@ -1,4 +1,4 @@ -import { ZERO } from '@masknet/shared' +import { ZERO } from '@masknet/web3-shared' import BigNumber from 'bignumber.js' import { useMemo } from 'react' import { ONE_BIPS, SLIPPAGE_TOLERANCE_DEFAULT } from '../../constants' diff --git a/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeComputed.ts index 5e3dc5d0a051..daf253f5a15c 100644 --- a/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/balancer/useTradeComputed.ts @@ -1,8 +1,8 @@ import { useMemo } from 'react' import BigNumber from 'bignumber.js' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { ZERO } from '@masknet/web3-shared' import { SwapResponse, TradeComputed, TradeStrategy } from '../../types' -import { ZERO } from '@masknet/shared' const MIN_VALUE = new BigNumber('1e-5') diff --git a/packages/maskbook/src/plugins/Trader/trader/native/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/native/useTradeComputed.ts index cad17e72eada..06fdb4ed9d61 100644 --- a/packages/maskbook/src/plugins/Trader/trader/native/useTradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/native/useTradeComputed.ts @@ -1,8 +1,7 @@ import { useMemo } from 'react' import BigNumber from 'bignumber.js' -import { FungibleTokenDetailed, EthereumTokenType } from '@masknet/web3-shared' +import { EthereumTokenType, FungibleTokenDetailed, ZERO } from '@masknet/web3-shared' import { TradeComputed, TradeStrategy } from '../../types' -import { ZERO } from '@masknet/shared' export interface NativeTokenWrapper { /** diff --git a/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2Trade.ts b/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2Trade.ts index 8a4b5acb3ebb..9cc6a9e48310 100644 --- a/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2Trade.ts +++ b/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2Trade.ts @@ -1,12 +1,11 @@ import { useMemo } from 'react' -import { Trade, Pair } from '@uniswap/sdk' -import { toUniswapCurrencyAmount, toUniswapCurrency } from '../../helpers' -import { useChainId } from '@masknet/web3-shared' +import { Pair, Trade } from '@uniswap/sdk' +import { toUniswapCurrency, toUniswapCurrencyAmount } from '../../helpers' +import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { isGreaterThan, isZero, useChainId } from '@masknet/web3-shared' import { TradeStrategy } from '../../types' import { useAllCommonPairs } from './useAllCommonPairs' -import type { FungibleTokenDetailed } from '@masknet/web3-shared' import { MAX_HOP } from '../../constants' -import { isGreaterThan, isZero } from '@masknet/shared' export function useV2Trade( strategy: TradeStrategy = TradeStrategy.ExactIn, diff --git a/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2TradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2TradeComputed.ts index 248111c1a635..dcf423c6f865 100644 --- a/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2TradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/uniswap/useV2TradeComputed.ts @@ -1,10 +1,10 @@ import { Trade, TradeType } from '@uniswap/sdk' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { ZERO } from '@masknet/web3-shared' import { uniswapCurrencyAmountTo, uniswapPercentTo, uniswapPriceTo, uniswapTokenTo } from '../../helpers' import { TradeComputed, TradeStrategy } from '../../types' import { useSlippageTolerance } from './useSlippageTolerance' import { useV2TradeBreakdown } from './useV2TradeBreakdown' -import { ZERO } from '@masknet/shared' export function useV2TradeComputed( trade: Trade | null, diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeApproveComputed.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeApproveComputed.ts index 8cc43a5be24a..5b685eeb5ded 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeApproveComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeApproveComputed.ts @@ -1,7 +1,6 @@ import { useContext, useMemo } from 'react' -import { useChainId, createERC20Token, FungibleTokenDetailed, EthereumTokenType } from '@masknet/web3-shared' +import { createERC20Token, EthereumTokenType, FungibleTokenDetailed, useChainId, ZERO } from '@masknet/web3-shared' import { SwapQuoteResponse, TradeComputed, TradeProvider } from '../types' -import { ZERO } from '@masknet/shared' import { TradeContext } from './useTradeContext' export function useTradeApproveComputed(trade: TradeComputed | null, token?: FungibleTokenDetailed) { diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts index 51e6fb2451d6..57bee96886e5 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts @@ -1,6 +1,7 @@ import { useContext } from 'react' import BigNumber from 'bignumber.js' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { pow10 } from '@masknet/web3-shared' import { TradeProvider, TradeStrategy } from '../types' import { useTrade as useNativeTokenTrade } from './native/useTrade' import { useTradeComputed as useNativeTokenTradeComputed } from './native/useTradeComputed' @@ -11,7 +12,6 @@ import { useTradeComputed as useBalancerTradeComputed } from './balancer/useTrad import { useTrade as useZrxTrade } from './0x/useTrade' import { useTrade as useBalancerTrade } from './balancer/useTrade' import { unreachable } from '@dimensiondev/kit' -import { pow10 } from '@masknet/shared' import { TradeContext } from './useTradeContext' export function useTradeComputed( diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeStateComputed.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeStateComputed.ts index 08792146eedb..4981fa9aa64a 100644 --- a/packages/maskbook/src/plugins/Trader/trader/useTradeStateComputed.ts +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeStateComputed.ts @@ -1,4 +1,4 @@ -import { formatBalance } from '@masknet/shared' +import { formatBalance } from '@masknet/web3-shared' import { TradeProvider, TradeStrategy } from '../types' import { useTradeComputed } from './useTradeComputed' import { useTradeState } from './useTradeState' diff --git a/packages/maskbook/src/plugins/Transak/hooks/useTransakURL.ts b/packages/maskbook/src/plugins/Transak/hooks/useTransakURL.ts index fea6ffd7a82b..340ffb2833fe 100644 --- a/packages/maskbook/src/plugins/Transak/hooks/useTransakURL.ts +++ b/packages/maskbook/src/plugins/Transak/hooks/useTransakURL.ts @@ -2,7 +2,7 @@ import { useMemo } from 'react' import { rgbToHex, useTheme } from '@material-ui/core' import stringify from 'json-stable-stringify' import { TRANSAK_API_KEY_PRODUCTION, TRANSAK_API_KEY_STAGING } from '../constants' -import { formatEthereumAddress } from '@masknet/shared' +import { formatEthereumAddress } from '@masknet/web3-shared' import type { TransakConfig } from '../types' const ENV = { diff --git a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/GasNowDialog.tsx b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/GasNowDialog.tsx index 270d74f5cfe1..6664d9df1cf2 100644 --- a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/GasNowDialog.tsx +++ b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/GasNowDialog.tsx @@ -1,5 +1,5 @@ -import { formatWeiToGwei, useValueRef } from '@masknet/shared' -import { EthereumTokenType, GasNow } from '@masknet/web3-shared' +import { useValueRef } from '@masknet/shared' +import { EthereumTokenType, formatWeiToGwei, GasNow } from '@masknet/web3-shared' import { DialogContent, List, ListItem, makeStyles, Skeleton, TextField, Theme, Typography } from '@material-ui/core' import FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord' import BigNumber from 'bignumber.js' diff --git a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/WalletStatusDialog/RecentTransactionList.tsx b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/WalletStatusDialog/RecentTransactionList.tsx index 27ef00f630d9..e40a854a8232 100644 --- a/packages/maskbook/src/plugins/Wallet/SNSAdaptor/WalletStatusDialog/RecentTransactionList.tsx +++ b/packages/maskbook/src/plugins/Wallet/SNSAdaptor/WalletStatusDialog/RecentTransactionList.tsx @@ -1,8 +1,13 @@ -import { XCircle, Check } from 'react-feather' -import { makeStyles, List, ListItem, Typography, Link, Button, Box, CircularProgress } from '@material-ui/core' +import { Check, XCircle } from 'react-feather' +import { Box, Button, CircularProgress, Link, List, ListItem, makeStyles, Typography } from '@material-ui/core' import OpenInNewIcon from '@material-ui/icons/OpenInNew' -import { formatKeccakHash } from '@masknet/shared' -import { useAccount, useChainId, TransactionStatusType, resolveTransactionLinkOnExplorer } from '@masknet/web3-shared' +import { + formatKeccakHash, + resolveTransactionLinkOnExplorer, + TransactionStatusType, + useAccount, + useChainId, +} from '@masknet/web3-shared' import { useI18N } from '../../../../utils' import { useRecentTransactions } from '../../hooks/useRecentTransactions' import { useSnackbarCallback } from '../../../../extension/options-page/DashboardDialogs/Base' diff --git a/packages/maskbook/src/plugins/Wallet/services/assets.ts b/packages/maskbook/src/plugins/Wallet/services/assets.ts index 3f90f877de61..e19a8864d59a 100644 --- a/packages/maskbook/src/plugins/Wallet/services/assets.ts +++ b/packages/maskbook/src/plugins/Wallet/services/assets.ts @@ -1,4 +1,3 @@ -import { formatEthereumAddress, pow10 } from '@masknet/shared' import { unreachable } from '@dimensiondev/kit' import { ChainId, @@ -8,9 +7,11 @@ import { createNativeToken, CurrencyType, EthereumTokenType, + formatEthereumAddress, getChainDetailed, getChainIdFromName, getTokenConstants, + pow10, } from '@masknet/web3-shared' import BigNumber from 'bignumber.js' import { values } from 'lodash-es' diff --git a/packages/maskbook/src/plugins/Wallet/services/erc1155.ts b/packages/maskbook/src/plugins/Wallet/services/erc1155.ts index ada952df3787..a8d7ccf48c75 100644 --- a/packages/maskbook/src/plugins/Wallet/services/erc1155.ts +++ b/packages/maskbook/src/plugins/Wallet/services/erc1155.ts @@ -2,9 +2,9 @@ import { createTransaction } from '../../../database/helpers/openDB' import { createWalletDBAccess } from '../database/Wallet.db' import { WalletMessages } from '../messages' import { assert } from '../../../utils/utils' -import { formatEthereumAddress } from '@masknet/shared' -import { WalletRecordIntoDB, ERC1155TokenRecordIntoDB, getWalletByAddress } from './helpers' import type { ERC1155TokenDetailed } from '@masknet/web3-shared' +import { formatEthereumAddress } from '@masknet/web3-shared' +import { ERC1155TokenRecordIntoDB, getWalletByAddress, WalletRecordIntoDB } from './helpers' export async function getERC1155Tokens() { const t = createTransaction(await createWalletDBAccess(), 'readonly')('ERC1155Token', 'Wallet') diff --git a/packages/maskbook/src/plugins/Wallet/services/erc20.ts b/packages/maskbook/src/plugins/Wallet/services/erc20.ts index c334f10b7b7c..1cc5086ff10a 100644 --- a/packages/maskbook/src/plugins/Wallet/services/erc20.ts +++ b/packages/maskbook/src/plugins/Wallet/services/erc20.ts @@ -4,10 +4,9 @@ import { createTransaction } from '../../../database/helpers/openDB' import { createWalletDBAccess } from '../database/Wallet.db' import { WalletMessages } from '../messages' import { assert } from '../../../utils/utils' -import { formatEthereumAddress } from '@masknet/shared' -import { WalletRecordIntoDB, ERC20TokenRecordIntoDB, getWalletByAddress } from './helpers' +import { ERC20TokenRecordIntoDB, getWalletByAddress, WalletRecordIntoDB } from './helpers' import type { ERC20TokenRecord } from '../database/types' -import { ERC20TokenDetailed, isSameAddress } from '@masknet/web3-shared' +import { ERC20TokenDetailed, formatEthereumAddress, isSameAddress } from '@masknet/web3-shared' import { queryTransactionPaged } from '../../../database/helpers/pagination' export async function getERC20TokensCount() { diff --git a/packages/maskbook/src/plugins/Wallet/services/erc721.ts b/packages/maskbook/src/plugins/Wallet/services/erc721.ts index 6e189c62c7b6..51cf10455096 100644 --- a/packages/maskbook/src/plugins/Wallet/services/erc721.ts +++ b/packages/maskbook/src/plugins/Wallet/services/erc721.ts @@ -1,13 +1,17 @@ import Fuse from 'fuse.js' import { EthereumAddress } from 'wallet.ts' import { omit } from 'lodash-es' -import { ERC721TokenAssetDetailed, ERC721TokenDetailed, isSameAddress } from '@masknet/web3-shared' +import { + ERC721TokenAssetDetailed, + ERC721TokenDetailed, + formatEthereumAddress, + isSameAddress, +} from '@masknet/web3-shared' import { createTransaction } from '../../../database/helpers/openDB' import { createWalletDBAccess } from '../database/Wallet.db' import { WalletMessages } from '../messages' import { assert } from '../../../utils/utils' -import { formatEthereumAddress } from '@masknet/shared' -import { WalletRecordIntoDB, ERC721TokenRecordIntoDB, getWalletByAddress, ERC721TokenRecordOutDB } from './helpers' +import { ERC721TokenRecordIntoDB, ERC721TokenRecordOutDB, getWalletByAddress, WalletRecordIntoDB } from './helpers' import type { ERC721TokenRecord } from '../database/types' import { queryTransactionPaged } from '../../../database/helpers/pagination' diff --git a/packages/maskbook/src/plugins/Wallet/services/helpers.ts b/packages/maskbook/src/plugins/Wallet/services/helpers.ts index d2633236863f..400d5fd78ef3 100644 --- a/packages/maskbook/src/plugins/Wallet/services/helpers.ts +++ b/packages/maskbook/src/plugins/Wallet/services/helpers.ts @@ -2,21 +2,20 @@ import { omit } from 'lodash-es' import type { IDBPSafeTransaction } from '../../../database/helpers/openDB' import type { WalletDB } from '../database/Wallet.db' import type { - WalletRecord, + ERC1155TokenRecord, + ERC1155TokenRecordInDatabase, ERC20TokenRecord, - WalletRecordInDatabase, ERC20TokenRecordInDatabase, ERC721TokenRecord, ERC721TokenRecordInDatabase, - ERC1155TokenRecord, - ERC1155TokenRecordInDatabase, PhraseRecord, PhraseRecordInDatabase, TransactionChunkRecord, TransactionChunkRecordInDatabase, + WalletRecord, + WalletRecordInDatabase, } from '../database/types' -import { ChainId, getChainIdFromName } from '@masknet/web3-shared' -import { formatEthereumAddress } from '@masknet/shared' +import { ChainId, formatEthereumAddress, getChainIdFromName } from '@masknet/web3-shared' export async function getWalletByAddress(t: IDBPSafeTransaction, address: string) { const record = await t.objectStore('Wallet').get(formatEthereumAddress(address)) diff --git a/packages/maskbook/src/plugins/Wallet/services/recentTransactions.ts b/packages/maskbook/src/plugins/Wallet/services/recentTransactions.ts index 916c224e9679..ffd48ec19f40 100644 --- a/packages/maskbook/src/plugins/Wallet/services/recentTransactions.ts +++ b/packages/maskbook/src/plugins/Wallet/services/recentTransactions.ts @@ -1,5 +1,4 @@ -import { formatEthereumAddress } from '@masknet/shared' -import { isSameAddress, TransactionStateType, TransactionStatusType } from '@masknet/web3-shared' +import { formatEthereumAddress, isSameAddress, TransactionStateType, TransactionStatusType } from '@masknet/web3-shared' import { createTransaction } from '../../../database/helpers/openDB' import { getTransactionReceipt } from '../../../extension/background-script/EthereumService' import type { TransactionRecord } from '../database/types' diff --git a/packages/maskbook/src/plugins/Wallet/services/transactions.ts b/packages/maskbook/src/plugins/Wallet/services/transactions.ts index 9265cc8789ef..22781e0d4004 100644 --- a/packages/maskbook/src/plugins/Wallet/services/transactions.ts +++ b/packages/maskbook/src/plugins/Wallet/services/transactions.ts @@ -2,16 +2,16 @@ import { isNil } from 'lodash-es' import BigNumber from 'bignumber.js' import { DebankTransactionDirection, - Transaction, - ZerionTransactionItem, + HistoryResponse, PortfolioProvider, + Transaction, ZerionRBDTransactionType, + ZerionTransactionItem, ZerionTransactionStatus, - HistoryResponse, } from '../types' import * as DeBankAPI from '../apis/debank' import * as ZerionApi from '../apis/zerion' -import { pow10 } from '@masknet/shared' +import { pow10 } from '@masknet/web3-shared' export async function getTransactionList( address: string, diff --git a/packages/maskbook/src/plugins/Wallet/services/wallet.ts b/packages/maskbook/src/plugins/Wallet/services/wallet.ts index 32a6ecbedc03..b29c94681d96 100644 --- a/packages/maskbook/src/plugins/Wallet/services/wallet.ts +++ b/packages/maskbook/src/plugins/Wallet/services/wallet.ts @@ -1,14 +1,13 @@ import * as bip39 from 'bip39' -import { HDKey, EthereumAddress } from 'wallet.ts' +import { EthereumAddress, HDKey } from 'wallet.ts' import { BigNumber } from 'bignumber.js' import { ec as EC } from 'elliptic' import { createTransaction } from '../../../database/helpers/openDB' import { createWalletDBAccess } from '../database/Wallet.db' import type { WalletRecord } from '../database/types' import { WalletMessages } from '../messages' -import { buf2hex, hex2buf, assert } from '../../../utils/utils' -import { currySameAddress, ProviderType, resolveProviderName } from '@masknet/web3-shared' -import { formatEthereumAddress } from '@masknet/shared' +import { assert, buf2hex, hex2buf } from '../../../utils/utils' +import { currySameAddress, formatEthereumAddress, ProviderType, resolveProviderName } from '@masknet/web3-shared' import { getWalletByAddress, WalletRecordIntoDB, WalletRecordOutDB } from './helpers' import { currentAccountSettings, currentProviderSettings } from '../settings' import { HD_PATH_WITHOUT_INDEX_ETHEREUM } from '../constants' diff --git a/packages/maskbook/src/plugins/dHEDGE/UI/InvestDialog.tsx b/packages/maskbook/src/plugins/dHEDGE/UI/InvestDialog.tsx index 8646623f30ed..fd83cec7c68b 100644 --- a/packages/maskbook/src/plugins/dHEDGE/UI/InvestDialog.tsx +++ b/packages/maskbook/src/plugins/dHEDGE/UI/InvestDialog.tsx @@ -1,7 +1,9 @@ -import { formatBalance, isZero, pow10 } from '@masknet/shared' import { EthereumTokenType, + formatBalance, FungibleTokenDetailed, + isZero, + pow10, TransactionStateType, useAccount, useTokenBalance, diff --git a/packages/maskbook/src/plugins/dHEDGE/UI/PoolStats.tsx b/packages/maskbook/src/plugins/dHEDGE/UI/PoolStats.tsx index 8091d8219c38..609335380b24 100644 --- a/packages/maskbook/src/plugins/dHEDGE/UI/PoolStats.tsx +++ b/packages/maskbook/src/plugins/dHEDGE/UI/PoolStats.tsx @@ -1,13 +1,13 @@ import { useState } from 'react' import type { Pool } from '../types' -import { makeStyles, Typography, Grid, Divider } from '@material-ui/core' +import { Divider, Grid, makeStyles, Typography } from '@material-ui/core' import { Trans } from 'react-i18next' import { formatAmountPostfix } from '../utils' import { MaskColorVar } from '@masknet/theme' import DOMPurify from 'isomorphic-dompurify' import { POOL_DESCRIPTION_LIMIT } from '../constants' import BigNumber from 'bignumber.js' -import { formatBalance } from '@masknet/shared' +import { formatBalance } from '@masknet/web3-shared' const DIGIT_LENGTH = 18 diff --git a/packages/maskbook/src/plugins/hooks/usePriceLineChart.ts b/packages/maskbook/src/plugins/hooks/usePriceLineChart.ts index 323d992627f3..e303e796b7e3 100644 --- a/packages/maskbook/src/plugins/hooks/usePriceLineChart.ts +++ b/packages/maskbook/src/plugins/hooks/usePriceLineChart.ts @@ -1,6 +1,6 @@ import type { RefObject } from 'react' import type { Dimension } from './useDimension' -import { formatCurrency } from '@masknet/shared' +import { formatCurrency } from '@masknet/web3-shared' import { useLineChart } from './useLineChart' export function usePriceLineChart( diff --git a/packages/maskbook/src/web3/UI/EthereumAccountButton.tsx b/packages/maskbook/src/web3/UI/EthereumAccountButton.tsx index 2d9179f9d65c..616c2a771419 100644 --- a/packages/maskbook/src/web3/UI/EthereumAccountButton.tsx +++ b/packages/maskbook/src/web3/UI/EthereumAccountButton.tsx @@ -1,7 +1,8 @@ import { useCallback } from 'react' import classNames from 'classnames' -import { formatEthereumAddress, FormattedBalance } from '@masknet/shared' +import { FormattedBalance } from '@masknet/shared' import { + formatEthereumAddress, resolveChainColor, useAccount, useChainDetailed, diff --git a/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx b/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx index fcd6de71cce9..3353e69c8bf7 100644 --- a/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx +++ b/packages/maskbook/src/web3/UI/EthereumERC20TokenApprovedBoundary.tsx @@ -1,16 +1,16 @@ import React, { useCallback, useEffect } from 'react' import { useSnackbar } from '@masknet/theme' import { Grid, makeStyles } from '@material-ui/core' -import { formatBalance } from '@masknet/shared' -import { unreachable } from '@dimensiondev/kit' -import { useI18N } from '../../utils' -import ActionButton from '../../extension/options-page/DashboardComponents/ActionButton' import { ApproveStateType, ERC20TokenDetailed, + formatBalance, TransactionStateType, useERC20TokenApproveCallback, } from '@masknet/web3-shared' +import { unreachable } from '@dimensiondev/kit' +import { useI18N } from '../../utils' +import ActionButton from '../../extension/options-page/DashboardComponents/ActionButton' const useStyles = makeStyles((theme) => ({ button: { diff --git a/packages/maskbook/src/web3/UI/EthereumWalletConnectedBoundary.tsx b/packages/maskbook/src/web3/UI/EthereumWalletConnectedBoundary.tsx index 3ce66af957f6..dc2fc8006833 100644 --- a/packages/maskbook/src/web3/UI/EthereumWalletConnectedBoundary.tsx +++ b/packages/maskbook/src/web3/UI/EthereumWalletConnectedBoundary.tsx @@ -1,13 +1,13 @@ import { Grid, makeStyles } from '@material-ui/core' import classNames from 'classnames' import { useCallback } from 'react' -import { isZero, useValueRef } from '@masknet/shared' +import { useValueRef } from '@masknet/shared' import ActionButton from '../../extension/options-page/DashboardComponents/ActionButton' import Services from '../../extension/service' import { WalletMessages } from '../../plugins/Wallet/messages' import { currentIsMetamaskLockedSettings, currentProviderSettings } from '../../plugins/Wallet/settings' -import { useRemoteControlledDialog, useI18N } from '../../utils' -import { ProviderType, useAccount, useChainIdValid, useNativeTokenBalance } from '@masknet/web3-shared' +import { useI18N, useRemoteControlledDialog } from '../../utils' +import { isZero, ProviderType, useAccount, useChainIdValid, useNativeTokenBalance } from '@masknet/web3-shared' import { useStylesExtends } from '../../components/custom-ui-helper' const useStyles = makeStyles((theme) => ({ diff --git a/packages/maskbook/src/web3/UI/TokenAmountPanel.tsx b/packages/maskbook/src/web3/UI/TokenAmountPanel.tsx index 40dc9b3ec46b..8d0820074a32 100644 --- a/packages/maskbook/src/web3/UI/TokenAmountPanel.tsx +++ b/packages/maskbook/src/web3/UI/TokenAmountPanel.tsx @@ -1,10 +1,11 @@ -import { useCallback, ChangeEvent, useMemo } from 'react' -import { makeStyles, TextField, Typography, Box, Chip, InputProps, ChipProps, TextFieldProps } from '@material-ui/core' +import { ChangeEvent, useCallback, useMemo } from 'react' +import { Box, Chip, ChipProps, InputProps, makeStyles, TextField, TextFieldProps, Typography } from '@material-ui/core' import classNames from 'classnames' import { SelectTokenChip, SelectTokenChipProps } from './SelectTokenChip' -import { formatBalance, FormattedBalance } from '@masknet/shared' -import { useStylesExtends } from '../../components/custom-ui-helper' +import { FormattedBalance } from '@masknet/shared' import type { FungibleTokenDetailed } from '@masknet/web3-shared' +import { formatBalance } from '@masknet/web3-shared' +import { useStylesExtends } from '../../components/custom-ui-helper' import { useI18N } from '../../utils' const MIN_AMOUNT_LENGTH = 1 diff --git a/packages/maskbook/src/web3/UI/TxFeeEstimation.tsx b/packages/maskbook/src/web3/UI/TxFeeEstimation.tsx index 41196b7c8cbb..9c2ec7347e33 100644 --- a/packages/maskbook/src/web3/UI/TxFeeEstimation.tsx +++ b/packages/maskbook/src/web3/UI/TxFeeEstimation.tsx @@ -1,13 +1,22 @@ -import { Grid, Paper, Typography, makeStyles, useTheme } from '@material-ui/core' +import { Grid, makeStyles, Paper, Typography, useTheme } from '@material-ui/core' import { useI18N, useRemoteControlledDialog } from '../../utils' import { Image } from '../../components/shared/Image' import { useAssets } from '../../plugins/Wallet/hooks/useAssets' import { WalletMessages } from '../../plugins/Wallet/messages' import { useStylesExtends } from '../../components/custom-ui-helper' -import { useValueRef, formatWeiToGwei, formatBalance } from '@masknet/shared' -import { GasNow, ChainId, useGasPrice, EthereumTokenType, getChainDetailed, useChainId } from '@masknet/web3-shared' +import { useValueRef } from '@masknet/shared' +import { + ChainId, + EthereumTokenType, + formatBalance, + formatWeiToGwei, + GasNow, + getChainDetailed, + useChainId, + useGasPrice, +} from '@masknet/web3-shared' import { currentGasNowSettings } from '../../plugins/Wallet/settings' -import { useState, useCallback, useMemo } from 'react' +import { useCallback, useMemo, useState } from 'react' const useStyles = makeStyles(() => {}) diff --git a/packages/shared/package.json b/packages/shared/package.json index 390720b7486c..e366f37886b6 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -5,6 +5,7 @@ "dependencies": { "@dimensiondev/holoflows-kit": "0.8.0-20210317064617-6c4792c", "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", + "@masknet/web3-shared": "workspace:*", "@servie/events": "^3.0.0", "anchorme": "^2.1.2", "async-call-rpc": "^5.1.0", diff --git a/packages/shared/src/utils/index.ts b/packages/shared/src/utils/index.ts index b2444077b70f..cafcfaf46069 100644 --- a/packages/shared/src/utils/index.ts +++ b/packages/shared/src/utils/index.ts @@ -2,4 +2,3 @@ export * from './parseURL' export * from './delay' export * from './timeout' export * from './sessionStorageCache' -export * from './number' diff --git a/packages/shared/src/wallet/components.tsx b/packages/shared/src/wallet/components.tsx index 98d11782865c..d76ac1a5cd25 100644 --- a/packages/shared/src/wallet/components.tsx +++ b/packages/shared/src/wallet/components.tsx @@ -1,6 +1,6 @@ import type { BigNumber } from 'bignumber.js' import { FC, Fragment } from 'react' -import { formatBalance, formatCurrency, formatEthereumAddress } from './formatter' +import { formatBalance, formatCurrency, formatEthereumAddress } from '@masknet/web3-shared' export interface FormattedBalanceProps { value: BigNumber.Value | undefined diff --git a/packages/shared/src/wallet/index.ts b/packages/shared/src/wallet/index.ts index 6fe300b3fb1b..cb64ac1b52aa 100644 --- a/packages/shared/src/wallet/index.ts +++ b/packages/shared/src/wallet/index.ts @@ -1,2 +1 @@ -export * from './formatter' export * from './components' diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index d142758ad97c..266df49a045a 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -9,5 +9,6 @@ "include": ["./src/"], "ts-node": { "compilerOptions": { "module": "CommonJS" } - } + }, + "references": [{ "path": "../web3-shared" }] } diff --git a/packages/web3-shared/package.json b/packages/web3-shared/package.json index ef7dec9c384f..cba67676a275 100644 --- a/packages/web3-shared/package.json +++ b/packages/web3-shared/package.json @@ -6,7 +6,6 @@ "@dimensiondev/kit": "=0.0.0-20210624142900-972fd05", "@masknet/constants": "workspace:*", "@masknet/contracts": "workspace:*", - "@masknet/shared": "workspace:*", "bignumber.js": "9.0.1", "ethereum-blockies": "^0.1.1", "lodash-es": "^4.17.21", diff --git a/packages/web3-shared/src/hooks/useAssets.ts b/packages/web3-shared/src/hooks/useAssets.ts index 67555b933d72..29183954276c 100644 --- a/packages/web3-shared/src/hooks/useAssets.ts +++ b/packages/web3-shared/src/hooks/useAssets.ts @@ -5,7 +5,7 @@ import { useAssetsFromChain } from './useAssetsFromChain' import { useAssetsFromProvider } from './useAssetsFromProvider' import { useCallback } from 'react' import { useAssetsMerged } from './useAssetsMerged' -import { formatEthereumAddress } from '@masknet/shared' +import { formatEthereumAddress } from '../utils' export function useAssets(tokens: FungibleTokenDetailed[]) { const wallet = useWallet() diff --git a/packages/web3-shared/src/hooks/useAssetsMerged.ts b/packages/web3-shared/src/hooks/useAssetsMerged.ts index 317addf10fe5..7fa2d6a95138 100644 --- a/packages/web3-shared/src/hooks/useAssetsMerged.ts +++ b/packages/web3-shared/src/hooks/useAssetsMerged.ts @@ -1,8 +1,7 @@ import type { Asset } from '../types' import { useChainId } from './useChainId' -import { formatEthereumAddress } from '@masknet/shared' import { uniqBy } from 'lodash-es' -import { getChainIdFromName, getTokenUSDValue, isSameAddress } from '../utils' +import { formatEthereumAddress, getChainIdFromName, getTokenUSDValue, isSameAddress } from '../utils' import { useTokenConstants } from '../constants' /** diff --git a/packages/web3-shared/src/hooks/useERC20TokenApproveCallback.ts b/packages/web3-shared/src/hooks/useERC20TokenApproveCallback.ts index a145353eae28..f786a00ca1bf 100644 --- a/packages/web3-shared/src/hooks/useERC20TokenApproveCallback.ts +++ b/packages/web3-shared/src/hooks/useERC20TokenApproveCallback.ts @@ -10,7 +10,7 @@ import { useGasPrice } from './useGasPrice' import { useERC20TokenAllowance } from './useERC20TokenAllowance' import { useERC20TokenBalance } from './useERC20TokenBalance' import { TransactionStateType, useTransactionState } from './useTransactionState' -import { isLessThan } from '@masknet/shared' +import { isLessThan } from '../utils' const MaxUint256 = new BigNumber('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff').toFixed() diff --git a/packages/web3-shared/src/hooks/useERC20TokenDetailed.ts b/packages/web3-shared/src/hooks/useERC20TokenDetailed.ts index 8bc1bc5aa9e1..6d7c8ecbb23d 100644 --- a/packages/web3-shared/src/hooks/useERC20TokenDetailed.ts +++ b/packages/web3-shared/src/hooks/useERC20TokenDetailed.ts @@ -1,11 +1,11 @@ import { useMemo } from 'react' import { useAsyncRetry } from 'react-use' -import { formatEthereumAddress } from '@masknet/shared' -import { EthereumTokenType, ERC20TokenDetailed } from '../types' +import { ERC20TokenDetailed, EthereumTokenType } from '../types' import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' import { useChainId } from './useChainId' import { useSingleContractMultipleData } from './useMulticall' import { useERC20TokenContract } from '../contracts/useERC20TokenContract' +import { formatEthereumAddress } from '../utils' export function useERC20TokenDetailed(address: string, token?: Partial) { const chainId = useChainId() diff --git a/packages/web3-shared/src/hooks/useERC20TokenTransferCallback.ts b/packages/web3-shared/src/hooks/useERC20TokenTransferCallback.ts index 10c3b575f15b..3708f5c471e9 100644 --- a/packages/web3-shared/src/hooks/useERC20TokenTransferCallback.ts +++ b/packages/web3-shared/src/hooks/useERC20TokenTransferCallback.ts @@ -7,7 +7,7 @@ import { TransactionStateType, useTransactionState } from './useTransactionState import { TransactionEventType } from '../types' import { useNonce } from './useNonce' import { useGasPrice } from './useGasPrice' -import { isGreaterThan, isZero } from '@masknet/shared' +import { isGreaterThan, isZero } from '../utils' export function useERC20TokenTransferCallback(address: string, amount?: string, recipient?: string) { const nonce = useNonce() diff --git a/packages/web3-shared/src/hooks/useERC721TokenDetailed.ts b/packages/web3-shared/src/hooks/useERC721TokenDetailed.ts index 8c17e56ddc9e..e68b514dc205 100644 --- a/packages/web3-shared/src/hooks/useERC721TokenDetailed.ts +++ b/packages/web3-shared/src/hooks/useERC721TokenDetailed.ts @@ -1,11 +1,11 @@ import { useMemo } from 'react' import { useAsyncRetry } from 'react-use' -import { formatEthereumAddress } from '@masknet/shared' -import { EthereumTokenType, ERC721TokenDetailed } from '../types' +import { ERC721TokenDetailed, EthereumTokenType } from '../types' import type { AsyncStateRetry } from 'react-use/lib/useAsyncRetry' import { useChainId } from './useChainId' import { useERC721TokenContract } from '../contracts/useERC721TokenContract' import { useSingleContractMultipleData } from './useMulticall' +import { formatEthereumAddress } from '../utils' export function useERC721TokenDetailed(address: string, token?: Partial) { const chainId = useChainId() diff --git a/packages/web3-shared/src/hooks/useNativeTokenTransferCallback.ts b/packages/web3-shared/src/hooks/useNativeTokenTransferCallback.ts index 9a55a6efe5f1..0155f939f527 100644 --- a/packages/web3-shared/src/hooks/useNativeTokenTransferCallback.ts +++ b/packages/web3-shared/src/hooks/useNativeTokenTransferCallback.ts @@ -7,7 +7,7 @@ import { TransactionStateType, useTransactionState } from './useTransactionState import { useWeb3 } from './useWeb3' import { useNonce } from './useNonce' import { useGasPrice } from './useGasPrice' -import { isGreaterThan, isZero } from '@masknet/shared' +import { isGreaterThan, isZero } from '../utils' export function useNativeTransferCallback(amount?: string, recipient?: string, memo?: string) { const web3 = useWeb3() diff --git a/packages/web3-shared/src/hooks/useNativeTokenWrapperCallback.ts b/packages/web3-shared/src/hooks/useNativeTokenWrapperCallback.ts index a71902fdf63a..e394c86cb987 100644 --- a/packages/web3-shared/src/hooks/useNativeTokenWrapperCallback.ts +++ b/packages/web3-shared/src/hooks/useNativeTokenWrapperCallback.ts @@ -6,7 +6,7 @@ import { TransactionStateType, useTransactionState } from './useTransactionState import { useNonce } from './useNonce' import { useGasPrice } from './useGasPrice' import { TransactionEventType } from '../types' -import { isLessThan, isZero } from '@masknet/shared' +import { isLessThan, isZero } from '../utils' export function useNativeTokenWrapperCallback() { const nonce = useNonce() diff --git a/packages/web3-shared/src/hooks/useStableTokensDebank.ts b/packages/web3-shared/src/hooks/useStableTokensDebank.ts index 1828bd37ebf8..efd43a33809f 100644 --- a/packages/web3-shared/src/hooks/useStableTokensDebank.ts +++ b/packages/web3-shared/src/hooks/useStableTokensDebank.ts @@ -1,8 +1,7 @@ -import { formatEthereumAddress } from '@masknet/shared' import { useChainId } from './useChainId' import STABLE_COINS from '../assets/stable_coins.json' import { ChainId } from '../types' -import { createERC20Token } from '../utils' +import { createERC20Token, formatEthereumAddress } from '../utils' export function useStableTokensDebank() { const chainId = useChainId() diff --git a/packages/web3-shared/src/pipes/index.ts b/packages/web3-shared/src/pipes/index.ts index e5ad8e33559f..7e35f7d8f61c 100644 --- a/packages/web3-shared/src/pipes/index.ts +++ b/packages/web3-shared/src/pipes/index.ts @@ -1,4 +1,3 @@ -import { formatEthereumAddress } from '@masknet/shared' import { safeUnreachable, unreachable } from '@dimensiondev/kit' import { getTokenConstants } from '../constants' import { @@ -11,7 +10,7 @@ import { NonFungibleTokenDetailed, ProviderType, } from '../types' -import { getChainDetailed } from '../utils' +import { formatEthereumAddress, getChainDetailed } from '../utils' export function resolveProviderName(providerType: ProviderType) { switch (providerType) { diff --git a/packages/shared/src/wallet/formatter.tsx b/packages/web3-shared/src/utils/formatter.ts similarity index 100% rename from packages/shared/src/wallet/formatter.tsx rename to packages/web3-shared/src/utils/formatter.ts diff --git a/packages/web3-shared/src/utils/index.ts b/packages/web3-shared/src/utils/index.ts index 03f24264c577..03b8aa7ac219 100644 --- a/packages/web3-shared/src/utils/index.ts +++ b/packages/web3-shared/src/utils/index.ts @@ -1,212 +1,3 @@ -import { getEnumAsArray, safeUnreachable } from '@dimensiondev/kit' -import BigNumber from 'bignumber.js' -import type Web3 from 'web3' -import type { AbiOutput } from 'web3-utils' -import CHAINS from '../assets/chains.json' -import { getTokenConstants } from '../constants' -import { - Asset, - ChainId, - CurrencyType, - ERC1155TokenAssetDetailed, - ERC20TokenDetailed, - ERC721TokenAssetDetailed, - EthereumTokenType, - NativeTokenDetailed, - NetworkType, -} from '../types' - -export function isSameAddress(addrA: string, addrB: string) { - return addrA.toLowerCase() === addrB.toLowerCase() -} - -export function currySameAddress(base: string) { - return (target: string | { address: string }) => { - if (typeof target === 'string') { - return isSameAddress(base, target) - } else if (typeof target === 'object' && typeof target.address === 'string') { - return isSameAddress(base, target.address) - } - throw new Error('Unsupported `target` address format') - } -} - -export const isDAI = currySameAddress(getTokenConstants().DAI_ADDRESS) - -export const isOKB = currySameAddress(getTokenConstants().OKB_ADDRESS) - -export const isNative = currySameAddress(getTokenConstants().NATIVE_TOKEN_ADDRESS) - -export function addGasMargin(value: BigNumber.Value, scale = 3000) { - return new BigNumber(value).multipliedBy(new BigNumber(10000).plus(scale)).dividedToIntegerBy(10000) -} - -//#region chain detailed -export function getChainDetailed(chainId = ChainId.Mainnet) { - return CHAINS.find((x) => x.chainId === chainId) -} - -// Learn more: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md -export function getChainDetailedCAIP(chainId = ChainId.Mainnet) { - const chainDetailed = getChainDetailed(chainId) - if (!chainDetailed) return - return { - chainId: `0x${chainDetailed.chainId.toString(16)}`, - chainName: chainDetailed.name, - nativeCurrency: chainDetailed.nativeCurrency, - rpcUrls: chainDetailed.rpc, - blockExplorerUrls: [ - chainDetailed.explorers && chainDetailed.explorers.length > 0 && chainDetailed.explorers[0].url - ? chainDetailed.explorers[0].url - : chainDetailed.infoURL, - ], - } -} - -export function getChainName(chainId: ChainId) { - const chainDetailed = getChainDetailed(chainId) - return chainDetailed?.name ?? 'Unknown' -} - -export function getChainFullName(chainId: ChainId) { - const chainDetailed = getChainDetailed(chainId) - return chainDetailed?.fullName ?? 'Unknown' -} - -export function getChainIdFromName(name: string) { - const chainDetailed = CHAINS.find((x) => - [x.chain, x.network, x.name, x.shortName, x.fullName].map((y) => y.toLowerCase()).includes(name.toLowerCase()), - ) - return chainDetailed?.chainId as ChainId | undefined -} - -export function getChainIdFromNetworkType(networkType: NetworkType) { - switch (networkType) { - case NetworkType.Ethereum: - return ChainId.Mainnet - case NetworkType.Binance: - return ChainId.BSC - case NetworkType.Polygon: - return ChainId.Matic - default: - safeUnreachable(networkType) - return ChainId.Mainnet - } -} - -export function getNetworkTypeFromChainId(chainId: ChainId) { - const chainDetailed = getChainDetailed(chainId) - switch (chainDetailed?.chain) { - case 'ETH': - return NetworkType.Ethereum - case 'BSC': - return NetworkType.Binance - case 'Matic': - return NetworkType.Polygon - default: - throw new Error('Unknown chain id.') - } -} -//#endregion - -//#region tokens -export function createNativeToken(chainId: ChainId): NativeTokenDetailed { - const chainDetailed = getChainDetailed(chainId) - if (!chainDetailed) throw new Error('Unknown chain id.') - return { - type: EthereumTokenType.Native, - chainId, - address: getTokenConstants().NATIVE_TOKEN_ADDRESS, - ...chainDetailed.nativeCurrency, - } -} - -export function createERC20Token( - chainId: ChainId, - address: string, - decimals: number, - name: string, - symbol: string, -): ERC20TokenDetailed { - return { - type: EthereumTokenType.ERC20, - chainId, - address, - decimals, - name, - symbol, - } -} - -export function createERC721Token( - chainId: ChainId, - tokenId: string, - address: string, - name: string, - symbol: string, - baseURI?: string, - tokenURI?: string, - asset?: ERC721TokenAssetDetailed['asset'], -): ERC721TokenAssetDetailed { - return { - type: EthereumTokenType.ERC721, - chainId, - tokenId, - address, - name, - symbol, - baseURI, - tokenURI, - asset, - } -} - -export function createERC1155Token( - chainId: ChainId, - tokenId: string, - address: string, - name: string, - uri?: string, - asset?: ERC1155TokenAssetDetailed['asset'], -): ERC1155TokenAssetDetailed { - return { - type: EthereumTokenType.ERC1155, - chainId, - tokenId, - address, - name, - uri, - asset, - } -} - -export function createERC20Tokens( - key: keyof ReturnType, - name: string | ((chainId: ChainId) => string), - symbol: string | ((chainId: ChainId) => string), - decimals: number | ((chainId: ChainId) => number), -) { - return getEnumAsArray(ChainId).reduce((accumulator, { value: chainId }) => { - const evaludator: (f: T | ((chainId: ChainId) => T)) => T = (f) => - typeof f === 'function' ? (f as any)(chainId) : f - - accumulator[chainId] = { - type: EthereumTokenType.ERC20, - chainId, - address: getTokenConstants(chainId)[key], - name: evaludator(name), - symbol: evaludator(symbol), - decimals: evaludator(decimals), - } - return accumulator - }, {} as { [chainId in ChainId]: ERC20TokenDetailed }) -} -//#endregion - -export function decodeOutputString(web3: Web3, abis: AbiOutput[], output: string) { - if (abis.length === 1) return web3.eth.abi.decodeParameter(abis[0], output) - if (abis.length > 1) return web3.eth.abi.decodeParameters(abis, output) - return -} - -export const getTokenUSDValue = (token: Asset) => (token.value ? Number.parseFloat(token.value[CurrencyType.USD]) : 0) +export * from './token' +export * from './formatter' +export * from './number' diff --git a/packages/shared/src/utils/number.ts b/packages/web3-shared/src/utils/number.ts similarity index 100% rename from packages/shared/src/utils/number.ts rename to packages/web3-shared/src/utils/number.ts diff --git a/packages/web3-shared/src/utils/token.ts b/packages/web3-shared/src/utils/token.ts new file mode 100644 index 000000000000..03f24264c577 --- /dev/null +++ b/packages/web3-shared/src/utils/token.ts @@ -0,0 +1,212 @@ +import { getEnumAsArray, safeUnreachable } from '@dimensiondev/kit' +import BigNumber from 'bignumber.js' +import type Web3 from 'web3' +import type { AbiOutput } from 'web3-utils' +import CHAINS from '../assets/chains.json' +import { getTokenConstants } from '../constants' +import { + Asset, + ChainId, + CurrencyType, + ERC1155TokenAssetDetailed, + ERC20TokenDetailed, + ERC721TokenAssetDetailed, + EthereumTokenType, + NativeTokenDetailed, + NetworkType, +} from '../types' + +export function isSameAddress(addrA: string, addrB: string) { + return addrA.toLowerCase() === addrB.toLowerCase() +} + +export function currySameAddress(base: string) { + return (target: string | { address: string }) => { + if (typeof target === 'string') { + return isSameAddress(base, target) + } else if (typeof target === 'object' && typeof target.address === 'string') { + return isSameAddress(base, target.address) + } + throw new Error('Unsupported `target` address format') + } +} + +export const isDAI = currySameAddress(getTokenConstants().DAI_ADDRESS) + +export const isOKB = currySameAddress(getTokenConstants().OKB_ADDRESS) + +export const isNative = currySameAddress(getTokenConstants().NATIVE_TOKEN_ADDRESS) + +export function addGasMargin(value: BigNumber.Value, scale = 3000) { + return new BigNumber(value).multipliedBy(new BigNumber(10000).plus(scale)).dividedToIntegerBy(10000) +} + +//#region chain detailed +export function getChainDetailed(chainId = ChainId.Mainnet) { + return CHAINS.find((x) => x.chainId === chainId) +} + +// Learn more: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md +export function getChainDetailedCAIP(chainId = ChainId.Mainnet) { + const chainDetailed = getChainDetailed(chainId) + if (!chainDetailed) return + return { + chainId: `0x${chainDetailed.chainId.toString(16)}`, + chainName: chainDetailed.name, + nativeCurrency: chainDetailed.nativeCurrency, + rpcUrls: chainDetailed.rpc, + blockExplorerUrls: [ + chainDetailed.explorers && chainDetailed.explorers.length > 0 && chainDetailed.explorers[0].url + ? chainDetailed.explorers[0].url + : chainDetailed.infoURL, + ], + } +} + +export function getChainName(chainId: ChainId) { + const chainDetailed = getChainDetailed(chainId) + return chainDetailed?.name ?? 'Unknown' +} + +export function getChainFullName(chainId: ChainId) { + const chainDetailed = getChainDetailed(chainId) + return chainDetailed?.fullName ?? 'Unknown' +} + +export function getChainIdFromName(name: string) { + const chainDetailed = CHAINS.find((x) => + [x.chain, x.network, x.name, x.shortName, x.fullName].map((y) => y.toLowerCase()).includes(name.toLowerCase()), + ) + return chainDetailed?.chainId as ChainId | undefined +} + +export function getChainIdFromNetworkType(networkType: NetworkType) { + switch (networkType) { + case NetworkType.Ethereum: + return ChainId.Mainnet + case NetworkType.Binance: + return ChainId.BSC + case NetworkType.Polygon: + return ChainId.Matic + default: + safeUnreachable(networkType) + return ChainId.Mainnet + } +} + +export function getNetworkTypeFromChainId(chainId: ChainId) { + const chainDetailed = getChainDetailed(chainId) + switch (chainDetailed?.chain) { + case 'ETH': + return NetworkType.Ethereum + case 'BSC': + return NetworkType.Binance + case 'Matic': + return NetworkType.Polygon + default: + throw new Error('Unknown chain id.') + } +} +//#endregion + +//#region tokens +export function createNativeToken(chainId: ChainId): NativeTokenDetailed { + const chainDetailed = getChainDetailed(chainId) + if (!chainDetailed) throw new Error('Unknown chain id.') + return { + type: EthereumTokenType.Native, + chainId, + address: getTokenConstants().NATIVE_TOKEN_ADDRESS, + ...chainDetailed.nativeCurrency, + } +} + +export function createERC20Token( + chainId: ChainId, + address: string, + decimals: number, + name: string, + symbol: string, +): ERC20TokenDetailed { + return { + type: EthereumTokenType.ERC20, + chainId, + address, + decimals, + name, + symbol, + } +} + +export function createERC721Token( + chainId: ChainId, + tokenId: string, + address: string, + name: string, + symbol: string, + baseURI?: string, + tokenURI?: string, + asset?: ERC721TokenAssetDetailed['asset'], +): ERC721TokenAssetDetailed { + return { + type: EthereumTokenType.ERC721, + chainId, + tokenId, + address, + name, + symbol, + baseURI, + tokenURI, + asset, + } +} + +export function createERC1155Token( + chainId: ChainId, + tokenId: string, + address: string, + name: string, + uri?: string, + asset?: ERC1155TokenAssetDetailed['asset'], +): ERC1155TokenAssetDetailed { + return { + type: EthereumTokenType.ERC1155, + chainId, + tokenId, + address, + name, + uri, + asset, + } +} + +export function createERC20Tokens( + key: keyof ReturnType, + name: string | ((chainId: ChainId) => string), + symbol: string | ((chainId: ChainId) => string), + decimals: number | ((chainId: ChainId) => number), +) { + return getEnumAsArray(ChainId).reduce((accumulator, { value: chainId }) => { + const evaludator: (f: T | ((chainId: ChainId) => T)) => T = (f) => + typeof f === 'function' ? (f as any)(chainId) : f + + accumulator[chainId] = { + type: EthereumTokenType.ERC20, + chainId, + address: getTokenConstants(chainId)[key], + name: evaludator(name), + symbol: evaludator(symbol), + decimals: evaludator(decimals), + } + return accumulator + }, {} as { [chainId in ChainId]: ERC20TokenDetailed }) +} +//#endregion + +export function decodeOutputString(web3: Web3, abis: AbiOutput[], output: string) { + if (abis.length === 1) return web3.eth.abi.decodeParameter(abis[0], output) + if (abis.length > 1) return web3.eth.abi.decodeParameters(abis, output) + return +} + +export const getTokenUSDValue = (token: Asset) => (token.value ? Number.parseFloat(token.value[CurrencyType.USD]) : 0) diff --git a/packages/web3-shared/tsconfig.json b/packages/web3-shared/tsconfig.json index 5a1c2d574902..f58fbe6a79ab 100644 --- a/packages/web3-shared/tsconfig.json +++ b/packages/web3-shared/tsconfig.json @@ -9,5 +9,5 @@ "ts-node": { "compilerOptions": { "module": "CommonJS" } }, - "references": [{ "path": "../shared/" }, { "path": "../constants" }] + "references": [{ "path": "../constants" }] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ca5b48856ce..d425d8bd3f74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -588,6 +588,7 @@ importers: specifiers: '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' + '@masknet/web3-shared': workspace:* '@servie/events': ^3.0.0 anchorme: ^2.1.2 async-call-rpc: ^5.1.0 @@ -602,6 +603,7 @@ importers: dependencies: '@dimensiondev/holoflows-kit': 0.8.0-20210317064617-6c4792c '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 + '@masknet/web3-shared': link:../web3-shared '@servie/events': 3.0.0 anchorme: 2.1.2 async-call-rpc: 5.1.0 @@ -668,7 +670,6 @@ importers: '@dimensiondev/kit': '=0.0.0-20210624142900-972fd05' '@masknet/constants': workspace:* '@masknet/contracts': workspace:* - '@masknet/shared': workspace:* '@types/use-subscription': ^1.0.0 bignumber.js: 9.0.1 ethereum-blockies: ^0.1.1 @@ -684,7 +685,6 @@ importers: '@dimensiondev/kit': 0.0.0-20210624142900-972fd05 '@masknet/constants': link:../constants '@masknet/contracts': link:../contracts - '@masknet/shared': link:../shared bignumber.js: 9.0.1 ethereum-blockies: 0.1.1 lodash-es: 4.17.21