Skip to content

Commit

Permalink
Fix AssetId in api tester.
Browse files Browse the repository at this point in the history
  • Loading branch information
Neopallium committed Oct 11, 2024
1 parent 4456198 commit fb88551
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ polymesh-api-codegen-macro = { version = "3.5.2", path = "crates/polymesh-api-co
polymesh-api-codegen = { version = "3.5.2", path = "crates/polymesh-api-codegen", default-features = false }
polymesh-api-client = { version = "3.7.1", path = "crates/polymesh-api-client", default-features = false }
polymesh-api-client-extras = { version = "3.4.1", path = "crates/polymesh-api-client-extras", default-features = false }
polymesh-api-tester = { version = "0.7.2", path = "crates/polymesh-api-tester", default-features = false }
polymesh-api-tester = { version = "0.7.3", path = "crates/polymesh-api-tester", default-features = false }
polymesh-api-ink = { version = "1.3.1", path = "crates/polymesh-api-ink", default-features = false }
polymesh-api = { version = "3.8.1", path = "./", default-features = false }

Expand Down
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.7.2"
version = "0.7.3"
edition = "2021"
authors = ["Robert G. Jakabosky <robert@polymesh.network>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/polymesh-api-tester/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(feature = "polymesh_v7")]
pub use polymesh_api::polymesh::types::polymesh_primitives::{
asset::AssetID,
asset::AssetId,
};
pub use polymesh_api::{
client::{AccountId, IdentityId, Signer},
Expand Down
6 changes: 3 additions & 3 deletions crates/polymesh-api-tester/src/tester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

#[cfg(feature = "polymesh_v7")]
use polymesh_api::polymesh::types::polymesh_primitives::{
asset::AssetID,
asset::AssetId,
secondary_key::ExtrinsicPermissions,
};
use polymesh_api::{
Expand Down Expand Up @@ -368,11 +368,11 @@ impl PolymeshTester {
}

#[cfg(feature = "polymesh_v7")]
pub fn gen_asset_id(&self) -> AssetID {
pub fn gen_asset_id(&self) -> AssetId {
use rand::{thread_rng, Rng};
let mut data = [0u8; 8];
thread_rng().fill(&mut data[..]);
let fake_name = hex::encode_upper(data);
AssetID(fake_name.as_bytes().try_into().unwrap())
AssetId(fake_name.as_bytes().try_into().unwrap())
}
}

0 comments on commit fb88551

Please sign in to comment.