1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-02-04 11:51:50 +00:00
trezor-firmware/rust/trezor-client/src/client/solana.rs

16 lines
482 B
Rust

use super::{handle_interaction, Trezor};
use crate::{error::Result, protos};
impl Trezor {
// SOLANA
pub fn solana_get_address(&mut self, path: Vec<u32>) -> Result<String> {
let mut req = protos::SolanaGetAddress::new();
req.address_n = path;
req.show_display = Some(true);
let address = handle_interaction(
self.call(req, Box::new(|_, m: protos::SolanaAddress| Ok(m.address().into())))?,
)?;
Ok(address)
}
}