Skip to content

Commit

Permalink
fix async issue buy adding async await
Browse files Browse the repository at this point in the history
  • Loading branch information
DanStevensonDev committed Jul 30, 2021
1 parent 5f1c07f commit 7e2b779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MakeOffer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class MakeOffer extends Component {
}
}

handleMakeOffer = (event) => {
handleMakeOffer = async (event) => {
// prevent default form submission before validation
event.preventDefault()

const {offerAmountInEth, commitUrl} = this.state

const formValidationResponse = validateFormValues(offerAmountInEth, commitUrl)
const formValidationResponse = await validateFormValues(offerAmountInEth, commitUrl)
this.setState(() => {
return {
transactionSuccessOrErrorMessage: formValidationResponse
Expand Down

0 comments on commit 7e2b779

Please sign in to comment.