File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,15 @@ async def fetch_chunk(chunk: list[str]) -> dict:
129129            try :
130130                response  =  combined_data [id ]
131131                vs_currency_key  =  batch .vs_currency .lower ()
132+                 percentage_change_24h  =  response .get (f"{ vs_currency_key }  )
132133                item  =  TokenPriceResponse (
133134                    ** request .model_dump (),
134135                    vs_currency = batch .vs_currency ,
135136                    price = float (response [vs_currency_key ]),
136-                     percentage_change_24h = float (
137-                         response [f"{ vs_currency_key }  ]
137+                     percentage_change_24h = (
138+                         float (percentage_change_24h )
139+                         if  percentage_change_24h  is  not None 
140+                         else  None 
138141                    ),
139142                    cache_status = CacheStatus .MISS ,
140143                    source = PriceSource .COINGECKO ,
Original file line number Diff line number Diff line change 11[project ]
22name  = " gate3" 
3- version  = " 0.3.0 " 
3+ version  = " 0.3.1 " 
44description  = " Gate API for web3 applications at Brave" 
55authors  = [
66]
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments