Skip to content

Commit

Permalink
Merge pull request #5178 from jmacxx/refund_agent_payout_fee
Browse files Browse the repository at this point in the history
Refund agent payout to use withdrawal fee rate from settings
  • Loading branch information
ripcurlx authored Feb 9, 2021
2 parents 874d923 + fc04e88 commit 5ad670f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions core/src/main/java/bisq/core/btc/TxFeeEstimationService.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ private Tuple2<Coin, Integer> getEstimatedFeeAndTxVsize(boolean isTaker,
}

public Tuple2<Coin, Integer> getEstimatedFeeAndTxVsize(Coin amount,
FeeService feeService,
BtcWalletService btcWalletService) {
Coin txFeePerVbyte = feeService.getTxFeePerVbyte();
Coin txFeePerVbyte = btcWalletService.getTxFeeForWithdrawalPerVbyte();
// We start with min taker fee vsize of 175
int estimatedTxVsize = TYPICAL_TX_WITH_1_INPUT_VSIZE;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import bisq.core.dao.DaoFacade;
import bisq.core.locale.Res;
import bisq.core.offer.Offer;
import bisq.core.provider.fee.FeeService;
import bisq.core.support.SupportType;
import bisq.core.support.dispute.Dispute;
import bisq.core.support.dispute.DisputeList;
Expand Down Expand Up @@ -105,7 +104,6 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
private final TradeWalletService tradeWalletService;
private final BtcWalletService btcWalletService;
private final TxFeeEstimationService txFeeEstimationService;
private final FeeService feeService;
private final DaoFacade daoFacade;
private Dispute dispute;
private Optional<Runnable> finalizeDisputeHandlerOptional = Optional.empty();
Expand Down Expand Up @@ -143,7 +141,6 @@ public DisputeSummaryWindow(@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormat
TradeWalletService tradeWalletService,
BtcWalletService btcWalletService,
TxFeeEstimationService txFeeEstimationService,
FeeService feeService,
DaoFacade daoFacade) {

this.formatter = formatter;
Expand All @@ -152,7 +149,6 @@ public DisputeSummaryWindow(@Named(FormattingUtils.BTC_FORMATTER_KEY) CoinFormat
this.tradeWalletService = tradeWalletService;
this.btcWalletService = btcWalletService;
this.txFeeEstimationService = txFeeEstimationService;
this.feeService = feeService;
this.daoFacade = daoFacade;

type = Type.Confirmation;
Expand Down Expand Up @@ -672,7 +668,7 @@ private void showPayoutTxConfirmation(Contract contract, DisputeResult disputeRe
Coin sellerPayoutAmount = disputeResult.getSellerPayoutAmount();
String sellerPayoutAddressString = contract.getSellerPayoutAddressString();
Coin outputAmount = buyerPayoutAmount.add(sellerPayoutAmount);
Tuple2<Coin, Integer> feeTuple = txFeeEstimationService.getEstimatedFeeAndTxVsize(outputAmount, feeService, btcWalletService);
Tuple2<Coin, Integer> feeTuple = txFeeEstimationService.getEstimatedFeeAndTxVsize(outputAmount, btcWalletService);
Coin fee = feeTuple.first;
Integer txVsize = feeTuple.second;
double feePerVbyte = CoinUtil.getFeePerVbyte(fee, txVsize);
Expand Down

0 comments on commit 5ad670f

Please sign in to comment.