From 057b2861d36c2dbc721182f629cce2c01e955715 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 2 Apr 2020 03:11:10 +0800 Subject: [PATCH] fix: getConfirmedBlock ix programId parsing --- web3.js/src/transaction.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web3.js/src/transaction.js b/web3.js/src/transaction.js index 3c5805d0d3..0cc09b4e6a 100644 --- a/web3.js/src/transaction.js +++ b/web3.js/src/transaction.js @@ -530,7 +530,7 @@ export class Transaction { let instructions = []; for (let i = 0; i < instructionCount; i++) { let instruction = {}; - instruction.programIndex = byteArray.shift(); + instruction.programIdIndex = byteArray.shift(); const accountCount = shortvec.decodeLength(byteArray); instruction.accounts = byteArray.slice(0, accountCount); byteArray = byteArray.slice(accountCount); @@ -619,7 +619,7 @@ export class Transaction { for (let i = 0; i < instructions.length; i++) { let instructionData = { keys: [], - programId: new PublicKey(accounts[instructions[i].programIndex]), + programId: new PublicKey(accounts[instructions[i].programIdIndex]), data: bs58.decode(instructions[i].data), }; for (let j = 0; j < instructions[i].accounts.length; j++) {