Compare commits

...

1 Commits

Author SHA1 Message Date
26419d7723 Fix example mock Signer API in solana-program (#23911)
(cherry picked from commit 492c54a28f)
2022-03-24 21:59:06 +00:00
2 changed files with 9 additions and 7 deletions

View File

@ -77,15 +77,17 @@ pub mod solana_sdk {
pub fn new() -> Keypair {
Keypair
}
}
pub fn pubkey(&self) -> Pubkey {
impl Signer for Keypair {
fn pubkey(&self) -> Pubkey {
Pubkey::default()
}
}
impl Signer for Keypair {}
pub trait Signer {}
pub trait Signer {
fn pubkey(&self) -> Pubkey;
}
}
pub mod signers {

View File

@ -164,7 +164,7 @@ impl Message {
/// instruction::Instruction,
/// message::Message,
/// pubkey::Pubkey,
/// signature::Keypair,
/// signature::{Keypair, Signer},
/// transaction::Transaction,
/// };
///
@ -235,7 +235,7 @@ impl Message {
/// instruction::Instruction,
/// message::Message,
/// pubkey::Pubkey,
/// signature::Keypair,
/// signature::{Keypair, Signer},
/// transaction::Transaction,
/// };
///
@ -333,7 +333,7 @@ impl Message {
/// message::Message,
/// nonce,
/// pubkey::Pubkey,
/// signature::Keypair,
/// signature::{Keypair, Signer},
/// system_instruction,
/// transaction::Transaction,
/// };