-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add unit tests + Update doc #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small fix, leaving approval to tech reviewers.
Co-authored-by: Adam Stone <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny nit. Otherwise LGTM
src/sdk/rpcs/query_balance.rs
Outdated
let err = "Error: Missing purse identifier".to_string(); | ||
error(&err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding of Rust, I believe this just convert the &str
literal into a String
and then back into an &str
correct? If that is the case we can probably just revert these lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that is correct I changed that a lot and added an Err using the string as String just below.
I moved the to_string below thus.
let err = "Error: Missing key from formatted string";
error(err);
return Err(SdkError::InvalidArgument {
context: "query_global_state",
error: err.to_string(),
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also fixed the context
This PR intends to
Multi threading the tests (like the integration tests) does not work correctly so using one thread.