Skip to content

Commit

Permalink
chapp's review
Browse files Browse the repository at this point in the history
  • Loading branch information
vctt94 committed Jul 17, 2022
1 parent b9ba779 commit 3e15346
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions client/asset/dcr/dcr.go
Expand Up @@ -909,6 +909,9 @@ func (dcr *ExchangeWallet) feeRate(confTarget uint64) (uint64, error) {
}

func convertFeeToUint(estimatedFeeRate float64) (uint64, error) {
if estimatedFeeRate == 0 {
return 0, nil
}
atomsPerKB, err := dcrutil.NewAmount(estimatedFeeRate) // atomsPerKB is 0 when err != nil
if err != nil {
return 0, err
Expand Down Expand Up @@ -955,11 +958,6 @@ func externalFeeEstimator(ctx context.Context, net dex.Network, nb uint64) (floa
// number of confirmations, but falls back to the suggestion or fallbackFeeRate
// via feeRateWithFallback.
func (dcr *ExchangeWallet) targetFeeRateWithFallback(confTarget, feeSuggestion uint64) uint64 {
// Fee estimation is not available in SPV mode.
if dcr.wallet.SpvMode() {
return dcr.feeRateWithFallback(feeSuggestion)
}

feeRate, err := dcr.feeRate(confTarget)
if err != nil {
dcr.log.Errorf("Failed to get fee rate: %v", err)
Expand Down

0 comments on commit 3e15346

Please sign in to comment.