mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-28 17:15:14 +01:00
Merge pull request #7379 from alvasw/AltCoinAccountsDataModel_Handle_XMR_detection_NullPointerException
AltCoinAccountsDataModel: Handle XMR detection NullPointerException
This commit is contained in:
commit
54b094fae5
1 changed files with 6 additions and 1 deletions
|
@ -81,7 +81,7 @@ class AltCoinAccountsDataModel extends ActivatableDataModel {
|
|||
fillAndSortPaymentAccounts();
|
||||
|
||||
paymentAccounts.stream()
|
||||
.filter(e -> e.getSingleTradeCurrency().getCode().equals("XMR"))
|
||||
.filter(this::isXmrPaymentAccount)
|
||||
.forEach(e -> {
|
||||
if (!xmrAccountUsesSubAddresses(e)) {
|
||||
XmrForm.showXmrSubAddressPopup();
|
||||
|
@ -98,6 +98,11 @@ class AltCoinAccountsDataModel extends ActivatableDataModel {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isXmrPaymentAccount(PaymentAccount paymentAccount) {
|
||||
TradeCurrency tradeCurrency = paymentAccount.getSingleTradeCurrency();
|
||||
return tradeCurrency != null && tradeCurrency.getCode().equals("XMR");
|
||||
}
|
||||
|
||||
private boolean xmrAccountUsesSubAddresses(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount instanceof CryptoCurrencyAccount) {
|
||||
CryptoCurrencyAccount account = (CryptoCurrencyAccount) paymentAccount;
|
||||
|
|
Loading…
Add table
Reference in a new issue