Skip to content

Commit

Permalink
fix usage of fee getter
Browse files Browse the repository at this point in the history
  • Loading branch information
lisicky committed Nov 11, 2024
1 parent 6d9a474 commit e4af66a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/builders/tx_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,7 @@ impl TransactionBuilder {
}

fn validate_fee(&self) -> Result<(), JsError> {
if let Some(fee) = &self.fee {
if let Some(fee) = &self.get_fee_if_set() {
let min_fee = min_fee(&self)?;
if fee < &min_fee {
Err(JsError::from_str(&format!(
Expand Down Expand Up @@ -2255,7 +2255,7 @@ impl TransactionBuilder {

fn build_and_size(&self) -> Result<(TransactionBody, usize), JsError> {
let fee = self
.fee
.get_fee_if_set()
.or(self.get_fee_if_set())
.ok_or_else(|| JsError::from_str("Fee not specified"))?;

Expand Down

0 comments on commit e4af66a

Please sign in to comment.