feat: Add pagination for HSD v7 and return errors when node not connected
All checks were successful
Build Docker / Build Image (push) Successful in 52s

This commit is contained in:
2025-01-30 12:32:20 +11:00
parent 1962c9345e
commit 42e8f642b4
7 changed files with 171 additions and 28 deletions

View File

@@ -29,7 +29,14 @@ functions = {
def main(params, authentication):
wallet = authentication.split(":")[0]
txs = account.getTransactions(wallet)
txCount = 0
page = 1
while True:
txs = account.getTransactions(wallet,page)
if len(txs) == 0:
break
txCount += len(txs)
page += 1
return {"txs": f'Total TXs: {len(txs)}'}
return {"txs": f'Total TXs: {txCount}'}