File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 11import { utils } from 'ethers'
22import { MerkleTree } from 'merkletreejs'
33
4- const baseUrl = 'http://localhost:8080'
4+ const baseUrl = process . env . API_URL ?? 'http://localhost:8080'
55
66const createTree = async (
77 unhashedLeaves : string [ ] ,
@@ -82,7 +82,7 @@ const getProofForIndexedAddress = async (
8282
8383const getRootFromProof = async ( proof : string [ ] ) : Promise < string > => {
8484 const rootRes = await fetch ( `${ baseUrl } /api/v1/root?proof=${ proof . join ( ',' ) } ` )
85- const resp = await rootRes . json ( )
85+ const resp : { root : string } = await rootRes . json ( )
8686 return resp . root
8787}
8888
@@ -111,19 +111,6 @@ const checkProofEquality = (remote: string[], local: string[]) => {
111111 }
112112}
113113
114- // health check
115-
116- const healthRes = await fetch ( `${ baseUrl } /health` , {
117- method : 'GET' ,
118- headers : {
119- 'Content-Type' : 'application/json' ,
120- 'Accept-Encoding' : 'gzip' ,
121- } ,
122- } )
123-
124- const version = await healthRes . text ( )
125- console . log ( 'api version' , version )
126-
127114// basic merkle tree
128115
129116const unhashedLeaves = [
You can’t perform that action at this time.
0 commit comments