20 lines
567 B
Python
20 lines
567 B
Python
#!/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")
|