File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ export class OFTBridge extends BaseBridgeAdapter {
116116 const cap = ethers . utils . parseEther ( "0.01" ) ;
117117
118118 if ( BigNumber . from ( feeStruct . nativeFee ) . gt ( cap ) ) {
119- throw "queried OFT nativeFee is to high. Can 't pay that much for a bridge" ;
119+ throw `can 't go over fee cap ( ${ feeStruct . nativeFee } > ${ cap } )` ;
120120 } else {
121121 this . logMessage ( "feeCap check" , { feeCap : cap . toString ( ) , message : "fee is okay" } ) ;
122122 }
@@ -171,12 +171,8 @@ export class OFTBridge extends BaseBridgeAdapter {
171171 eventConfig
172172 ) ;
173173
174- // Filter events by destination eid. Notice that we can't filter in the query directly
175- // because eid is not an indexed parameter
176- const destinationEid = this . dstChainEid ;
177- const events = allEvents . filter ( ( event ) => {
178- return event . args . dstEid === destinationEid ;
179- } ) ;
174+ // Filter events by destination eid
175+ const events = allEvents . filter ( ( { args } ) => args . dstEid === this . dstChainEid ) ;
180176
181177 return {
182178 [ this . dstTokenAddress ] : events . map ( ( event ) =>
You can’t perform that action at this time.
0 commit comments