File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff 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
237237const getEtherscanLikeAPIUrl = ( network : string ) => {
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments