From 7469a4907c68a1e363c60d87db6dce4437939e1c Mon Sep 17 00:00:00 2001 From: martbost Date: Tue, 8 Sep 2026 09:07:00 -0500 Subject: [PATCH] WalletConnect buy: set EIP-1559 fees above Polygon's min priority fee Amoy/Polygon reject txs whose priority fee is under ~25 gwei ("gas tip below minimum"); wallets lowball it. Set explicit maxPriorityFeePerGas 30 gwei, maxFeePerGas 250 gwei ceiling, and a 600k gas limit so buys/activations aren't rejected or mis-estimated. Co-Authored-By: Claude Opus 4.8 --- public/assets/wallet.js | 7 +++++++ public/index.html | 2 +- public/my.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/public/assets/wallet.js b/public/assets/wallet.js index 0299428..a13fdd7 100644 --- a/public/assets/wallet.js +++ b/public/assets/wallet.js @@ -161,6 +161,13 @@ window.IAPWallet = (function () { await ensureChain(c); const tx = { from: addr, to: c.contract, data }; if (valueWei) tx.value = '0x' + BigInt(valueWei).toString(16); + // Polygon (mainnet + Amoy) enforce a ~25 gwei minimum priority fee; wallets + // routinely lowball it and the RPC rejects "gas tip below minimum". Set + // explicit EIP-1559 fees above the floor, plus a safe gas limit so the wallet + // doesn't mis-estimate. Unused gas is never charged. + tx.maxPriorityFeePerGas = '0x' + (30n * 10n ** 9n).toString(16); // 30 gwei + tx.maxFeePerGas = '0x' + (250n * 10n ** 9n).toString(16); // 250 gwei ceiling + tx.gas = '0x' + (600000n).toString(16); // 600k limit return eth().request({ method: 'eth_sendTransaction', params: [tx] }); } async function waitTx(hash) { diff --git a/public/index.html b/public/index.html index 115e79c..7e1c822 100644 --- a/public/index.html +++ b/public/index.html @@ -439,7 +439,7 @@ - + diff --git a/public/my.html b/public/my.html index 242a854..f25e06d 100644 --- a/public/my.html +++ b/public/my.html @@ -690,7 +690,7 @@ - +