Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
rkalis committed Jul 14, 2024
1 parent 24207a8 commit dded7ac
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion public/confirm.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion public/popup.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-new-potential-scam-transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion scripts/get-signature-transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions scripts/utils/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/DivideContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div className={classes}>{children}</div>;
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Href.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <div className={classes}>{children}</div>;
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/PlaceholderIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ interface Props {

const PlaceholderIcon = (
{ size, className, color, border, square, children }: Props,
ref: ForwardedRef<HTMLDivElement>
ref: ForwardedRef<HTMLDivElement>,
) => {
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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion src/components/popup/settings/SelectOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SelectOption = <T,>({ option, isSelected, select }: Props<T>) => {
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}
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useBrowserStorage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Browser from 'webextension-polyfill';
const useBrowserStorage = <T,>(
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);
Expand Down Expand Up @@ -45,7 +45,7 @@ const useBrowserStorage = <T,>(
setError(error);
});
},
[key, state]
[key, state],
);

useEffect(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/injected/proxy-injected-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/chains/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ export const getChainSlug = (chainId: number): string | undefined => {
};

const REVERSE_CHAIN_SLUGS: Record<string, number> = Object.fromEntries(
SUPPORTED_CHAINS.map((chainId) => [getChainSlug(chainId), chainId])
SUPPORTED_CHAINS.map((chainId) => [getChainSlug(chainId), chainId]),
);

export const getChainIdFromSlug = (slug: string): number | undefined => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/decoders/AggregateDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] },
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface ListingItemDisplayData {

export const getNftListingItemTokenData = async (
item: NftListingItem,
chainId: number
chainId: number,
): Promise<ListingItemDisplayData> => {
// Some scammers use an incorrect interface using numbers so we convert it to string
const itemType = String(item.itemType);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/whois.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SpenderData } from '../types';
export const getSpenderData = async (
address: string,
chainId?: number,
openseaProxyAddress?: string
openseaProxyAddress?: string,
): Promise<SpenderData | null> => {
if (!chainId) return null;
if (!address) return null;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ const Confirm = () => {
createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<Confirm />
</React.StrictMode>
</React.StrictMode>,
);
2 changes: 1 addition & 1 deletion src/pages/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ const Popup = () => {
createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<Popup />
</React.StrictMode>
</React.StrictMode>,
);

0 comments on commit dded7ac

Please sign in to comment.