Skip to content

Commit

Permalink
more clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobar79 committed May 31, 2024
1 parent b84caa3 commit 2fd2663
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__swaps__/screens/Swap/components/SwapSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const SwapSlider = ({
}, [xPercentage.value]);

const percentageText = useDerivedValue(() => {
return `${Math.round(xPercentage.value ?? initialPercentage * 100)}%`;
return `${Math.round((xPercentage.value ?? initialPercentage) * 100)}%`;
}, [xPercentage.value]);

useAnimatedReaction(
Expand Down
4 changes: 2 additions & 2 deletions src/__swaps__/screens/Swap/hooks/useSwapInputsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function useSwapInputsController({
return '$0.00';
}

const nativeValue = `$${parseFloat(inputValues.value.inputNativeValue.toString()).toLocaleString('en-US', {
const nativeValue = `$${Number(inputValues.value.inputNativeValue).toLocaleString('en-US', {
useGrouping: true,
minimumFractionDigits: 2,
maximumFractionDigits: 2,
Expand Down Expand Up @@ -148,7 +148,7 @@ export function useSwapInputsController({
return '$0.00';
}

const nativeValue = `$${parseFloat(inputValues.value.outputNativeValue.toString()).toLocaleString('en-US', {
const nativeValue = `$${Number(inputValues.value.outputNativeValue).toLocaleString('en-US', {
useGrouping: true,
minimumFractionDigits: 2,
maximumFractionDigits: 2,
Expand Down

0 comments on commit 2fd2663

Please sign in to comment.