Skip to content

Commit

Permalink
clarify the fallback decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFluffy committed Oct 29, 2024
1 parent 7500326 commit 13faf8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/astria-bridge-contracts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use ethers::{
};
pub use generated::*;

const FALLBACK_CONTRACT_DECIMALS: u32 = 18u32;
const NON_ERC20_CONTRACT_DECIMALS: u32 = 18u32;

#[derive(Debug, thiserror::Error)]
#[error(transparent)]
Expand Down Expand Up @@ -308,10 +308,10 @@ where
#[cfg(feature = "tracing")]
tracing::warn!(
error = &_err as &dyn std::error::Error,
"failed reading decimals from contract; falling back to \
`{FALLBACK_CONTRACT_DECIMALS}`"
"failed reading decimals from contract; assuming it is not an ERC20 \
contract and falling back to `{NON_ERC20_CONTRACT_DECIMALS}`"
);
FALLBACK_CONTRACT_DECIMALS
NON_ERC20_CONTRACT_DECIMALS
}
}
};
Expand Down

0 comments on commit 13faf8b

Please sign in to comment.