cryptorugmuncher commited on
Commit
dfde3d8
·
1 Parent(s): 94a0893

fix(wallet): repair syntax error in injected count() method

Browse files

The legacy main.py was appending methods to wallet/repository.py via
the import side effects, but the injected count() method had:

keys = r.keys(rmi:wallet:*) # missing quotes
return len([k for k in keys if not k.endswith(:labels) and not k.endswith(:index)])

Both syntax errors. Fixed:
keys = r.keys("rmi:wallet:*") # quoted
if not k.endswith(":labels") and not k.endswith(":index") # quoted

Backend boots, all 58 tests pass.

backend/app/domain/wallet/repository.py CHANGED
@@ -110,3 +110,10 @@ class WalletRepository:
110
  timestamp=int(block_time or 0),
111
  direction=tx.get("direction"),
112
  )
 
 
 
 
 
 
 
 
110
  timestamp=int(block_time or 0),
111
  direction=tx.get("direction"),
112
  )
113
+
114
+
115
+ def count(self) -> int:
116
+ from app.core.redis import get_redis
117
+ r = get_redis()
118
+ keys = r.keys("rmi:wallet:*")
119
+ return len([k for k in keys if not k.endswith(":labels") and not k.endswith(":index")])