Skip to content

Commit

Permalink
run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
yvesfracari committed Jun 13, 2024
1 parent 141dcdb commit 07ffff1
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 40 deletions.
8 changes: 4 additions & 4 deletions apps/cow-amm-deployer/graphql-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export type introspection = {
};
};

import * as gqlTada from 'gql.tada';
import * as gqlTada from "gql.tada";

declare module 'gql.tada' {
declare module "gql.tada" {
interface setupSchema {
introspection: introspection
introspection: introspection;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function AmmsTable({
<Table.BodyCell>
<span className="text-base">
{new Date(
(amm.order.blockTimestamp as number) * 1000
(amm.order.blockTimestamp as number) * 1000,
).toLocaleString()}
</span>
</Table.BodyCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function EditAMMForm({ ammData }: { ammData: ICowAmm }) {
token0: ammData.token0,
token1: ammData.token1,
minTradedToken0: Number(
formatUnits(ammData.minTradedToken0, ammData.token0.decimals)
formatUnits(ammData.minTradedToken0, ammData.token0.decimals),
),
priceOracleSchema: ammData.decodedPriceOracleData,
},
Expand Down Expand Up @@ -90,7 +90,7 @@ export function EditAMMForm({ ammData }: { ammData: ICowAmm }) {
<AccordionTrigger
className={cn(
errors.minTradedToken0 ? "text-destructive" : "",
"pt-0"
"pt-0",
)}
>
Advanced Options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export function Header({
new URL(
getExplorerAddressLink(
ammData.order.chainId as ChainId,
ammData.order.owner as Address
)
ammData.order.owner as Address,
),
)
}
rel="noreferrer noopener"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function CreateAMMForm({ userId }: { userId: string }) {
});
setValue(
"minTradedToken0",
await getNewMinTradeToken0(token, chainId as ChainId)
await getNewMinTradeToken0(token, chainId as ChainId),
);
}}
selectedToken={(token0 as IToken) ?? undefined}
Expand Down Expand Up @@ -166,7 +166,7 @@ export function CreateAMMForm({ userId }: { userId: string }) {
<AccordionTrigger
className={cn(
errors.minTradedToken0 ? "text-destructive" : "",
"pt-0"
"pt-0",
)}
>
Advanced Options
Expand Down
6 changes: 3 additions & 3 deletions apps/cow-amm-deployer/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const buttonVariants = cva(
variant: "default",
size: "default",
},
}
},
);

export interface ButtonProps
Expand All @@ -56,7 +56,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
disabled = false,
...props
},
ref
ref,
) => {
const Comp = asChild ? Slot : "button";
return (
Expand All @@ -80,7 +80,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
)}
</Comp>
);
}
},
);
Button.displayName = "Button";

