From 11dec266f29ffc31dbc4861a828cd155e887ab94 Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Thu, 14 Mar 2024 15:31:58 -0700 Subject: [PATCH 1/2] Update to prettier 3.1.0 --- package-lock.json | 12 +++--- package.json | 2 +- .../src/@types/MethodFirstParameter.ts | 2 +- .../api-react/src/@types/MethodReturnType.ts | 2 +- packages/api-react/src/chiaLazyBaseQuery.ts | 6 +-- .../hooks/useCurrentFingerprintSettings.ts | 4 +- .../src/hooks/useFingerprintSettings.ts | 4 +- .../src/hooks/useGetHarvesterQuery.ts | 2 +- .../src/hooks/useGetHarvesterStats.ts | 2 +- .../src/hooks/useGetLatestBlocksQuery.ts | 2 +- .../hooks/useGetLatestPeakTimestampQuery.ts | 2 +- .../api-react/src/hooks/useLocalStorage.ts | 6 +-- packages/api-react/src/hooks/usePrefs.ts | 6 +-- packages/api-react/src/hooks/useService.ts | 2 +- packages/api-react/src/hooks/useServices.ts | 4 +- .../src/hooks/useSubscribeToEvent.ts | 2 +- .../api-react/src/hooks/useThrottleQuery.ts | 4 +- packages/api-react/src/services/client.ts | 2 +- packages/api-react/src/services/daemon.ts | 4 +- packages/api-react/src/services/farmer.ts | 14 +++---- packages/api-react/src/services/fullNode.ts | 2 +- packages/api-react/src/services/harvester.ts | 2 +- packages/api-react/src/services/wallet.ts | 40 +++++++++---------- .../src/utils/onCacheEntryAddedInvalidate.ts | 8 ++-- .../utils/reduxToolkitEndpointAbstractions.ts | 12 +++--- packages/api/src/@types/PoolState.ts | 2 +- packages/api/src/Client.ts | 2 +- packages/api/src/Message.test.ts | 8 ++-- packages/api/src/services/Daemon.ts | 6 +-- packages/api/src/services/Farmer.ts | 2 +- packages/api/src/services/PlotterService.ts | 2 +- packages/api/src/services/Service.ts | 8 ++-- packages/api/src/services/WalletService.ts | 38 +++++++++--------- .../tests/utils/calculateRoyalties.test.ts | 6 +-- packages/api/src/utils/calculateRoyalties.ts | 4 +- packages/api/src/utils/toBech32m.ts | 2 +- packages/api/src/wallets/NFT.ts | 2 +- .../AddressBookProvider.tsx | 2 +- .../core/src/components/Auth/AuthProvider.tsx | 6 +-- packages/core/src/components/Back/Back.tsx | 2 +- .../components/CardListItem/CardListItem.tsx | 4 +- .../components/Dropdown/DropdownActions.tsx | 4 +- .../src/components/Dropdown/DropdownBase.tsx | 4 +- .../ErrorBoundary/ErrorBoundary.tsx | 2 +- .../components/EstimatedFee/EstimatedFee.tsx | 12 +++--- packages/core/src/components/Form/Form.tsx | 2 +- .../FormBackButton/FormBackButton.tsx | 2 +- .../components/FormatBytes/FormatBytes.tsx | 2 +- .../LayoutDashboard/LayoutDashboard.tsx | 2 +- .../LocaleProvider/LocaleProvider.tsx | 4 +- packages/core/src/components/Menu/Menu.tsx | 6 +-- .../ModalDialogs/ModalDialogsProvider.tsx | 4 +- .../core/src/components/Mode/ModeProvider.tsx | 4 +- .../core/src/components/Persist/Persist.tsx | 6 +-- .../Scrollbar/ScrollbarVirtuoso.tsx | 2 +- .../components/SideBarItem/SideBarItem.tsx | 4 +- .../src/components/Table/TableControlled.tsx | 6 +-- .../src/components/TextField/TextField.tsx | 2 +- .../ToolbarSpacing/ToolbarSpacing.tsx | 2 +- .../core/src/components/Truncate/Truncate.tsx | 2 +- packages/core/src/hooks/useAddressBook.tsx | 12 +++--- .../hooks/useGetLatestVersionFromWebsite.ts | 4 +- packages/core/src/hooks/useHiddenList.ts | 6 +-- .../src/hooks/useKeyringMigrationPrompt.tsx | 2 +- packages/core/src/hooks/useOpenDialog.ts | 4 +- packages/core/src/hooks/usePersistState.ts | 2 +- .../core/src/hooks/useScrollbarsSettings.tsx | 2 +- packages/core/src/hooks/useTrans.ts | 2 +- .../useValidateChangePassphraseParams.tsx | 6 +-- .../screens/SelectKey/EmojiAndColorPicker.tsx | 2 +- .../core/src/screens/SelectKey/SelectKey.tsx | 2 +- .../src/screens/SelectKey/WalletStatus.tsx | 2 +- .../screens/SelectKey/WalletStatusHeight.tsx | 2 +- packages/core/src/theme/dark.ts | 2 +- packages/core/src/utils/validAddress.ts | 4 +- packages/gui/public/index.html | 2 +- .../src/@types/WalletConnectCommandParam.ts | 2 +- .../addressbook/AddressBookSideBar.tsx | 6 +-- .../components/addressbook/ContactEdit.tsx | 4 +- .../components/addressbook/ContactSummary.tsx | 2 +- .../src/components/app/AppKeyringMigrator.tsx | 2 +- .../gui/src/components/app/AppProviders.tsx | 2 +- packages/gui/src/components/app/AppState.tsx | 2 +- .../src/components/app/AppStatusHeader.tsx | 4 +- packages/gui/src/components/block/Block.jsx | 2 +- .../fullNode/FullNodeCloseConnection.tsx | 2 +- .../fullNode/card/FullNodeCardStatus.tsx | 2 +- .../components/harvest/HarvesterDetail.tsx | 2 +- .../components/harvest/HarvesterOverview.tsx | 2 +- .../harvest/HarvesterPlotDetails.tsx | 4 +- .../src/components/harvest/LatencyCharts.tsx | 2 +- .../components/harvest/PlotDetailsChart.tsx | 2 +- .../gui/src/components/lrus/LRUsProvider.tsx | 2 +- .../src/components/nfts/NFTAutocomplete.tsx | 8 ++-- .../gui/src/components/nfts/NFTBurnDialog.tsx | 2 +- .../components/nfts/NFTContextualActions.tsx | 13 +++--- .../src/components/nfts/NFTFilterProvider.tsx | 2 +- .../nfts/NFTMoveToProfileDialog.tsx | 6 +-- .../gui/src/components/nfts/NFTPreview.tsx | 10 +++-- .../components/nfts/NFTProfileDropdown.tsx | 2 +- .../gui/src/components/nfts/NFTSummary.tsx | 6 +-- .../src/components/nfts/NFTTransferAction.tsx | 2 +- .../components/nfts/detail/NFTDetailV2.tsx | 2 +- .../components/nfts/gallery/NFTGallery.tsx | 8 ++-- .../NFTGalleryScrollPositionProvider.tsx | 4 +- .../nfts/gallery/SelectedActionsDialog.tsx | 4 +- .../components/nfts/provider/NFTProvider.tsx | 12 +++--- .../nfts/provider/NFTProviderContext.ts | 2 +- .../nfts/provider/hooks/useMetadataData.ts | 10 ++--- .../nfts/provider/hooks/useNFTData.ts | 10 ++--- .../nfts/provider/hooks/useNFTDataNachos.ts | 6 +-- .../nfts/provider/hooks/useNFTDataOnDemand.ts | 10 ++--- .../notification/NotificationOffer.tsx | 4 +- .../notification/NotificationPreviewOffer.tsx | 4 +- .../notification/NotificationsProvider.tsx | 12 +++--- .../gui/src/components/notification/utils.ts | 4 +- .../src/components/offers/NFTOfferEditor.tsx | 8 ++-- .../offers/NFTOfferTokenSelector.tsx | 4 +- .../src/components/offers/NFTOfferViewer.tsx | 14 +++---- .../offers/OfferEditorConditionsPanel.tsx | 2 +- .../components/offers/OfferExchangeRate.tsx | 2 +- .../gui/src/components/offers/OfferImport.tsx | 2 +- .../src/components/offers/OfferManager.tsx | 8 ++-- .../components/offers/OfferShareDialog.tsx | 34 ++++++++-------- packages/gui/src/components/offers/utils.ts | 24 +++++------ .../components/offers2/CancelOfferList.tsx | 4 +- .../components/offers2/CreateOfferBuilder.tsx | 4 +- .../offers2/OfferBuilderExpirationSection.tsx | 2 +- .../components/offers2/OfferBuilderImport.tsx | 2 +- .../offers2/OfferBuilderNFTRoyalties.tsx | 2 +- .../offers2/OfferBuilderProvider.tsx | 12 +++--- .../offers2/OfferBuilderTokenSelector.tsx | 2 +- .../components/offers2/OfferBuilderViewer.tsx | 10 ++--- ...ferEditorCancelConflictingOffersDialog.tsx | 4 +- .../components/offers2/OfferIncomingTable.tsx | 22 +++++----- .../src/components/offers2/OffersProvider.tsx | 14 +++---- .../gui/src/components/plot/PlotAction.tsx | 2 +- .../gui/src/components/plot/PlotHarvester.tsx | 2 +- .../components/plot/add/PlotAddChooseKeys.tsx | 10 ++--- .../components/plot/add/PlotAddChooseSize.tsx | 8 ++-- .../plot/add/PlotAddSelectHybridDiskMode.tsx | 4 +- .../plot/queue/PlotQueueActions.tsx | 2 +- .../plotNFT/PlotNFTAbsorbRewards.tsx | 2 +- .../src/components/plotNFT/PlotNFTCard.tsx | 2 +- .../components/plotNFT/PlotNFTChangePool.tsx | 2 +- .../plotNFT/PlotNFTGetPoolLoginLinkDialog.tsx | 2 +- .../plotNFT/PlotNFTUnconfirmedCard.tsx | 2 +- .../plotNFT/select/PlotNFTSelectPool.tsx | 2 +- packages/gui/src/components/pool/PoolJoin.tsx | 2 +- .../settings/ChangePassphrasePrompt.tsx | 4 +- .../components/settings/LimitCacheSize.tsx | 2 +- .../src/components/settings/ProfileAdd.tsx | 2 +- .../src/components/settings/ProfileView.tsx | 2 +- .../src/components/settings/ResyncPrompt.tsx | 2 +- .../settings/SetPassphrasePrompt.tsx | 4 +- .../components/settings/SettingsCustody.tsx | 2 +- .../settings/SettingsDerivationIndex.tsx | 2 +- .../components/settings/SettingsHarvester.tsx | 22 +++++----- .../settings/SettingsIntegration.tsx | 8 ++-- .../src/components/settings/SettingsNFT.tsx | 2 +- .../src/components/settings/SettingsPanel.tsx | 6 +-- .../SettingsVerifiableCredentials.tsx | 2 +- .../components/signVerify/VerifyMessage.tsx | 2 +- packages/gui/src/components/vcs/VCCard.tsx | 18 ++++----- packages/gui/src/components/vcs/VCDetail.tsx | 2 +- packages/gui/src/components/vcs/VCList.tsx | 8 ++-- .../WalletConnectAddConnectionDialog.tsx | 4 +- .../WalletConnectConnections.tsx | 2 +- packages/gui/src/electron/CacheManager.ts | 26 ++++++------ packages/gui/src/electron/main.tsx | 16 ++++---- .../gui/src/electron/utils/downloadFile.ts | 2 +- packages/gui/src/hooks/useAcceptOfferHook.tsx | 8 ++-- packages/gui/src/hooks/useAssetIdName.ts | 4 +- .../src/hooks/useBlockchainNotifications.tsx | 10 ++--- .../src/hooks/useFetchAndProcessMetadata.ts | 2 +- packages/gui/src/hooks/useFullNodeState.ts | 2 +- packages/gui/src/hooks/useHiddenNFTs.ts | 4 +- .../gui/src/hooks/useIntersectionObserver.ts | 2 +- packages/gui/src/hooks/useNFT.ts | 2 +- packages/gui/src/hooks/useNFTCoinEvents.ts | 4 +- packages/gui/src/hooks/useNFTMetadata.ts | 2 +- packages/gui/src/hooks/useNFTVerifyHash.ts | 6 +-- packages/gui/src/hooks/useNFTs.ts | 8 ++-- .../gui/src/hooks/useNotificationSettings.ts | 2 +- packages/gui/src/hooks/useOffer.ts | 2 +- .../hooks/useOfferExpirationDefaultTime.tsx | 6 +-- packages/gui/src/hooks/useOpenUnsafeLink.tsx | 2 +- packages/gui/src/hooks/useResolveNFTOffer.ts | 4 +- packages/gui/src/hooks/useSaveFile.ts | 2 +- packages/gui/src/hooks/useSelectDirectory.tsx | 4 +- .../gui/src/hooks/useUnconfirmedPlotNFTs.ts | 2 +- .../gui/src/hooks/useValidNotifications.ts | 8 ++-- packages/gui/src/hooks/useWalletConnect.ts | 4 +- .../gui/src/hooks/useWalletConnectCommand.tsx | 4 +- .../gui/src/hooks/useWalletConnectPairs.ts | 10 ++--- .../src/hooks/useWalletConnectPreferences.ts | 4 +- packages/gui/src/hooks/useWalletOffers.ts | 4 +- packages/gui/src/index.html | 2 +- packages/gui/src/util/chiaEnvironment.js | 2 +- ...reateOfferForIdsToOfferBuilderData.test.ts | 2 +- .../createOfferForIdsToOfferBuilderData.ts | 2 +- packages/gui/src/util/fetchOffer.ts | 2 +- .../gui/src/util/findCATWalletByAssetId.ts | 2 +- .../gui/src/util/getNFTsDataStatistics.ts | 2 +- packages/gui/src/util/hasSpendableBalance.ts | 2 +- packages/gui/src/util/loadConfig.ts | 4 +- packages/gui/src/util/nfts.test.ts | 4 +- .../gui/src/util/offerToOfferBuilderData.ts | 2 +- packages/gui/src/util/prepareNFTOffer.test.ts | 2 +- packages/gui/src/util/prepareNFTOffer.ts | 2 +- .../src/util/prepareWalletConnectCommand.ts | 2 +- packages/gui/src/util/resolveOfferInfo.ts | 4 +- packages/gui/src/util/walletConnect.ts | 12 +++--- .../tests/data_object_model/read_data_file.ts | 2 +- .../offers/offer_created_via_nft.spec.ts | 2 +- .../offers/offer_transfer_via_nft.spec.ts | 4 +- .../create_delete_wallet.spec.ts | 2 +- .../key_import_negative_test.spec.ts | 2 +- .../paste_key_import_negative_test.spec.ts | 2 +- .../rename_wallet_existing_name.spec.ts | 2 +- .../gui/tests/tokens/receive_txch.spec.ts | 2 +- .../tests/tokens/send_amount_greater.spec.ts | 2 +- .../gui/tests/tokens/send_error_page.spec.ts | 2 +- .../gui/tests/tokens/send_fee_txch.spec.ts | 4 +- .../ClawbackClaimTransactionDialog.tsx | 2 +- .../src/components/WalletConnections.tsx | 2 +- .../wallets/src/components/WalletGraph.tsx | 6 +-- .../wallets/src/components/WalletHeader.tsx | 2 +- .../wallets/src/components/WalletHistory.tsx | 10 ++--- .../components/WalletHistoryClawbackChip.tsx | 12 +++--- .../wallets/src/components/WalletImport.tsx | 2 +- .../src/components/WalletRenameDialog.tsx | 2 +- .../wallets/src/components/WalletSend.tsx | 4 +- .../WalletSendTransactionResultDialog.tsx | 4 +- .../wallets/src/components/WalletStatus.tsx | 2 +- .../src/components/WalletStatusHeight.tsx | 2 +- .../wallets/src/components/WalletsSidebar.tsx | 2 +- .../card/WalletCardCRCatApprove.tsx | 2 +- .../card/WalletCardCRCatRestrictions.tsx | 2 +- .../card/WalletCardPendingBalance.tsx | 2 +- .../card/WalletCardPendingChange.tsx | 2 +- .../card/WalletCardPendingTotalBalance.tsx | 2 +- .../card/WalletCardSpendableBalance.tsx | 2 +- .../card/WalletCardTotalBalance.tsx | 2 +- .../wallets/src/components/cat/WalletCAT.tsx | 2 +- .../crCat/CrCatApprovePendingDialog.tsx | 2 +- .../src/hooks/useClawbackDefaultTime.tsx | 8 ++-- packages/wallets/src/hooks/useHiddenWallet.ts | 6 +-- packages/wallets/src/hooks/useWallet.ts | 2 +- .../wallets/src/hooks/useWalletHumanValue.ts | 2 +- packages/wallets/src/hooks/useWalletState.ts | 2 +- .../src/hooks/useWalletTransactions.ts | 2 +- packages/wallets/src/hooks/useWalletsList.ts | 2 +- 253 files changed, 600 insertions(+), 597 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e43c3dae5..b382e23dd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "lerna-audit": "^1.3.3", "lint-staged": "14.0.1", "nyc": "15.1.0", - "prettier": "2.8.8", + "prettier": "3.1.0", "typescript": "^5.1.6" } }, @@ -19236,15 +19236,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index 1153013284..30749f77b8 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "lerna-audit": "^1.3.3", "lint-staged": "14.0.1", "nyc": "15.1.0", - "prettier": "2.8.8", + "prettier": "3.1.0", "typescript": "^5.1.6" }, "version": "1.2.10-dev132" diff --git a/packages/api-react/src/@types/MethodFirstParameter.ts b/packages/api-react/src/@types/MethodFirstParameter.ts index 099d2b1ac7..a322186d0b 100644 --- a/packages/api-react/src/@types/MethodFirstParameter.ts +++ b/packages/api-react/src/@types/MethodFirstParameter.ts @@ -1,6 +1,6 @@ type MethodFirstParameter< TClass extends new (...args: any) => any, - Method extends keyof InstanceType & string + Method extends keyof InstanceType & string, > = Parameters[Method]>[0]; export default MethodFirstParameter; diff --git a/packages/api-react/src/@types/MethodReturnType.ts b/packages/api-react/src/@types/MethodReturnType.ts index b07709f1cf..31be523b06 100644 --- a/packages/api-react/src/@types/MethodReturnType.ts +++ b/packages/api-react/src/@types/MethodReturnType.ts @@ -1,6 +1,6 @@ type MethodReturnType< TClass extends new (...args: any) => any, - Method extends keyof InstanceType & string + Method extends keyof InstanceType & string, > = Awaited[Method]>>; export default MethodReturnType; diff --git a/packages/api-react/src/chiaLazyBaseQuery.ts b/packages/api-react/src/chiaLazyBaseQuery.ts index 96c8e7435d..fe5a5335bc 100644 --- a/packages/api-react/src/chiaLazyBaseQuery.ts +++ b/packages/api-react/src/chiaLazyBaseQuery.ts @@ -7,7 +7,7 @@ const instances = new Map>( async function getInstance( service: TService, - api: any + api: any, ): Promise> { if (!instances.has(service)) { if (service.isClient) { @@ -40,7 +40,7 @@ const chiaLazyBaseQuery = async < TService extends ServiceConstructor, TMethod extends keyof InstanceType & string, // TParameter extends Parameters[TMethod]>[0], - TResult extends ReturnType[TMethod]> + TResult extends ReturnType[TMethod]>, >( options: { service: TService; @@ -49,7 +49,7 @@ const chiaLazyBaseQuery = async < args?: any; mockResponse?: any; }, - api: any + api: any, ) => { const { service, command, args = [], mockResponse } = options; diff --git a/packages/api-react/src/hooks/useCurrentFingerprintSettings.ts b/packages/api-react/src/hooks/useCurrentFingerprintSettings.ts index 9542c3b556..2833df386f 100644 --- a/packages/api-react/src/hooks/useCurrentFingerprintSettings.ts +++ b/packages/api-react/src/hooks/useCurrentFingerprintSettings.ts @@ -5,7 +5,7 @@ import { type Serializable } from './usePrefs'; export default function useCurrentFingerprintSettings( key: string, - defaultValue?: Type + defaultValue?: Type, ): [ Type | undefined, (value: Type | ((prevValue: Type) => Type)) => void, @@ -13,7 +13,7 @@ export default function useCurrentFingerprintSettings fingerprint: number | undefined; isLoading: boolean; error?: Error; - } + }, ] { const { data: fingerprint, isLoading, error } = useGetLoggedInFingerprintQuery(); const [data, setData] = useFingerprintSettings(fingerprint, key, defaultValue); diff --git a/packages/api-react/src/hooks/useFingerprintSettings.ts b/packages/api-react/src/hooks/useFingerprintSettings.ts index f3bf2deb77..b5de18f26b 100644 --- a/packages/api-react/src/hooks/useFingerprintSettings.ts +++ b/packages/api-react/src/hooks/useFingerprintSettings.ts @@ -5,7 +5,7 @@ import usePrefs, { type Serializable } from './usePrefs'; export default function useFingerprintSettings( fingerprint: number | undefined, key: string, - defaultValue?: Type + defaultValue?: Type, ): [Type | undefined, (value: Type | ((preValue: Type) => Type)) => void] { type LocalStorageType = Record>; const [settings, setSettings] = usePrefs('fingerprintSettings', {}); @@ -40,7 +40,7 @@ export default function useFingerprintSettings( }; }); }, - [key, setSettings, fingerprint] + [key, setSettings, fingerprint], ); if (!fingerprint) { diff --git a/packages/api-react/src/hooks/useGetHarvesterQuery.ts b/packages/api-react/src/hooks/useGetHarvesterQuery.ts index 06bc37404f..0694a928e7 100644 --- a/packages/api-react/src/hooks/useGetHarvesterQuery.ts +++ b/packages/api-react/src/hooks/useGetHarvesterQuery.ts @@ -7,7 +7,7 @@ export default function useGetHarvesterQuery({ nodeId }: { nodeId: string }) { const harvester = useMemo( () => data?.find((harvesterItem) => harvesterItem.connection.nodeId === nodeId), - [data, nodeId] + [data, nodeId], ); const isLoading = isLoadingHarvesterSummary; diff --git a/packages/api-react/src/hooks/useGetHarvesterStats.ts b/packages/api-react/src/hooks/useGetHarvesterStats.ts index a4c064b95d..235f8114e0 100644 --- a/packages/api-react/src/hooks/useGetHarvesterStats.ts +++ b/packages/api-react/src/hooks/useGetHarvesterStats.ts @@ -7,7 +7,7 @@ export default function useGetHarvesterStats(nodeId: string) { const harvester = useMemo( () => data?.find((harvesterItem) => harvesterItem.connection.nodeId === nodeId), - [data, nodeId] + [data, nodeId], ); return { diff --git a/packages/api-react/src/hooks/useGetLatestBlocksQuery.ts b/packages/api-react/src/hooks/useGetLatestBlocksQuery.ts index f2489c12f2..8c636cbc30 100644 --- a/packages/api-react/src/hooks/useGetLatestBlocksQuery.ts +++ b/packages/api-react/src/hooks/useGetLatestBlocksQuery.ts @@ -14,7 +14,7 @@ export default function useGetLatestBlocksQuery(count = 10) { }, { skip: !peakHeight, - } + }, ); const isLoading = isLoadingBlockchainState || isLoadingBlocks; diff --git a/packages/api-react/src/hooks/useGetLatestPeakTimestampQuery.ts b/packages/api-react/src/hooks/useGetLatestPeakTimestampQuery.ts index 030513370e..c47fe3b1f6 100644 --- a/packages/api-react/src/hooks/useGetLatestPeakTimestampQuery.ts +++ b/packages/api-react/src/hooks/useGetLatestPeakTimestampQuery.ts @@ -34,7 +34,7 @@ export default function useGetLatestPeakTimestampQuery() { const newPeakTimestamp = useMemo( () => getLatestTimestamp(blocks, latestPeakTimestamp.current), - [blocks, latestPeakTimestamp] + [blocks, latestPeakTimestamp], ); latestPeakTimestamp.current = newPeakTimestamp; diff --git a/packages/api-react/src/hooks/useLocalStorage.ts b/packages/api-react/src/hooks/useLocalStorage.ts index 794890b089..2fae6787c8 100644 --- a/packages/api-react/src/hooks/useLocalStorage.ts +++ b/packages/api-react/src/hooks/useLocalStorage.ts @@ -24,7 +24,7 @@ function getValueFromLocalStorage(key: string): T | undefined { export default function useLocalStorage( key: string, - defaultValue?: T + defaultValue?: T, ): [T | undefined, (value: T | ((value: T | undefined) => T)) => void] { const [storedValue, setStoredValue] = useState(getValueFromLocalStorage(key)); const defaultValueRef = useRef(defaultValue); @@ -57,7 +57,7 @@ export default function useLocalStorage( return newValue; }); }, - [key] + [key], ); const changeHandler = useCallback( @@ -67,7 +67,7 @@ export default function useLocalStorage( setStoredValue(newValue); } }, - [key] + [key], ); // Listen changes diff --git a/packages/api-react/src/hooks/usePrefs.ts b/packages/api-react/src/hooks/usePrefs.ts index 13785788b7..2ffd99a919 100644 --- a/packages/api-react/src/hooks/usePrefs.ts +++ b/packages/api-react/src/hooks/usePrefs.ts @@ -34,7 +34,7 @@ export function isEqual(a: Serializable, b: Serializable) { export default function usePrefs( key: string, - defaultValue: T + defaultValue: T, ): [T, (value: T | ((value: T) => T)) => void] { const [value, setValue] = useState(getPreferences(key)); const valueRef = useRef(value); @@ -65,7 +65,7 @@ export default function usePrefs( // notify other hooks eventEmitter.emit('prefs', { key, newValue }); }, - [key] + [key], ); const handleOnChange = useCallback( @@ -74,7 +74,7 @@ export default function usePrefs( setValue(e.newValue); } }, - [key] + [key], ); // The reason to use EventEmitter for updating prefs state: diff --git a/packages/api-react/src/hooks/useService.ts b/packages/api-react/src/hooks/useService.ts index cb10e83378..8353a9c784 100644 --- a/packages/api-react/src/hooks/useService.ts +++ b/packages/api-react/src/hooks/useService.ts @@ -18,7 +18,7 @@ type Options = { export default function useService( service: ServiceNameValue, - options: Options = {} + options: Options = {}, ): { isLoading: boolean; isRunning: boolean; diff --git a/packages/api-react/src/hooks/useServices.ts b/packages/api-react/src/hooks/useServices.ts index 5b3ed0ff00..96e0ddb01b 100644 --- a/packages/api-react/src/hooks/useServices.ts +++ b/packages/api-react/src/hooks/useServices.ts @@ -43,7 +43,7 @@ function getServiceOptions(service: ServiceNameValue, services: ServiceNameValue export default function useMonitorServices( services: ServiceNameValue[], - options: Options = {} + options: Options = {}, ): { isLoading: boolean; error?: Error | unknown; @@ -67,7 +67,7 @@ export default function useMonitorServices( const introducerState = useService( ServiceName.INTRODUCER, - getServiceOptions(ServiceName.INTRODUCER, services, options) + getServiceOptions(ServiceName.INTRODUCER, services, options), ); const datalayerState = useService(ServiceName.DATALAYER, getServiceOptions(ServiceName.DATALAYER, services, options)); diff --git a/packages/api-react/src/hooks/useSubscribeToEvent.ts b/packages/api-react/src/hooks/useSubscribeToEvent.ts index a9ff5b539f..5692b98d2d 100644 --- a/packages/api-react/src/hooks/useSubscribeToEvent.ts +++ b/packages/api-react/src/hooks/useSubscribeToEvent.ts @@ -11,7 +11,7 @@ function subscribe(event: string, service: ServiceConstructor, cb: Function) { service, args: [cb], }, - api + api, ); return unsubscribe; diff --git a/packages/api-react/src/hooks/useThrottleQuery.ts b/packages/api-react/src/hooks/useThrottleQuery.ts index 7a2e481b67..c07392aa13 100644 --- a/packages/api-react/src/hooks/useThrottleQuery.ts +++ b/packages/api-react/src/hooks/useThrottleQuery.ts @@ -13,7 +13,7 @@ export default function useThrottleQuery( wait?: number; leading?: boolean; trailing?: boolean; - } = {} + } = {}, ) { const { leading = true, trailing = true, wait = 0 } = throttleOptions; @@ -30,7 +30,7 @@ export default function useThrottleQuery( leading, trailing, }), - [wait, leading, trailing, forceUpdate] + [wait, leading, trailing, forceUpdate], ); queryHook(variables, { diff --git a/packages/api-react/src/services/client.ts b/packages/api-react/src/services/client.ts index e3ec033fc1..3ccc03c102 100644 --- a/packages/api-react/src/services/client.ts +++ b/packages/api-react/src/services/client.ts @@ -30,7 +30,7 @@ export const clientApi = apiWithTag.injectEndpoints({ }, ], }, - apiLocal + apiLocal, ); unsubscribe = response.data; diff --git a/packages/api-react/src/services/daemon.ts b/packages/api-react/src/services/daemon.ts index 32c0073f9a..68b97d1ba7 100644 --- a/packages/api-react/src/services/daemon.ts +++ b/packages/api-react/src/services/daemon.ts @@ -29,7 +29,7 @@ export const daemonApi = apiWithTag.injectEndpoints({ providesTags: (keys) => keys ? [ - ...keys.map((key) => ({ type: 'DaemonKey', id: key.fingerprint } as const)), + ...keys.map((key) => ({ type: 'DaemonKey', id: key.fingerprint }) as const), { type: 'DaemonKey', id: 'LIST' }, ] : [{ type: 'DaemonKey', id: 'LIST' }], @@ -44,7 +44,7 @@ export const daemonApi = apiWithTag.injectEndpoints({ walletAddresses[fingerprint].map((address) => ({ type: 'WalletAddress', id: `${fingerprint}:${address.hdPath}`, - })) + })), ), { type: 'WalletAddress', id: 'LIST' }, ] diff --git a/packages/api-react/src/services/farmer.ts b/packages/api-react/src/services/farmer.ts index d0cb60ade2..c182121974 100644 --- a/packages/api-react/src/services/farmer.ts +++ b/packages/api-react/src/services/farmer.ts @@ -87,7 +87,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (plots) => plots ? [ - ...plots.map(({ plotId }) => ({ type: 'HarvesterPlots', plotId } as const)), + ...plots.map(({ plotId }) => ({ type: 'HarvesterPlots', plotId }) as const), { type: 'HarvesterPlots', id: 'LIST' }, ] : [{ type: 'HarvesterPlots', id: 'LIST' }], @@ -106,7 +106,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (plots) => plots ? [ - ...plots.map((filename) => ({ type: 'HarvesterPlotsInvalid', filename } as const)), + ...plots.map((filename) => ({ type: 'HarvesterPlotsInvalid', filename }) as const), { type: 'HarvesterPlotsInvalid', id: 'LIST' }, ] : [{ type: 'HarvesterPlotsInvalid', id: 'LIST' }], @@ -125,7 +125,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (plots) => plots ? [ - ...plots.map((filename) => ({ type: 'HarvesterPlotsKeysMissing', filename } as const)), + ...plots.map((filename) => ({ type: 'HarvesterPlotsKeysMissing', filename }) as const), { type: 'HarvesterPlotsKeysMissing', id: 'LIST' }, ] : [{ type: 'HarvesterPlotsKeysMissing', id: 'LIST' }], @@ -144,7 +144,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (plots) => plots ? [ - ...plots.map((filename) => ({ type: 'HarvesterPlotsDuplicates', filename } as const)), + ...plots.map((filename) => ({ type: 'HarvesterPlotsDuplicates', filename }) as const), { type: 'HarvesterPlotsDuplicates', id: 'LIST' }, ] : [{ type: 'HarvesterPlotsDuplicates', id: 'LIST' }], @@ -171,7 +171,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (connections) => connections ? [ - ...connections.map(({ nodeId }) => ({ type: 'FarmerConnections', id: nodeId } as const)), + ...connections.map(({ nodeId }) => ({ type: 'FarmerConnections', id: nodeId }) as const), { type: 'FarmerConnections', id: 'LIST' }, ] : [{ type: 'FarmerConnections', id: 'LIST' }], @@ -212,7 +212,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (signagePoints) => signagePoints ? [ - ...signagePoints.map(({ challengeHash }) => ({ type: 'SignagePoints', id: challengeHash } as const)), + ...signagePoints.map(({ challengeHash }) => ({ type: 'SignagePoints', id: challengeHash }) as const), { type: 'SignagePoints', id: 'LIST' }, ] : [{ type: 'SignagePoints', id: 'LIST' }], @@ -235,7 +235,7 @@ export const farmerApi = apiWithTag.injectEndpoints({ providesTags: (poolsList) => poolsList ? [ - ...poolsList.map(({ p2SingletonPuzzleHash }) => ({ type: 'Pools', id: p2SingletonPuzzleHash } as const)), + ...poolsList.map(({ p2SingletonPuzzleHash }) => ({ type: 'Pools', id: p2SingletonPuzzleHash }) as const), { type: 'Pools', id: 'LIST' }, ] : [{ type: 'Pools', id: 'LIST' }], diff --git a/packages/api-react/src/services/fullNode.ts b/packages/api-react/src/services/fullNode.ts index f9d0c21ab4..be30bef5f4 100644 --- a/packages/api-react/src/services/fullNode.ts +++ b/packages/api-react/src/services/fullNode.ts @@ -101,7 +101,7 @@ export const fullNodeApi = apiWithTag.injectEndpoints({ providesTags: (connections) => connections ? [ - ...connections.map(({ nodeId }) => ({ type: 'FullNodeConnections', id: nodeId } as const)), + ...connections.map(({ nodeId }) => ({ type: 'FullNodeConnections', id: nodeId }) as const), { type: 'FullNodeConnections', id: 'LIST' }, ] : [{ type: 'FullNodeConnections', id: 'LIST' }], diff --git a/packages/api-react/src/services/harvester.ts b/packages/api-react/src/services/harvester.ts index 5b4a700f99..8f7ee0d01f 100644 --- a/packages/api-react/src/services/harvester.ts +++ b/packages/api-react/src/services/harvester.ts @@ -55,7 +55,7 @@ export const harvesterApi = apiWithTag2.injectEndpoints({ providesTags: (directories) => directories ? [ - ...directories.map((directory) => ({ type: 'PlotDirectories', id: directory } as const)), + ...directories.map((directory) => ({ type: 'PlotDirectories', id: directory }) as const), { type: 'PlotDirectories', id: 'LIST' }, ] : [{ type: 'PlotDirectories', id: 'LIST' }], diff --git a/packages/api-react/src/services/wallet.ts b/packages/api-react/src/services/wallet.ts index 68fba3c730..696b0214ff 100644 --- a/packages/api-react/src/services/wallet.ts +++ b/packages/api-react/src/services/wallet.ts @@ -124,7 +124,7 @@ export const walletApi = apiWithTag.injectEndpoints({ ...wallet, meta, }; - }) + }), ), }; } catch (error) { @@ -136,7 +136,7 @@ export const walletApi = apiWithTag.injectEndpoints({ // transformResponse: (response) => response.wallets, providesTags(result) { return result - ? [...result.map(({ id }) => ({ type: 'Wallets', id } as const)), { type: 'Wallets', id: 'LIST' }] + ? [...result.map(({ id }) => ({ type: 'Wallets', id }) as const), { type: 'Wallets', id: 'LIST' }] : [{ type: 'Wallets', id: 'LIST' }]; }, onCacheEntryAdded: onCacheEntryAddedInvalidate(baseQuery, api, [ @@ -367,7 +367,7 @@ export const walletApi = apiWithTag.injectEndpoints({ }, ], }, - queryApi + queryApi, ); } @@ -419,7 +419,7 @@ export const walletApi = apiWithTag.injectEndpoints({ transformResponse: (response) => response.publicKeyFingerprints, providesTags: (keys) => keys - ? [...keys.map((key) => ({ type: 'Keys', id: key } as const)), { type: 'Keys', id: 'LIST' }] + ? [...keys.map((key) => ({ type: 'Keys', id: key }) as const), { type: 'Keys', id: 'LIST' }] : [{ type: 'Keys', id: 'LIST' }], }), @@ -456,7 +456,7 @@ export const walletApi = apiWithTag.injectEndpoints({ providesTags(result) { return result ? [ - ...result.map(({ name }) => ({ type: 'Transactions', id: name } as const)), + ...result.map(({ name }) => ({ type: 'Transactions', id: name }) as const), { type: 'Transactions', id: 'LIST' }, ] : [{ type: 'Transactions', id: 'LIST' }]; @@ -581,7 +581,7 @@ export const walletApi = apiWithTag.injectEndpoints({ providesTags: (connections) => connections ? [ - ...connections.map(({ nodeId }) => ({ type: 'WalletConnections', id: nodeId } as const)), + ...connections.map(({ nodeId }) => ({ type: 'WalletConnections', id: nodeId }) as const), { type: 'WalletConnections', id: 'LIST' }, ] : [{ type: 'WalletConnections', id: 'LIST' }], @@ -615,7 +615,7 @@ export const walletApi = apiWithTag.injectEndpoints({ providesTags(result) { return result ? [ - ...result.map(({ tradeId }) => ({ type: 'OfferTradeRecord', id: tradeId } as const)), + ...result.map(({ tradeId }) => ({ type: 'OfferTradeRecord', id: tradeId }) as const), { type: 'OfferTradeRecord', id: 'LIST' }, ] : [{ type: 'OfferTradeRecord', id: 'LIST' }]; @@ -698,7 +698,7 @@ export const walletApi = apiWithTag.injectEndpoints({ transformResponse: (response) => response.catList, providesTags(result) { return result - ? [...result.map(({ assetId }) => ({ type: 'CATs', id: assetId } as const)), { type: 'CATs', id: 'LIST' }] + ? [...result.map(({ assetId }) => ({ type: 'CATs', id: assetId }) as const), { type: 'CATs', id: 'LIST' }] : [{ type: 'CATs', id: 'LIST' }]; }, }), @@ -756,7 +756,7 @@ export const walletApi = apiWithTag.injectEndpoints({ } const transaction = updatedTransactions.find( - (trx) => trx.name === transactionName && !!trx?.sentTo?.length + (trx) => trx.name === transactionName && !!trx?.sentTo?.length, ); if (transaction) { @@ -785,7 +785,7 @@ export const walletApi = apiWithTag.injectEndpoints({ }, ], }, - queryApi + queryApi, ); } @@ -947,7 +947,7 @@ export const walletApi = apiWithTag.injectEndpoints({ ...data?.state, walletId: wallet.id, }; - }) + }), ), await Promise.all( poolWallets.map(async (wallet: any) => { @@ -962,7 +962,7 @@ export const walletApi = apiWithTag.injectEndpoints({ } return data?.walletBalance; - }) + }), ), ]); @@ -976,7 +976,7 @@ export const walletApi = apiWithTag.injectEndpoints({ poolStates.forEach((poolStateItem: any) => { const poolWalletStatus = poolWalletStates.find( - (item) => item.launcherId === poolStateItem.poolConfig.launcherId + (item) => item.launcherId === poolStateItem.poolConfig.launcherId, ); if (!poolWalletStatus) { external.push({ @@ -1092,7 +1092,7 @@ export const walletApi = apiWithTag.injectEndpoints({ ...wallet, myDid, }; - }) + }), ), }; } catch (error) { @@ -1103,7 +1103,7 @@ export const walletApi = apiWithTag.injectEndpoints({ }, providesTags(result) { return result - ? [...result.map(({ id }) => ({ type: 'DIDWallet', id } as const)), { type: 'DIDWallet', id: 'LIST' }] + ? [...result.map(({ id }) => ({ type: 'DIDWallet', id }) as const), { type: 'DIDWallet', id: 'LIST' }] : [{ type: 'DIDWallet', id: 'LIST' }]; }, onCacheEntryAdded: onCacheEntryAddedInvalidate(baseQuery, api, [ @@ -1171,7 +1171,7 @@ export const walletApi = apiWithTag.injectEndpoints({ }; return updatedNFT; - }) + }), ); return { @@ -1202,7 +1202,7 @@ export const walletApi = apiWithTag.injectEndpoints({ } countByWalletId[walletId] = nftCountData.count; - }) + }), ); const total = Object.values(countByWalletId).reduce((a, b) => a + b, 0); @@ -1221,7 +1221,7 @@ export const walletApi = apiWithTag.injectEndpoints({ }, providesTags: (countByWalletId) => countByWalletId - ? [...Object.entries(countByWalletId).map(([walletId]) => ({ type: 'NFTCount', id: walletId } as const))] + ? [...Object.entries(countByWalletId).map(([walletId]) => ({ type: 'NFTCount', id: walletId }) as const)] : [], }), @@ -1250,7 +1250,7 @@ export const walletApi = apiWithTag.injectEndpoints({ return { [walletId]: updatedNFTs, }; - }) + }), ); const nftsByWalletId: { [walletId: string]: NFTInfo[] } = {}; nftData.forEach((entry) => { @@ -1271,7 +1271,7 @@ export const walletApi = apiWithTag.injectEndpoints({ nftsByWalletId ? [ ...Object.entries(nftsByWalletId).flatMap(([_walletId, nfts]) => - nfts.map((nft) => ({ type: 'NFTInfo', id: nft.launcherId } as const)) + nfts.map((nft) => ({ type: 'NFTInfo', id: nft.launcherId }) as const), ), { type: 'NFTInfo', id: 'LIST' }, ] diff --git a/packages/api-react/src/utils/onCacheEntryAddedInvalidate.ts b/packages/api-react/src/utils/onCacheEntryAddedInvalidate.ts index 37e5a15e1e..371fddfd0b 100644 --- a/packages/api-react/src/utils/onCacheEntryAddedInvalidate.ts +++ b/packages/api-react/src/utils/onCacheEntryAddedInvalidate.ts @@ -52,7 +52,7 @@ export default function onCacheEntryAddedInvalidate(rtkQuery: BaseQuery, api: an api.endpoints[endpoint].initiate(args, { subscribe: false, forceRefetch: true, - }) + }), ); } else { const currentEndpoint = endpoint(); @@ -61,7 +61,7 @@ export default function onCacheEntryAddedInvalidate(rtkQuery: BaseQuery, api: an currentEndpoint.initiate(args, { subscribe: false, forceRefetch: true, - }) + }), ); } } @@ -69,13 +69,13 @@ export default function onCacheEntryAddedInvalidate(rtkQuery: BaseQuery, api: an }, ], }, - mutationApi + mutationApi, ); if (response.data) { unsubscribes.push(response.data); } - }) + }), ); } finally { await cacheEntryRemoved; diff --git a/packages/api-react/src/utils/reduxToolkitEndpointAbstractions.ts b/packages/api-react/src/utils/reduxToolkitEndpointAbstractions.ts index 7c00ab581b..8f8d928dd7 100644 --- a/packages/api-react/src/utils/reduxToolkitEndpointAbstractions.ts +++ b/packages/api-react/src/utils/reduxToolkitEndpointAbstractions.ts @@ -14,8 +14,8 @@ export function query< TClass extends ServiceConstructor, Method extends keyof InstanceType & string, Transform extends (response: MethodReturnType) => any = ( - response: MethodReturnType - ) => MethodReturnType + response: MethodReturnType, + ) => MethodReturnType, >( build: Builder, service: TClass, @@ -31,7 +31,7 @@ export function query< invalidatesTags?: Parameters< typeof build.query, MethodFirstParameter> >[0]['invalidatesTags']; - } = {} + } = {}, ) { const { transformResponse = (data) => data, ...rest } = options; @@ -56,8 +56,8 @@ export function mutation< TClass extends ServiceConstructor, Method extends keyof InstanceType & string, Transform extends (response: MethodReturnType) => any = ( - response: MethodReturnType - ) => MethodReturnType + response: MethodReturnType, + ) => MethodReturnType, >( build: Builder, service: TClass, @@ -73,7 +73,7 @@ export function mutation< invalidatesTags?: Parameters< typeof build.mutation, MethodFirstParameter> >[0]['invalidatesTags']; - } = {} // Omit, MethodFirstParameter>>[0], 'query'> = {} + } = {}, // Omit, MethodFirstParameter>>[0], 'query'> = {} ) { const { transformResponse = (data) => data, ...rest } = options; diff --git a/packages/api/src/@types/PoolState.ts b/packages/api/src/@types/PoolState.ts index 4185a68b18..8079738769 100644 --- a/packages/api/src/@types/PoolState.ts +++ b/packages/api/src/@types/PoolState.ts @@ -26,7 +26,7 @@ type PoolState = { { errorCode: number; errorMessage: string; - } + }, ] >; validPartialsSinceStart: number; diff --git a/packages/api/src/Client.ts b/packages/api/src/Client.ts index 69cd2ccbaa..c48e4abcc2 100644 --- a/packages/api/src/Client.ts +++ b/packages/api/src/Client.ts @@ -303,7 +303,7 @@ export default class Client extends EventEmitter { this.requests.delete(requestId); reject( - new ErrorData(`The request ${requestId} has timed out ${currentTimeout / 1000} seconds.`, undefined) + new ErrorData(`The request ${requestId} has timed out ${currentTimeout / 1000} seconds.`, undefined), ); } }, currentTimeout); diff --git a/packages/api/src/Message.test.ts b/packages/api/src/Message.test.ts index a84acca242..89b3566641 100644 --- a/packages/api/src/Message.test.ts +++ b/packages/api/src/Message.test.ts @@ -59,7 +59,7 @@ describe('Message', () => { const message = new Message(options); const json = message.toJSON(false); expect(json).toEqual( - '{"command":"test","data":{"testKey":"test","test_key":"test","TestKey":"test"},"origin":"test","destination":"test","ack":true,"request_id":"test"}' + '{"command":"test","data":{"testKey":"test","test_key":"test","TestKey":"test"},"origin":"test","destination":"test","ack":true,"request_id":"test"}', ); }); @@ -75,7 +75,7 @@ describe('Message', () => { const message = new Message(options); const json = message.toJSON(true); expect(json).toEqual( - '{"command":"test","data":{"test_key":"test","test_key_1":"test","test_key_2":"test"},"origin":"test","destination":"test","ack":true,"request_id":"test"}' + '{"command":"test","data":{"test_key":"test","test_key_1":"test","test_key_2":"test"},"origin":"test","destination":"test","ack":true,"request_id":"test"}', ); }); @@ -90,7 +90,7 @@ describe('Message', () => { const message = new Message(options); const json = message.toJSON(true); expect(json).toEqual( - '{"command":"test","data":{},"origin":"test","destination":"test","ack":true,"request_id":"test"}' + '{"command":"test","data":{},"origin":"test","destination":"test","ack":true,"request_id":"test"}', ); }); @@ -105,7 +105,7 @@ describe('Message', () => { const message = new Message(options); const json = message.toJSON(true); expect(json).toEqual( - '{"command":"test","data":{"test_key":"test"},"origin":"test","destination":"test","ack":false,"request_id":"test"}' + '{"command":"test","data":{"test_key":"test"},"origin":"test","destination":"test","ack":false,"request_id":"test"}', ); }); }); diff --git a/packages/api/src/services/Daemon.ts b/packages/api/src/services/Daemon.ts index 8b6bb2c63b..44791225c1 100644 --- a/packages/api/src/services/Daemon.ts +++ b/packages/api/src/services/Daemon.ts @@ -151,7 +151,7 @@ export default class Daemon extends Service { origin: client.origin, destination: service, }), - 1000 + 1000, ); if (data.success) { @@ -370,7 +370,7 @@ export default class Daemon extends Service { } return undefined; - }) + }), ); } @@ -427,7 +427,7 @@ export default class Daemon extends Service { getKeysForPlotting(args?: { fingerprints?: number[] }) { return this.command<{ keys: { [fingerprint: number]: { farmerPublicKey: string; poolPublicKey: string } } }>( 'get_keys_for_plotting', - args + args, ); } diff --git a/packages/api/src/services/Farmer.ts b/packages/api/src/services/Farmer.ts index 4fd18a16af..4c0dfcf94c 100644 --- a/packages/api/src/services/Farmer.ts +++ b/packages/api/src/services/Farmer.ts @@ -131,7 +131,7 @@ export default class Farmer extends Service { newFarmingInfo: this.newFarmingInfo, latencyData: this.latencyData, }, - null + null, ); } }); diff --git a/packages/api/src/services/PlotterService.ts b/packages/api/src/services/PlotterService.ts index ba361ec6d1..7c6368b2a3 100644 --- a/packages/api/src/services/PlotterService.ts +++ b/packages/api/src/services/PlotterService.ts @@ -51,7 +51,7 @@ function mergeQueue( // partialQueue does not contain `log` property. currentQueue and the result contains it currentQueue: PlotQueueItem[], partialQueue: PlotQueueItem[], - isLogChange: boolean + isLogChange: boolean, ): PlotQueueItem[] { let result = [...currentQueue]; diff --git a/packages/api/src/services/Service.ts b/packages/api/src/services/Service.ts index 50aa6e00d4..b1b68dda93 100644 --- a/packages/api/src/services/Service.ts +++ b/packages/api/src/services/Service.ts @@ -77,7 +77,7 @@ export default abstract class Service extends EventEmitter { data: Object = {}, ack = false, timeout?: number, - disableFormat?: boolean + disableFormat?: boolean, ): Promise { const { client, origin, name } = this; @@ -97,7 +97,7 @@ export default abstract class Service extends EventEmitter { ack, }), timeout, - disableFormat + disableFormat, ); return response?.data as Data; @@ -110,7 +110,7 @@ export default abstract class Service extends EventEmitter { onCommand( command: string, callback: (data: any, message: Message) => void, - processData?: (data: any, message: Message) => any + processData?: (data: any, message: Message) => any, ): () => void { function handleCommand(data: any, message: Message) { const updatedData = processData ? processData(data, message) : data; @@ -132,7 +132,7 @@ export default abstract class Service extends EventEmitter { callback(data, message); } }, - processData + processData, ); } } diff --git a/packages/api/src/services/WalletService.ts b/packages/api/src/services/WalletService.ts index 8f51f6b750..c20cdf7636 100644 --- a/packages/api/src/services/WalletService.ts +++ b/packages/api/src/services/WalletService.ts @@ -252,7 +252,7 @@ export default class Wallet extends Service { { driver_dict: driverDict, ...restArgs }, false, undefined, - disableJSONFormatting + disableJSONFormatting, ); } @@ -384,8 +384,8 @@ export default class Wallet extends Service { state: 'coin_added'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('coin_added', callback); } @@ -397,8 +397,8 @@ export default class Wallet extends Service { state: 'coin_removed'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('coin_removed', callback); } @@ -438,8 +438,8 @@ export default class Wallet extends Service { state: 'nft_coin_added'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('nft_coin_added', callback); } @@ -451,8 +451,8 @@ export default class Wallet extends Service { state: 'nft_coin_removed'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('nft_coin_removed', callback); } @@ -464,8 +464,8 @@ export default class Wallet extends Service { state: 'nft_coin_updated'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('nft_coin_updated', callback); } @@ -477,8 +477,8 @@ export default class Wallet extends Service { state: 'vc_coin_added'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('vc_coin_added', callback); } @@ -490,8 +490,8 @@ export default class Wallet extends Service { state: 'vc_coin_removed'; walletId: number; }, - message: Message - ) => void + message: Message, + ) => void, ) { return this.onStateChanged('vc_coin_removed', callback); } @@ -503,9 +503,9 @@ export default class Wallet extends Service { index: number; }; }, - message: Message + message: Message, ) => void, - processData?: (data: any) => any + processData?: (data: any) => any, ) { return this.onStateChanged('new_derivation_index', callback, processData); } @@ -517,9 +517,9 @@ export default class Wallet extends Service { index: number; }; }, - message: Message + message: Message, ) => void, - processData?: (data: any) => any + processData?: (data: any) => any, ) { return this.onStateChanged('nft_coin_did_set', callback, processData); } diff --git a/packages/api/src/tests/utils/calculateRoyalties.test.ts b/packages/api/src/tests/utils/calculateRoyalties.test.ts index 1a62dfba1e..b424486a5f 100644 --- a/packages/api/src/tests/utils/calculateRoyalties.test.ts +++ b/packages/api/src/tests/utils/calculateRoyalties.test.ts @@ -66,7 +66,7 @@ describe('calculateRoyalties', () => { it('converts an numeric wallet id and amount to a fungible asset', () => { const fungibleAsset: RoyaltyCalculationFungibleAsset = fungibleAssetFromWalletIdAndAmount( 1, - new BigNumber(100_000_000_000_000) + new BigNumber(100_000_000_000_000), ); expect(fungibleAsset.asset).toBe('1'); expect(fungibleAsset.amount).toEqual(new BigNumber(100_000_000_000_000)); @@ -74,7 +74,7 @@ describe('calculateRoyalties', () => { it('converts a string wallet id and amount to a fungible asset', () => { const fungibleAsset: RoyaltyCalculationFungibleAsset = fungibleAssetFromWalletIdAndAmount( '2', - new BigNumber(100_000) + new BigNumber(100_000), ); expect(fungibleAsset.asset).toBe('2'); expect(fungibleAsset.amount).toEqual(new BigNumber(100_000)); @@ -84,7 +84,7 @@ describe('calculateRoyalties', () => { it('converts an asset id and amount to a fungible asset', () => { const fungibleAsset: RoyaltyCalculationFungibleAsset = fungibleAssetFromAssetIdAndAmount( 'a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913', - new BigNumber(100_000_000_000_000) + new BigNumber(100_000_000_000_000), ); expect(fungibleAsset.asset).toBe('a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913'); expect(fungibleAsset.amount).toEqual(new BigNumber(100_000_000_000_000)); diff --git a/packages/api/src/utils/calculateRoyalties.ts b/packages/api/src/utils/calculateRoyalties.ts index bc719acc45..3ef442101d 100644 --- a/packages/api/src/utils/calculateRoyalties.ts +++ b/packages/api/src/utils/calculateRoyalties.ts @@ -12,7 +12,7 @@ type NFTInfoWithFrontEndData = NFTInfo & { export default function royaltyAssetFromNFTInfo( nftInfo: NFTInfoWithFrontEndData, - testnet = false + testnet = false, ): RoyaltyCalculationRoyaltyAsset { return { asset: nftInfo.$nftId, @@ -23,7 +23,7 @@ export default function royaltyAssetFromNFTInfo( export function fungibleAssetFromWalletIdAndAmount( walletId: number | string, - amount: BigNumber + amount: BigNumber, ): RoyaltyCalculationFungibleAsset { return { asset: walletId.toString(), diff --git a/packages/api/src/utils/toBech32m.ts b/packages/api/src/utils/toBech32m.ts index 1da9a72d63..47e0d04448 100644 --- a/packages/api/src/utils/toBech32m.ts +++ b/packages/api/src/utils/toBech32m.ts @@ -32,7 +32,7 @@ export function fromBech32m(value: string): string { export function decodeBech32m( value: string, - outputEncoding: BufferEncoding = 'utf8' + outputEncoding: BufferEncoding = 'utf8', ): { prefix: string; data: string } { const { words, prefix } = bech32m.decode(value); const data = Buffer.from(bech32m.fromWords(words)).toString(outputEncoding); diff --git a/packages/api/src/wallets/NFT.ts b/packages/api/src/wallets/NFT.ts index 98ecd82686..cce76583eb 100644 --- a/packages/api/src/wallets/NFT.ts +++ b/packages/api/src/wallets/NFT.ts @@ -150,7 +150,7 @@ export default class NFTWallet extends Wallet { async calculateRoyalties(args: CalculateRoyaltiesRequest) { return this.command>>( 'nft_calculate_royalties', - args + args, ); } } diff --git a/packages/core/src/components/AddressBookProvider/AddressBookProvider.tsx b/packages/core/src/components/AddressBookProvider/AddressBookProvider.tsx index 5560d33ca5..3b583326b9 100644 --- a/packages/core/src/components/AddressBookProvider/AddressBookProvider.tsx +++ b/packages/core/src/components/AddressBookProvider/AddressBookProvider.tsx @@ -14,7 +14,7 @@ export default function AddressBookProvider({ children }) { const value = useMemo( () => [addressBook, addContact, removeContact, getContactByContactId, editContact, getContactByAddress], - [addressBook, addContact, removeContact, getContactByContactId, editContact, getContactByAddress] + [addressBook, addContact, removeContact, getContactByContactId, editContact, getContactByAddress], ); return {children}; diff --git a/packages/core/src/components/Auth/AuthProvider.tsx b/packages/core/src/components/Auth/AuthProvider.tsx index 7c3c4b02ec..ba95fea22f 100644 --- a/packages/core/src/components/Auth/AuthProvider.tsx +++ b/packages/core/src/components/Auth/AuthProvider.tsx @@ -38,7 +38,7 @@ export default function AuthProvider(props: AuthProviderProps) { } } }, - [clearCache] + [clearCache], ); // automatically log in if we have a fingerprint already and logIn is not in progress @@ -79,7 +79,7 @@ export default function AuthProvider(props: AuthProviderProps) { setIsLoading(false); } }, - [handleLogOut, logIn, clearCache] + [handleLogOut, logIn, clearCache], ); const context = useMemo( @@ -89,7 +89,7 @@ export default function AuthProvider(props: AuthProviderProps) { fingerprint, isLoading, }), - [handleLogIn, handleLogOut, fingerprint, isLoading] + [handleLogIn, handleLogOut, fingerprint, isLoading], ); return {children}; diff --git a/packages/core/src/components/Back/Back.tsx b/packages/core/src/components/Back/Back.tsx index a489f9caf7..6f96112c2d 100644 --- a/packages/core/src/components/Back/Back.tsx +++ b/packages/core/src/components/Back/Back.tsx @@ -38,7 +38,7 @@ export default function Back(props: BackProps) { confirmColor="danger" > You have made changes. Do you want to discard them? - + , )); if (!canGoBack) { diff --git a/packages/core/src/components/CardListItem/CardListItem.tsx b/packages/core/src/components/CardListItem/CardListItem.tsx index 7cb35361fb..0db27ead9b 100644 --- a/packages/core/src/components/CardListItem/CardListItem.tsx +++ b/packages/core/src/components/CardListItem/CardListItem.tsx @@ -36,8 +36,8 @@ export default function CardListItem(props: CardListItemProps) { selected ? theme.palette.highlight.main : borderTransparency - ? theme.palette.background.default - : getColorModeValue(theme, 'border') + ? theme.palette.background.default + : getColorModeValue(theme, 'border') }`, backgroundColor: (theme) => `${selected ? getColorModeValue(theme, 'sidebarBackground') : theme.palette.background.paper}`, diff --git a/packages/core/src/components/Dropdown/DropdownActions.tsx b/packages/core/src/components/Dropdown/DropdownActions.tsx index 5b21ab9ab8..fd045c8c96 100644 --- a/packages/core/src/components/Dropdown/DropdownActions.tsx +++ b/packages/core/src/components/Dropdown/DropdownActions.tsx @@ -26,10 +26,10 @@ const StyledMenu = styled((props: MenuProps) => ( color: theme.palette.mode === 'light' ? Color.Comet[700] : theme.palette.grey[300], boxShadow: `${Color.Neutral[50]} 0px 0px 0px 0px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.15 : 0.05 + theme.palette.mode === 'dark' ? 0.15 : 0.05, )} 0px 0px 0px 1px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.01 : 0.1 + theme.palette.mode === 'dark' ? 0.01 : 0.1, )} 0px 10px 15px -3px, ${alpha(Color.Neutral[900], theme.palette.mode === 'dark' ? 0.15 : 0.05)} 0px 4px 6px -2px`, '& .MuiMenu-list': { padding: '4px 0', diff --git a/packages/core/src/components/Dropdown/DropdownBase.tsx b/packages/core/src/components/Dropdown/DropdownBase.tsx index c64cbe541f..a7134bd381 100644 --- a/packages/core/src/components/Dropdown/DropdownBase.tsx +++ b/packages/core/src/components/Dropdown/DropdownBase.tsx @@ -26,10 +26,10 @@ const StyledMenu = styled((props: MenuProps) => ( color: theme.palette.mode === 'light' ? Color.Comet[700] : theme.palette.grey[300], boxShadow: `${Color.Neutral[50]} 0px 0px 0px 0px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.15 : 0.05 + theme.palette.mode === 'dark' ? 0.15 : 0.05, )} 0px 0px 0px 1px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.01 : 0.1 + theme.palette.mode === 'dark' ? 0.01 : 0.1, )} 0px 10px 15px -3px, ${alpha(Color.Neutral[900], theme.palette.mode === 'dark' ? 0.15 : 0.05)} 0px 4px 6px -2px`, '& .MuiMenu-list': { padding: '4px 0', diff --git a/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx b/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx index 86f5e9d8c3..0baa27119f 100644 --- a/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx +++ b/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx @@ -17,7 +17,7 @@ const StyledPre = styled(Typography)(() => ({ function formatStackTrace(stack: []) { const stackTrace = stack.map( ({ fileName, columnNumber, lineNumber, functionName }) => - `at ${fileName}:${lineNumber}:${columnNumber} ${functionName}` + `at ${fileName}:${lineNumber}:${columnNumber} ${functionName}`, ); return stackTrace.join('\n'); } diff --git a/packages/core/src/components/EstimatedFee/EstimatedFee.tsx b/packages/core/src/components/EstimatedFee/EstimatedFee.tsx index 54b032a7b6..8a8b24cc43 100644 --- a/packages/core/src/components/EstimatedFee/EstimatedFee.tsx +++ b/packages/core/src/components/EstimatedFee/EstimatedFee.tsx @@ -81,7 +81,7 @@ function Select(props: SelectProps) { onTypeChange('dropdown'); onTimeChange( formattedEstimates.find((estimate) => estimate.formattedEstimate === (event.target.value as string)) - ?.minutes ?? 0 + ?.minutes ?? 0, ); onValueChange(event.target.value as string); } @@ -186,7 +186,7 @@ export default function EstimatedFee(props: FeeProps) { { pollingInterval: REFRESH_SECONDS * 1000, // in milliseconds skip: mode === Mode.WALLET, - } + }, ); const { data: ests, isLoading, isSuccess, requestId: feeEstimateRequestId, startedTimeStamp } = result; @@ -210,8 +210,8 @@ export default function EstimatedFee(props: FeeProps) { ? defaultValues : defaultValues.concat([0]) : estimateList.some((val) => val === 0) - ? estimateList - : estimateList.concat([0]); + ? estimateList + : estimateList.concat([0]); return estList.map((estimate: number, i: number) => { const formattedEstimate = mojoToChiaLocaleString(estimate, locale); @@ -223,8 +223,8 @@ export default function EstimatedFee(props: FeeProps) { minutes > 1 ? t`Likely in ${minutes} minutes` : minutes === -1 - ? t`Likely in >5 minutes` - : t`Likely in ${TARGET_TIMES[i]} seconds`, + ? t`Likely in >5 minutes` + : t`Likely in ${TARGET_TIMES[i]} seconds`, estimate, formattedEstimate, }; diff --git a/packages/core/src/components/Form/Form.tsx b/packages/core/src/components/Form/Form.tsx index 7aa5a14f26..37d854a024 100644 --- a/packages/core/src/components/Form/Form.tsx +++ b/packages/core/src/components/Form/Form.tsx @@ -12,7 +12,7 @@ function Form( onSubmit: SubmitHandler; children: ReactNode; }, - ref: any + ref: any, ) { const { methods, onSubmit, ...rest } = props; const { handleSubmit } = methods; diff --git a/packages/core/src/components/FormBackButton/FormBackButton.tsx b/packages/core/src/components/FormBackButton/FormBackButton.tsx index 6b1fd0f4ae..fe02d6ecbc 100644 --- a/packages/core/src/components/FormBackButton/FormBackButton.tsx +++ b/packages/core/src/components/FormBackButton/FormBackButton.tsx @@ -29,7 +29,7 @@ export default function FormBackButton(props: Props) { confirmColor="danger" > You have made changes. Do you want to discard them? - + , )); if (canGoBack) { diff --git a/packages/core/src/components/FormatBytes/FormatBytes.tsx b/packages/core/src/components/FormatBytes/FormatBytes.tsx index 20f94f5929..4abe46095b 100644 --- a/packages/core/src/components/FormatBytes/FormatBytes.tsx +++ b/packages/core/src/components/FormatBytes/FormatBytes.tsx @@ -49,7 +49,7 @@ export default function FormatBytes(props: Props) { // convert value to nearest bytes representation const unitIndex = Math.min( CovertReversed.length - 1, - CovertReversed.findIndex((item) => absValue.isGreaterThanOrEqualTo(item[0])) + CovertReversed.findIndex((item) => absValue.isGreaterThanOrEqualTo(item[0])), ); const [unitValue, unitName] = CovertReversed[unitIndex]; diff --git a/packages/core/src/components/LayoutDashboard/LayoutDashboard.tsx b/packages/core/src/components/LayoutDashboard/LayoutDashboard.tsx index 59bf82f70f..43d6f7ddb6 100644 --- a/packages/core/src/components/LayoutDashboard/LayoutDashboard.tsx +++ b/packages/core/src/components/LayoutDashboard/LayoutDashboard.tsx @@ -69,7 +69,7 @@ export default function LayoutDashboard(props: LayoutDashboardProps) { }, { skip: !fingerprint, - } + }, ); type WalletKeyTheme = { emoji: string | null; diff --git a/packages/core/src/components/LocaleProvider/LocaleProvider.tsx b/packages/core/src/components/LocaleProvider/LocaleProvider.tsx index 5491438cd4..21d0b72065 100644 --- a/packages/core/src/components/LocaleProvider/LocaleProvider.tsx +++ b/packages/core/src/components/LocaleProvider/LocaleProvider.tsx @@ -44,7 +44,7 @@ export default function LocaleProvider(props: LocaleProviderProps) { } setLocale(localeLocal); }, - [locales, setLocale] + [locales, setLocale], ); const context = useMemo( @@ -54,7 +54,7 @@ export default function LocaleProvider(props: LocaleProviderProps) { locale, setLocale: handleSetLocale, }), - [locales, defaultLocale, locale, handleSetLocale] + [locales, defaultLocale, locale, handleSetLocale], ); // prepare default locale diff --git a/packages/core/src/components/Menu/Menu.tsx b/packages/core/src/components/Menu/Menu.tsx index 39dc18502a..1971524db4 100644 --- a/packages/core/src/components/Menu/Menu.tsx +++ b/packages/core/src/components/Menu/Menu.tsx @@ -16,19 +16,19 @@ function Menu(props: MenuProps, ref: any) { const handleClose = useCallback( ( event: SyntheticEvent, - reason: 'escapeKeyDown' | 'backdropClick' | 'tabKeyDown' | 'menuItemClick' + reason: 'escapeKeyDown' | 'backdropClick' | 'tabKeyDown' | 'menuItemClick', ) => { event.stopPropagation(); onClose?.(event, reason as any); }, - [onClose] + [onClose], ); const context = useMemo( () => ({ close: handleClose, }), - [handleClose] + [handleClose], ); return ( diff --git a/packages/core/src/components/ModalDialogs/ModalDialogsProvider.tsx b/packages/core/src/components/ModalDialogs/ModalDialogsProvider.tsx index b603d11e18..0dfa0738fe 100644 --- a/packages/core/src/components/ModalDialogs/ModalDialogsProvider.tsx +++ b/packages/core/src/components/ModalDialogs/ModalDialogsProvider.tsx @@ -41,7 +41,7 @@ export default function ModalDialogsProvider(props: Props) { ]); }); }, - [hide] + [hide], ); const modalDialogsContextValue = useMemo( @@ -50,7 +50,7 @@ export default function ModalDialogsProvider(props: Props) { hide, dialogs, }), - [dialogs, hide, show] + [dialogs, hide, show], ); return {children}; diff --git a/packages/core/src/components/Mode/ModeProvider.tsx b/packages/core/src/components/Mode/ModeProvider.tsx index bbe7b302d3..4abb461db7 100644 --- a/packages/core/src/components/Mode/ModeProvider.tsx +++ b/packages/core/src/components/Mode/ModeProvider.tsx @@ -32,7 +32,7 @@ export default function ModeProvider(props: ModeProviderProps) { setModeState(newMode); } }, - [persist, setModePref, setModeState] + [persist, setModePref, setModeState], ); const mode = persist ? modePref : modeState; @@ -42,7 +42,7 @@ export default function ModeProvider(props: ModeProviderProps) { mode, setMode: handleSetMode, }), - [mode, handleSetMode] + [mode, handleSetMode], ); return {children}; diff --git a/packages/core/src/components/Persist/Persist.tsx b/packages/core/src/components/Persist/Persist.tsx index 8c1b32b106..5933f0e3d6 100755 --- a/packages/core/src/components/Persist/Persist.tsx +++ b/packages/core/src/components/Persist/Persist.tsx @@ -51,7 +51,7 @@ function Persist(props: PersistProps, ref: any) { return state[currentNamespace] ?? defaultValueLocal; }, - [state, persistNamespace, parentPersistContext] + [state, persistNamespace, parentPersistContext], ); const setValue = useCallback( @@ -68,7 +68,7 @@ function Persist(props: PersistProps, ref: any) { onChange(value); } }, - [state, persistNamespace, parentPersistContext, onChange] + [state, persistNamespace, parentPersistContext, onChange], ); const context = useMemo( @@ -76,7 +76,7 @@ function Persist(props: PersistProps, ref: any) { getValue, setValue, }), - [getValue, setValue] + [getValue, setValue], ); return ( diff --git a/packages/core/src/components/Scrollbar/ScrollbarVirtuoso.tsx b/packages/core/src/components/Scrollbar/ScrollbarVirtuoso.tsx index fc11164941..eaeaee47e4 100644 --- a/packages/core/src/components/Scrollbar/ScrollbarVirtuoso.tsx +++ b/packages/core/src/components/Scrollbar/ScrollbarVirtuoso.tsx @@ -16,7 +16,7 @@ function ScrollbarVirtuoso(props: ScrollbarProps, ref: any) { ref.current = scrollbarsRef.osInstance().getElements().viewport; } }, - [ref] + [ref], ); return ( diff --git a/packages/core/src/components/SideBarItem/SideBarItem.tsx b/packages/core/src/components/SideBarItem/SideBarItem.tsx index 34e6cce2fe..0624eaa200 100644 --- a/packages/core/src/components/SideBarItem/SideBarItem.tsx +++ b/packages/core/src/components/SideBarItem/SideBarItem.tsx @@ -31,7 +31,9 @@ const StyledListItemIcon = styled(ListItemIcon)` left: 0; width: 100%; height: 100%; - box-shadow: 0px -2px 4px ${alpha(Color.Green[300], 0.41)}, 0px 1px 8px ${alpha(Color.Lime[400], 0.45)}; + box-shadow: + 0px -2px 4px ${alpha(Color.Green[300], 0.41)}, + 0px 1px 8px ${alpha(Color.Lime[400], 0.45)}; opacity: 0; transition: opacity 0.3s ease-in-out; } diff --git a/packages/core/src/components/Table/TableControlled.tsx b/packages/core/src/components/Table/TableControlled.tsx index 3ec2c7f808..ccc57a4809 100644 --- a/packages/core/src/components/Table/TableControlled.tsx +++ b/packages/core/src/components/Table/TableControlled.tsx @@ -182,7 +182,7 @@ export default function TableControlled(props: TableControlledProps) { key: index, ...col, })), - [cols] + [cols], ); const preparedRows = useMemo( @@ -191,7 +191,7 @@ export default function TableControlled(props: TableControlledProps) { $uniqueId: uniqueField ? get(row, uniqueField) : rowIndex, ...row, })), - [rows, uniqueField] + [rows, uniqueField], ); function handleRowClick(e: SyntheticEvent, row: Row) { @@ -270,7 +270,7 @@ export function TableControlledRow({ for (let i = 0; i < expandedCellShift; i += 1) { expandableCells.push( - + , ); } return ( diff --git a/packages/core/src/components/TextField/TextField.tsx b/packages/core/src/components/TextField/TextField.tsx index bdd681210a..7850c3abbc 100644 --- a/packages/core/src/components/TextField/TextField.tsx +++ b/packages/core/src/components/TextField/TextField.tsx @@ -132,7 +132,7 @@ export default function TextField(props: TextFieldProps): JSX.Element { /> ); }, - [baseOnChange, name, dataTestid, inputProps, rest, rules, errors, helperText] + [baseOnChange, name, dataTestid, inputProps, rest, rules, errors, helperText], ); return ; diff --git a/packages/core/src/components/ToolbarSpacing/ToolbarSpacing.tsx b/packages/core/src/components/ToolbarSpacing/ToolbarSpacing.tsx index e9eb44739c..d415ccf923 100644 --- a/packages/core/src/components/ToolbarSpacing/ToolbarSpacing.tsx +++ b/packages/core/src/components/ToolbarSpacing/ToolbarSpacing.tsx @@ -4,7 +4,7 @@ import React from 'react'; const useStyles = makeStyles((theme: Theme) => createStyles({ toolbar: theme.mixins.toolbar, - }) + }), ); export default function ToolbarSpacing() { diff --git a/packages/core/src/components/Truncate/Truncate.tsx b/packages/core/src/components/Truncate/Truncate.tsx index 30930c97ee..739cda9586 100644 --- a/packages/core/src/components/Truncate/Truncate.tsx +++ b/packages/core/src/components/Truncate/Truncate.tsx @@ -57,7 +57,7 @@ export function truncateValue(children: string, opts: TruncateValueOptions): str } const truncatedSubValue = `${subValue.substring(0, leftLength)}${separator}${subValue.substring( - subValue.length - rightLength + subValue.length - rightLength, )}`; return rest diff --git a/packages/core/src/hooks/useAddressBook.tsx b/packages/core/src/hooks/useAddressBook.tsx index 3e58d517ab..835d393df9 100644 --- a/packages/core/src/hooks/useAddressBook.tsx +++ b/packages/core/src/hooks/useAddressBook.tsx @@ -9,7 +9,7 @@ export default function useAddressBook(): [ notes: string, nftId: string, domainNames: ContactDomainName[], - emoji: string + emoji: string, ) => void, // addContact (contactId: number) => void, // removeContact (contactId: number) => AddressContact | undefined, // getContactContactId @@ -21,9 +21,9 @@ export default function useAddressBook(): [ notes: string, nftId: string, domainNames: ContactDomainName[], - emoji: string + emoji: string, ) => void, // editContact - (address: string) => AddressContact | undefined // getContactByAddress + (address: string) => AddressContact | undefined, // getContactByAddress ] { // editContact const [addressBook, setAddressBook] = useState([]); @@ -54,7 +54,7 @@ export default function useAddressBook(): [ notes: string, nftId: string, domainNames: ContactDomainName[], - emoji: string + emoji: string, ) { const contactId = getNewContactId(); const newAddress: AddressContact = { @@ -89,7 +89,7 @@ export default function useAddressBook(): [ notes: string, nftId: string, domainNames: ContactDomainName[], - emoji: string + emoji: string, ) { const filteredContacts = addressBook.filter((contact) => contact.contactId !== contactId); @@ -109,7 +109,7 @@ export default function useAddressBook(): [ function getContactByAddress(address: string) { const result = addressBook.find( - (ab) => ab.addresses !== undefined && ab.addresses.some((c) => c.address === address) + (ab) => ab.addresses !== undefined && ab.addresses.some((c) => c.address === address), ); return result; } diff --git a/packages/core/src/hooks/useGetLatestVersionFromWebsite.ts b/packages/core/src/hooks/useGetLatestVersionFromWebsite.ts index 3e752899c8..b2e0171101 100644 --- a/packages/core/src/hooks/useGetLatestVersionFromWebsite.ts +++ b/packages/core/src/hooks/useGetLatestVersionFromWebsite.ts @@ -26,7 +26,7 @@ export default function useGetLatestVersionFromWebsite(): UseGetLatestVersionFro const [isLoading, setIsLoading] = useState(true); const [latestVersionURL] = useLocalStorage( 'latestVersionURL', - 'https://download.chia.net/latest/latest.json' + 'https://download.chia.net/latest/latest.json', ); const [skipVersions, setSkipVersions] = useLocalStorage('skipVersions', []); const { version: appVersion } = useAppVersion(); @@ -38,7 +38,7 @@ export default function useGetLatestVersionFromWebsite(): UseGetLatestVersionFro (version: string) => { setSkipVersions((prev) => [...(prev ?? []), version]); }, - [setSkipVersions] + [setSkipVersions], ); useEffect(() => { diff --git a/packages/core/src/hooks/useHiddenList.ts b/packages/core/src/hooks/useHiddenList.ts index de02cb8e27..49d7afbf4e 100644 --- a/packages/core/src/hooks/useHiddenList.ts +++ b/packages/core/src/hooks/useHiddenList.ts @@ -6,12 +6,12 @@ type List = { }; export default function useHiddenList( - listName: string + listName: string, ): [ isHidden: (key: Type) => boolean, setIsHidden: (key: Type, newValue: (isHidden: boolean) => boolean | boolean) => void, hidden: Type[], - setIsNFTMultipleHide: (nftIds: string[], hide: boolean) => void + setIsNFTMultipleHide: (nftIds: string[], hide: boolean) => void, ] { const [hiddenLists, setHiddenLists] = usePrefs>('isHidden', {}); @@ -35,7 +35,7 @@ export default function useHiddenList( }); } }, - [list, hiddenLists, setHiddenLists, listName] + [list, hiddenLists, setHiddenLists, listName], ); const setIsNFTMultipleHide = (nftIds: string[], hide: boolean) => { diff --git a/packages/core/src/hooks/useKeyringMigrationPrompt.tsx b/packages/core/src/hooks/useKeyringMigrationPrompt.tsx index 27ae4d6c7a..994000932e 100644 --- a/packages/core/src/hooks/useKeyringMigrationPrompt.tsx +++ b/packages/core/src/hooks/useKeyringMigrationPrompt.tsx @@ -22,7 +22,7 @@ export default function useKeyringMigrationPrompt() { Your keys have not been migrated to a new keyring. You will be unable to create new keys or delete existing keys until migration completes. Would you like to migrate your keys now? - + , ); if (beginMigration) { diff --git a/packages/core/src/hooks/useOpenDialog.ts b/packages/core/src/hooks/useOpenDialog.ts index 1111303eda..5a7bc86376 100644 --- a/packages/core/src/hooks/useOpenDialog.ts +++ b/packages/core/src/hooks/useOpenDialog.ts @@ -19,7 +19,7 @@ export default function useOpenDialog() { }); }, // eslint-disable-next-line react-hooks/exhaustive-deps -- Used only for unmounting - [] + [], ); const handleOpen = useCallback( @@ -32,7 +32,7 @@ export default function useOpenDialog() { return result; }, - [show] + [show], ); return handleOpen; diff --git a/packages/core/src/hooks/usePersistState.ts b/packages/core/src/hooks/usePersistState.ts index d4c3af1c9c..2784bf5776 100755 --- a/packages/core/src/hooks/usePersistState.ts +++ b/packages/core/src/hooks/usePersistState.ts @@ -17,7 +17,7 @@ export default function usePersistState(defaultValue: T, namespace?: string): update(); }, - [namespace, persistContext, update] + [namespace, persistContext, update], ); return [value, setValue]; diff --git a/packages/core/src/hooks/useScrollbarsSettings.tsx b/packages/core/src/hooks/useScrollbarsSettings.tsx index 0ca02c96e6..feaff1fb18 100644 --- a/packages/core/src/hooks/useScrollbarsSettings.tsx +++ b/packages/core/src/hooks/useScrollbarsSettings.tsx @@ -19,7 +19,7 @@ export default function useScrollbarsSettings(): ScrollbarsSettings & { autoHide, })); }, - [setSettings] + [setSettings], ); return { diff --git a/packages/core/src/hooks/useTrans.ts b/packages/core/src/hooks/useTrans.ts index f175ea4dbe..bb4ea28896 100644 --- a/packages/core/src/hooks/useTrans.ts +++ b/packages/core/src/hooks/useTrans.ts @@ -6,7 +6,7 @@ export default function useTrans() { const handleTranslate = useCallback( (messageId: string, values?: Object, options?: Object) => i18n._(messageId, values, options), - [i18n] + [i18n], ); return handleTranslate; diff --git a/packages/core/src/hooks/useValidateChangePassphraseParams.tsx b/packages/core/src/hooks/useValidateChangePassphraseParams.tsx index 0c09738873..f75414f776 100644 --- a/packages/core/src/hooks/useValidateChangePassphraseParams.tsx +++ b/packages/core/src/hooks/useValidateChangePassphraseParams.tsx @@ -14,7 +14,7 @@ export default function useValidateChangePassphraseParams() { async function validateChangePassphraseParams( currentPassphrase: string | null, newPassphrase: string, - confirmationPassphrase: string + confirmationPassphrase: string, ): Promise { try { if (isLoading) { @@ -36,7 +36,7 @@ export default function useValidateChangePassphraseParams() { plural(minPassphraseLength, { one: 'Passphrases must be at least # character in length', other: 'Passphrases must be at least # characters in length', - }) + }), ); } else if (currentPassphrase !== null && currentPassphrase === newPassphrase) { throw new Error(t`New passphrase is the same as your current passphrase`); @@ -75,7 +75,7 @@ export default function useValidateChangePassphraseParams() { maxWidth="xs" > {message} - + , ); // @ts-ignore diff --git a/packages/core/src/screens/SelectKey/EmojiAndColorPicker.tsx b/packages/core/src/screens/SelectKey/EmojiAndColorPicker.tsx index 283e70fb52..fdea881a09 100644 --- a/packages/core/src/screens/SelectKey/EmojiAndColorPicker.tsx +++ b/packages/core/src/screens/SelectKey/EmojiAndColorPicker.tsx @@ -75,7 +75,7 @@ export default function EmojiAndColorPicker(props: EmojiAndColorPickerType) { onClickOutside(); } }, - [onClickOutside] + [onClickOutside], ); React.useEffect(() => { diff --git a/packages/core/src/screens/SelectKey/SelectKey.tsx b/packages/core/src/screens/SelectKey/SelectKey.tsx index 3071a1a827..88362c9d34 100644 --- a/packages/core/src/screens/SelectKey/SelectKey.tsx +++ b/packages/core/src/screens/SelectKey/SelectKey.tsx @@ -134,7 +134,7 @@ export default function SelectKey() { Deleting all keys will permanently remove the keys from your computer, make sure you have backups. Are you sure you want to continue? - + , ); } diff --git a/packages/core/src/screens/SelectKey/WalletStatus.tsx b/packages/core/src/screens/SelectKey/WalletStatus.tsx index 925d6ec9cb..69e4caa374 100644 --- a/packages/core/src/screens/SelectKey/WalletStatus.tsx +++ b/packages/core/src/screens/SelectKey/WalletStatus.tsx @@ -37,7 +37,7 @@ export default function WalletStatus(props: WalletStatusProps) { {}, { pollingInterval: 10_000, - } + }, ); if (isLoading || !walletState) { diff --git a/packages/core/src/screens/SelectKey/WalletStatusHeight.tsx b/packages/core/src/screens/SelectKey/WalletStatusHeight.tsx index 85dcd16136..afe0da436a 100644 --- a/packages/core/src/screens/SelectKey/WalletStatusHeight.tsx +++ b/packages/core/src/screens/SelectKey/WalletStatusHeight.tsx @@ -8,7 +8,7 @@ export default function WalletStatusHeight() { {}, { pollingInterval: 10_000, - } + }, ); if (isLoading) { diff --git a/packages/core/src/theme/dark.ts b/packages/core/src/theme/dark.ts index 0006713529..5ad54857d3 100644 --- a/packages/core/src/theme/dark.ts +++ b/packages/core/src/theme/dark.ts @@ -157,5 +157,5 @@ export default createTheme( }, }, }, - } + }, ); diff --git a/packages/core/src/utils/validAddress.ts b/packages/core/src/utils/validAddress.ts index 9cf7e63b3a..9ac3477ea0 100644 --- a/packages/core/src/utils/validAddress.ts +++ b/packages/core/src/utils/validAddress.ts @@ -7,8 +7,8 @@ export default function validAddress(address: string, allowedPrefixes?: string[] if (allowedPrefixes && !allowedPrefixes.includes(prefix)) { throw new Error( `Invalid address: ${address}. Valid addresses must contain one of the following prefixes: ${allowedPrefixes.join( - ', ' - )}` + ', ', + )}`, ); } } diff --git a/packages/gui/public/index.html b/packages/gui/public/index.html index 48fff9e8ac..d79d6837eb 100644 --- a/packages/gui/public/index.html +++ b/packages/gui/public/index.html @@ -1,4 +1,4 @@ - + diff --git a/packages/gui/src/@types/WalletConnectCommandParam.ts b/packages/gui/src/@types/WalletConnectCommandParam.ts index 408a981fda..cdb0cd498c 100644 --- a/packages/gui/src/@types/WalletConnectCommandParam.ts +++ b/packages/gui/src/@types/WalletConnectCommandParam.ts @@ -14,7 +14,7 @@ type WalletConnectCommandParam = { value: any, params: WalletConnectCommandParam[], values: Record, - onChange: (values: Record) => void + onChange: (values: Record) => void, ) => ReactNode; hide?: boolean; }; diff --git a/packages/gui/src/components/addressbook/AddressBookSideBar.tsx b/packages/gui/src/components/addressbook/AddressBookSideBar.tsx index c86e08018c..90cc57cdd8 100644 --- a/packages/gui/src/components/addressbook/AddressBookSideBar.tsx +++ b/packages/gui/src/components/addressbook/AddressBookSideBar.tsx @@ -33,7 +33,7 @@ export default function AddressBookSideBar() { const filteredAddressesByName = addresses.filter( (addr: any) => (addr.name && addr.name.toLowerCase().includes(searchTerm)) || - (addr.address && addr.address.toLowerCase().includes(searchTerm)) + (addr.address && addr.address.toLowerCase().includes(searchTerm)), ); if (filteredAddressesByName && filteredAddressesByName.length > 0) { return true; @@ -45,7 +45,7 @@ export default function AddressBookSideBar() { const filteredDids = dids.filter( (did: any) => (did.name && did.name.toLowerCase().includes(searchTerm)) || - (did.did && did.did.toLowerCase().includes(searchTerm)) + (did.did && did.did.toLowerCase().includes(searchTerm)), ); if (filteredDids && filteredDids.length > 0) { return true; @@ -56,7 +56,7 @@ export default function AddressBookSideBar() { const filteredDomains = domainNames.filter( (domain: any) => (domain.name && domain.name.toLowerCase().includes(searchTerm)) || - (domain.domain && domain.domain.toLowerCase().includes(searchTerm)) + (domain.domain && domain.domain.toLowerCase().includes(searchTerm)), ); if (filteredDomains && filteredDomains.length > 0) { return true; diff --git a/packages/gui/src/components/addressbook/ContactEdit.tsx b/packages/gui/src/components/addressbook/ContactEdit.tsx index 1d9e01c8b8..71879f231a 100644 --- a/packages/gui/src/components/addressbook/ContactEdit.tsx +++ b/packages/gui/src/components/addressbook/ContactEdit.tsx @@ -242,7 +242,7 @@ export default function ContactEdit() { abContact.addresses.forEach((contactAddress) => { if (contactAddress.address === entry.address) { throw new Error( - `The address ${entry.address} is already assigned to an existing contact: ${abContact.name}` + `The address ${entry.address} is already assigned to an existing contact: ${abContact.name}`, ); } }); @@ -277,7 +277,7 @@ export default function ContactEdit() { data.notes, data.nftId, filteredDomains, - chosenEmoji + chosenEmoji, ); navigate(`/dashboard/addressbook/${Number(contact.contactId)}`); } diff --git a/packages/gui/src/components/addressbook/ContactSummary.tsx b/packages/gui/src/components/addressbook/ContactSummary.tsx index 6db5f53e6d..4b60f4affb 100644 --- a/packages/gui/src/components/addressbook/ContactSummary.tsx +++ b/packages/gui/src/components/addressbook/ContactSummary.tsx @@ -46,7 +46,7 @@ export default function ContactSummary() { Are you sure you want to permanently delete this contact? Once deleted, this contact cannot be recovered. - + , ); if (deleteContact) { diff --git a/packages/gui/src/components/app/AppKeyringMigrator.tsx b/packages/gui/src/components/app/AppKeyringMigrator.tsx index bd47aa06b2..76cf939838 100644 --- a/packages/gui/src/components/app/AppKeyringMigrator.tsx +++ b/packages/gui/src/components/app/AppKeyringMigrator.tsx @@ -82,7 +82,7 @@ export default function AppKeyringMigrator() { await openDialog( Keyring migration failed: {error.message} - + , ); } } diff --git a/packages/gui/src/components/app/AppProviders.tsx b/packages/gui/src/components/app/AppProviders.tsx index 6104fe634b..13c3a63092 100644 --- a/packages/gui/src/components/app/AppProviders.tsx +++ b/packages/gui/src/components/app/AppProviders.tsx @@ -70,7 +70,7 @@ export default function App(props: AppProps) { cert, key, webSocket: WebSocket, - }) + }), ); setIsReady(true); diff --git a/packages/gui/src/components/app/AppState.tsx b/packages/gui/src/components/app/AppState.tsx index bbb6715d24..128df2bd74 100644 --- a/packages/gui/src/components/app/AppState.tsx +++ b/packages/gui/src/components/app/AppState.tsx @@ -108,7 +108,7 @@ export default function AppState(props: Props) { } const specificRunningServiceStates = servicesState.running.filter((serviceName) => - runServices.includes(serviceName) + runServices.includes(serviceName), ); return specificRunningServiceStates.length === runServices.length; diff --git a/packages/gui/src/components/app/AppStatusHeader.tsx b/packages/gui/src/components/app/AppStatusHeader.tsx index c91d26a9ec..7c3f649df3 100644 --- a/packages/gui/src/components/app/AppStatusHeader.tsx +++ b/packages/gui/src/components/app/AppStatusHeader.tsx @@ -21,10 +21,10 @@ const StyledPopover = styled((props: PopoverProps) => )(({ color: theme.palette.mode === 'light' ? Color.Comet[700] : theme.palette.grey[300], boxShadow: `${Color.Neutral[50]} 0px 0px 0px 0px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.15 : 0.05 + theme.palette.mode === 'dark' ? 0.15 : 0.05, )} 0px 0px 0px 1px, ${alpha( Color.Neutral[900], - theme.palette.mode === 'dark' ? 0.01 : 0.1 + theme.palette.mode === 'dark' ? 0.01 : 0.1, )} 0px 10px 15px -3px, ${alpha(Color.Neutral[900], theme.palette.mode === 'dark' ? 0.15 : 0.05)} 0px 4px 6px -2px`, '& .MuiMenu-list': { padding: '4px 0', diff --git a/packages/gui/src/components/block/Block.jsx b/packages/gui/src/components/block/Block.jsx index 081e3e2a9a..66d6a3580a 100644 --- a/packages/gui/src/components/block/Block.jsx +++ b/packages/gui/src/components/block/Block.jsx @@ -69,7 +69,7 @@ export default function Block() { }, { skip: !blockRecord?.prevHash || !blockRecord?.height, - } + }, ); async function updateNewPlotId(blockLocal) { diff --git a/packages/gui/src/components/fullNode/FullNodeCloseConnection.tsx b/packages/gui/src/components/fullNode/FullNodeCloseConnection.tsx index f27aee39db..dd41a00b03 100644 --- a/packages/gui/src/components/fullNode/FullNodeCloseConnection.tsx +++ b/packages/gui/src/components/fullNode/FullNodeCloseConnection.tsx @@ -26,7 +26,7 @@ export default function FullNodeCloseConnection(props: Props): JSX.Element { } > Are you sure you want to disconnect? - + , ); } diff --git a/packages/gui/src/components/fullNode/card/FullNodeCardStatus.tsx b/packages/gui/src/components/fullNode/card/FullNodeCardStatus.tsx index 57a5f7dbc3..b93827664c 100644 --- a/packages/gui/src/components/fullNode/card/FullNodeCardStatus.tsx +++ b/packages/gui/src/components/fullNode/card/FullNodeCardStatus.tsx @@ -62,7 +62,7 @@ export default function FullNodeCardStatus() { {}, { pollingInterval: 10_000, - } + }, ); if (isLoading) { diff --git a/packages/gui/src/components/harvest/HarvesterDetail.tsx b/packages/gui/src/components/harvest/HarvesterDetail.tsx index c4c7be7527..e9a2950848 100644 --- a/packages/gui/src/components/harvest/HarvesterDetail.tsx +++ b/packages/gui/src/components/harvest/HarvesterDetail.tsx @@ -93,7 +93,7 @@ function HarvesterLatencyGraph(props: HarvesterLatencyGraphProps) { earnedSpacePercentage = ( }> {Math.round( - effectiveSpace.minus(harvesterTotalPlotSize).div(harvesterTotalPlotSize).multipliedBy(1000).toNumber() + effectiveSpace.minus(harvesterTotalPlotSize).div(harvesterTotalPlotSize).multipliedBy(1000).toNumber(), ) / 10}{' '} % diff --git a/packages/gui/src/components/harvest/HarvesterOverview.tsx b/packages/gui/src/components/harvest/HarvesterOverview.tsx index 4b9a25a657..2e711a20e3 100644 --- a/packages/gui/src/components/harvest/HarvesterOverview.tsx +++ b/packages/gui/src/components/harvest/HarvesterOverview.tsx @@ -141,7 +141,7 @@ export default function HarvesterOverview() { totalFarmSizeRaw={totalFarmSizeRaw} totalFarmSizeEffective={totalFarmSizeEffective} /> - + , ); } return elements; diff --git a/packages/gui/src/components/harvest/HarvesterPlotDetails.tsx b/packages/gui/src/components/harvest/HarvesterPlotDetails.tsx index 65bca9686c..b9580fde47 100644 --- a/packages/gui/src/components/harvest/HarvesterPlotDetails.tsx +++ b/packages/gui/src/components/harvest/HarvesterPlotDetails.tsx @@ -97,7 +97,7 @@ function HarvesterPlotDetails(props: HarvesterPlotDetailsProps) { }} /> C{cl} {countCompression} {percentageCompression}% - + , ); } @@ -133,7 +133,7 @@ function HarvesterPlotDetails(props: HarvesterPlotDetailsProps) { {kSizeAndCompressionBreakDown} - + , ); } diff --git a/packages/gui/src/components/harvest/LatencyCharts.tsx b/packages/gui/src/components/harvest/LatencyCharts.tsx index 897892b833..659f397917 100644 --- a/packages/gui/src/components/harvest/LatencyCharts.tsx +++ b/packages/gui/src/components/harvest/LatencyCharts.tsx @@ -78,7 +78,7 @@ function LatencyBarChart(props: BarChartProps) { }, }, }), - [unit] + [unit], ); const data = React.useMemo(() => { diff --git a/packages/gui/src/components/harvest/PlotDetailsChart.tsx b/packages/gui/src/components/harvest/PlotDetailsChart.tsx index 8c495224c8..b6d81796ab 100644 --- a/packages/gui/src/components/harvest/PlotDetailsChart.tsx +++ b/packages/gui/src/components/harvest/PlotDetailsChart.tsx @@ -70,7 +70,7 @@ function PlotDetailsChart(props: PlotDetailsProps) { }, ], }), - [kSizeData, compressionData] + [kSizeData, compressionData], ); return ; } diff --git a/packages/gui/src/components/lrus/LRUsProvider.tsx b/packages/gui/src/components/lrus/LRUsProvider.tsx index 615d3a27b8..27fbf7ab76 100644 --- a/packages/gui/src/components/lrus/LRUsProvider.tsx +++ b/packages/gui/src/components/lrus/LRUsProvider.tsx @@ -25,7 +25,7 @@ export default function LRUsProvider(props: LRUsProviderProps) { } return lru; }, - [LRUs] + [LRUs], ); const value = useMemo(() => ({ getLRU }), [getLRU]); diff --git a/packages/gui/src/components/nfts/NFTAutocomplete.tsx b/packages/gui/src/components/nfts/NFTAutocomplete.tsx index a3883e2f12..9c7b0d6753 100644 --- a/packages/gui/src/components/nfts/NFTAutocomplete.tsx +++ b/packages/gui/src/components/nfts/NFTAutocomplete.tsx @@ -85,7 +85,7 @@ export default function NFTAutocomplete(props: NFTAutocompleteProps) { ); }, - [inputValue] + [inputValue], ); const handleChange = useCallback( @@ -99,7 +99,7 @@ export default function NFTAutocomplete(props: NFTAutocompleteProps) { onChange(getNFTId(newValue.launcherId)); } }, - [onChange] + [onChange], ); const handleInputValueChange = useCallback( @@ -108,7 +108,7 @@ export default function NFTAutocomplete(props: NFTAutocompleteProps) { setSearchText(newInputValue); onChange(newInputValue || ''); }, - [onChange] + [onChange], ); const handleClose = useCallback(() => { @@ -137,7 +137,7 @@ export default function NFTAutocomplete(props: NFTAutocompleteProps) { return option.launcherId === selectedNFT.launcherId; }, - [firstOption, selectedNFT] + [firstOption, selectedNFT], ); const options = includeNFTCollection ? nfts : []; diff --git a/packages/gui/src/components/nfts/NFTBurnDialog.tsx b/packages/gui/src/components/nfts/NFTBurnDialog.tsx index 684f24a7ae..27e7f35aa0 100644 --- a/packages/gui/src/components/nfts/NFTBurnDialog.tsx +++ b/packages/gui/src/components/nfts/NFTBurnDialog.tsx @@ -88,7 +88,7 @@ export default function NFTBurnDialog(props: NFTPreviewDialogProps) { } confirmTitle={Burn} - /> + />, ); if (!confirmation) { diff --git a/packages/gui/src/components/nfts/NFTContextualActions.tsx b/packages/gui/src/components/nfts/NFTContextualActions.tsx index 9206740a50..2cd2252da5 100644 --- a/packages/gui/src/components/nfts/NFTContextualActions.tsx +++ b/packages/gui/src/components/nfts/NFTContextualActions.tsx @@ -172,13 +172,13 @@ function NFTTransferContextualAction(props: NFTTransferContextualActionProps) { openDialog( NFT Transfer Pending}> The NFT transfer transaction has been successfully submitted to the blockchain. - + , ); } else { openDialog( NFT Transfer Failed}> The NFT transfer failed: {result.error} - + , ); } } @@ -256,14 +256,14 @@ function NFTCancelUnconfirmedTransactionContextualAction(props: NFTCancelUnconfi The NFT status has been updated. If the transaction was successfully sent to the mempool, it may still complete. - + , ); } catch (error) { const err = error?.message || 'Unknown error'; openDialog( NFT Status Update Failed}> The NFT status update failed: {err} - + , ); } } @@ -475,10 +475,7 @@ function NFTHideContextualAction(props: NFTHideContextualActionProps) { } if (isMultiSelect) { - setHiddenMultiple( - selection?.items.map((nft: NFTInfo) => nft.$nftId), - !isHidden - ); + setHiddenMultiple(selection?.items.map((nft: NFTInfo) => nft.$nftId), !isHidden); setSelectedNFTIds([]); } else { setIsNFTHidden(selectedNft.$nftId, !isHidden); diff --git a/packages/gui/src/components/nfts/NFTFilterProvider.tsx b/packages/gui/src/components/nfts/NFTFilterProvider.tsx index 74bdbb3860..1c59d33706 100644 --- a/packages/gui/src/components/nfts/NFTFilterProvider.tsx +++ b/packages/gui/src/components/nfts/NFTFilterProvider.tsx @@ -48,7 +48,7 @@ export default function NFTFilterProvider(props: NFTFilterProviderProps) { setVisibility, setSearch, }), - [walletIds, types, visibility, search, setWalletIds, setTypes, setVisibility, setSearch] + [walletIds, types, visibility, search, setWalletIds, setTypes, setVisibility, setSearch], ); return {children}; diff --git a/packages/gui/src/components/nfts/NFTMoveToProfileDialog.tsx b/packages/gui/src/components/nfts/NFTMoveToProfileDialog.tsx index 9cf4bcb9b6..085eb3f124 100644 --- a/packages/gui/src/components/nfts/NFTMoveToProfileDialog.tsx +++ b/packages/gui/src/components/nfts/NFTMoveToProfileDialog.tsx @@ -193,20 +193,20 @@ export function NFTMoveToProfileAction(props: NFTMoveToProfileActionProps) { ) : null} - + , ); } else if (!error) { openDialog( NFT Move Pending}> The NFT move transaction has been successfully submitted to the blockchain. - + , ); } else { const err = error?.message || 'Unknown error'; openDialog( NFT Move Failed}> The NFT move failed: {err} - + , ); } } finally { diff --git a/packages/gui/src/components/nfts/NFTPreview.tsx b/packages/gui/src/components/nfts/NFTPreview.tsx index 39bd0f3075..ddf1b4c800 100644 --- a/packages/gui/src/components/nfts/NFTPreview.tsx +++ b/packages/gui/src/components/nfts/NFTPreview.tsx @@ -64,7 +64,9 @@ const ModelExtension = styled.div<{ isDarkMode: boolean }>` align-items: center; padding: 8px 16px; background: ${(props) => (props.isDarkMode ? Color.Neutral[800] : Color.Neutral[50])}; - box-shadow: 0px 0px 24px ${alpha(Color.Green[500], 0.5)}, 0px 4px 8px ${alpha(Color.Green[700], 0.32)}; + box-shadow: + 0px 0px 24px ${alpha(Color.Green[500], 0.5)}, + 0px 4px 8px ${alpha(Color.Green[700], 0.32)}; border-radius: 32px; color: ${(props) => (props.isDarkMode ? Color.Neutral[50] : Color.Neutral[800])}; `; @@ -146,7 +148,7 @@ export default function NFTPreview(props: NFTPreviewProps) { const [hideObjectionableContent] = useHideObjectionableContent(); const [ignoreSizeLimit /* , setIgnoreSizeLimit */] = usePersistState( false, - `nft-preview-ignore-size-limit-${nftId}` + `nft-preview-ignore-size-limit-${nftId}`, ); const { preview, isLoading: isLoadingVerifyHash } = useNFTVerifyHash(nftId, { @@ -254,7 +256,7 @@ export default function NFTPreview(props: NFTPreviewProps) {