Skip to content

Commit

Permalink
Add get_seed and new_signer_idx to tester public API.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neopallium committed Jul 11, 2024
1 parent 1e425ac commit f474175
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/polymesh-api-tester/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polymesh-api-tester"
version = "0.6.0"
version = "0.6.1"
edition = "2021"
authors = ["Robert G. Jakabosky <[email protected]>"]
license = "Apache-2.0"
Expand Down
6 changes: 5 additions & 1 deletion crates/polymesh-api-tester/src/tester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ impl PolymeshTester {
self.sudo.is_some()
}

pub fn get_seed(&self) -> &str {
&self.seed
}

pub fn dev_user(&self, name: &str) -> Result<DbAccountSigner> {
DbAccountSigner::from_string(self.db.clone(), &format!("//{}", name))
}
Expand All @@ -82,7 +86,7 @@ impl PolymeshTester {
self.users.insert(name.to_string(), user.clone());
}

fn new_signer_idx(&self, name: &str, idx: usize) -> Result<AccountSigner> {
pub fn new_signer_idx(&self, name: &str, idx: usize) -> Result<AccountSigner> {
AccountSigner::from_string(&format!("//{}_{}_{}", self.seed, name, idx))
}

Expand Down

0 comments on commit f474175

Please sign in to comment.