Merge pull request #11831 from AmineKhaldi/owner_pubkey_hex

Show owner pubkey as a hex string in nft list command
This commit is contained in:
William Allen 2022-06-10 15:58:19 -05:00 committed by GitHub
commit a6272b894d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -767,13 +767,17 @@ async def list_nfts(args: Dict, wallet_client: WalletRpcClient, fingerprint: int
for n in nft_list:
nft = NFTInfo.from_json_dict(n)
if nft.owner_pubkey is None:
owner_pubkey = None
else:
owner_pubkey = nft.owner_pubkey.hex()
print()
print(f"{'Launcher coin ID:'.ljust(26)} {nft.launcher_id}")
print(f"{'Launcher puzhash:'.ljust(26)} {nft.launcher_puzhash}")
print(f"{'Current NFT coin ID:'.ljust(26)} {nft.nft_coin_id}")
print(f"{'On-chain data/info:'.ljust(26)} {nft.chain_info}")
print(f"{'Owner DID:'.ljust(26)} {nft.owner_did}")
print(f"{'Owner pubkey:'.ljust(26)} {nft.owner_pubkey}")
print(f"{'Owner pubkey:'.ljust(26)} {owner_pubkey}")
print(f"{'Royalty percentage:'.ljust(26)} {nft.royalty_percentage}")
print(f"{'Royalty puzhash:'.ljust(26)} {nft.royalty_puzzle_hash}")
print(f"{'NFT content hash:'.ljust(26)} {nft.data_hash.hex()}")