Merge pull request #8998 from Abdulkbk/trx-pagination
pagination: add pagination to wallet transactions
This commit is contained in:
14 files changed
+329
-37
No files matched your search
+6
-4
@@ -6476,14 +6476,16 @@ func (r *rpcServer) GetTransactions(ctx context.Context,
|
||||
endHeight = req.EndHeight
|
||||
}
|
||||
|
||||
transactions, err := r.server.cc.Wallet.ListTransactionDetails(
|
||||
req.StartHeight, endHeight, req.Account,
|
||||
)
|
||||
txns, firstIdx, lastIdx, err :=
|
||||
r.server.cc.Wallet.ListTransactionDetails(
|
||||
req.StartHeight, endHeight, req.Account,
|
||||
req.IndexOffset, req.MaxTransactions,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return lnrpc.RPCTransactionDetails(transactions), nil
|
||||
return lnrpc.RPCTransactionDetails(txns, firstIdx, lastIdx), nil
|
||||
}
|
||||
|
||||
// DescribeGraph returns a description of the latest graph state from the PoV
|
||||
|
||||
Reference in new issue
Block a user