Skip to content

Commit

Permalink
feat: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Jun 14, 2024
1 parent 6499fdb commit 419772c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/DeFi/components/AssetInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,13 @@ export const AssetInput: React.FC<AssetInputProps> = ({
// onChange will send us the formatted value
// To get around this we need to get the value from the onChange using a ref
// Now when the max buttons are clicked the onChange will not fire
debugger
onChange(amountRef.current ?? '', isFiat)
}, [isFiat, onChange])

const handleValueChange = useCallback(
(values: NumberFormatValues) => {
// This fires anytime value changes including setting it on max click
// Store the value in a ref to send when we actually want the onChange to fire
debugger
amountRef.current = values.value
handleChange()
},
Expand Down

0 comments on commit 419772c

Please sign in to comment.