Skip to content

Refactor asset handling and introduce SwapNoteStorage#2592

Open
PoulavBhowmick03 wants to merge 7 commits into0xMiden:nextfrom
PoulavBhowmick03:swap_note_storage
Open

Refactor asset handling and introduce SwapNoteStorage#2592
PoulavBhowmick03 wants to merge 7 commits into0xMiden:nextfrom
PoulavBhowmick03:swap_note_storage

Conversation

@PoulavBhowmick03
Copy link
Contributor

Closes #2515

@PoulavBhowmick03
Copy link
Contributor Author

I wrote it similar to P2idNoteStorage and P2ideNoteStorage and it's methods and complied to their API types.

Copy link
Contributor

@PhilippGackstatter PhilippGackstatter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I left a few comments.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! I left one small comment inline.

storage.extend_from_slice(&requested_asset.as_elements());
storage.extend_from_slice(payback_recipient.digest().as_elements());
let inputs = NoteStorage::new(storage)?;
let inputs = NoteStorage::from(swap_storage);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd rename the variable here from inputs to storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SwapNoteStorage

3 participants