From dded7ac29ac9d700ff2906a47d2f9b18667c62fd Mon Sep 17 00:00:00 2001 From: Rosco Kalis Date: Sun, 14 Jul 2024 13:00:19 +0300 Subject: [PATCH] Run prettier --- public/confirm.html | 2 +- public/popup.html | 2 +- scripts/get-new-potential-scam-transactions.ts | 2 +- scripts/get-signature-transactions.ts | 2 +- scripts/utils/transactions.ts | 4 ++-- src/components/common/DivideContainer.tsx | 2 +- src/components/common/Href.tsx | 2 +- src/components/common/Logo.tsx | 2 +- src/components/common/MenuItem.tsx | 2 +- src/components/common/PlaceholderIcon.tsx | 4 ++-- src/components/common/Spinner.tsx | 2 +- src/components/popup/settings/SelectOption.tsx | 2 +- src/hooks/useBrowserStorage.tsx | 4 ++-- src/injected/proxy-injected-providers.tsx | 6 +++--- src/lib/chains/chains.ts | 2 +- src/lib/decoders/AggregateDecoder.ts | 2 +- .../decoders/typed-signature/listing/Seaport14Decoder.ts | 2 +- src/lib/utils/tokens.ts | 2 +- src/lib/utils/whois.ts | 2 +- src/pages/confirm.tsx | 2 +- src/pages/popup.tsx | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) diff --git a/public/confirm.html b/public/confirm.html index add5c6b..6a4085a 100644 --- a/public/confirm.html +++ b/public/confirm.html @@ -1,4 +1,4 @@ - + diff --git a/public/popup.html b/public/popup.html index 2b63fe7..e3b2aea 100644 --- a/public/popup.html +++ b/public/popup.html @@ -1,4 +1,4 @@ - + diff --git a/scripts/get-new-potential-scam-transactions.ts b/scripts/get-new-potential-scam-transactions.ts index b7b6b2c..2e2ea35 100644 --- a/scripts/get-new-potential-scam-transactions.ts +++ b/scripts/get-new-potential-scam-transactions.ts @@ -46,7 +46,7 @@ const getTransactions = async () => { console.log(`${filteredTransactions.length}/${transactions.length} in the last ${blockCount} blocks`); filteredTransactions.forEach((transaction) => - console.log(transaction.hash, transaction.input.slice(0, 10), transaction.to) + console.log(transaction.hash, transaction.input.slice(0, 10), transaction.to), ); return filteredTransactions; diff --git a/scripts/get-signature-transactions.ts b/scripts/get-signature-transactions.ts index 646aca3..352e773 100644 --- a/scripts/get-signature-transactions.ts +++ b/scripts/get-signature-transactions.ts @@ -14,7 +14,7 @@ const getTransactions = async () => { }); console.log( - `${filteredTransactions.length}/${transactions.length} transactions match the signature in the last ${blockCount} blocks` + `${filteredTransactions.length}/${transactions.length} transactions match the signature in the last ${blockCount} blocks`, ); filteredTransactions.forEach((transaction) => console.log(transaction.hash, transaction.to)); diff --git a/scripts/utils/transactions.ts b/scripts/utils/transactions.ts index 3f7b16b..4b7ad43 100644 --- a/scripts/utils/transactions.ts +++ b/scripts/utils/transactions.ts @@ -14,8 +14,8 @@ export const getTransactionsInBlocks = async (blockCount: number = 1) => { const blocks = await Promise.all( range(fromBlock, toBlock).map((blockNumber) => - client.getBlock({ blockNumber: BigInt(blockNumber), includeTransactions: true }) - ) + client.getBlock({ blockNumber: BigInt(blockNumber), includeTransactions: true }), + ), ); const transactions = blocks.flatMap((block) => block.transactions); diff --git a/src/components/common/DivideContainer.tsx b/src/components/common/DivideContainer.tsx index d0546a8..d0c62e3 100644 --- a/src/components/common/DivideContainer.tsx +++ b/src/components/common/DivideContainer.tsx @@ -9,7 +9,7 @@ interface Props { const DivideContainer = ({ children, className }: Props) => { const classes = twMerge( 'w-full flex flex-col items-stretch bg-neutral-0 dark:bg-neutral-750 divide-y divide-neutral-150 dark:divide-neutral-800', - className + className, ); return
{children}
; diff --git a/src/components/common/Href.tsx b/src/components/common/Href.tsx index 502caf1..b42ffae 100644 --- a/src/components/common/Href.tsx +++ b/src/components/common/Href.tsx @@ -27,7 +27,7 @@ const Href = ({ href, children, className, underline, html }: Props) => { 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current focus-visible:rounded', className, styleMapping[html ? 'html' : 'inherit'], - underlineMapping[underline ?? 'always'] + underlineMapping[underline ?? 'always'], ); return ( diff --git a/src/components/common/Logo.tsx b/src/components/common/Logo.tsx index ffa9d26..dd4e567 100644 --- a/src/components/common/Logo.tsx +++ b/src/components/common/Logo.tsx @@ -24,7 +24,7 @@ const Logo = ({ src, alt, size, square, border, className }: Props) => { 'aspect-square bg-white', square ? 'rounded-lg' : 'rounded-full', border && 'border border-black dark:border-white', - className + className, ); return ( diff --git a/src/components/common/MenuItem.tsx b/src/components/common/MenuItem.tsx index cf72bc9..05b9d7b 100644 --- a/src/components/common/MenuItem.tsx +++ b/src/components/common/MenuItem.tsx @@ -19,7 +19,7 @@ const MenuItem = ({ className, size, colorChangeOnHover, children }: Props) => { classMapping[`size-${size}`], colorChangeOnHover && 'hover:bg-neutral-150 hover:text-neutral-850 hover:dark:bg-neutral-800 hover:dark:text-neutral-300', - className + className, ); return
{children}
; diff --git a/src/components/common/PlaceholderIcon.tsx b/src/components/common/PlaceholderIcon.tsx index 1519e1b..96fedcc 100644 --- a/src/components/common/PlaceholderIcon.tsx +++ b/src/components/common/PlaceholderIcon.tsx @@ -14,14 +14,14 @@ interface Props { const PlaceholderIcon = ( { size, className, color, border, square, children }: Props, - ref: ForwardedRef + ref: ForwardedRef, ) => { const classes = twMerge( 'aspect-square rounded-full', color ?? 'bg-zinc-300 dark:bg-zinc-600', square ? 'rounded-lg' : 'rounded-full', border && 'border border-black dark:border-white', - className + className, ); return ( diff --git a/src/components/common/Spinner.tsx b/src/components/common/Spinner.tsx index 1affcc6..38a6ef0 100644 --- a/src/components/common/Spinner.tsx +++ b/src/components/common/Spinner.tsx @@ -9,7 +9,7 @@ const Spinner = ({ className }: Props) => { const classes = twMerge( className ?? 'w-4 h-4', 'animate-spin-fast mx-1', // Compensate for formatting with other HeroIcons - 'loader' + 'loader', ); return ( diff --git a/src/components/popup/settings/SelectOption.tsx b/src/components/popup/settings/SelectOption.tsx index 5edd6c4..490c934 100644 --- a/src/components/popup/settings/SelectOption.tsx +++ b/src/components/popup/settings/SelectOption.tsx @@ -17,7 +17,7 @@ const SelectOption = ({ option, isSelected, select }: Props) => { size="large" colorChangeOnHover={true} className={twMerge( - isSelected && 'pl-8 text-brand dark:text-brand hover:text-brand hover:dark:text-brand font-bold' + isSelected && 'pl-8 text-brand dark:text-brand hover:text-brand hover:dark:text-brand font-bold', )} > {option.label} diff --git a/src/hooks/useBrowserStorage.tsx b/src/hooks/useBrowserStorage.tsx index cd72e37..dd603e4 100644 --- a/src/hooks/useBrowserStorage.tsx +++ b/src/hooks/useBrowserStorage.tsx @@ -7,7 +7,7 @@ import Browser from 'webextension-polyfill'; const useBrowserStorage = ( area: 'local' | 'sync', key: string, - initialValue: T + initialValue: T, ): [T, (value: T) => void, boolean, string | undefined] => { const [state, setState] = useState(initialValue); const [isPersistent, setIsPersistent] = useState(true); @@ -45,7 +45,7 @@ const useBrowserStorage = ( setError(error); }); }, - [key, state] + [key, state], ); useEffect(() => { diff --git a/src/injected/proxy-injected-providers.tsx b/src/injected/proxy-injected-providers.tsx index e79cd89..b7faa83 100644 --- a/src/injected/proxy-injected-providers.tsx +++ b/src/injected/proxy-injected-providers.tsx @@ -63,7 +63,7 @@ const proxyEthereumProvider = (ethereumProvider: any, name: string) => { return Reflect.apply(target, thisArg, argumentsList); } else { const error = ethErrors.provider.userRejectedRequest( - 'Revoke.cash Confirmation: User denied transaction signature.' + 'Revoke.cash Confirmation: User denied transaction signature.', ); const response = { id: request?.id, @@ -89,7 +89,7 @@ const proxyEthereumProvider = (ethereumProvider: any, name: string) => { return Reflect.apply(target, thisArg, argumentsList); } else { const error = ethErrors.provider.userRejectedRequest( - 'Revoke.cash Confirmation: User denied message signature.' + 'Revoke.cash Confirmation: User denied message signature.', ); const response = { id: request?.id, @@ -112,7 +112,7 @@ const proxyEthereumProvider = (ethereumProvider: any, name: string) => { return Reflect.apply(target, thisArg, argumentsList); } else { const error = ethErrors.provider.userRejectedRequest( - 'Revoke.cash Confirmation: User denied message signature.' + 'Revoke.cash Confirmation: User denied message signature.', ); const response = { id: request?.id, diff --git a/src/lib/chains/chains.ts b/src/lib/chains/chains.ts index f697386..0b91808 100644 --- a/src/lib/chains/chains.ts +++ b/src/lib/chains/chains.ts @@ -1336,7 +1336,7 @@ export const getChainSlug = (chainId: number): string | undefined => { }; const REVERSE_CHAIN_SLUGS: Record = Object.fromEntries( - SUPPORTED_CHAINS.map((chainId) => [getChainSlug(chainId), chainId]) + SUPPORTED_CHAINS.map((chainId) => [getChainSlug(chainId), chainId]), ); export const getChainIdFromSlug = (slug: string): number | undefined => { diff --git a/src/lib/decoders/AggregateDecoder.ts b/src/lib/decoders/AggregateDecoder.ts index c5ad1e9..962e350 100644 --- a/src/lib/decoders/AggregateDecoder.ts +++ b/src/lib/decoders/AggregateDecoder.ts @@ -14,7 +14,7 @@ export class AggregateDecoder implements Decoder { constructor( private transactionDecoders: TransactionDecoder[], private typedSignatureDecoders: TypedSignatureDecoder[], - private untypedSignatureDecoders: UntypedSignatureDecoder[] + private untypedSignatureDecoders: UntypedSignatureDecoder[], ) {} decode(message: Message): WarningData | undefined { diff --git a/src/lib/decoders/typed-signature/listing/Seaport14Decoder.ts b/src/lib/decoders/typed-signature/listing/Seaport14Decoder.ts index 9a903b2..0cd109c 100644 --- a/src/lib/decoders/typed-signature/listing/Seaport14Decoder.ts +++ b/src/lib/decoders/typed-signature/listing/Seaport14Decoder.ts @@ -40,7 +40,7 @@ export class Seaport14Decoder implements TypedSignatureDecoder { offer: acc.offer.concat(item.offer), consideration: acc.consideration.concat(item.consideration), }), - { offer: [], consideration: [] } + { offer: [], consideration: [] }, ); } diff --git a/src/lib/utils/tokens.ts b/src/lib/utils/tokens.ts index 47995ec..1aa7098 100644 --- a/src/lib/utils/tokens.ts +++ b/src/lib/utils/tokens.ts @@ -44,7 +44,7 @@ export interface ListingItemDisplayData { export const getNftListingItemTokenData = async ( item: NftListingItem, - chainId: number + chainId: number, ): Promise => { // Some scammers use an incorrect interface using numbers so we convert it to string const itemType = String(item.itemType); diff --git a/src/lib/utils/whois.ts b/src/lib/utils/whois.ts index 239e2a8..5c0cb24 100644 --- a/src/lib/utils/whois.ts +++ b/src/lib/utils/whois.ts @@ -7,7 +7,7 @@ import { SpenderData } from '../types'; export const getSpenderData = async ( address: string, chainId?: number, - openseaProxyAddress?: string + openseaProxyAddress?: string, ): Promise => { if (!chainId) return null; if (!address) return null; diff --git a/src/pages/confirm.tsx b/src/pages/confirm.tsx index 584b6f3..e9ef4ab 100644 --- a/src/pages/confirm.tsx +++ b/src/pages/confirm.tsx @@ -52,5 +52,5 @@ const Confirm = () => { createRoot(document.getElementById('root')!).render( - + , ); diff --git a/src/pages/popup.tsx b/src/pages/popup.tsx index 978df97..c3f1d5d 100644 --- a/src/pages/popup.tsx +++ b/src/pages/popup.tsx @@ -29,5 +29,5 @@ const Popup = () => { createRoot(document.getElementById('root')!).render( - + , );