fix: legacy gas-price fallback to use the typed getFeeData result instead of the non-existent
This commit is contained in:
@@ -319,7 +319,8 @@ export default function HomePage() {
|
|||||||
// Fallback to legacy gasPrice if EIP-1559 style send fails or simulates a revert
|
// Fallback to legacy gasPrice if EIP-1559 style send fails or simulates a revert
|
||||||
setStatusMessage(t("status.feeFallback"), "info", "status.feeFallback");
|
setStatusMessage(t("status.feeFallback"), "info", "status.feeFallback");
|
||||||
const gasPrice =
|
const gasPrice =
|
||||||
(await signerRef.current.provider?.getGasPrice?.()) || ethers.parseUnits("50", "gwei");
|
(await signerRef.current.provider?.getFeeData?.())?.gasPrice ||
|
||||||
|
ethers.parseUnits("50", "gwei");
|
||||||
tx = await signerRef.current.sendTransaction({
|
tx = await signerRef.current.sendTransaction({
|
||||||
...txRequest,
|
...txRequest,
|
||||||
gasLimit,
|
gasLimit,
|
||||||
|
|||||||
Reference in New Issue
Block a user