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 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-08 09:07:00 -05:00
parent 90e33a42b5
commit 7469a4907c
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -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) {
+1 -1
View File
@@ -439,7 +439,7 @@
</section>
<script src="/assets/common.js?v=20260908c"></script>
<script src="/assets/wallet.js?v=20260908d"></script>
<script src="/assets/wallet.js?v=20260908e"></script>
<script src="/assets/home.js?v=20260906m"></script>
<script src="/assets/chat.js?v=20260906m"></script>
</body>
+1 -1
View File
@@ -690,7 +690,7 @@
</div>
</div>
<script src="/assets/common.js?v=20260908c"></script>
<script src="/assets/wallet.js?v=20260908d"></script>
<script src="/assets/wallet.js?v=20260908e"></script>
<script src="/assets/my.js?v=20260908i"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>