From 581827080320ce08592925310982e22c189f488b Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 5 Apr 2022 14:37:43 -0400 Subject: [PATCH] fix address_list pagination --- lbry/wallet/database.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lbry/wallet/database.py b/lbry/wallet/database.py index 2ddf9a666..1f7b2c0e4 100644 --- a/lbry/wallet/database.py +++ b/lbry/wallet/database.py @@ -1211,6 +1211,8 @@ class Database(SQLiteMixin): return addresses async def get_address_count(self, cols=None, read_only=False, **constraints): + # this is a count query that returns one line. Don't pass offset. + constraints.pop('offset') count = await self.select_addresses('COUNT(*) as total', read_only=read_only, **constraints) return count[0]['total'] or 0