All files / src/utils workaround.ts

64.28% Statements 9/14
0% Branches 0/5
100% Functions 2/2
64.28% Lines 9/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30    33x 56x       56x       56x       56x     33x 12x       12x       12x    
// TODO: Remove this file after the issue is fixed
 
export function normalizeBatchTTL(batchTTL: number) {
  Iif (!Number.isInteger(batchTTL)) {
    return 1
  }
 
  Iif (batchTTL < 1) {
    return 1
  }
 
  Iif (batchTTL > 315569260) {
    return 315569260
  }
 
  return batchTTL
}
 
export function normalizeCurrentPrice(currentPrice: number) {
  Iif (!Number.isInteger(currentPrice)) {
    return 24000
  }
 
  Iif (currentPrice < 24000) {
    return 24000
  }
 
  return currentPrice
}