Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up burn command #3976

Merged
merged 19 commits into from
Oct 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up dust checking
casey committed Oct 3, 2024
commit 245101a4ae0d6f07a311c3477603cff2223d2671
19 changes: 8 additions & 11 deletions src/wallet/transaction_builder.rs
Original file line number Diff line number Diff line change
@@ -169,18 +169,15 @@ impl TransactionBuilder {
return Err(Error::DuplicateAddress(recipient_as_address));
}

match self.target {
Target::Value(output_value) | Target::ExactPostage(output_value) => {
let dust_value = self.recipient.dust_value();

if output_value < dust_value {
return Err(Error::Dust {
output_value,
dust_value,
});
}
if let Target::Value(output_value) | Target::ExactPostage(output_value) = self.target {
let dust_value = self.recipient.dust_value();

if output_value < dust_value {
return Err(Error::Dust {
output_value,
dust_value,
});
}
_ => (),
}
}