Skip to content

Commit

Permalink
style(ui): Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wormat committed Oct 14, 2022
1 parent d2a3b6d commit c2ca529
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions apps/ui/scripts/processWormholeTokenData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { CHAINS, ChainId, isEVMChain } from "@certusone/wormhole-sdk";
import fs from "fs";

import type { ChainId } from "@certusone/wormhole-sdk";
import { CHAINS, isEVMChain } from "@certusone/wormhole-sdk";
import { parse } from "csv-parse";

type Source =
Expand Down Expand Up @@ -166,7 +168,6 @@ const processRecord = ({
});

const main = async () => {
const processedRecords: WormholeToken[] = [];
const parser = fs
.createReadStream(`${__dirname}/../tmp/wormholeTokenData.csv`)
.pipe(
Expand All @@ -176,13 +177,16 @@ const main = async () => {
}),
);

// eslint-disable-next-line functional/prefer-readonly-type
const processedRecords: WormholeToken[] = [];
for await (const record of parser) {
const processedRecord = processRecord(record);
const processedRecord = processRecord(record as CsvRecord);
const supportedChains = [
processedRecord.nativeDetails,
...processedRecord.wrappedDetails,
].filter((details) => isChainSupported(details.chainId));
if (supportedChains.length >= 2) {
// eslint-disable-next-line functional/immutable-data
processedRecords.push(processedRecord);
}
}
Expand Down
8 changes: 4 additions & 4 deletions apps/ui/src/components/WormholeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ export const WormholeForm = (): ReactElement => {
</table>
{txResults.length > 0 && (
<>
<h2>Tx results</h2>
<h2>{"Tx results"}</h2>
<table>
<tr>
<th>Chain ID</th>
<th>Tx ID</th>
<th>{"Chain ID"}</th>
<th>{"Tx ID"}</th>
</tr>
{txResults.map(({ chainId, txId }) => (
<tr>
<tr key={txId}>
<td>{chainId}</td>
<td>{txId}</td>
</tr>
Expand Down

0 comments on commit c2ca529

Please sign in to comment.