File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ pub struct Config {
6868 pub wormhole : Wormhole ,
6969}
7070
71+ impl Config {
72+ pub fn is_check_fee_enabled ( & self ) -> bool {
73+ self . bridge_indexer . api_url . is_some ( )
74+ }
75+ }
76+
7177#[ derive( Debug , Clone , Deserialize ) ]
7278pub struct Redis {
7379 pub url : String ,
Original file line number Diff line number Diff line change @@ -544,7 +544,7 @@ async fn process_near_transfer_event(
544544
545545 info ! ( "Trying to process InitTransferEvent/FinTransferEvent/UpdateFeeEvent" ) ;
546546
547- if config. bridge_indexer . api_url . is_some ( )
547+ if config. is_check_fee_enabled ( )
548548 && !config
549549 . near
550550 . sign_without_checking_fee
@@ -671,7 +671,7 @@ async fn process_sign_transfer_event(
671671 anyhow:: bail!( "Fee recipient mismatch" ) ;
672672 }
673673
674- if config. bridge_indexer . api_url . is_some ( ) {
674+ if config. is_check_fee_enabled ( ) {
675675 let transfer_message = match connector
676676 . near_get_transfer_message ( message_payload. transfer_id )
677677 . await
@@ -835,7 +835,7 @@ async fn process_evm_init_transfer_event(
835835 )
836836 } ) ?;
837837
838- if config. bridge_indexer . api_url . is_some ( ) {
838+ if config. is_check_fee_enabled ( ) {
839839 let sender =
840840 utils:: evm:: string_to_evm_omniaddress ( chain_kind, & init_log. inner . sender . to_string ( ) )
841841 . map_err ( |err| {
You can’t perform that action at this time.
0 commit comments