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

Implement Serde Deserialize for Call and Transaction Requests #346

Merged
merged 4 commits into from
May 15, 2020

Conversation

HCastano
Copy link
Contributor

I've got a crate that's using these types, and it would benefit from being able to deserialize them.


#[test]
fn should_deserialize_transaction_request() {
let tx_request = TransactionRequest {
Copy link
Owner

Choose a reason for hiding this comment

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

There is already a test for serialization, I think for simplicity of the test I'd prefer to just use a raw JSON as serialized.

@@ -97,6 +97,28 @@ mod tests {
);
}

#[test]
fn should_deserialize_call_request() {
let call_request = CallRequest {
Copy link
Owner

Choose a reason for hiding this comment

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

same here - let's just hardcode a string (or two) and check we deserialize it correctly.

@tomusdrw tomusdrw merged commit 27ec387 into tomusdrw:master May 15, 2020
@HCastano HCastano deleted the hc-add-deserialize-to-call-request branch May 15, 2020 21:00
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.

2 participants