Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove solana-sdk from solana-remote-wallet #3629

Merged
merged 4 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading