This commit is contained in:
guibescos 2022-12-19 13:20:32 +01:00 committed by GitHub
parent d517f11af0
commit f6ad2d6544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 17 deletions

View File

@ -833,13 +833,6 @@ function hasWormholePayload(
onChainInstructions: InstructionAccount[], onChainInstructions: InstructionAccount[],
wormholeTools: WormholeTools wormholeTools: WormholeTools
): boolean { ): boolean {
if (onChainInstructions.length !== 2) {
console.debug(
`Expected 2 instructions in the transaction, found ${onChainInstructions.length}`
);
return false;
}
const [messagePDA] = getIxAuthorityPDA( const [messagePDA] = getIxAuthorityPDA(
txPubkey, txPubkey,
new anchor.BN(1), new anchor.BN(1),
@ -854,16 +847,7 @@ function hasWormholePayload(
wormholeTools wormholeTools
); );
return ( return areEqualOnChainInstructions(wormholeIxs, onChainInstructions);
isEqualOnChainInstruction(
wormholeIxs[0],
onChainInstructions[0] as InstructionAccount
) &&
isEqualOnChainInstruction(
wormholeIxs[1],
onChainInstructions[1] as InstructionAccount
)
);
} }
function isEqualOnChainInstruction( function isEqualOnChainInstruction(