mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-19 23:36:00 -04:00
Add null check to selected arbitrator
This commit is contained in:
parent
4c0cc738e4
commit
bc734fe51b
@ -18,6 +18,7 @@
|
||||
package io.bitsquare.trade.protocol.trade;
|
||||
|
||||
import io.bitsquare.app.Version;
|
||||
import io.bitsquare.arbitration.Arbitrator;
|
||||
import io.bitsquare.arbitration.ArbitratorManager;
|
||||
import io.bitsquare.btc.AddressEntry;
|
||||
import io.bitsquare.btc.TradeWalletService;
|
||||
@ -50,6 +51,8 @@ import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
public class ProcessModel implements Model, Serializable {
|
||||
// That object is saved to disc. We need to take care of changes to not break deserialization.
|
||||
private static final long serialVersionUID = Version.LOCAL_DB_VERSION;
|
||||
@ -145,7 +148,9 @@ public class ProcessModel implements Model, Serializable {
|
||||
}
|
||||
|
||||
public byte[] getArbitratorPubKey(NodeAddress arbitratorNodeAddress) {
|
||||
return user.getAcceptedArbitratorByAddress(arbitratorNodeAddress).getBtcPubKey();
|
||||
Arbitrator acceptedArbitratorByAddress = user.getAcceptedArbitratorByAddress(arbitratorNodeAddress);
|
||||
checkNotNull(acceptedArbitratorByAddress, "acceptedArbitratorByAddress must not be null. Maybe there is no arbitrator in the network available.");
|
||||
return acceptedArbitratorByAddress.getBtcPubKey();
|
||||
}
|
||||
|
||||
public Offer getOffer() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user