Skip to content

Commit

Permalink
💥 fix: Small fix on value update
Browse files Browse the repository at this point in the history
  • Loading branch information
caioaletroca committed Dec 20, 2024
1 parent b3bca71 commit 04c15d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ export const TransactionProvider = ({
if (formValues.source.length === 1) {
form.setValue('source.0.value', formValues.value)
}
}, [formValues.source.length])
}, [formValues.value, formValues.source.length])

useEffect(() => {
if (formValues.destination.length === 1) {
form.setValue('destination.0.value', formValues.value)
}
}, [formValues.destination.length])
}, [formValues.value, formValues.destination.length])

return (
<TransactionFormProvider.Provider
Expand Down

0 comments on commit 04c15d3

Please sign in to comment.