mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
remove mining fee from locked funds in MS for locked funds display
This commit is contained in:
parent
ae65561623
commit
afe009b303
6 changed files with 8 additions and 6 deletions
|
@ -56,7 +56,7 @@ public class OffererCreatesAndSignsDepositTxAsBuyer extends TradeTask {
|
|||
WalletService walletService = processModel.getWalletService();
|
||||
String id = processModel.getOffer().getId();
|
||||
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
||||
buyerMultiSigAddressEntry.setLockedTradeAmount(buyerInputAmount);
|
||||
buyerMultiSigAddressEntry.setLockedTradeAmount(buyerInputAmount.subtract(FeePolicy.getFixedTxFeeForTrades()));
|
||||
walletService.saveAddressEntryList();
|
||||
PreparedDepositTxAndOffererInputs result = processModel.getTradeWalletService().offererCreatesAndSignsDepositTx(
|
||||
true,
|
||||
|
|
|
@ -19,6 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.buyer;
|
|||
|
||||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import io.bitsquare.btc.AddressEntry;
|
||||
import io.bitsquare.btc.FeePolicy;
|
||||
import io.bitsquare.btc.WalletService;
|
||||
import io.bitsquare.btc.data.RawTransactionInput;
|
||||
import io.bitsquare.common.crypto.Hash;
|
||||
|
@ -57,7 +58,7 @@ public class SignAndPublishDepositTxAsBuyer extends TradeTask {
|
|||
ArrayList<RawTransactionInput> buyerInputs = processModel.getRawTransactionInputs();
|
||||
WalletService walletService = processModel.getWalletService();
|
||||
AddressEntry buyerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
||||
buyerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(buyerInputs.stream().mapToLong(input -> input.value).sum()));
|
||||
buyerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(buyerInputs.stream().mapToLong(input -> input.value).sum()).subtract(FeePolicy.getFixedTxFeeForTrades()));
|
||||
walletService.saveAddressEntryList();
|
||||
TradingPeer tradingPeer = processModel.tradingPeer;
|
||||
processModel.getTradeWalletService().takerSignsAndPublishesDepositTx(
|
||||
|
|
|
@ -56,7 +56,7 @@ public class OffererCreatesAndSignsDepositTxAsSeller extends TradeTask {
|
|||
WalletService walletService = processModel.getWalletService();
|
||||
String id = processModel.getOffer().getId();
|
||||
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(id, AddressEntry.Context.MULTI_SIG);
|
||||
sellerMultiSigAddressEntry.setLockedTradeAmount(sellerInputAmount);
|
||||
sellerMultiSigAddressEntry.setLockedTradeAmount(sellerInputAmount.subtract(FeePolicy.getFixedTxFeeForTrades()));
|
||||
walletService.saveAddressEntryList();
|
||||
PreparedDepositTxAndOffererInputs result = processModel.getTradeWalletService().offererCreatesAndSignsDepositTx(
|
||||
false,
|
||||
|
|
|
@ -19,6 +19,7 @@ package io.bitsquare.trade.protocol.trade.tasks.seller;
|
|||
|
||||
import com.google.common.util.concurrent.FutureCallback;
|
||||
import io.bitsquare.btc.AddressEntry;
|
||||
import io.bitsquare.btc.FeePolicy;
|
||||
import io.bitsquare.btc.WalletService;
|
||||
import io.bitsquare.btc.data.RawTransactionInput;
|
||||
import io.bitsquare.common.crypto.Hash;
|
||||
|
@ -56,7 +57,7 @@ public class SignAndPublishDepositTxAsSeller extends TradeTask {
|
|||
ArrayList<RawTransactionInput> sellerInputs = processModel.getRawTransactionInputs();
|
||||
WalletService walletService = processModel.getWalletService();
|
||||
AddressEntry sellerMultiSigAddressEntry = walletService.getOrCreateAddressEntry(processModel.getOffer().getId(), AddressEntry.Context.MULTI_SIG);
|
||||
sellerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(sellerInputs.stream().mapToLong(input -> input.value).sum()));
|
||||
sellerMultiSigAddressEntry.setLockedTradeAmount(Coin.valueOf(sellerInputs.stream().mapToLong(input -> input.value).sum()).subtract(FeePolicy.getFixedTxFeeForTrades()));
|
||||
walletService.saveAddressEntryList();
|
||||
TradingPeer tradingPeer = processModel.tradingPeer;
|
||||
processModel.getTradeWalletService().takerSignsAndPublishesDepositTx(
|
||||
|
|
|
@ -253,7 +253,7 @@ public class LockedView extends ActivatableView<VBox, Void> {
|
|||
details = "-";
|
||||
}
|
||||
|
||||
field = new HyperlinkWithIcon(details + " (Locked in trade (MultiSig))",
|
||||
field = new HyperlinkWithIcon("Locked in trade with ID: " + details + " (MultiSig)",
|
||||
AwesomeIcon.INFO_SIGN);
|
||||
field.setOnAction(event -> openDetailPopup(item));
|
||||
field.setTooltip(new Tooltip("Open popup for details"));
|
||||
|
|
|
@ -252,7 +252,7 @@ public class ReservedView extends ActivatableView<VBox, Void> {
|
|||
details = "-";
|
||||
}
|
||||
|
||||
field = new HyperlinkWithIcon(details + " (Reserved in offer (local wallet))",
|
||||
field = new HyperlinkWithIcon("Reserved in offer with ID: " + details + " (local wallet)",
|
||||
AwesomeIcon.INFO_SIGN);
|
||||
field.setOnAction(event -> openDetailPopup(item));
|
||||
field.setTooltip(new Tooltip("Open popup for details"));
|
||||
|
|
Loading…
Add table
Reference in a new issue