WalletConnect buy: lower maxFeePerGas ceiling to 50 gwei

250 gwei ceiling tripped MetaMask's "network fee higher than necessary" alert on
Amoy (base fee ~0). 50 gwei keeps priority above Polygon's ~25 gwei floor while
reading as a normal fee, so buyers get a clean Confirm.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-08 09:12:19 -05:00
parent 7469a4907c
commit d23eb10c58
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -165,8 +165,8 @@ window.IAPWallet = (function () {
// 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.maxPriorityFeePerGas = '0x' + (30n * 10n ** 9n).toString(16); // 30 gwei (> Polygon's ~25 gwei floor)
tx.maxFeePerGas = '0x' + (50n * 10n ** 9n).toString(16); // 50 gwei ceiling (Amoy base fee is ~0; avoids MetaMask "fee too high" alert)
tx.gas = '0x' + (600000n).toString(16); // 600k limit
return eth().request({ method: 'eth_sendTransaction', params: [tx] });
}
+1 -1
View File
@@ -439,7 +439,7 @@
</section>
<script src="/assets/common.js?v=20260908c"></script>
<script src="/assets/wallet.js?v=20260908e"></script>
<script src="/assets/wallet.js?v=20260908f"></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=20260908e"></script>
<script src="/assets/wallet.js?v=20260908f"></script>
<script src="/assets/my.js?v=20260908i"></script>
<script src="/assets/chat.js?v=20260907l"></script>
</body>