Skip to content

Commit

Permalink
fix: don't copy note's metadata (#593)
Browse files Browse the repository at this point in the history
  • Loading branch information
polydez authored Apr 11, 2024
1 parent 01a6c1d commit b1078f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion miden-tx/tests/integration/scripts/faucet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn prove_faucet_contract_mint_fungible_asset_succeeds() {
assert_eq!(created_note.id(), id);
assert_eq!(
created_note.metadata(),
NoteMetadata::new(faucet_account.id(), NoteType::OffChain, tag, ZERO).unwrap()
&NoteMetadata::new(faucet_account.id(), NoteType::OffChain, tag, ZERO).unwrap()
);
}

Expand Down
6 changes: 3 additions & 3 deletions objects/src/transaction/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ impl OutputNote {
}

/// Note's metadata.
pub fn metadata(&self) -> NoteMetadata {
pub fn metadata(&self) -> &NoteMetadata {
match self {
OutputNote::Public(note) => *note.metadata(),
OutputNote::Private(note) => *note.metadata(),
OutputNote::Public(note) => note.metadata(),
OutputNote::Private(note) => note.metadata(),
}
}
}
Expand Down

0 comments on commit b1078f8

Please sign in to comment.