fix: adress can have activity even if the current amount is zero
This commit is contained in:
parent
c1289c43a4
commit
ee2342e1ba
1 changed files with 3 additions and 3 deletions
|
|
@ -77,8 +77,8 @@ async def delete_watch_wallet(wallet_id: str) -> None:
|
||||||
|
|
||||||
########################ADDRESSES#######################
|
########################ADDRESSES#######################
|
||||||
|
|
||||||
|
|
||||||
async def get_fresh_address(wallet_id: str) -> Optional[Address]:
|
async def get_fresh_address(wallet_id: str) -> Optional[Address]:
|
||||||
|
# todo: move logic to views_api after satspay refactoring
|
||||||
wallet = await get_watch_wallet(wallet_id)
|
wallet = await get_watch_wallet(wallet_id)
|
||||||
|
|
||||||
if not wallet:
|
if not wallet:
|
||||||
|
|
@ -87,7 +87,7 @@ async def get_fresh_address(wallet_id: str) -> Optional[Address]:
|
||||||
wallet_addresses = await get_addresses(wallet_id)
|
wallet_addresses = await get_addresses(wallet_id)
|
||||||
receive_addresses = list(
|
receive_addresses = list(
|
||||||
filter(
|
filter(
|
||||||
lambda addr: addr.branch_index == 0 and addr.amount != 0, wallet_addresses
|
lambda addr: addr.branch_index == 0 and addr.has_activity, wallet_addresses
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
last_receive_index = (
|
last_receive_index = (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue