Skip to content

Commit

Permalink
hotfix convert string
Browse files Browse the repository at this point in the history
  • Loading branch information
WhidRubeld committed Sep 2, 2021
1 parent e7553a8 commit c288044
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/screens/Pairs/extra/PairSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const PairSettings = forwardRef(
if (pair) {
setFirst(pair.first)
setSecond(pair.second)
setUp(`${pair.percent.up}`)
setDown(`${pair.percent.down}`)
setUp(`${pair.percent.up}`.replace(/\./g, ','))
setDown(`${pair.percent.down}`.replace(/\./g, ','))
}
}, [pair])

Expand All @@ -68,7 +68,10 @@ const PairSettings = forwardRef(
const data = {
first,
second,
percent: { up: parseFloat(up), down: parseFloat(down) },
percent: {
up: parseFloat(up.replace(/,/g, '.')),
down: parseFloat(up.replace(/,/g, '.')),
},
}

const promise = !pair
Expand Down

0 comments on commit c288044

Please sign in to comment.