Skip to content

Commit f6ad2d6

Browse files
authored
Refactor (#431)
1 parent d517f11 commit f6ad2d6

File tree

1 file changed

+1
-17
lines changed
  • third_party/pyth/multisig-wh-message-builder/src

1 file changed

+1
-17
lines changed

third_party/pyth/multisig-wh-message-builder/src/index.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -833,13 +833,6 @@ function hasWormholePayload(
833833
onChainInstructions: InstructionAccount[],
834834
wormholeTools: WormholeTools
835835
): boolean {
836-
if (onChainInstructions.length !== 2) {
837-
console.debug(
838-
`Expected 2 instructions in the transaction, found ${onChainInstructions.length}`
839-
);
840-
return false;
841-
}
842-
843836
const [messagePDA] = getIxAuthorityPDA(
844837
txPubkey,
845838
new anchor.BN(1),
@@ -854,16 +847,7 @@ function hasWormholePayload(
854847
wormholeTools
855848
);
856849

857-
return (
858-
isEqualOnChainInstruction(
859-
wormholeIxs[0],
860-
onChainInstructions[0] as InstructionAccount
861-
) &&
862-
isEqualOnChainInstruction(
863-
wormholeIxs[1],
864-
onChainInstructions[1] as InstructionAccount
865-
)
866-
);
850+
return areEqualOnChainInstructions(wormholeIxs, onChainInstructions);
867851
}
868852

869853
function isEqualOnChainInstruction(

0 commit comments

Comments
 (0)