Skip to content

Commit

Permalink
✨ prettier lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Flip-Liquid committed Apr 10, 2024
1 parent da09486 commit 3261b5c
Show file tree
Hide file tree
Showing 23 changed files with 300 additions and 298 deletions.
4 changes: 2 additions & 2 deletions src/app/api/common/delegateStatement/getDelegateStatement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ async function getDelegateStatementForAddress({
return postgreqsqlData
? postgreqsqlData
: slug === DaoSlug.OP // Only fetch from Dynamo for optimism
? await getDelegateStatementForAddressDynamo(address)
: null;
? await getDelegateStatementForAddressDynamo(address)
: null;
}

/*
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/common/utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const createOptionalStringValidator = <T extends string>(
const literals = inputs.map((x) => z.literal(x)) as unknown as readonly [
z.ZodLiteral<T>,
z.ZodLiteral<T>,
...z.ZodLiteral<T>[],
...z.ZodLiteral<T>[]
];
return z
.union([
Expand Down
8 changes: 4 additions & 4 deletions src/components/Admin/ProposalType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ export default function ProposalType({
Number(e.target.value) > 100
? 100
: Number(e.target.value) < 0
? 0
: Number(e.target.value)
? 0
: Number(e.target.value)
);
}}
/>
Expand Down Expand Up @@ -213,8 +213,8 @@ export default function ProposalType({
Number(e.target.value) > 100
? 100
: Number(e.target.value) < 0
? 0
: Number(e.target.value)
? 0
: Number(e.target.value)
);
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function OptionsResultsPanel({
return BigInt(b.votes || 0) > BigInt(a.votes || 0)
? 1
: BigInt(b.votes || 0) < BigInt(a.votes || 0)
? -1
: 0;
? -1
: 0;
});

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export default function OpManagerDeleteProposal({
{isLoading
? "Loading..."
: isSuccess
? "Proposal deleted"
: "Delete proposal"}
? "Proposal deleted"
: "Delete proposal"}
</Button>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Votes/VoteText/VoteText.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default function VoteText({ support }) {
support === "FOR"
? "voted for"
: support === "AGAINST"
? "voted against"
: "abstained";
? "voted against"
: "abstained";

return <p className={className}>{supportText}</p>;
}
4 changes: 2 additions & 2 deletions src/components/shared/SimulateTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export default function SimulateTransaction({
status === "Valid"
? styles.valid
: status === "Invalid"
? styles.invalid
: styles.else_color
? styles.invalid
: styles.else_color
}
>
{status}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Form = FormProvider;

type FormFieldContextValue<
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
> = {
name: TName;
};
Expand All @@ -28,7 +28,7 @@ const FormFieldContext = React.createContext<FormFieldContextValue>(

const FormField = <
TFieldValues extends FieldValues = FieldValues,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
>({
...props
}: ControllerProps<TFieldValues, TName>) => {
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useAdvancedVoting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ const useAdvancedVoting = ({
? "castVoteWithReasonAndParams"
: "castVoteWithReason"
: params
? "castVoteWithReasonAndParams"
: "castVote",
? "castVoteWithReasonAndParams"
: "castVote",
args: reason
? params
? [BigInt(proposalId), support, reason, params]
: [BigInt(proposalId), support, reason]
: params
? [BigInt(proposalId), support, reason, params]
: ([BigInt(proposalId), support] as any),
? [BigInt(proposalId), support, reason, params]
: ([BigInt(proposalId), support] as any),
chainId: optimism.id,
});

Expand Down
62 changes: 31 additions & 31 deletions src/lib/contracts/generated/AlligatorOPV5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export type SubdelegationRulesStructOutput = [
notValidAfter: bigint,
customRule: string,
allowanceType: bigint,
allowance: bigint,
allowance: bigint
] & {
maxRedelegations: bigint;
blocksBeforeVoteCloses: bigint;
Expand Down Expand Up @@ -135,7 +135,7 @@ export interface AlligatorOPV5Interface extends Interface {
BigNumberish,
BigNumberish,
BytesLike,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(
Expand All @@ -160,7 +160,7 @@ export interface AlligatorOPV5Interface extends Interface {
BytesLike,
BigNumberish,
BytesLike,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(
Expand All @@ -175,7 +175,7 @@ export interface AlligatorOPV5Interface extends Interface {
BigNumberish,
BigNumberish,
string,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(
Expand All @@ -189,7 +189,7 @@ export interface AlligatorOPV5Interface extends Interface {
BytesLike,
BigNumberish,
BytesLike,
BytesLike,
BytesLike
]
): string;
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
Expand Down Expand Up @@ -399,12 +399,12 @@ export namespace SubDelegationEvent {
export type InputTuple = [
from: AddressLike,
to: AddressLike,
subdelegationRules: SubdelegationRulesStruct,
subdelegationRules: SubdelegationRulesStruct
];
export type OutputTuple = [
from: string,
to: string,
subdelegationRules: SubdelegationRulesStructOutput,
subdelegationRules: SubdelegationRulesStructOutput
];
export interface OutputObject {
from: string;
Expand All @@ -421,12 +421,12 @@ export namespace SubDelegations_address_address_array_tuple_Event {
export type InputTuple = [
from: AddressLike,
to: AddressLike[],
subdelegationRules: SubdelegationRulesStruct,
subdelegationRules: SubdelegationRulesStruct
];
export type OutputTuple = [
from: string,
to: string[],
subdelegationRules: SubdelegationRulesStructOutput,
subdelegationRules: SubdelegationRulesStructOutput
];
export interface OutputObject {
from: string;
Expand All @@ -443,12 +443,12 @@ export namespace SubDelegations_address_address_array_tuple_array_Event {
export type InputTuple = [
from: AddressLike,
to: AddressLike[],
subdelegationRules: SubdelegationRulesStruct[],
subdelegationRules: SubdelegationRulesStruct[]
];
export type OutputTuple = [
from: string,
to: string[],
subdelegationRules: SubdelegationRulesStructOutput[],
subdelegationRules: SubdelegationRulesStructOutput[]
];
export interface OutputObject {
from: string;
Expand Down Expand Up @@ -491,14 +491,14 @@ export namespace VoteCastEvent {
voter: AddressLike,
authority: AddressLike[],
proposalId: BigNumberish,
support: BigNumberish,
support: BigNumberish
];
export type OutputTuple = [
proxy: string,
voter: string,
authority: string[],
proposalId: bigint,
support: bigint,
support: bigint
];
export interface OutputObject {
proxy: string;
Expand All @@ -519,14 +519,14 @@ export namespace VotesCastEvent {
voter: AddressLike,
authorities: AddressLike[][],
proposalId: BigNumberish,
support: BigNumberish,
support: BigNumberish
];
export type OutputTuple = [
proxies: string[],
voter: string,
authorities: string[][],
proposalId: bigint,
support: bigint,
support: bigint
];
export interface OutputObject {
proxies: string[];
Expand Down Expand Up @@ -611,7 +611,7 @@ export interface AlligatorOPV5 extends BaseContract {
support: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand All @@ -622,7 +622,7 @@ export interface AlligatorOPV5 extends BaseContract {
authority: AddressLike[],
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
reason: string
],
[void],
"nonpayable"
Expand All @@ -634,7 +634,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -646,7 +646,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -661,7 +661,7 @@ export interface AlligatorOPV5 extends BaseContract {
params: BytesLike,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand All @@ -680,7 +680,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -696,7 +696,7 @@ export interface AlligatorOPV5 extends BaseContract {
params: BytesLike,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand Down Expand Up @@ -745,7 +745,7 @@ export interface AlligatorOPV5 extends BaseContract {
customRule: string;
allowanceType: bigint;
allowance: bigint;
},
}
],
"view"
>;
Expand Down Expand Up @@ -815,7 +815,7 @@ export interface AlligatorOPV5 extends BaseContract {
support: BigNumberish,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand All @@ -827,7 +827,7 @@ export interface AlligatorOPV5 extends BaseContract {
authority: AddressLike[],
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
reason: string
],
[void],
"nonpayable"
Expand All @@ -840,7 +840,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -853,7 +853,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -869,7 +869,7 @@ export interface AlligatorOPV5 extends BaseContract {
params: BytesLike,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand All @@ -886,7 +886,7 @@ export interface AlligatorOPV5 extends BaseContract {
proposalId: BigNumberish,
support: BigNumberish,
reason: string,
params: BytesLike,
params: BytesLike
],
[void],
"nonpayable"
Expand All @@ -903,7 +903,7 @@ export interface AlligatorOPV5 extends BaseContract {
params: BytesLike,
v: BigNumberish,
r: BytesLike,
s: BytesLike,
s: BytesLike
],
[void],
"nonpayable"
Expand Down Expand Up @@ -955,7 +955,7 @@ export interface AlligatorOPV5 extends BaseContract {
customRule: string;
allowanceType: bigint;
allowance: bigint;
},
}
],
"view"
>;
Expand Down
Loading

0 comments on commit 3261b5c

Please sign in to comment.