Swap page: the RPC syncing and no-answer notices move out of the pools table into a wrapping line under it, and both tables wrap their cells (fixed layout, normal white space); the overlap sweep clipped the syncing row at 768 to 1280 px while the public RPC re-executed from block 0

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-08 13:35:55 +00:00
parent 11b6228151
commit 63b704b000

View file

@ -70,7 +70,8 @@ input[readonly]{color:var(--ash)}
.status[data-state="bad"]{color:var(--bad)}
.status code,td code,dd code{font-family:var(--f-mono);font-size:13px;background:var(--obsidian);padding:1px 6px;border-radius:6px}
p.small,.small{font-size:14px;color:var(--ash);line-height:1.55}
table.swaps,table.pools{width:100%;border-collapse:collapse;font-size:14px;margin-top:8px}
table.swaps,table.pools{width:100%;table-layout:fixed;border-collapse:collapse;font-size:14px;margin-top:8px}
table.swaps td,table.pools td,table.swaps th,table.pools th{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
table.swaps th,table.pools th{text-align:left;color:var(--ash);font-weight:500;padding:8px 6px;border-bottom:1px solid var(--line)}
table.swaps td,table.pools td{padding:10px 6px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
table.swaps td[data-state="bad"]{color:var(--bad)}
@ -284,6 +285,7 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
<thead><tr><th>Pool</th><th>Reserves</th></tr></thead>
<tbody id="pools-body"><tr><td colspan="2">Reading the chain…</td></tr></tbody>
</table>
<p class="small" id="pools-note" role="status" aria-live="polite"></p>
<div class="faucet-row">
<button class="btn ghost" id="drip-tta" type="button" disabled>Get 1,000 TTA</button>
<button class="btn ghost" id="drip-ttb" type="button" disabled>Get 1,000 TTB</button>
@ -512,9 +514,10 @@ dt{color:var(--ash)}dd{margin:0;font-family:var(--f-mono);font-size:13px;overflo
function refreshPools(){
rpc('eth_blockNumber',[]).then(function(n){
var h=parseInt(n,16);rpcBehind=h<DEPLOY_BLOCK;
if(rpcBehind){$('pools-body').innerHTML='<tr><td colspan="2">The public RPC is still syncing: block '+h.toLocaleString('en-GB')+' of at least '+DEPLOY_BLOCK.toLocaleString('en-GB')+'. Reserves, quotes and swaps appear when it reaches the pools.</td></tr>';return;}
if(rpcBehind){$('pools-body').innerHTML='<tr><td colspan="2">RPC syncing</td></tr>';say($('pools-note'),'The public RPC is syncing: block '+h.toLocaleString('en-GB')+' of at least '+DEPLOY_BLOCK.toLocaleString('en-GB')+'. Reserves, quotes and swaps appear when it reaches the pools.','bad');return;}
say($('pools-note'),'','');
return readPools();
}).catch(function(){$('pools-body').innerHTML='<tr><td colspan="2">The public RPC did not answer. Try again in a minute.</td></tr>';});
}).catch(function(){$('pools-body').innerHTML='<tr><td colspan="2">no answer</td></tr>';say($('pools-note'),'The public RPC did not answer. Try again in a minute.','bad');});
}
function readPools(){
Promise.all(POOLS.map(function(p){return call(A.router,enc(S.getReserves,['address','address'],[p.a,p.b])).then(function(r){var w=words(r);return fmt(w[0],2)+' '+p.sa+' / '+fmt(w[1],2)+' '+p.sb;}).catch(function(){return 'unreadable';});})).then(function(rows){