Skip to content

Commit

Permalink
Namecoin: Add more fields to name_list result
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyRand committed Feb 17, 2020
1 parent 7557be0 commit 62822eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions electrum_nmc/electrum/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,20 @@ async def name_list(self, identifier=None, wallet: Abstract_Wallet = None):
expires_in = name_expires_in(height, chain_height)
expired = expires_in <= 0 if expires_in is not None else None

is_mine = wallet.is_mine(address)

result_item = {
"name": name,
"name_encoding": "ascii",
"value": value,
"value_encoding": "ascii",
"txid": txid,
"vout": vout,
"address": address,
"height": height,
"expires_in": expires_in,
"expired": expired,
"ismine": is_mine,
}
result.append(result_item)

Expand Down

0 comments on commit 62822eb

Please sign in to comment.