mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2026-09-05 02:24:21 -05:00
Merge pull request #11830 from AmineKhaldi/did_id_as_property
Read did_id from nft_wallet_info in NFTWallet. Fixes some did_id AttributeError instances
This commit is contained in:
@@ -64,7 +64,10 @@ class NFTWallet:
|
||||
nft_wallet_info: NFTWalletInfo
|
||||
standard_wallet: Wallet
|
||||
wallet_id: int
|
||||
did_id: Optional[bytes32]
|
||||
|
||||
@property
|
||||
def did_id(self):
|
||||
return self.nft_wallet_info.did_id
|
||||
|
||||
@classmethod
|
||||
async def create_new_nft_wallet(
|
||||
@@ -101,12 +104,6 @@ class NFTWallet:
|
||||
|
||||
await self.wallet_state_manager.add_new_wallet(self, self.wallet_info.id, in_transaction=in_transaction)
|
||||
self.log.debug("Generated a new NFT wallet: %s", self.__dict__)
|
||||
if not did_id:
|
||||
# default profile wallet
|
||||
self.log.debug("Standard NFT wallet created")
|
||||
self.did_id = None
|
||||
else:
|
||||
self.did_id = did_id
|
||||
return self
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user