diff --git a/Cargo.lock b/Cargo.lock index 0c3dc48122..01d2d20049 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1591,9 +1591,9 @@ dependencies = [ [[package]] name = "iota-ledger-nano" -version = "1.0.3" +version = "1.0.4-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434abd10cd26c00345c19290f87d0e66104c6ce3069a5b7e1eb6c09a47ea18ca" +checksum = "816dacd0903072f3e07200d5cf615c519c46fcf356b7e45a1a7d963056cf36fb" dependencies = [ "arrayref", "byteorder", diff --git a/sdk/Cargo.toml b/sdk/Cargo.toml index e83dd06b95..eed1148c0c 100644 --- a/sdk/Cargo.toml +++ b/sdk/Cargo.toml @@ -69,7 +69,7 @@ futures = { version = "0.3.30", default-features = false, features = [ "thread-pool", ], optional = true } instant = { version = "0.1.12", default-features = false, optional = true } -iota-ledger-nano = { version = "1.0.3", default-features = false, optional = true } +iota-ledger-nano = { version = "1.0.4-alpha.3", default-features = false, features = ["nova"], optional = true } iota_stronghold = { version = "2.0.0", default-features = false, optional = true } log = { version = "0.4.20", default-features = false, optional = true } once_cell = { version = "1.19.0", default-features = false, optional = true } diff --git a/sdk/src/client/secret/ledger_nano.rs b/sdk/src/client/secret/ledger_nano.rs index 576630ef9a..a54a0863b2 100644 --- a/sdk/src/client/secret/ledger_nano.rs +++ b/sdk/src/client/secret/ledger_nano.rs @@ -16,8 +16,9 @@ use crypto::{ }, }; use iota_ledger_nano::{ - api::errors::APIError, get_app_config, get_buffer_size, get_ledger, get_opened_app, LedgerBIP32Index, - Packable as LedgerNanoPackable, TransportTypes, + api::{constants::Protocol, errors::APIError}, + get_app_config, get_buffer_size, get_ledger, get_opened_app, LedgerBIP32Index, Packable as LedgerNanoPackable, + TransportTypes, }; use packable::{error::UnexpectedEOF, unpacker::SliceUnpacker, Packable, PackableExt}; use tokio::sync::Mutex; @@ -159,7 +160,7 @@ impl SecretManage for LedgerSecretManager { let lock = self.mutex.lock().await; // get ledger - let ledger = get_ledger(coin_type, bip32_account, self.is_simulator).map_err(Error::from)?; + let ledger = get_ledger(Protocol::Nova, coin_type, bip32_account, self.is_simulator).map_err(Error::from)?; if ledger.is_debug_app() { ledger .set_non_interactive_mode(self.non_interactive) @@ -206,7 +207,7 @@ impl SecretManage for LedgerSecretManager { // Lock the mutex to prevent multiple simultaneous requests to a ledger. let lock = self.mutex.lock().await; - let ledger = get_ledger(coin_type, account_index, self.is_simulator).map_err(Error::from)?; + let ledger = get_ledger(Protocol::Nova, coin_type, account_index, self.is_simulator).map_err(Error::from)?; if ledger.is_debug_app() { ledger .set_non_interactive_mode(self.non_interactive) @@ -287,7 +288,7 @@ impl SecretManage for LedgerSecretManager { // lock the mutex to prevent multiple simultaneous requests to a ledger let lock = self.mutex.lock().await; - let ledger = get_ledger(coin_type, bip32_account, self.is_simulator).map_err(Error::from)?; + let ledger = get_ledger(Protocol::Nova, coin_type, bip32_account, self.is_simulator).map_err(Error::from)?; if ledger.is_debug_app() { ledger .set_non_interactive_mode(self.non_interactive)