Skip to content

Commit

Permalink
remove solana-sdk from solana-remote-wallet (#3629)
Browse files Browse the repository at this point in the history
* remove solana-sdk from remote-wallet

* missing dev dep

* missing feature activation

* missing feature activation
  • Loading branch information
kevinheavey authored Dec 10, 2024
1 parent 2cea8e6 commit 0431722
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 25 deletions.
5 changes: 4 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clap-v3-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ solana-cluster-type = { workspace = true }
solana-commitment-config = { workspace = true }
solana-derivation-path = { workspace = true }
solana-hash = { workspace = true }
solana-keypair = { workspace = true }
solana-keypair = { workspace = true, features = ["seed-derivable"] }
solana-native-token = { workspace = true }
solana-presigner = { workspace = true }
solana-program = { workspace = true }
Expand Down
5 changes: 1 addition & 4 deletions faucet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ solana-message = { workspace = true }
solana-metrics = { workspace = true }
solana-native-token = { workspace = true }
solana-packet = { workspace = true }
solana-pubkey = { workspace = true }
solana-pubkey = { workspace = true, features = ["rand"] }
solana-signer = { workspace = true }
solana-system-interface = { workspace = true }
solana-system-transaction = { workspace = true }
Expand All @@ -37,9 +37,6 @@ spl-memo = { workspace = true, features = ["no-entrypoint"] }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }

[dev-dependencies]
solana-pubkey = { workspace = true, features = ["rand"] }

[lib]
crate-type = ["lib"]
name = "solana_faucet"
Expand Down
5 changes: 4 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion remote-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ parking_lot = { workspace = true }
qstring = { workspace = true }
semver = { workspace = true }
solana-derivation-path = { workspace = true }
solana-sdk = { workspace = true }
solana-offchain-message = { workspace = true }
solana-pubkey = { workspace = true, features = ["std"] }
solana-signature = { workspace = true, features = ["std"] }
solana-signer = { workspace = true }
thiserror = { workspace = true }
uriparse = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
solana-pubkey = { workspace = true, features = ["rand"] }

[features]
default = ["linux-static-hidraw", "hidapi"]
Expand Down
7 changes: 4 additions & 3 deletions remote-wallet/src/ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use {
crate::{ledger_error::LedgerError, locator::Manufacturer},
log::*,
num_traits::FromPrimitive,
solana_sdk::{pubkey::Pubkey, signature::Signature},
solana_pubkey::Pubkey,
solana_signature::Signature,
std::{cmp::min, convert::TryFrom},
};

Expand Down Expand Up @@ -531,8 +532,8 @@ impl RemoteWallet<hidapi::DeviceInfo> for LedgerWallet {
message: &[u8],
) -> Result<Signature, RemoteWalletError> {
if message.len()
> solana_sdk::offchain_message::v0::OffchainMessage::MAX_LEN_LEDGER
+ solana_sdk::offchain_message::v0::OffchainMessage::HEADER_LEN
> solana_offchain_message::v0::OffchainMessage::MAX_LEN_LEDGER
+ solana_offchain_message::v0::OffchainMessage::HEADER_LEN
{
return Err(RemoteWalletError::InvalidInput(
"Off-chain message to sign is too long".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion remote-wallet/src/locator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
solana_sdk::pubkey::{ParsePubkeyError, Pubkey},
solana_pubkey::{ParsePubkeyError, Pubkey},
std::{
convert::{Infallible, TryFrom, TryInto},
str::FromStr,
Expand Down
7 changes: 3 additions & 4 deletions remote-wallet/src/remote_keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ use {
},
},
solana_derivation_path::DerivationPath,
solana_sdk::{
pubkey::Pubkey,
signature::{Signature, Signer, SignerError},
},
solana_pubkey::Pubkey,
solana_signature::Signature,
solana_signer::{Signer, SignerError},
};

pub struct RemoteKeypair {
Expand Down
15 changes: 7 additions & 8 deletions remote-wallet/src/remote_wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ use {
log::*,
parking_lot::RwLock,
solana_derivation_path::{DerivationPath, DerivationPathError},
solana_sdk::{
pubkey::Pubkey,
signature::{Signature, SignerError},
},
solana_pubkey::Pubkey,
solana_signature::Signature,
solana_signer::SignerError,
std::{
rc::Rc,
time::{Duration, Instant},
Expand Down Expand Up @@ -336,7 +335,7 @@ mod tests {

#[test]
fn test_parse_locator() {
let pubkey = solana_sdk::pubkey::new_rand();
let pubkey = solana_pubkey::new_rand();
let locator = Locator {
manufacturer: Manufacturer::Ledger,
pubkey: Some(pubkey),
Expand Down Expand Up @@ -369,7 +368,7 @@ mod tests {

#[test]
fn test_remote_wallet_info_matches() {
let pubkey = solana_sdk::pubkey::new_rand();
let pubkey = solana_pubkey::new_rand();
let info = RemoteWalletInfo {
manufacturer: Manufacturer::Ledger,
model: "Nano S".to_string(),
Expand All @@ -391,7 +390,7 @@ mod tests {
assert!(info.matches(&test_info));
test_info.host_device_path = "/host/device/path".to_string();
assert!(info.matches(&test_info));
let another_pubkey = solana_sdk::pubkey::new_rand();
let another_pubkey = solana_pubkey::new_rand();
test_info.pubkey = another_pubkey;
assert!(!info.matches(&test_info));
test_info.pubkey = pubkey;
Expand All @@ -400,7 +399,7 @@ mod tests {

#[test]
fn test_get_pretty_path() {
let pubkey = solana_sdk::pubkey::new_rand();
let pubkey = solana_pubkey::new_rand();
let pubkey_str = pubkey.to_string();
let remote_wallet_info = RemoteWalletInfo {
model: "nano-s".to_string(),
Expand Down
5 changes: 4 additions & 1 deletion svm/examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0431722

Please sign in to comment.