Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(bridge-contracts): add snapshot test for memo #1753

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Fraser999
Copy link
Contributor

Summary

This adds a snapshot test for the memo field being populated from the withdrawal info.

Background

The new test should serve to emphasize that the schema of the memo field is part of the API and changes to this could well be breaking.

Changes

  • Moved some code unchanged inside the existing memo_to_json and removed the generic parameter.
  • Added snapshot test.

Testing

This is a test.

Changelogs

No updates required - this is only adding a test.

Related Issues

Closes #1752.

Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Mild request for changes: the event ID caused us issues previously and so should also be under test.

crates/astria-bridge-contracts/src/lib.rs Outdated Show resolved Hide resolved
crates/astria-bridge-contracts/src/lib.rs Outdated Show resolved Hide resolved
crates/astria-bridge-contracts/src/lib.rs Outdated Show resolved Hide resolved
crates/astria-bridge-contracts/src/lib.rs Outdated Show resolved Hide resolved
crates/astria-bridge-contracts/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Changed from comment to requesting changes because I saw auto merge is enabled.

Copy link
Member

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

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

Yeah, this is nice and useful. Thank you!

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.

Provide snapshot test for memo field in astria-bridge-contracts
4 participants