File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,27 @@ impl Config {
9494            ) , 
9595            _ => { } 
9696        } 
97+         let  grt_wei = self . tap . max_amount_willing_to_lose_grt . get_value ( ) ; 
98+         let  decimal = BigDecimal :: from_u128 ( grt_wei) . unwrap ( ) ; 
99+         let  divisor = & self . tap . rav_request . trigger_value_divisor ; 
100+         let  trigger_value = ( decimal / divisor) 
101+             . to_u128 ( ) 
102+             . expect ( "Could not represent the trigger value in u128" ) ; 
103+         let  minimum_recommended_for_max_willing_to_lose_grt = 0.1 ; 
104+         if  trigger_value
105+             < minimum_recommended_for_max_willing_to_lose_grt
106+                 . to_u128 ( ) 
107+                 . unwrap ( ) 
108+         { 
109+             warn ! ( 
110+                 "Trigger value is too low, currently below 0.1 GRT. \  
111+ \ 
112+ \ 
113+ \ 
114+ \ 
115+ 
116+             ) 
117+         } 
97118
98119        let  ten:  BigDecimal  = 10 . into ( ) ; 
99120        let  usual_grt_price = BigDecimal :: from_str ( "0.0001" ) . unwrap ( )  *  ten; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments