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
+6 -1
View File
@@ -1308,7 +1308,12 @@ const server = http.createServer(async (req, res) => {
return json(res, 200, { ok: true }, { 'Set-Cookie': auth.clearCookie() });
}
if (p === '/api/gas' && req.method === 'GET') {
try { return json(res, 200, await chain.suggestedFees()); }
try {
const fees = await chain.suggestedFees();
const from = u.searchParams.get('from'), to = u.searchParams.get('to'), data = u.searchParams.get('data'), value = u.searchParams.get('value');
if (/^0x[0-9a-fA-F]{40}$/.test(from || '') && /^0x[0-9a-fA-F]{40}$/.test(to || '') && /^0x[0-9a-fA-F]*$/.test(data || '')) { const call = { from, to, data: data || '0x' }; if (/^0x[0-9a-fA-F]+$/.test(value || '')) call.value = value; fees.gas = await chain.estimateGas(call); }
return json(res, 200, fees);
}
catch (e) { return json(res, 200, {}); }
}