Skip to content

Commit

Permalink
Do not include EstimateFeeMode to request if it is None #651
Browse files Browse the repository at this point in the history
  • Loading branch information
artemii235 committed Jun 2, 2020
1 parent 8496d71 commit 3a9680f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mm2src/coins/utxo/rpc_clients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ impl NativeClientImpl {
/// Always estimate fee for transaction to be confirmed in next block
pub fn estimate_smart_fee(&self, mode: &Option<EstimateFeeMode>) -> RpcRes<EstimateSmartFeeRes> {
let n_blocks = 1;
rpc_func!(self, "estimatesmartfee", n_blocks, mode)
match mode {
Some(m) => rpc_func!(self, "estimatesmartfee", n_blocks, m),
None => rpc_func!(self, "estimatesmartfee", n_blocks),
}
}

/// https://bitcoin.org/en/developer-reference#listtransactions
Expand Down Expand Up @@ -1035,7 +1038,10 @@ impl ElectrumClient {
/// Always estimate fee for transaction to be confirmed in next block
fn estimate_fee(&self, mode: &Option<EstimateFeeMode>) -> RpcRes<f64> {
let n_blocks = 1;
rpc_func!(self, "blockchain.estimatefee", n_blocks, mode)
match mode {
Some(m) => rpc_func!(self, "blockchain.estimatefee", n_blocks, m),
None => rpc_func!(self, "blockchain.estimatefee", n_blocks),
}
}
}

Expand Down

0 comments on commit 3a9680f

Please sign in to comment.