diff --git a/testing/jormungandr-testing-utils/src/testing/network_builder/settings.rs b/testing/jormungandr-testing-utils/src/testing/network_builder/settings.rs index 3fef13e5fe..9735211734 100644 --- a/testing/jormungandr-testing-utils/src/testing/network_builder/settings.rs +++ b/testing/jormungandr-testing-utils/src/testing/network_builder/settings.rs @@ -161,7 +161,7 @@ impl Settings { }]); self.legacy_wallets - .insert(template.alias().clone(), template.clone()); + .insert(template.alias().to_string(), template.clone()); self.block0.initial.push(legacy_fragment); } } diff --git a/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/external.rs b/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/external.rs index cac6f646cd..7ca17f3a33 100644 --- a/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/external.rs +++ b/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/external.rs @@ -24,7 +24,11 @@ impl ExternalWalletTemplate { &self.value } - pub fn address(&self) -> String { - self.address.clone() + pub fn address(&self) -> &str { + &self.address + } + + pub fn alias(&self) -> &str { + &self.alias } } diff --git a/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/legacy.rs b/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/legacy.rs index ef8954845c..542893315b 100644 --- a/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/legacy.rs +++ b/testing/jormungandr-testing-utils/src/testing/network_builder/wallet/template/legacy.rs @@ -25,7 +25,7 @@ impl LegacyWalletTemplate { } } - pub fn alias(&self) -> &WalletAlias { + pub fn alias(&self) -> &str { &self.alias } @@ -33,7 +33,11 @@ impl LegacyWalletTemplate { &self.value } - pub fn address(&self) -> String { - self.address.clone() + pub fn address(&self) -> &str { + &self.address + } + + pub fn mnemonics(&self) -> &str { + &self.mnemonics } } diff --git a/testing/jormungandr-testing-utils/src/wallet/delegation.rs b/testing/jormungandr-testing-utils/src/wallet/delegation.rs index e4321e9ca2..931df6c77d 100644 --- a/testing/jormungandr-testing-utils/src/wallet/delegation.rs +++ b/testing/jormungandr-testing-utils/src/wallet/delegation.rs @@ -18,6 +18,7 @@ pub struct Wallet { /// this is the root seed of the wallet, everytime we will require /// the wallet to update we will update the rng, we keep the `seed` /// so we may reproduce the steps of the wallet + #[allow(dead_code)] seed: [u8; 32], rng: ChaChaRng, diff --git a/testing/jormungandr-testing-utils/src/wallet/utxo.rs b/testing/jormungandr-testing-utils/src/wallet/utxo.rs index 27e3e4bd7e..a41589dd71 100644 --- a/testing/jormungandr-testing-utils/src/wallet/utxo.rs +++ b/testing/jormungandr-testing-utils/src/wallet/utxo.rs @@ -5,7 +5,7 @@ use jormungandr_lib::{ hash::Hash, key::{self, Identifier}, }, - interfaces::{Address, UTxOInfo}, + interfaces::Address, }; use rand_chacha::ChaChaRng; use rand_core::{CryptoRng, RngCore, SeedableRng}; @@ -17,6 +17,7 @@ pub struct Wallet { /// this is the root seed of the wallet, everytime we will require /// the wallet to update we will update the rng, we keep the `seed` /// so we may reproduce the steps of the wallet + #[allow(dead_code)] seed: [u8; 32], rng: ChaChaRng, @@ -24,10 +25,6 @@ pub struct Wallet { /// the spending key signing_keys: Vec, - /// utxos with the index in the `signing_keys` so we can later - /// sign the witness for the next transaction, - utxos: Vec<(usize, UTxOInfo)>, - discrimination: Discrimination, } @@ -43,7 +40,6 @@ impl Wallet { signing_keys: Vec::new(), seed, rng: ChaChaRng::from_seed(seed), - utxos: Vec::new(), discrimination, }; wallet.generate_new_signing_key();