Skip to content

Commit

Permalink
Update src/containers/consignment.rs
Browse files Browse the repository at this point in the history
`assign.as_attachment()` return the vector(`&[AssignAttach<Seal>`), so I think there should not be a `and_then()` method after that.
Then `Attach::as_revealed_state`, there is no `as_reveal_state` in the rgbcore, but `Assign<State, Seal>::as_reveal_state`.

Co-authored-by: Dr. Maxim Orlovsky <[email protected]>
  • Loading branch information
Jack Choi and dr-orlovsky authored Jun 22, 2024
1 parent 86ff555 commit 1c8ae7c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/containers/consignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,7 @@ impl<const TRANSFER: bool> Consignment<TRANSFER> {
.known_transitions
.values()
.for_each(|transition| {
transition.assignments.values().for_each(|assign| {
assign.as_attachment().iter().for_each(|item| {
let state = item
.as_revealed_state()
.expect("get revealed attached state failed");
transition.assignments.values().filter_map(|assign| assign.as_attachment().and_then(Attach::as_revealed_state)).for_each(|assign| {
if !self.attachments.keys().any(|&id| id == state.id) {
status.add_warning(Warning::Custom(format!(
"attach id from data containers {:?} is not present in the \
Expand Down

0 comments on commit 1c8ae7c

Please sign in to comment.