Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set amount for delayed payout tx to 0 #3471

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ funds.tx.multiSigDeposit=Multisig deposit: {0}
funds.tx.multiSigPayout=Multisig payout: {0}
funds.tx.disputePayout=Dispute payout: {0}
funds.tx.disputeLost=Lost dispute case: {0}
funds.tx.collateralForRefund=Collateral for refund: {0}
funds.tx.collateralForRefund=Refund collateral: {0}
funds.tx.timeLockedPayoutTx=Time locked payout tx: {0}
funds.tx.refund=Refund from arbitration: {0}
funds.tx.unknown=Unknown reason: {0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import bisq.core.locale.Res;
import bisq.core.offer.Offer;
import bisq.core.offer.OpenOffer;
import bisq.core.trade.Contract;
import bisq.core.trade.Tradable;
import bisq.core.trade.Trade;
import bisq.core.util.BSFormatter;
Expand Down Expand Up @@ -239,15 +238,14 @@ public void onTransactionConfidenceChanged(TransactionConfidence confidence) {
if (valueSentToMe.isPositive()) {
details = Res.get("funds.tx.refund", tradeId);
} else {
Contract contract = trade.getContract();
Coin tradeAmount = trade.getTradeAmount();
if (contract != null && tradeAmount != null) {
boolean isBuyer = contract.isMyRoleBuyer(pubKeyRing);
amountAsCoin = isBuyer ? trade.getOffer().getBuyerSecurityDeposit().multiply(-1) :
(trade.getOffer().getSellerSecurityDeposit().add(tradeAmount)).multiply(-1);
details = Res.get("funds.tx.collateralForRefund", tradeId);
txConfidenceIndicator.setVisible(false);
}
// We have spent the deposit tx outputs to the Bisq donation address to enable
// the refund process (refund agent -> reimbursement). As the funds have left our wallet
// already when funding the deposit tx we show 0 BTC as amount.
// Confirmation is not known from the BitcoinJ side (not 100% clear why) as no funds
// left our wallet nor we received funds. So we set indicator invisible.
amountAsCoin = Coin.ZERO;
details = Res.get("funds.tx.collateralForRefund", tradeId);
txConfidenceIndicator.setVisible(false);
}
} else {
if (transactionAwareTrade.isDelayedPayoutTx(txId)) {
Expand Down