Skip to content

Commit 4689d8b

Browse files
feat: make solana-remote-wallet optional via feature flag
1 parent fc03f91 commit 4689d8b

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ solana-clap-utils = "1.14.*"
1414
solana-cli-config = "1.14.*"
1515
solana-client = "1.14.*"
1616
solana-logger ="1.14.*"
17-
solana-remote-wallet = "1.14.*"
17+
solana-remote-wallet = { version = "1.14.*", optional = true }
1818
solana-sdk = "1.14.*"
1919
tokio = { version = "1", features = ["full"] }
2020
thiserror = "1.0"
@@ -38,4 +38,8 @@ assert_cmd = "2.0"
3838
predicates = "3.0"
3939
tempfile = "3.8"
4040
serial_test = "2.0"
41-
mockito = "1.2"
41+
mockito = "1.2"
42+
43+
[features]
44+
default = []
45+
remote-wallet = ["solana-remote-wallet"]

src/main.rs

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,15 @@ use {
1111
solana_remote_wallet::remote_wallet::RemoteWalletManager,
1212
solana_sdk::{
1313
commitment_config::CommitmentConfig,
14-
instruction::AccountMeta,
1514
native_token::Sol,
16-
signature::{Keypair, Signer},
15+
signature::Signer,
1716
},
1817
std::{env, process::exit, sync::Arc},
1918
};
2019
pub mod clparse;
2120
pub mod prelude;
2221
pub mod utils;
2322

24-
/// Space allocated for account state
25-
const ACCOUNT_STATE_SPACE: usize = 1024;
26-
2723
struct Config {
2824
commitment_config: CommitmentConfig,
2925
default_signer: Box<dyn Signer>,
@@ -727,20 +723,6 @@ mod test {
727723

728724
use {super::*, solana_test_validator::*};
729725

730-
// Tests commented out as they depend on removed functions
731-
/*
732-
#[test]
733-
fn test_ping() {
734-
let (test_validator, payer) = TestValidatorGenesis::default().start();
735-
let rpc_client = test_validator.get_rpc_client();
736-
737-
assert!(matches!(
738-
ping_instruction(&rpc_client, &payer, CommitmentConfig::confirmed()),
739-
Ok(_)
740-
));
741-
}
742-
*/
743-
744726
#[test]
745727
fn test_borsh() {
746728
#[repr(C)]
@@ -756,8 +738,9 @@ mod test {
756738
primary_sale_happened: Some(true),
757739
};
758740
let bout = faux.try_to_vec().unwrap();
759-
println!("{:?}", bout);
760741
let in_faux = UpdateMetadataAccountArgs::try_from_slice(&bout).unwrap();
761-
println!("{:?}", in_faux);
742+
743+
// Assert that the deserialized data matches the original
744+
assert_eq!(faux, in_faux);
762745
}
763-
}
746+
}

0 commit comments

Comments
 (0)