Expand Down
2 changes: 1 addition & 1 deletion apps/cow-amm-deployer/src/components/DepositForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function DepositForm({
}) {
const schema = getDepositSchema(
Number(walletBalanceToken0),
Number(walletBalanceToken1)
Number(walletBalanceToken1),
);

const form = useForm<z.input<typeof schema>>({
Expand Down
4 changes: 2 additions & 2 deletions apps/cow-amm-deployer/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export function Header({ linkUrl, imageSrc, children, onLinkClick }: IHeader) {
new URL(
getExplorerAddressLink(
chainId as ChainId,
safeAddress as Address
)
safeAddress as Address,
),
)
}
rel="noreferrer noopener"
Expand Down
10 changes: 5 additions & 5 deletions apps/cow-amm-deployer/src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function useTableContext() {

if (!context) {
throw new Error(
"Child components of Table cannot be rendered outside the Table component!"
"Child components of Table cannot be rendered outside the Table component!",
);
}

Expand All @@ -69,14 +69,14 @@ export default function Table({
className={cn(
"min-w-full",
predefinedClasses[color][variant][shade].border,
classNames
classNames,
)}
>
<table
className={cn(
"divide-y divide-sand7 min-w-full",
predefinedClasses[color][variant][shade].style,
"w-full"
"w-full",
)}
>
{children}
Expand Down Expand Up @@ -112,7 +112,7 @@ function HeaderCell({
className={cn(
"text-left font-bold",
onClick ? "cursor-pointer" : "",
classNames
classNames,
)}
>
{children}
Expand Down Expand Up @@ -203,7 +203,7 @@ function BodyCell({
className={cn(
"whitespace-nowrap",
customWidth ? cn(customWidth, "pl-4") : padding,
classNames
classNames,
)}
colSpan={colSpan}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/cow-amm-deployer/src/components/TokenLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const cowTokenListLogoUrl = (address?: string, chainId?: ChainId) => {
return cowTokenList.find(
(token) =>
token.chainId === chainId &&
token.address.toLowerCase() === address?.toLowerCase()
token.address.toLowerCase() === address?.toLowerCase(),
)?.logoURI;
};

Expand Down
2 changes: 1 addition & 1 deletion apps/cow-amm-deployer/src/components/TokenSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function TokenSelect({
try {
const importedToken = await fetchTokenInfo(
search as Address,
chainId as ChainId
chainId as ChainId,
);
handleSelectToken(importedToken);
addImportedToken(importedToken, chainId as ChainId);
Expand Down
4 changes: 2 additions & 2 deletions apps/cow-amm-deployer/src/components/WithdrawForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export function WithdrawForm({ ammData }: { ammData: ICowAmm }) {
const onSubmit = async (data: typeof ammWithdrawSchema._type) => {
const amount0 = parseUnits(
String((Number(ammData.token0.balance) * data.withdrawPct) / 100),
ammData.token0.decimals
ammData.token0.decimals,
);
const amount1 = parseUnits(
String((Number(ammData.token1.balance) * data.withdrawPct) / 100),
ammData.token1.decimals
ammData.token1.decimals,
);
const txArgs = {
type: TRANSACTION_TYPES.WITHDRAW_COW_AMM,
Expand Down
10 changes: 5 additions & 5 deletions apps/cow-amm-deployer/src/lib/addressUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type BlockExplorerLinkType =
function getEtherscanUrl(
chainId: ChainId,
data: string,
type: BlockExplorerLinkType
type: BlockExplorerLinkType,
): string {
const basePath = CHAIN_INFO[chainId].explorer;

Expand All @@ -48,7 +48,7 @@ function getEtherscanUrl(
export function getBlockExplorerUrl(
chainId: ChainId,
type: BlockExplorerLinkType,
data: string
data: string,
): string {
return getEtherscanUrl(chainId, data, type);
}
Expand All @@ -62,7 +62,7 @@ export function isCowOrder(type: BlockExplorerLinkType, data?: string) {
export function getEtherscanLink(
chainId: ChainId,
type: BlockExplorerLinkType,
data: string
data: string,
): string {
if (isCowOrder(type, data)) {
// Explorer for CoW orders:
Expand All @@ -76,7 +76,7 @@ export function getEtherscanLink(
export function getExplorerLabel(
chainId: ChainId,
type: BlockExplorerLinkType,
data?: string
data?: string,
): string {
if (isCowOrder(type, data)) {
return "View on Explorer";
Expand All @@ -90,7 +90,7 @@ export function getExplorerLabel(
export function shortenOrderId(
orderId: string,
start = 0,
chars = ORDER_ID_SHORT_LENGTH
chars = ORDER_ID_SHORT_LENGTH,
): string {
return orderId.substring(start, chars + start);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cow-amm-deployer/src/lib/cowExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function getExplorerBaseUrl(chainId: ChainId): string {
if (!baseUrl) {
throw new Error(
"Unsupported Network. The operator API is not deployed in the Network " +
chainId
chainId,
);
} else {
return baseUrl;
Expand All @@ -48,7 +48,7 @@ export function getExplorerOrderLink(chainId: ChainId, orderId: UID): string {

export function getExplorerAddressLink(
chainId: ChainId,
address: string
address: string,
): string {
const baseUrl = getExplorerBaseUrl(chainId);

Expand Down
14 changes: 7 additions & 7 deletions apps/cow-amm-deployer/src/lib/nativeAndWrappedTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const DEFAULT_NATIVE_DECIMALS = 18;
const WETH9_MAINNET_ADDRESS = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
const ETH_LOGO_URL = cowprotocolTokenLogoUrl(
WETH9_MAINNET_ADDRESS.toLowerCase(),
mainnet.id
mainnet.id,
);

export const WRAPPED_NATIVE_CURRENCIES: Record<ChainId, TokenWithLogo> = {
Expand All @@ -22,15 +22,15 @@ export const WRAPPED_NATIVE_CURRENCIES: Record<ChainId, TokenWithLogo> = {
WETH9_MAINNET_ADDRESS,
DEFAULT_NATIVE_DECIMALS,
"WETH",
"Wrapped Ether"
"Wrapped Ether",
),
[gnosis.id]: new TokenWithLogo(
undefined,
gnosis.id,
"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",
DEFAULT_NATIVE_DECIMALS,
"WXDAI",
"Wrapped XDAI"
"Wrapped XDAI",
),
// [arbitrum.id]: new TokenWithLogo(
// ETH_LOGO_URL,
Expand All @@ -46,7 +46,7 @@ export const WRAPPED_NATIVE_CURRENCIES: Record<ChainId, TokenWithLogo> = {
"0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
DEFAULT_NATIVE_DECIMALS,
"WETH",
"Wrapped Ether"
"Wrapped Ether",
),
};

Expand All @@ -57,15 +57,15 @@ export const NATIVE_CURRENCIES: Record<ChainId, TokenWithLogo> = {
NATIVE_CURRENCY_ADDRESS,
DEFAULT_NATIVE_DECIMALS,
"ETH",
"Ether"
"Ether",
),
[gnosis.id]: new TokenWithLogo(
undefined,
gnosis.id,
NATIVE_CURRENCY_ADDRESS,
DEFAULT_NATIVE_DECIMALS,
"xDAI",
"xDAI"
"xDAI",
),
// [arbitrum.id]: new TokenWithLogo(
// undefined,
Expand All @@ -81,7 +81,7 @@ export const NATIVE_CURRENCIES: Record<ChainId, TokenWithLogo> = {
NATIVE_CURRENCY_ADDRESS,
DEFAULT_NATIVE_DECIMALS,
"ETH",
"Ether"
"Ether",
),
};

Expand Down

0 comments on commit 07ffff1

Please sign in to comment.