Skip to content

Commit

Permalink
Remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Mar 27, 2024
1 parent 7ba8a0c commit 4c2636e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
12 changes: 4 additions & 8 deletions sdk/src/client/api/block_builder/transaction_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,10 @@ impl TransactionBuilder {
return Err(TransactionBuilderError::InvalidInputCount(self.selected_inputs.len()));
}

let remainder_address = match self.get_remainder_address()? {
Some(a) => a,
None => {
log::debug!("MissingInputWithEd25519Address from finish");
return Err(TransactionBuilderError::MissingInputWithEd25519Address);
}
}
.0;
let remainder_address = self
.get_remainder_address()?
.ok_or(TransactionBuilderError::MissingInputWithEd25519Address)?
.0;

let mut added_amount_mana = HashMap::<Option<ChainId>, (u64, u64)>::new();
for (chain_id, added_amount) in self.remainders.added_amount.drain() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,9 @@ impl TransactionBuilder {
mana_diff = mana_diff.saturating_sub(self.initial_mana_excess()?);
}

let (remainder_address, chain) = match self.get_remainder_address()? {
Some(a) => a,
None => {
log::debug!("MissingInputWithEd25519Address from update_remainders");
return Err(TransactionBuilderError::MissingInputWithEd25519Address);
}
};
let (remainder_address, chain) = self
.get_remainder_address()?
.ok_or(TransactionBuilderError::MissingInputWithEd25519Address)?;

// Amount can be just multiplied, because all remainder outputs with a native token have the same storage
// cost.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,7 @@ impl TransactionBuilder {
// than the current block index
match &required_address {
Address::Ed25519(_) | Address::ImplicitAccountCreation(_) => {}
_ => {
log::debug!(
"MissingInputWithEd25519Address from null_transaction_unlocks required_address {required_address:?}"
);
log::debug!("Tx Builder {self:#?}");
Err(TransactionBuilderError::MissingInputWithEd25519Address)?
}
_ => Err(TransactionBuilderError::MissingInputWithEd25519Address)?,
}

let block = SignatureUnlock::new(
Expand Down
5 changes: 1 addition & 4 deletions sdk/src/client/secret/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,7 @@ where
// than the current block index
match &required_address {
Address::Ed25519(_) | Address::ImplicitAccountCreation(_) => {}
_ => {
log::debug!("MissingInputWithEd25519Address from default_transaction_unlocks, required_address {required_address:?}");
Err(TransactionBuilderError::MissingInputWithEd25519Address)?
}
_ => Err(TransactionBuilderError::MissingInputWithEd25519Address)?,
}

let chain = input.chain.ok_or(ClientError::MissingBip32Chain)?;
Expand Down

0 comments on commit 4c2636e

Please sign in to comment.