File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
third_party/pyth/multisig-wh-message-builder/src Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -833,13 +833,6 @@ function hasWormholePayload(
833
833
onChainInstructions : InstructionAccount [ ] ,
834
834
wormholeTools : WormholeTools
835
835
) : 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
-
843
836
const [ messagePDA ] = getIxAuthorityPDA (
844
837
txPubkey ,
845
838
new anchor . BN ( 1 ) ,
@@ -854,16 +847,7 @@ function hasWormholePayload(
854
847
wormholeTools
855
848
) ;
856
849
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 ) ;
867
851
}
868
852
869
853
function isEqualOnChainInstruction (
You can’t perform that action at this time.
0 commit comments