Skip to content

Commit 071f1da

Browse files
committed
fix: eslint errors
1 parent f6e94ad commit 071f1da

7 files changed

Lines changed: 16 additions & 21 deletions

File tree

templates/escrows/details/GeneralInformation.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ import {
1919
BookOpen,
2020
} from "lucide-react";
2121
import { Actions, roleActions } from "./Actions";
22-
import type {
23-
DialogStates,
24-
StatusStates,
25-
} from "@/components/tw-blocks/providers/EscrowDialogsProvider";
22+
import type { DialogStates } from "@/components/tw-blocks/providers/EscrowDialogsProvider";
2623
import { GetEscrowsFromIndexerResponse } from "@trustless-work/escrow/types";
2724
import { useEscrowAmountContext } from "@/components/tw-blocks/providers/EscrowAmountProvider";
2825
import { StatisticsCard } from "./StatisticsCard";
@@ -36,7 +33,7 @@ import { useCopy } from "@/components/tw-blocks/helpers/useCopy";
3633
interface GeneralInformationProps {
3734
selectedEscrow: GetEscrowsFromIndexerResponse;
3835
userRolesInEscrow: string[];
39-
dialogStates: DialogStates & StatusStates;
36+
dialogStates: DialogStates;
4037
areAllMilestonesApproved: boolean;
4138
}
4239

templates/escrows/details/MilestoneCard.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import {
1111
CheckCheck,
1212
Layers,
1313
} from "lucide-react";
14-
import {
15-
GetEscrowsFromIndexerResponse as Escrow,
16-
Role,
17-
} from "@trustless-work/escrow/types";
14+
import { GetEscrowsFromIndexerResponse as Escrow } from "@trustless-work/escrow/types";
1815
import {
1916
MultiReleaseMilestone,
2017
SingleReleaseMilestone,

templates/escrows/details/MilestoneDetailDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ export const MilestoneDetailDialog = ({
110110
new URL(url);
111111
return true;
112112
} catch (error) {
113+
console.error(error);
113114
return false;
114115
}
115116
};

templates/escrows/escrows-by-role/table/EscrowsTable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ export const EscrowsByRoleTable = () => {
261261
const className =
262262
typeof header.column.columnDef.meta === "object" &&
263263
header.column.columnDef.meta &&
264-
"className" in (header.column.columnDef.meta as any)
265-
? (header.column.columnDef.meta as any).className
264+
"className" in header.column.columnDef.meta
265+
? header.column.columnDef.meta.className
266266
: "";
267267
return (
268268
<TableHead
@@ -375,8 +375,8 @@ export const EscrowsByRoleTable = () => {
375375
const className =
376376
typeof cell.column.columnDef.meta === "object" &&
377377
cell.column.columnDef.meta &&
378-
"className" in (cell.column.columnDef.meta as any)
379-
? (cell.column.columnDef.meta as any).className
378+
"className" in cell.column.columnDef.meta
379+
? (cell.column.columnDef.meta.className as string)
380380
: "";
381381
return (
382382
<TableCell key={cell.id} className={className}>

templates/escrows/escrows-by-signer/table/EscrowsTable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ export const EscrowsBySignerTable = () => {
248248
const className =
249249
typeof header.column.columnDef.meta === "object" &&
250250
header.column.columnDef.meta &&
251-
"className" in (header.column.columnDef.meta as any)
252-
? (header.column.columnDef.meta as any).className
251+
"className" in header.column.columnDef.meta
252+
? header.column.columnDef.meta.className
253253
: "";
254254
return (
255255
<TableHead
@@ -362,8 +362,8 @@ export const EscrowsBySignerTable = () => {
362362
const className =
363363
typeof cell.column.columnDef.meta === "object" &&
364364
cell.column.columnDef.meta &&
365-
"className" in (cell.column.columnDef.meta as any)
366-
? (cell.column.columnDef.meta as any).className
365+
"className" in cell.column.columnDef.meta
366+
? (cell.column.columnDef.meta.className as string)
367367
: "";
368368
return (
369369
<TableCell key={cell.id} className={className}>

templates/escrows/multi-release/initialize-escrow/shared/useInitializeEscrow.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function useInitializeEscrow() {
8383
receiverMemo: "123",
8484
trustline: {
8585
address: usdc?.value || "",
86-
decimals: usdc?.decimals || 10000000,
86+
decimals: 10000000,
8787
},
8888
roles: {
8989
approver: walletAddress || "",
@@ -102,12 +102,12 @@ export function useInitializeEscrow() {
102102

103103
// Set form values
104104
Object.entries(templateData).forEach(([key, value]) => {
105-
form.setValue(key as any, value);
105+
form.setValue(key as keyof z.infer<typeof formSchema>, value);
106106
});
107107

108108
// Explicitly set the trustline field
109109
form.setValue("trustline.address", usdc?.value || "");
110-
form.setValue("trustline.decimals", usdc?.decimals || 10000000);
110+
form.setValue("trustline.decimals", 10000000);
111111
};
112112

113113
const handleSubmit = form.handleSubmit(async (payload) => {

templates/providers/TrustlessWork.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
development,
77

88
// mainnet environment = "https://api.trustlesswork.com"
9-
mainNet,
9+
// mainNet,
1010
TrustlessWorkConfig,
1111
} from "@trustless-work/escrow";
1212

0 commit comments

Comments
 (0)