Skip to content

Commit

Permalink
chore: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone committed Dec 10, 2024
1 parent 07226ef commit 69f482d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
1 change: 1 addition & 0 deletions blueprint-test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ fn inject_tangle_key<P: AsRef<Path>>(keystore_path: P, name: &str) -> color_eyre
let suri = format!("//{name}");

let sr = sp_core::sr25519::Pair::from_string(&suri, None).expect("Should be valid SR keypair");

let sr_seed = &sr.as_ref().secret.to_bytes();

let ed = sp_core::ed25519::Pair::from_string(&suri, None).expect("Should be valid ED keypair");
Expand Down
8 changes: 0 additions & 8 deletions blueprint-test-utils/src/tangle/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,6 @@ pub async fn request_service(
PaymentAsset::from(Asset::Custom(0)),
value,
);
let balance_call = api::storage().balances().account(user.account_id());
let balance = client
.storage()
.at_latest()
.await?
.fetch_or_default(&balance_call)
.await?;
println!("XXX | Balance: {:?}", balance);
let res = client
.tx()
.sign_and_submit_then_watch_default(&call, user)
Expand Down
15 changes: 0 additions & 15 deletions blueprint-test-utils/src/test_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,21 +166,6 @@ pub async fn new_test_ext_blueprint_manager<
opts.signer = Some(handle.sr25519_id().clone().into_inner());
}

// Give the accounts balances
let client = get_client(&opts.ws_rpc_url, &opts.http_rpc_url)
.await
.expect("Failed to create an account-based localhost client");

let alice = get_from_seed::<sr25519::Public>("Alice");
let transfer_call = api::tx()
.balances()
.transfer_allow_death(tg_addr.into(), 1_000_000_000_000_000_000_000_000);
let res = client
.tx()
.sign_and_submit_then_watch_default(&transfer_call, alice)
.await
.expect("Failed to transfer funds to Alice");

handles.push(handle);
}

Expand Down
4 changes: 2 additions & 2 deletions blueprints/incredible-squaring/tests/call_id.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::sync::atomic::AtomicU64;
use std::sync::atomic::Ordering;

use blueprint_test_utils::tangle::NodeConfig;
pub use blueprint_test_utils::{
get_blueprint_base_dir, read_cargo_toml_file, run_test_blueprint_manager, setup_log,
submit_job, tangle, wait_for_completion_of_tangle_job, Args, Job, Opts,
Expand All @@ -18,11 +19,10 @@ async fn call_id_valid() {

const N: usize = 1;
const JOB_ID: usize = 1;

new_test_ext_blueprint_manager::<N, 1, String, _, _>(
String::new(),
run_test_blueprint_manager,
false,
NodeConfig::new(false),
)
.await
.execute_with_async(|client, handles, blueprint, _| async move {
Expand Down

0 comments on commit 69f482d

Please sign in to comment.