Gas floor fix, chain guard, and dashboard footer
- wallet.js: fetch correct EIP-1559 fees from the network (Amoy/Polygon Bor enforce a ~25-30 gwei priority floor MetaMask's estimate misses) via new /api/gas; hard chain-guard before signing so a tx never lands on the wrong network; accept the wallet's usual networks in AppKit so its modal stops looping and drive add+switch ourselves. - chain.js: suggestedFees() from eth_maxPriorityFeePerGas + base fee. - Dashboard: move the Site links (Ad packages / Live ledger / The contract) out of the sidebar into a page footer; hide the sidebar scrollbar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -503,6 +503,11 @@ const server = http.createServer(async (req, res) => {
|
||||
await auth.logout(req);
|
||||
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()); }
|
||||
catch (e) { return json(res, 200, {}); }
|
||||
}
|
||||
|
||||
if (p === '/api/me' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s) return json(res, 200, { signedIn: false });
|
||||
|
||||
Reference in New Issue
Block a user