Resurrect the tests

This commit is contained in:
Greg Fitzgerald
2019-03-07 13:34:13 -07:00
parent a277f3e816
commit 17dcd1f62a
4 changed files with 43 additions and 74 deletions

View File

@ -43,12 +43,18 @@ impl BudgetInstruction {
to: Pubkey,
dt: DateTime<Utc>,
) -> BuilderInstruction {
let keys = vec![(from, true), (contract, false), (to, false)];
let mut keys = vec![(from, true), (contract, false)];
if from != to {
keys.push((to, false));
}
BuilderInstruction::new(id(), &BudgetInstruction::ApplyTimestamp(dt), keys)
}
pub fn new_apply_signature(from: Pubkey, contract: Pubkey, to: Pubkey) -> BuilderInstruction {
let keys = vec![(from, true), (contract, false), (to, false)];
let mut keys = vec![(from, true), (contract, false)];
if from != to {
keys.push((to, false));
}
BuilderInstruction::new(id(), &BudgetInstruction::ApplySignature, keys)
}
}