store transaction no longer takes the transaction fee from the config account

This commit is contained in:
Michael Vines
2019-03-18 12:44:41 -07:00
parent 15aed9f320
commit d0292b1cf1
2 changed files with 51 additions and 58 deletions

View File

@ -23,7 +23,15 @@ impl ConfigInstruction {
}
/// Store new data in a configuration account
pub fn new_store<T: ConfigState>(config_account_pubkey: &Pubkey, data: &T) -> Instruction {
Instruction::new(id(), data, vec![(*config_account_pubkey, true)])
pub fn new_store<T: ConfigState>(
from_account_pubkey: &Pubkey,
config_account_pubkey: &Pubkey,
data: &T,
) -> Instruction {
Instruction::new(
id(),
data,
vec![(*from_account_pubkey, true), (*config_account_pubkey, true)],
)
}
}