File tree Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Expand file tree Collapse file tree 6 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11NEXT_PUBLIC_ENV = prod 
2- NEXT_PUBLIC_SCREENING_URL = https://aave-api-v2.aave.com 
2+ NEXT_PUBLIC_API_BASEURL = https://aave-api-v2.aave.com 
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ TENDERLY_PROJECT=
55NEXT_PUBLIC_ENV = prod 
66NEXT_PUBLIC_ENABLE_GOVERNANCE = true 
77NEXT_PUBLIC_ENABLE_STAKING = true 
8- NEXT_PUBLIC_SCREENING_URL = https://aave-api-v2.aave.com 
8+ NEXT_PUBLIC_API_BASEURL = https://aave-api-v2.aave.com 
Original file line number Diff line number Diff line change 4444        NEXT_PUBLIC_ENV : ' ${{ inputs.NEXT_PUBLIC_ENV }}' 
4545        NEXT_PUBLIC_ENABLE_GOVERNANCE : ' true' 
4646        NEXT_PUBLIC_ENABLE_STAKING : ' true' 
47-         NEXT_PUBLIC_SCREENING_URL : ' https://aave-api-v2.aave.com' 
47+         NEXT_PUBLIC_API_BASEURL : ' https://aave-api-v2.aave.com' 
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ src/locales/
1313#  IDE
1414.vscode 
1515
16+ #  Env
17+ .env. * 
18+ 
1619#  Specific Ignores
1720* .svg 
1821* .ico 
Original file line number Diff line number Diff line change @@ -8,6 +8,6 @@ namespace NodeJS {
88    NEXT_PUBLIC_ENABLE_GOVERNANCE : string ; 
99    NEXT_PUBLIC_ENABLE_STAKING : string ; 
1010    NEXT_PUBLIC_ENV : string ; 
11-     NEXT_PUBLIC_SCREENING_URL : string ; 
11+     NEXT_PUBLIC_API_BASEURL : string ; 
1212  } 
1313} 
Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ const TWO_MINUTES = 2 * 60 * 1000;
1111export  const  useAddressAllowed  =  ( address : string ) : AddressAllowedResult  =>  { 
1212  const  [ isAllowed ,  setIsAllowed ]  =  useState ( true ) ; 
1313
14-   const  screeningUrl  =  process . env . NEXT_PUBLIC_SCREENING_URL ; 
14+   const  screeningUrl  =  `${ process . env . NEXT_PUBLIC_API_BASEURL }  /addresses/status` ; 
15+   const  queryParams  =  `?address=${ address }  ` ; 
1516
1617  const  getIsAddressAllowed  =  async  ( )  =>  { 
1718    if  ( screeningUrl  &&  address )  { 
1819      try  { 
19-         const  response  =  await  fetch ( ` ${ screeningUrl } /addresses/status?address= ${ address } ` ) ; 
20+         const  response  =  await  fetch ( screeningUrl   +   queryParams ) ; 
2021        if  ( response . ok )  { 
2122          const  data : {  addressAllowed : boolean  }  =  await  response . json ( ) ; 
2223          setIsAllowed ( data . addressAllowed ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments