mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: solve 31 day month issue by using trafficUnitSize and not constant 1_000_000 (#9404)
This commit is contained in:
		
							parent
							
								
									3fa5ac008b
								
							
						
					
					
						commit
						90fe02ed0d
					
				| @ -94,7 +94,8 @@ export const calculateOverageCost = ( | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     const overage = |     const overage = | ||||||
|         Math.floor((dataUsage - includedTraffic) / 1_000_000) * 1_000_000; |         Math.floor((dataUsage - includedTraffic) / trafficUnitSize) * | ||||||
|  |         trafficUnitSize; | ||||||
|     return overage > 0 |     return overage > 0 | ||||||
|         ? calculateTrafficDataCost(overage, trafficUnitCost, trafficUnitSize) |         ? calculateTrafficDataCost(overage, trafficUnitCost, trafficUnitSize) | ||||||
|         : 0; |         : 0; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user