Skip to content

Commit

Permalink
Merge pull request #41 from Rigidity/odd-output
Browse files Browse the repository at this point in the history
Fix NFT and DID odd output calculation
  • Loading branch information
Rigidity authored Jun 5, 2024
2 parents 11d1c9d + bc95611 commit 3afe447
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion crates/chia-sdk-parser/src/puzzles/did.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ impl DidPuzzle {
let create_coin = conditions
.into_iter()
.find_map(|condition| match condition {
Condition::CreateCoin(create_coin) => Some(create_coin),
Condition::CreateCoin(create_coin) if create_coin.amount % 2 == 1 => {
Some(create_coin)
}
_ => None,
});

Expand Down
2 changes: 1 addition & 1 deletion crates/chia-sdk-parser/src/puzzles/nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl NftPuzzle {
)?;

let create_coin = conditions.iter().find_map(|condition| match condition {
Condition::CreateCoin(create_coin) => Some(create_coin),
Condition::CreateCoin(create_coin) if create_coin.amount % 2 == 1 => Some(create_coin),
_ => None,
});

Expand Down

0 comments on commit 3afe447

Please sign in to comment.