Correct DeactivateDelinquent/Redelegate account parsing

This commit is contained in:
Michael Vines 2022-07-28 07:21:11 -06:00
parent 467cb5def5
commit 123f61ccad
1 changed files with 2 additions and 2 deletions

View File

@ -280,12 +280,12 @@ pub fn parse_stake(
info: json!({ info: json!({
"stakeAccount": account_keys[instruction.accounts[0] as usize].to_string(), "stakeAccount": account_keys[instruction.accounts[0] as usize].to_string(),
"voteAccount": account_keys[instruction.accounts[1] as usize].to_string(), "voteAccount": account_keys[instruction.accounts[1] as usize].to_string(),
"referenceVoteAccount": account_keys[instruction.accounts[3] as usize].to_string(), "referenceVoteAccount": account_keys[instruction.accounts[2] as usize].to_string(),
}), }),
}) })
} }
StakeInstruction::Redelegate => { StakeInstruction::Redelegate => {
check_num_stake_accounts(&instruction.accounts, 4)?; check_num_stake_accounts(&instruction.accounts, 5)?;
Ok(ParsedInstructionEnum { Ok(ParsedInstructionEnum {
instruction_type: "redelegate".to_string(), instruction_type: "redelegate".to_string(),
info: json!({ info: json!({