Skip to content

Commit

Permalink
Merge branch '2.0' into feat/mana-rewards-balance
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez authored Feb 6, 2024
2 parents 8c75889 + 4facf08 commit 8e2ae29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions bindings/core/src/method_handler/secret_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ where
}
#[cfg(feature = "ledger_nano")]
SecretManagerMethod::GetLedgerNanoStatus => {
if let Some(secret_manager) = secret_manager.downcast::<LedgerSecretManager>() {
Response::LedgerNanoStatus(secret_manager.get_ledger_nano_status().await)
let secret_manager = if let Some(secret_manager) = secret_manager.downcast::<LedgerSecretManager>() {
secret_manager
} else if let Some(SecretManager::LedgerNano(secret_manager)) = secret_manager.downcast::<SecretManager>() {
secret_manager
} else {
return Err(iota_sdk::client::Error::SecretManagerMismatch.into());
}
};
Response::LedgerNanoStatus(secret_manager.get_ledger_nano_status().await)
}
SecretManagerMethod::SignTransaction {
prepared_transaction_data,
Expand Down

0 comments on commit 8e2ae29

Please sign in to comment.