Skip to content

Commit

Permalink
refactor: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxwellDG committed Dec 4, 2023
1 parent 3a3d1cf commit e3031ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/amount-input-screen/number-pad-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export const numberPadReducer = (
switch (action.action) {
case NumberPadReducerActionType.SetAmount:
return action.payload
case NumberPadReducerActionType.HandlePaste:
const num: number = Number(action.payload.keys)
case NumberPadReducerActionType.HandlePaste: {
const num = Number(action.payload.keys)
const formatted: string =
num % 1 === 0 ? num.toString() : num.toFixed(numberOfDecimalsAllowed)
const splitByDecimal = formatted.split(".")
Expand All @@ -92,6 +92,7 @@ export const numberPadReducer = (
minorAmount: splitByDecimal[1] ?? "",
},
}
}
case NumberPadReducerActionType.HandleKeyPress:
if (action.payload.key === Key.Backspace) {
if (minorAmount.length > 0) {
Expand Down

0 comments on commit e3031ed

Please sign in to comment.