Bail out earlier if the transaction record has no spend bundle in generate_new_decentralised_id (#17129)

Bail out earlier if the transaction record has no spend bundle in generate_new_decentralised_id.
This commit is contained in:
Amine Khaldi 2023-12-27 16:06:57 +01:00 committed by GitHub
parent ff269b8864
commit 4a44043638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1287,6 +1287,9 @@ class DIDWallet:
origin_id=origin.name(),
)
if tx_record.spend_bundle is None:
return None
genesis_launcher_solution = Program.to([did_puzzle_hash, amount, bytes(0x80)])
launcher_cs = make_spend(launcher_coin, genesis_launcher_puz, genesis_launcher_solution)
@ -1305,9 +1308,6 @@ class DIDWallet:
await self.add_parent(eve_coin.parent_coin_info, eve_parent)
await self.add_parent(eve_coin.name(), future_parent)
if tx_record.spend_bundle is None:
return None
# Only want to save this information if the transaction is valid
did_info = DIDInfo(
origin_coin=launcher_coin,