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

Add unit tests + Update doc #24

Merged
merged 14 commits into from
Nov 21, 2023
Prev Previous commit
Next Next commit
Fix empty state_root_hash in query_contratc_dict
gRoussac committed Oct 26, 2023
commit e9548c80f1f2d5f0ccf781d0af7bd91deb78b829
6 changes: 3 additions & 3 deletions src/sdk/rpcs/get_balance.rs
Original file line number Diff line number Diff line change
@@ -148,10 +148,10 @@ impl SDK {
self.get_balance(hash.as_str(), purse_uref, verbosity, node_address)
.await
} else {
let err = "Error: Missing state_root_hash";
error(err);
return Err(JsError::new(err));
self.get_balance("", purse_uref, verbosity, node_address)
.await
};

match result {
Ok(data) => Ok(data.result.into()),
Err(err) => {
6 changes: 3 additions & 3 deletions src/sdk/rpcs/get_dictionary_item.rs
Original file line number Diff line number Diff line change
@@ -161,10 +161,10 @@ impl SDK {
self.get_dictionary_item(hash.as_str(), dictionary_item, verbosity, node_address)
.await
} else {
let err = "Error: Missing state_root_hash";
error(err);
return Err(JsError::new(err));
self.get_dictionary_item("", dictionary_item, verbosity, node_address)
.await
};

match result {
Ok(data) => Ok(data.result.into()),
Err(err) => {