mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
fix null pointer, cleanups
This commit is contained in:
parent
9cb9d0f88c
commit
546b6f7510
@ -17,11 +17,10 @@
|
||||
|
||||
package io.bitsquare.payment;
|
||||
|
||||
import io.bitsquare.common.persistance.Persistable;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public abstract class PaymentAccountFactory implements Persistable {
|
||||
public class PaymentAccountFactory {
|
||||
private static final Logger log = LoggerFactory.getLogger(PaymentAccountFactory.class);
|
||||
|
||||
public static PaymentAccount getPaymentAccount(PaymentMethod paymentMethod) {
|
||||
|
@ -271,7 +271,10 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
};
|
||||
model.dataModel.feeFromFundingTxProperty.addListener(feeFromFundingTxListener);
|
||||
|
||||
if (spinner != null && takeOfferButton.isVisible())
|
||||
if (offerAvailabilitySpinner != null && offerAvailabilitySpinner.isVisible())
|
||||
offerAvailabilitySpinner.setProgress(-1);
|
||||
|
||||
if (spinner != null && spinner.isVisible())
|
||||
spinner.setProgress(-1);
|
||||
}
|
||||
|
||||
@ -429,16 +432,16 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
String tradeAmountText = model.isSeller() ? "the trade amount, " : "";
|
||||
new Popup().headLine("Fund your trading wallet")
|
||||
.instruction("You need to pay in " +
|
||||
model.totalToPay.get() + " to your local Bitsquare trading wallet.\n" +
|
||||
"The amount is the sum of " + tradeAmountText + "the security deposit, the trading fee and " +
|
||||
"the bitcoin mining fee.\n\n" +
|
||||
"Please send from your external Bitcoin wallet the exact amount to the address: " +
|
||||
model.getAddressAsString() + "\n(you can copy the address in the screen below after closing that popup)\n\n" +
|
||||
"Make sure you use a sufficiently high mining fee of at least " +
|
||||
model.formatter.formatCoinWithCode(FeePolicy.getMinRequiredFeeForFundingTx()) +
|
||||
" to avoid problems that your transaction does not get confirmed in the blockchain.\n" +
|
||||
"Transactions with a lower fee will not be accepted.\n\n" +
|
||||
"You can see the status of your incoming payment and all the details in the screen below.")
|
||||
model.totalToPay.get() + " to your local Bitsquare trading wallet.\n" +
|
||||
"The amount is the sum of " + tradeAmountText + "the security deposit, the trading fee and " +
|
||||
"the bitcoin mining fee.\n\n" +
|
||||
"Please send from your external Bitcoin wallet the exact amount to the address: " +
|
||||
model.getAddressAsString() + "\n(you can copy the address in the screen below after closing that popup)\n\n" +
|
||||
"Make sure you use a sufficiently high mining fee of at least " +
|
||||
model.formatter.formatCoinWithCode(FeePolicy.getMinRequiredFeeForFundingTx()) +
|
||||
" to avoid problems that your transaction does not get confirmed in the blockchain.\n" +
|
||||
"Transactions with a lower fee will not be accepted.\n\n" +
|
||||
"You can see the status of your incoming payment and all the details in the screen below.")
|
||||
.dontShowAgainId(key, preferences)
|
||||
.show();
|
||||
}
|
||||
|
@ -73,5 +73,4 @@ public class TacWindow extends Overlay<TacWindow> {
|
||||
protected void onShow() {
|
||||
display();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
||||
|
||||
broadcast(new AddDataMessage(protectedStorageEntry), sender, listener, isDataOwner);
|
||||
}
|
||||
|
||||
|
||||
hashMapChangedListeners.stream().forEach(e -> e.onAdded(protectedStorageEntry));
|
||||
} else {
|
||||
log.trace("add failed");
|
||||
@ -442,7 +442,8 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
|
||||
else
|
||||
result = expirableMailboxStoragePayload.receiverPubKeyForRemoveOperation.equals(protectedStorageEntry.ownerPubKey);
|
||||
} else {
|
||||
result = protectedStorageEntry.getStoragePayload().getOwnerPubKey().equals(protectedStorageEntry.ownerPubKey);
|
||||
result = protectedStorageEntry != null && protectedStorageEntry.getStoragePayload() != null &&
|
||||
protectedStorageEntry.getStoragePayload().getOwnerPubKey().equals(protectedStorageEntry.ownerPubKey);
|
||||
}
|
||||
|
||||
if (!result)
|
||||
|
Loading…
x
Reference in New Issue
Block a user