Skip to content

Commit

Permalink
Fix DID transfer for NFTs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Nov 17, 2024
1 parent 6929df4 commit 7f88188
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/chia-sdk-driver/src/primitives/nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,12 @@ where
let did_id = transfer_condition.did_id;

let did_conditions = if did_id.is_some() {
Conditions::new().assert_puzzle_announcement(did_puzzle_assertion(
self.coin.puzzle_hash,
&transfer_condition,
))
Conditions::new()
.assert_puzzle_announcement(did_puzzle_assertion(
self.coin.puzzle_hash,
&transfer_condition,
))
.create_puzzle_announcement(self.info.launcher_id.into())
} else {
Conditions::new()
};
Expand Down Expand Up @@ -561,6 +563,8 @@ mod tests {

let mut did = did.update(ctx, &p2, mint_nft)?;

sim.spend_coins(ctx.take(), &[sk.clone()])?;

for i in 0..5 {
let did_owner = DidOwner::from_did_info(&did.info);

Expand Down

0 comments on commit 7f88188

Please sign in to comment.