Snapshot: full project state
This commit is contained in:
19
fix_nan.py
Normal file
19
fix_nan.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
"""SatsSpin: default logged-out balance displays to 0 instead of NaN."""
|
||||
import io
|
||||
|
||||
B = "/opt/casino/dist/assets/index-CzzrlZy-.js"
|
||||
bundle = io.open(B, encoding="utf-8").read()
|
||||
|
||||
fixes = [
|
||||
("Te(h.balanceSats)", "Te(h.balanceSats||0)"),
|
||||
("sb(h.balanceSats)", "sb(h.balanceSats||0)"),
|
||||
("Lt(h.balanceSats)", "Lt(h.balanceSats||0)"),
|
||||
]
|
||||
for old, new in fixes:
|
||||
n = bundle.count(old)
|
||||
bundle = bundle.replace(old, new)
|
||||
print(f"{old} -> {new}: {n} replaced")
|
||||
|
||||
io.open(B, "w", encoding="utf-8").write(bundle)
|
||||
print("NAN FIX DONE")
|
||||
Reference in New Issue
Block a user