mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-23 14:39:37 -05:00
Take wallet names by reference
We are always passing constants here. Make that more ergonomic.
This commit is contained in:
parent
22bdc08c83
commit
dc840e1562
@ -56,7 +56,7 @@ impl<'c> Monero {
|
||||
/// miner wallet container name is: `miner`
|
||||
pub async fn new(
|
||||
cli: &'c Cli,
|
||||
additional_wallets: Vec<String>,
|
||||
additional_wallets: Vec<&'static str>,
|
||||
) -> Result<(Self, Vec<Container<'c, Cli, image::Monero>>)> {
|
||||
let prefix = format!("{}_", random_prefix());
|
||||
let monerod_name = format!("{}{}", prefix, MONEROD_DAEMON_CONTAINER_NAME);
|
||||
|
@ -17,9 +17,7 @@ async fn fund_transfer_and_check_tx_key() {
|
||||
let send_to_bob = 5_000_000_000;
|
||||
|
||||
let tc = Cli::default();
|
||||
let (monero, _containers) = Monero::new(&tc, vec!["alice".to_string(), "bob".to_string()])
|
||||
.await
|
||||
.unwrap();
|
||||
let (monero, _containers) = Monero::new(&tc, vec!["alice", "bob"]).await.unwrap();
|
||||
let alice_wallet = monero.wallet("alice").unwrap();
|
||||
let bob_wallet = monero.wallet("bob").unwrap();
|
||||
|
||||
|
@ -195,12 +195,10 @@ async fn init_monero_container(
|
||||
Monero,
|
||||
Vec<Container<'_, Cli, monero_harness::image::Monero>>,
|
||||
) {
|
||||
let (monero, monerods) = Monero::new(&cli, vec![
|
||||
MONERO_WALLET_NAME_ALICE.to_owned(),
|
||||
MONERO_WALLET_NAME_BOB.to_owned(),
|
||||
])
|
||||
.await
|
||||
.unwrap();
|
||||
let (monero, monerods) =
|
||||
Monero::new(&cli, vec![MONERO_WALLET_NAME_ALICE, MONERO_WALLET_NAME_BOB])
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
(monero, monerods)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user