Refund agent payout to use withdrawal fee rate from settings

This commit is contained in:
jmacxx 2021-02-09 10:51:01 -06:00
parent 1a8aba8221
commit fc04e88a55
No known key found for this signature in database
GPG key ID: 155297BABFE94A1B
2 changed files with 2 additions and 7 deletions

View file

@ -141,9 +141,8 @@ public class TxFeeEstimationService {
}
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 {

View file

@ -38,7 +38,6 @@ import bisq.core.btc.wallet.TxBroadcaster;
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;
@ -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();
@ -143,7 +141,6 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
TradeWalletService tradeWalletService,
BtcWalletService btcWalletService,
TxFeeEstimationService txFeeEstimationService,
FeeService feeService,
DaoFacade daoFacade) {
this.formatter = formatter;
@ -152,7 +149,6 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
this.tradeWalletService = tradeWalletService;
this.btcWalletService = btcWalletService;
this.txFeeEstimationService = txFeeEstimationService;
this.feeService = feeService;
this.daoFacade = daoFacade;
type = Type.Confirmation;
@ -672,7 +668,7 @@ public class DisputeSummaryWindow extends Overlay<DisputeSummaryWindow> {
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);