Simplify remote wallet (#8249)

automerge
This commit is contained in:
Greg Fitzgerald
2020-02-12 15:38:51 -07:00
committed by GitHub
parent 127553ce4b
commit 741d148a0d
4 changed files with 16 additions and 27 deletions

View File

@ -208,6 +208,10 @@ impl Message {
)
}
pub fn serialize(&self) -> Vec<u8> {
bincode::serialize(self).unwrap()
}
pub fn program_ids(&self) -> Vec<&Pubkey> {
self.instructions
.iter()

View File

@ -9,7 +9,6 @@ use crate::{
signature::{KeypairUtil, Signature},
system_instruction,
};
use bincode::serialize;
use std::result;
use thiserror::Error;
@ -211,7 +210,7 @@ impl Transaction {
/// Return the serialized message data to sign.
pub fn message_data(&self) -> Vec<u8> {
serialize(&self.message()).unwrap()
self.message().serialize()
}
/// Check keys and keypair lengths, then sign this transaction.