@@ -340,10 +340,10 @@ impl AutomaticTopUpTask {
340340 Ok ( balance) => {
341341 if balance < token_config. min_balance {
342342 info ! (
343- "Address {} ERC-20 balance ({}) is below minimum ({}) for token {}, needs top-up" ,
343+ "Relayer {} ERC-20 balance ({}) is below minimum ({}) for token {}, needs top-up" ,
344344 address,
345- format_token_amount( & balance) ,
346- format_token_amount( & token_config. min_balance) ,
345+ format_token_amount( & balance, token_config . decimals ) ,
346+ format_token_amount( & token_config. min_balance, token_config . decimals ) ,
347347 token_config. address
348348 ) ;
349349 addresses_needing_top_up. push ( * address) ;
@@ -410,7 +410,7 @@ impl AutomaticTopUpTask {
410410 info ! (
411411 "Topped up address {} with {} tokens ({}). Transaction: {}" ,
412412 address,
413- format_token_amount( & token_config. top_up_amount) ,
413+ format_token_amount( & token_config. top_up_amount, token_config . decimals ) ,
414414 token_config. address,
415415 tx_hash
416416 ) ;
@@ -769,7 +769,7 @@ impl AutomaticTopUpTask {
769769 info ! (
770770 "From address {} has ERC-20 token balance: {} for token {}" ,
771771 from_address,
772- format_token_amount( & balance) ,
772+ format_token_amount( & balance, token_config . decimals ) ,
773773 token_config. address
774774 ) ;
775775
@@ -780,16 +780,16 @@ impl AutomaticTopUpTask {
780780 info ! (
781781 "From address {} requires {} tokens for token {}" ,
782782 from_address,
783- format_token_amount( & min_required_balance) ,
783+ format_token_amount( & min_required_balance, token_config . decimals ) ,
784784 token_config. address
785785 ) ;
786786
787787 if balance < min_required_balance {
788788 warn ! (
789789 "From address {} token balance ({}) is insufficient for top-up transaction. Required: {} for token {}" ,
790790 from_address,
791- format_token_amount( & balance) ,
792- format_token_amount( & min_required_balance) ,
791+ format_token_amount( & balance, token_config . decimals ) ,
792+ format_token_amount( & min_required_balance, token_config . decimals ) ,
793793 token_config. address
794794 ) ;
795795 return Ok ( false ) ;
@@ -838,7 +838,7 @@ impl AutomaticTopUpTask {
838838 "Sending ERC-20 top-up transaction: {} -> {} ({} tokens of {}){}" ,
839839 from_address,
840840 relayer_address,
841- format_token_amount( & token_config. top_up_amount) ,
841+ format_token_amount( & token_config. top_up_amount, token_config . decimals ) ,
842842 token_config. address,
843843 if config. via_safe( ) { " via Safe" } else { "" }
844844 ) ;
0 commit comments