mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add null handling for PaymentAccountPayload in multiple views
This commit is contained in:
parent
b80f3accb9
commit
ff49ec17e8
5 changed files with 22 additions and 13 deletions
|
@ -189,9 +189,11 @@ public class ContractWindow extends Overlay<ContractWindow> {
|
|||
nrOfDisputesAsBuyer + " / " + nrOfDisputesAsSeller);
|
||||
|
||||
addConfirmationLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.paymentDetails", Res.get("shared.buyer")),
|
||||
contract.getBuyerPaymentAccountPayload().getPaymentDetails()).second.setMouseTransparent(false);
|
||||
contract.getBuyerPaymentAccountPayload() != null ?
|
||||
contract.getBuyerPaymentAccountPayload().getPaymentDetails() : "NA").second.setMouseTransparent(false);
|
||||
addConfirmationLabelTextFieldWithCopyIcon(gridPane, ++rowIndex, Res.get("shared.paymentDetails", Res.get("shared.seller")),
|
||||
sellerPaymentAccountPayload.getPaymentDetails()).second.setMouseTransparent(false);
|
||||
sellerPaymentAccountPayload != null ?
|
||||
sellerPaymentAccountPayload.getPaymentDetails() : "NA").second.setMouseTransparent(false);
|
||||
|
||||
String title = "";
|
||||
String agentKeyBaseUserName = "";
|
||||
|
|
|
@ -448,8 +448,10 @@ public class ClosedTradesView extends ActivatableViewAndModel<VBox, ClosedTrades
|
|||
if (contract != null) {
|
||||
isBuyerOnion = contract.getBuyerNodeAddress().getFullAddress().contains(filterString);
|
||||
isSellerOnion = contract.getSellerNodeAddress().getFullAddress().contains(filterString);
|
||||
matchesBuyersPaymentAccountData = contract.getBuyerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesSellersPaymentAccountData = contract.getSellerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesBuyersPaymentAccountData = contract.getBuyerPaymentAccountPayload() != null &&
|
||||
contract.getBuyerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesSellersPaymentAccountData = contract.getSellerPaymentAccountPayload() != null &&
|
||||
contract.getSellerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
}
|
||||
return isBuyerOnion || isSellerOnion ||
|
||||
matchesBuyersPaymentAccountData || matchesSellersPaymentAccountData;
|
||||
|
|
|
@ -298,8 +298,10 @@ public class FailedTradesView extends ActivatableViewAndModel<VBox, FailedTrades
|
|||
if (contract != null) {
|
||||
isBuyerOnion = contract.getBuyerNodeAddress().getFullAddress().contains(filterString);
|
||||
isSellerOnion = contract.getSellerNodeAddress().getFullAddress().contains(filterString);
|
||||
matchesBuyersPaymentAccountData = contract.getBuyerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesSellersPaymentAccountData = contract.getSellerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesBuyersPaymentAccountData = contract.getBuyerPaymentAccountPayload() != null &&
|
||||
contract.getBuyerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
matchesSellersPaymentAccountData = contract.getSellerPaymentAccountPayload() != null &&
|
||||
contract.getSellerPaymentAccountPayload().getPaymentDetails().contains(filterString);
|
||||
}
|
||||
return isBuyerOnion || isSellerOnion ||
|
||||
matchesBuyersPaymentAccountData || matchesSellersPaymentAccountData;
|
||||
|
|
|
@ -221,15 +221,18 @@ public class SellerStep3View extends TradeStepView {
|
|||
// Not expected
|
||||
myPaymentDetails = ((AssetsAccountPayload) myPaymentAccountPayload).getAddress();
|
||||
}
|
||||
peersPaymentDetails = ((AssetsAccountPayload) peersPaymentAccountPayload).getAddress();
|
||||
peersPaymentDetails = peersPaymentAccountPayload != null ?
|
||||
((AssetsAccountPayload) peersPaymentAccountPayload).getAddress() : "NA";
|
||||
myTitle = Res.get("portfolio.pending.step3_seller.yourAddress", currencyName);
|
||||
peersTitle = Res.get("portfolio.pending.step3_seller.buyersAddress", currencyName);
|
||||
} else {
|
||||
if (myPaymentDetails.isEmpty()) {
|
||||
// Not expected
|
||||
myPaymentDetails = myPaymentAccountPayload.getPaymentDetails();
|
||||
myPaymentDetails = myPaymentAccountPayload != null ?
|
||||
myPaymentAccountPayload.getPaymentDetails() : "NA";
|
||||
}
|
||||
peersPaymentDetails = peersPaymentAccountPayload.getPaymentDetails();
|
||||
peersPaymentDetails = peersPaymentAccountPayload != null ?
|
||||
peersPaymentAccountPayload.getPaymentDetails() : "NA";
|
||||
myTitle = Res.get("portfolio.pending.step3_seller.yourAccount");
|
||||
peersTitle = Res.get("portfolio.pending.step3_seller.buyersAccount");
|
||||
}
|
||||
|
|
|
@ -782,11 +782,11 @@ public abstract class DisputeView extends ActivatableView<VBox, Void> implements
|
|||
.append(")\n");
|
||||
|
||||
String buyerPaymentAccountPayload = Utilities.toTruncatedString(
|
||||
contract.getBuyerPaymentAccountPayload().getPaymentDetails().
|
||||
replace("\n", " ").replace(";", "."), 100);
|
||||
contract.getBuyerPaymentAccountPayload() != null ? contract.getBuyerPaymentAccountPayload().getPaymentDetails().
|
||||
replace("\n", " ").replace(";", ".") : "NA", 100);
|
||||
String sellerPaymentAccountPayload = Utilities.toTruncatedString(
|
||||
contract.getSellerPaymentAccountPayload().getPaymentDetails()
|
||||
.replace("\n", " ").replace(";", "."), 100);
|
||||
contract.getSellerPaymentAccountPayload() != null ? contract.getSellerPaymentAccountPayload().getPaymentDetails()
|
||||
.replace("\n", " ").replace(";", ".") : "NA", 100);
|
||||
String buyerNodeAddress = contract.getBuyerNodeAddress().getFullAddress();
|
||||
String sellerNodeAddress = contract.getSellerNodeAddress().getFullAddress();
|
||||
csvStringBuilder.append(currency).append(";")
|
||||
|
|
Loading…
Add table
Reference in a new issue