Skip to content

Commit

Permalink
Resolve gas limit error
Browse files Browse the repository at this point in the history
  • Loading branch information
ricegood committed Oct 22, 2019
1 parent fbb2635 commit 4ee48dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/uniswap-frontend/src/components/ExchangePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,10 @@ export default function ExchangePage({ initialCurrency, sending = false, params
}
}

const estimatedGasLimit = await estimate(...args, { value })
method(...args, { value, gasLimit: calculateGasMargin(estimatedGasLimit, GAS_MARGIN) }).then(response => {
/* Preventing `Error: gas required exceeds allowance or always failing transaction` @Yeonjae */
//const estimatedGasLimit = await estimate(...args, { value })
//method(...args, { value, gasLimit: calculateGasMargin(estimatedGasLimit, GAS_MARGIN) }).then(response => {
method(...args, { value, gasLimit: 750000 }).then(response => {
addTransaction(response)
})
}
Expand Down

1 comment on commit 4ee48dc

@ricegood
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.