Wallet sends carry an explicit gas limit from the server's estimate (wallets that cannot estimate showed 'unable to get a gas fee' on buy and activate); Control Room rail expanded by default with a remembered Collapse toggle

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-08 06:25:06 -05:00
parent 547c7ba465
commit 55584a7007
14 changed files with 54 additions and 25 deletions
+5 -1
View File
@@ -210,12 +210,16 @@ window.IAPWallet = (function () {
// own estimate misses ("gas tip below minimum"). Pull the network's correct
// fees from the server and set them so the tx clears the floor.
try {
const g = await (await fetch('/api/gas')).json();
const q = new URLSearchParams({ from: tx.from, to: tx.to, data: tx.data || '0x' }); if (tx.value) q.set('value', tx.value);
const g = await (await fetch('/api/gas?' + q)).json();
if (g && g.maxPriorityFeePerGas && g.maxFeePerGas) {
tx.maxPriorityFeePerGas = g.maxPriorityFeePerGas;
tx.maxFeePerGas = g.maxFeePerGas;
}
// an explicit gas limit: some wallets cannot estimate on their own ('unable to get a gas fee', 2026-10-08)
if (g && g.gas) tx.gas = g.gas;
} catch (e) {}
if (!tx.gas) tx.gas = tx.value ? '0x61a80' : '0x30d40'; // 400k for a buy, 200k for activate: generous, the network refunds the unused part
try {
return await eth().request({ method: 'eth_sendTransaction', params: [tx] });
} catch (e) {