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
@@ -262,6 +262,11 @@ function init(opts) {
// We hand the wallet correct fees so the tx clears the floor: a priority tip at
// or above the network suggestion (floored at 30 gwei for headroom) and a
// maxFee that covers 2x base + tip so MetaMask never flags "max fee too low".
// eth_estimateGas for a prepared call, padded 30%: handed to the wallet as an explicit gas limit so wallets whose own
// estimation fails ('unable to get a gas fee', Marty 2026-10-08) can still sign. null when the call would revert.
async function estimateGas(tx) {
try { const g = BigInt(await rpc('eth_estimateGas', [tx])); return '0x' + (g + g * 30n / 100n).toString(16); } catch (e) { return null; }
}
async function suggestedFees() {
let tip = 0n, base = 0n;
try { tip = BigInt(await rpc('eth_maxPriorityFeePerGas', [])); } catch (e) {}
@@ -272,5 +277,5 @@ async function suggestedFees() {
return { maxPriorityFeePerGas: '0x' + priority.toString(16), maxFeePerGas: '0x' + maxFee.toString(16) };
}
module.exports = { init, getConfig, reloadConfig, memberIdByAccount, memberCount, member,
module.exports = { init, getConfig, reloadConfig, memberIdByAccount, memberCount, member, estimateGas,
product, productCount, quoteWei, creditBalance, catalog, recentEvents, totals, rpc, decodeLog, suggestedFees };