Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Mar 11, 2024
1 parent 39b4683 commit 88321e3
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::str::FromStr;
use web3::types::Address;

pub mod check_rpc;
pub mod scan_chain;
pub mod deposit;
pub mod scan_chain;

pub fn check_address_name(n: &str) -> Result<Address, FromHexError> {
match n {
Expand Down
8 changes: 4 additions & 4 deletions src/actions/deposit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub mod close;
pub mod terminate;
pub mod details;
pub mod create;
pub mod close;
pub mod create;
pub mod details;
pub mod terminate;
78 changes: 37 additions & 41 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,51 +349,47 @@ async fn main_internal() -> Result<(), PaymentError> {
)
.await?;
}
PaymentCommands::Deposit {
deposit
} => {
match deposit {
DepositCommands::Create {
PaymentCommands::Deposit { deposit } => match deposit {
DepositCommands::Create {
make_deposit_options,
} => {
make_deposit_local(
conn.clone().unwrap(),
make_deposit_options,
} => {
make_deposit_local(
conn.clone().unwrap(),
make_deposit_options,
config,
&public_addrs,
signer,
)
.await?;
}
DepositCommands::Close {
config,
&public_addrs,
signer,
)
.await?;
}
DepositCommands::Close {
close_deposit_options,
} => {
close_deposit_local(
conn.clone().unwrap(),
close_deposit_options,
} => {
close_deposit_local(
conn.clone().unwrap(),
close_deposit_options,
config,
&public_addrs,
)
.await?;
}
DepositCommands::Terminate {
config,
&public_addrs,
)
.await?;
}
DepositCommands::Terminate {
terminate_deposit_options,
} => {
terminate_deposit_local(
conn.clone().unwrap(),
terminate_deposit_options,
} => {
terminate_deposit_local(
conn.clone().unwrap(),
terminate_deposit_options,
config,
&public_addrs,
)
.await?;
}
DepositCommands::Check {
check_deposit_options,
} => {
deposit_details_local(check_deposit_options, config).await?;
}
config,
&public_addrs,
)
.await?;
}
}
DepositCommands::Check {
check_deposit_options,
} => {
deposit_details_local(check_deposit_options, config).await?;
}
},

PaymentCommands::GenerateKey {
generate_key_options,
Expand Down
1 change: 0 additions & 1 deletion src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ pub enum DepositCommands {
},
}


#[derive(StructOpt)]
#[structopt(about = "Payment admin tool")]
pub enum PaymentCommands {
Expand Down

0 comments on commit 88321e3

Please sign in to comment.