Skip to content

Commit 09184a4

Browse files
committed
fixup
1 parent 2978e89 commit 09184a4

6 files changed

Lines changed: 6 additions & 27 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

smartcontract/cli/src/config/get.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ mod tests {
111111
geo_program_id: None,
112112
tenant: None,
113113
address_labels: Default::default(),
114-
geo_program_id: None,
115114
};
116115

117116
mutator(&mut cfg);

smartcontract/cli/src/config/set.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ mod tests {
307307
geo_program_id: None,
308308
tenant: None,
309309
address_labels: Default::default(),
310-
geo_program_id: None,
311310
};
312311

313312
mutator(&mut cfg);

smartcontract/cli/src/geolocation/probe/get.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ mod tests {
6363
let probe = GeoProbe {
6464
account_type: AccountType::GeoProbe,
6565
owner: owner_pk,
66-
bump_seed: 255,
6766
exchange_pk,
6867
public_ip: Ipv4Addr::new(10, 0, 0, 1),
6968
location_offset_port: 8923,

smartcontract/cli/src/geolocation/probe/list.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ mod tests {
8383
let probe1 = GeoProbe {
8484
account_type: AccountType::GeoProbe,
8585
owner: Pubkey::new_unique(),
86-
bump_seed: 255,
8786
exchange_pk,
8887
public_ip: Ipv4Addr::new(10, 0, 0, 1),
8988
location_offset_port: 8923,
@@ -122,7 +121,6 @@ mod tests {
122121
let probe1 = GeoProbe {
123122
account_type: AccountType::GeoProbe,
124123
owner: Pubkey::new_unique(),
125-
bump_seed: 255,
126124
exchange_pk,
127125
public_ip: Ipv4Addr::new(10, 0, 0, 1),
128126
location_offset_port: 8923,

smartcontract/cli/src/geolocation/programconfig/init.rs

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
1-
use crate::{geoclicommand::GeoCliCommand, validators::validate_pubkey};
1+
use crate::geoclicommand::GeoCliCommand;
22
use clap::Args;
33
use doublezero_sdk::geolocation::programconfig::init::InitProgramConfigCommand;
4-
use solana_sdk::pubkey::Pubkey;
54
use std::io::Write;
65

76
#[derive(Args, Debug)]
8-
pub struct InitProgramConfigCliCommand {
9-
/// Serviceability program ID
10-
#[arg(long, value_parser = validate_pubkey)]
11-
pub serviceability_program_id: String,
12-
}
7+
pub struct InitProgramConfigCliCommand {}
138

149
impl InitProgramConfigCliCommand {
1510
pub fn execute<C: GeoCliCommand, W: Write>(self, client: &C, out: &mut W) -> eyre::Result<()> {
16-
let serviceability_program_id =
17-
Pubkey::try_from(self.serviceability_program_id.as_str()).unwrap();
18-
19-
let (sig, pda) = client.init_program_config(InitProgramConfigCommand {
20-
serviceability_program_id,
21-
})?;
11+
let (sig, pda) = client.init_program_config(InitProgramConfigCommand {})?;
2212

2313
writeln!(out, "Signature: {sig}\r\nAccount: {pda}")?;
2414

@@ -37,7 +27,6 @@ mod tests {
3727
fn test_cli_geo_init_program_config() {
3828
let mut client = MockGeoCliCommand::new();
3929

40-
let svc_program_id = Pubkey::from_str_const("HQ2UUt18uJqKaQFJhgV9zaTdQxUZjNrsKFgoEDquBkcx");
4130
let config_pda = Pubkey::from_str_const("BmrLoL9jzYo4yiPUsFhYFU8hgE3CD3Npt8tgbqvneMyB");
4231
let signature = Signature::from([
4332
120, 138, 162, 185, 59, 209, 241, 157, 71, 157, 74, 131, 4, 87, 54, 28, 38, 180, 222,
@@ -48,16 +37,11 @@ mod tests {
4837

4938
client
5039
.expect_init_program_config()
51-
.with(predicate::eq(InitProgramConfigCommand {
52-
serviceability_program_id: svc_program_id,
53-
}))
40+
.with(predicate::eq(InitProgramConfigCommand {}))
5441
.returning(move |_| Ok((signature, config_pda)));
5542

5643
let mut output = Vec::new();
57-
let res = InitProgramConfigCliCommand {
58-
serviceability_program_id: svc_program_id.to_string(),
59-
}
60-
.execute(&client, &mut output);
44+
let res = InitProgramConfigCliCommand {}.execute(&client, &mut output);
6145
assert!(res.is_ok());
6246
let output_str = String::from_utf8(output).unwrap();
6347
assert!(output_str.contains("Signature:"));

0 commit comments

Comments
 (0)