fix: getConfirmedBlock ix programId parsing
This commit is contained in:
parent
cfc902fc1e
commit
057b2861d3
|
@ -530,7 +530,7 @@ export class Transaction {
|
||||||
let instructions = [];
|
let instructions = [];
|
||||||
for (let i = 0; i < instructionCount; i++) {
|
for (let i = 0; i < instructionCount; i++) {
|
||||||
let instruction = {};
|
let instruction = {};
|
||||||
instruction.programIndex = byteArray.shift();
|
instruction.programIdIndex = byteArray.shift();
|
||||||
const accountCount = shortvec.decodeLength(byteArray);
|
const accountCount = shortvec.decodeLength(byteArray);
|
||||||
instruction.accounts = byteArray.slice(0, accountCount);
|
instruction.accounts = byteArray.slice(0, accountCount);
|
||||||
byteArray = byteArray.slice(accountCount);
|
byteArray = byteArray.slice(accountCount);
|
||||||
|
@ -619,7 +619,7 @@ export class Transaction {
|
||||||
for (let i = 0; i < instructions.length; i++) {
|
for (let i = 0; i < instructions.length; i++) {
|
||||||
let instructionData = {
|
let instructionData = {
|
||||||
keys: [],
|
keys: [],
|
||||||
programId: new PublicKey(accounts[instructions[i].programIndex]),
|
programId: new PublicKey(accounts[instructions[i].programIdIndex]),
|
||||||
data: bs58.decode(instructions[i].data),
|
data: bs58.decode(instructions[i].data),
|
||||||
};
|
};
|
||||||
for (let j = 0; j < instructions[i].accounts.length; j++) {
|
for (let j = 0; j < instructions[i].accounts.length; j++) {
|
||||||
|
|
Loading…
Reference in New Issue