Skip to content

Commit

Permalink
Fix fmt & lint
Browse files Browse the repository at this point in the history
1
  • Loading branch information
harshadptl committed Feb 9, 2022
1 parent 1a661d4 commit 4caa9ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/components/finutils/src/txn_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use {
zei::anon_xfr::structs::AXfrBody,
zei::{
anon_xfr::{
abar_to_bar::{gen_abar_to_bar_note},
abar_to_bar::gen_abar_to_bar_note,
bar_to_abar::gen_bar_to_abar_body,
gen_anon_xfr_body,
keys::{AXfrKeyPair, AXfrPubKey},
Expand Down Expand Up @@ -531,7 +531,7 @@ impl TransactionBuilder {
&input,
&input_keypair,
bar_pub_key,
asset_record_type
asset_record_type,
)
.c(d!())?;

Expand Down
2 changes: 1 addition & 1 deletion src/ledger/src/data_model/effects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ impl TxnEffect {
self.abar_conv_inputs.push(body.clone());
self.txos.push(Some(TxOutput {
id: None,
record: body.output.clone(),
record: body.output,
lien: None,
}));

Expand Down
12 changes: 3 additions & 9 deletions src/ledger/src/data_model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ use {
result::Result as StdResult,
},
unicode_normalization::UnicodeNormalization,
zei::xfr::asset_record::AssetRecordType::NonConfidentialAmount_NonConfidentialAssetType,
zei::{
anon_xfr::{
bar_to_abar::{BarToAbarBody, BarToAbarNote},
Expand Down Expand Up @@ -1776,6 +1775,7 @@ impl Transaction {
self.check_fee() && !self.is_coinbase_tx()
}

#[allow(clippy::if_same_then_else)]
/// A simple fee checker
///
/// The check logic is as follows:
Expand Down Expand Up @@ -1817,14 +1817,8 @@ impl Transaction {
}
} else if let Operation::TransferAnonAsset(_) = ops {
return true;
} else if let Operation::BarToAbar(ref x) = ops {
if x.note.body.input.get_record_type()
== NonConfidentialAmount_NonConfidentialAssetType
&& x.note.body.input.asset_type
== XfrAssetType::NonConfidential(ASSET_TYPE_FRA)
{
return true;
}
} else if let Operation::BarToAbar(_) = ops {
return true;
} else if let Operation::AbarToBar(_) = ops {
return true;
} else if matches!(ops, Operation::UpdateValidator(_)) {
Expand Down

0 comments on commit 4caa9ab

Please sign in to comment.