feat: Add wallet status
All checks were successful
Build Docker / Build Image (push) Successful in 1m16s

This commit is contained in:
2025-01-14 15:54:25 +11:00
parent cff65b167a
commit 693bf13450
21 changed files with 71 additions and 24 deletions

View File

@@ -381,6 +381,25 @@ def getNodeSync():
sync = round(sync, 2)
return sync
def getWalletStatus():
response = hsw.rpc_getWalletInfo()
if 'error' in response and response['error'] != None:
return "Error"
# return response
walletHeight = response['result']['height']
# Get the current block height
nodeHeight = getBlockHeight()
if walletHeight < nodeHeight:
return f"Scanning {walletHeight/nodeHeight*100:.2f}%"
elif walletHeight == nodeHeight:
return "Ready"
else:
return "Error wallet ahead of node"
def getBids(account, domain="NONE"):
if domain == "NONE":
return hsw.getWalletBids(account)