Skip to content

Commit

Permalink
fix: LO ui issue for > 99.99% EX-2813 (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
viet-nv authored Feb 10, 2025
1 parent 5082841 commit d57f6cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/swapv2/LimitOrder/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const calcPercentFilledOrder = (value: string, total: string, decimals: n
const float = parseFloat(
uint256ToFraction(value, decimals).divide(uint256ToFraction(total, decimals)).multiply(100).toFixed(16),
)
if (float && float > 99.99) return '99.99'
return float && float < 0.01 ? '< 0.01' : formatNumberWithPrecisionRange(float, 0, 2)
} catch (error) {
return '0'
Expand Down

0 comments on commit d57f6cb

Please sign in to comment.