diff --git a/public/assets/wallet.js b/public/assets/wallet.js index 3787d2c..710cb1a 100644 --- a/public/assets/wallet.js +++ b/public/assets/wallet.js @@ -165,13 +165,9 @@ 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 (> 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 + // Let the wallet set its own gas/fees. Setting them here makes MetaMask flag + // a "site-suggested fee" alert the user can't easily clear; MetaMask's own + // estimate already meets Amoy's minimum priority fee. return eth().request({ method: 'eth_sendTransaction', params: [tx] }); } async function waitTx(hash) { diff --git a/public/index.html b/public/index.html index b51a08e..eb30911 100644 --- a/public/index.html +++ b/public/index.html @@ -439,7 +439,7 @@ - + diff --git a/public/my.html b/public/my.html index 8e8bbcb..c37b8f6 100644 --- a/public/my.html +++ b/public/my.html @@ -696,7 +696,7 @@ - +