Skip to content

Commit 69df461

Browse files
committed
Fix lint
1 parent b247c45 commit 69df461

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

packages/cli/src/command-helpers/abi.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export const loadAbiFromSourcify = async (
1818
`Warnings while fetching ABI from Sourcify`,
1919
async () => {
2020
const chainId = await getSourcifyChainId(network);
21-
const result = await fetch(`https://repo.sourcify.dev/contracts/full_match/${chainId}/${address}/metadata.json`);
21+
const result = await fetch(
22+
`https://repo.sourcify.dev/contracts/full_match/${chainId}/${address}/metadata.json`,
23+
);
2224
const json = await result.json();
2325

2426
if (result.ok) {
@@ -228,10 +230,8 @@ const getSourcifyChainId = async (network: string) => {
228230
// Can fail if network name doesn't follow https://chainlist.org name convention
229231
const match = json.find((e: any) => e.name.toLowerCase().includes(network.replace('-', ' ')));
230232

231-
if (match)
232-
return match.chainId;
233-
else
234-
throw new Error(`Could not find chain id for "${network}"`);
233+
if (match) return match.chainId;
234+
throw new Error(`Could not find chain id for "${network}"`);
235235
};
236236

237237
const getEtherscanLikeAPIUrl = (network: string) => {

packages/cli/src/commands/init.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,7 @@ async function processInitForm(
707707

708708
// Try loading the ABI from Sourcify, if none was provided
709709
if (protocolInstance.hasABIs() && !initAbi) {
710-
abiFromSourcify = await retryWithPrompt(() =>
711-
loadAbiFromSourcify(ABI, network, value),
712-
);
710+
abiFromSourcify = await retryWithPrompt(() => loadAbiFromSourcify(ABI, network, value));
713711
}
714712
// If startBlock is not set, try to load it.
715713
if (!initStartBlock) {

0 commit comments

Comments
 (0)