Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Pana committed Nov 9, 2024
1 parent 39145cb commit d1090f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app_ui/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use alloc::format;
///
/// * `tx` - Transaction to be displayed for validation
pub fn ui_display_tx(tx: &Transaction) -> Result<bool, AppSW> {
let value_str = tx.value.to_cfx_str().ok_or(AppSW::TxDisplayFail)?;
let value_str = tx.value.cfx_str().ok_or(AppSW::TxDisplayFail)?;
let network = Network::from_network_id(tx.chain_id);
let to_str = cfx_addr_encode(&*tx.to, network).map_err(|_e| AppSW::AddrDisplayFail)?;
let data_str = format!("0x{}", hex::encode(tx.data.clone()).to_uppercase());
Expand Down
2 changes: 1 addition & 1 deletion src/types/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ construct_uint! {
}

impl U256 {
pub fn to_cfx_str(&self) -> Option<String> {
pub fn cfx_str(&self) -> Option<String> {
let wei_str = self.to_string();
let wei = BigDecimal::from_str(&wei_str).ok()?;
let eth_conversion = BigDecimal::from_i64(10_i64.pow(18))?;
Expand Down

0 comments on commit d1090f6

Please sign in to comment.