mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Refactoring:
-Reduce visibility
This commit is contained in:
parent
b76357e620
commit
ef9ac12519
5 changed files with 14 additions and 14 deletions
|
@ -64,12 +64,12 @@ public class XmrAutoConfirmResult extends AutoConfirmResult {
|
|||
this(State.UNDEFINED, 0, 0);
|
||||
}
|
||||
|
||||
public XmrAutoConfirmResult(State state) {
|
||||
XmrAutoConfirmResult(State state) {
|
||||
this(state, 0, 0);
|
||||
}
|
||||
|
||||
// alternate constructor for showing confirmation progress information
|
||||
public XmrAutoConfirmResult(State state, int confirmCount, int confirmsRequired) {
|
||||
XmrAutoConfirmResult(State state, int confirmCount, int confirmsRequired) {
|
||||
super(state.name());
|
||||
this.state = state;
|
||||
this.confirmCount = confirmCount;
|
||||
|
@ -77,7 +77,7 @@ public class XmrAutoConfirmResult extends AutoConfirmResult {
|
|||
}
|
||||
|
||||
// alternate constructor for error scenarios
|
||||
public XmrAutoConfirmResult(State state, @Nullable String errorMsg) {
|
||||
XmrAutoConfirmResult(State state, @Nullable String errorMsg) {
|
||||
this(state, 0, 0);
|
||||
|
||||
if (!isPendingState() && !isSuccessState() && state != State.FEATURE_DISABLED && state != State.UNDEFINED) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
@Slf4j
|
||||
@Value
|
||||
public class XmrProofInfo {
|
||||
class XmrProofInfo {
|
||||
private final String txHash;
|
||||
private final String txKey;
|
||||
private final String recipientAddress;
|
||||
|
@ -33,7 +33,7 @@ public class XmrProofInfo {
|
|||
private final int confirmsRequired;
|
||||
private final String serviceAddress;
|
||||
|
||||
public XmrProofInfo(
|
||||
XmrProofInfo(
|
||||
String txHash,
|
||||
String txKey,
|
||||
String recipientAddress,
|
||||
|
@ -50,7 +50,7 @@ public class XmrProofInfo {
|
|||
this.serviceAddress = serviceAddress;
|
||||
}
|
||||
|
||||
public String getUID() {
|
||||
String getUID() {
|
||||
return txHash + "|" + serviceAddress;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ import java.util.concurrent.TimeUnit;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class XmrProofParser {
|
||||
static public XmrAutoConfirmResult parse(XmrProofInfo xmrProofInfo, String jsonTxt) {
|
||||
class XmrProofParser {
|
||||
static XmrAutoConfirmResult parse(XmrProofInfo xmrProofInfo, String jsonTxt) {
|
||||
String txHash = xmrProofInfo.getTxHash();
|
||||
try {
|
||||
JsonObject json = new Gson().fromJson(jsonTxt, JsonObject.class);
|
||||
|
|
|
@ -81,11 +81,11 @@ class XmrTransferProofRequester {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// used by the service to abort further automatic retries
|
||||
public void stop() {
|
||||
void stop() {
|
||||
terminated = true;
|
||||
}
|
||||
|
||||
public void request() {
|
||||
void request() {
|
||||
if (terminated) {
|
||||
// the XmrTransferProofService has asked us to terminate i.e. not make any further api calls
|
||||
// this scenario may happen if a re-request is scheduled from the callback below
|
||||
|
|
|
@ -45,9 +45,9 @@ class XmrTransferProofService {
|
|||
socks5ProxyProvider = provider;
|
||||
}
|
||||
|
||||
public void requestProof(XmrProofInfo xmrProofInfo,
|
||||
Consumer<XmrAutoConfirmResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
void requestProof(XmrProofInfo xmrProofInfo,
|
||||
Consumer<XmrAutoConfirmResult> resultHandler,
|
||||
FaultHandler faultHandler) {
|
||||
String uid = xmrProofInfo.getUID();
|
||||
if (map.containsKey(uid)) {
|
||||
log.warn("We started a proof request for uid {} already", uid);
|
||||
|
@ -72,7 +72,7 @@ class XmrTransferProofService {
|
|||
requester.request();
|
||||
}
|
||||
|
||||
public void terminateRequest(XmrProofInfo xmrProofInfo) {
|
||||
void terminateRequest(XmrProofInfo xmrProofInfo) {
|
||||
String uid = xmrProofInfo.getUID();
|
||||
XmrTransferProofRequester requester = map.getOrDefault(uid, null);
|
||||
if (requester != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue