diff --git a/.eslintrc.js b/.eslintrc.js index 14952dd17..595d8dfe1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -26,6 +26,7 @@ module.exports = { 'react/prop-types': [1, { skipUndeclared: true }], 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', + '@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }], }, overrides: [ { diff --git a/src/api/wallet/composeProvider.ts b/src/api/wallet/composeProvider.ts index 23e97ea62..035190026 100644 --- a/src/api/wallet/composeProvider.ts +++ b/src/api/wallet/composeProvider.ts @@ -201,16 +201,13 @@ export const composeProvider = ( if (!txConfig) return false if (!txConfig.gas) { - const gasLimit = await web3.eth - .estimateGas({ - from: txConfig.from, - gas: txConfig.gas, - value: txConfig.value, - }) - .catch((error) => { - console.error('[composeProvider] Error estimating gas, probably failing transaction', txConfig) - throw error - }) + // Remove gasPrice from the estimation props, since they broke after last hardfork + // https://github.com/gnosis/dex-react/pull/1618 + const { gasPrice, ...txConfigEstimation } = txConfig + const gasLimit = await web3.eth.estimateGas(txConfigEstimation).catch((error) => { + console.error('[composeProvider] Error estimating gas, probably failing transaction', txConfig) + throw error + }) logDebug('[composeProvider] No gas Limit. Using estimation ' + gasLimit) txConfig.gas = numberToHex(gasLimit) } else {