1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
    }
}