csm-dashboard 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csm-dashboard
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Lido CSM Operator Dashboard for tracking validator earnings
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: fastapi>=0.104
@@ -24,9 +24,9 @@ src/data/strikes.py,sha256=b68exKntZpzjiEBftiI3AcvEclHp7vg5lsOiG2a7Kzo,9046
24
24
  src/services/__init__.py,sha256=MC7blFLAMazErCWuyYXvS6sO3uZm1z_RUOtnlIK0kSo,38
25
25
  src/services/operator_service.py,sha256=Q_Sc65T06IMHUAP_zgROGkZSbEyFPSL4B4ssVsFEUSg,29562
26
26
  src/web/__init__.py,sha256=iI2c5xxXmzsNxIetm0P2qE3uVsT-ClsMfzn620r5YTU,40
27
- src/web/app.py,sha256=PdO3sVA0j52UXbI7mRHG0VwZ_WVFy6pxJzCHlUIf_1A,32522
27
+ src/web/app.py,sha256=iLnkIi8GF5ybWwIQAmpNMxMoBaA0ob1xmfQaJrnpZ4E,32604
28
28
  src/web/routes.py,sha256=cswOYAsw9x4tEmGaHBDbkwUvML80M1onmDfRlhtQkGo,9895
29
- csm_dashboard-0.3.1.dist-info/METADATA,sha256=KgIqd2ixwSgMWwtV2MIJlwdvgh-2WC8oK4KdATEAflQ,12552
30
- csm_dashboard-0.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
- csm_dashboard-0.3.1.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
32
- csm_dashboard-0.3.1.dist-info/RECORD,,
29
+ csm_dashboard-0.3.2.dist-info/METADATA,sha256=S7WVOP9xDCfAx32g1My2AuSAi-uUsaFm910gDk5lR7I,12552
30
+ csm_dashboard-0.3.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
31
+ csm_dashboard-0.3.2.dist-info/entry_points.txt,sha256=P1Ul8ALIPBwDlVlXqTPuzJ64xxRpIJsYW8U73Tyjgtg,37
32
+ csm_dashboard-0.3.2.dist-info/RECORD,,
src/web/app.py CHANGED
@@ -327,13 +327,13 @@ def create_app() -> FastAPI:
327
327
  document.getElementById('active-validators').textContent = data.validators.active;
328
328
  document.getElementById('exited-validators').textContent = data.validators.exited;
329
329
 
330
- document.getElementById('current-bond').textContent = (data.rewards?.current_bond_eth ?? 0).toFixed(6);
331
- document.getElementById('required-bond').textContent = (data.rewards?.required_bond_eth ?? 0).toFixed(6);
332
- document.getElementById('excess-bond').textContent = (data.rewards?.excess_bond_eth ?? 0).toFixed(6);
333
- document.getElementById('cumulative-rewards').textContent = (data.rewards?.cumulative_rewards_eth ?? 0).toFixed(6);
334
- document.getElementById('distributed-rewards').textContent = (data.rewards?.distributed_eth ?? 0).toFixed(6);
335
- document.getElementById('unclaimed-rewards').textContent = (data.rewards?.unclaimed_eth ?? 0).toFixed(6);
336
- document.getElementById('total-claimable').textContent = (data.rewards?.total_claimable_eth ?? 0).toFixed(6);
330
+ document.getElementById('current-bond').textContent = parseFloat(data.rewards?.current_bond_eth ?? 0).toFixed(6);
331
+ document.getElementById('required-bond').textContent = parseFloat(data.rewards?.required_bond_eth ?? 0).toFixed(6);
332
+ document.getElementById('excess-bond').textContent = parseFloat(data.rewards?.excess_bond_eth ?? 0).toFixed(6);
333
+ document.getElementById('cumulative-rewards').textContent = parseFloat(data.rewards?.cumulative_rewards_eth ?? 0).toFixed(6);
334
+ document.getElementById('distributed-rewards').textContent = parseFloat(data.rewards?.distributed_eth ?? 0).toFixed(6);
335
+ document.getElementById('unclaimed-rewards').textContent = parseFloat(data.rewards?.unclaimed_eth ?? 0).toFixed(6);
336
+ document.getElementById('total-claimable').textContent = parseFloat(data.rewards?.total_claimable_eth ?? 0).toFixed(6);
337
337
 
338
338
  results.classList.remove('hidden');
339
339
  } catch (err) {
@@ -413,7 +413,7 @@ def create_app() -> FastAPI:
413
413
  if (h.bond_healthy) {
414
414
  document.getElementById('health-bond').innerHTML = '<span class="text-green-400">HEALTHY</span>';
415
415
  } else {
416
- document.getElementById('health-bond').innerHTML = `<span class="text-red-400">DEFICIT -${h.bond_deficit_eth.toFixed(4)} ETH</span>`;
416
+ document.getElementById('health-bond').innerHTML = `<span class="text-red-400">DEFICIT -${parseFloat(h.bond_deficit_eth).toFixed(4)} ETH</span>`;
417
417
  }
418
418
 
419
419
  // Stuck validators