Skip to content

Commit

Permalink
fix format issue with cratio and liquidation price
Browse files Browse the repository at this point in the history
  • Loading branch information
mstfash committed Mar 19, 2021
1 parent 936f0b9 commit 7078d0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/SafeOperations/SafeBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ const SafeBody = ({ isChecked }: Props) => {
accumulatedRate
)

const liquidationPenaltyPercentage = getRatePercentage(liquidationPenalty)
const liquidationPenaltyPercentage = getRatePercentage(
liquidationPenalty,
0
)
const liquidationPrice = getLiquidationPrice(
totalCollateral,
totalDebt,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const formatNumber = (value: string, digits = 4, round = false) => {
if (!value) {
return '0'
}
const n = Number(value.slice(0, 6))
const n = Number(value)
if (Number.isInteger(n) || value.length < 5) {
return n
}
Expand Down

0 comments on commit 7078d0c

Please sign in to comment.