mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Remove unused fields, apply new params
This commit is contained in:
parent
e825613f5c
commit
fac4200825
1 changed files with 5 additions and 27 deletions
|
@ -45,23 +45,17 @@ import bisq.core.user.UserPayload;
|
|||
import bisq.network.p2p.peers.peerexchange.PeerList;
|
||||
import bisq.network.p2p.storage.persistence.SequenceNumberMap;
|
||||
|
||||
import bisq.common.config.Config;
|
||||
import bisq.common.file.CorruptedStorageFileHandler;
|
||||
import bisq.common.proto.ProtobufferRuntimeException;
|
||||
import bisq.common.proto.network.NetworkProtoResolver;
|
||||
import bisq.common.proto.persistable.NavigationPath;
|
||||
import bisq.common.proto.persistable.PersistableEnvelope;
|
||||
import bisq.common.proto.persistable.PersistenceProtoResolver;
|
||||
import bisq.common.storage.Storage;
|
||||
|
||||
import com.google.inject.Provider;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
// TODO Use ProtobufferException instead of ProtobufferRuntimeException
|
||||
|
@ -70,19 +64,12 @@ import lombok.extern.slf4j.Slf4j;
|
|||
public class CorePersistenceProtoResolver extends CoreProtoResolver implements PersistenceProtoResolver {
|
||||
private final Provider<BtcWalletService> btcWalletService;
|
||||
private final NetworkProtoResolver networkProtoResolver;
|
||||
private final File storageDir;
|
||||
private final CorruptedStorageFileHandler corruptedStorageFileHandler;
|
||||
|
||||
@Inject
|
||||
public CorePersistenceProtoResolver(Provider<BtcWalletService> btcWalletService,
|
||||
NetworkProtoResolver networkProtoResolver,
|
||||
@Named(Config.STORAGE_DIR) File storageDir,
|
||||
CorruptedStorageFileHandler corruptedStorageFileHandler) {
|
||||
NetworkProtoResolver networkProtoResolver) {
|
||||
this.btcWalletService = btcWalletService;
|
||||
this.networkProtoResolver = networkProtoResolver;
|
||||
this.storageDir = storageDir;
|
||||
|
||||
this.corruptedStorageFileHandler = corruptedStorageFileHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,22 +83,13 @@ public class CorePersistenceProtoResolver extends CoreProtoResolver implements P
|
|||
case ADDRESS_ENTRY_LIST:
|
||||
return AddressEntryList.fromProto(proto.getAddressEntryList());
|
||||
case TRADABLE_LIST:
|
||||
return TradableList.fromProto(proto.getTradableList(),
|
||||
this,
|
||||
new Storage<>(storageDir, this, corruptedStorageFileHandler),
|
||||
btcWalletService.get());
|
||||
return TradableList.fromProto(proto.getTradableList(), this, btcWalletService.get());
|
||||
case ARBITRATION_DISPUTE_LIST:
|
||||
return ArbitrationDisputeList.fromProto(proto.getArbitrationDisputeList(),
|
||||
this,
|
||||
new Storage<>(storageDir, this, corruptedStorageFileHandler));
|
||||
return ArbitrationDisputeList.fromProto(proto.getArbitrationDisputeList(), this);
|
||||
case MEDIATION_DISPUTE_LIST:
|
||||
return MediationDisputeList.fromProto(proto.getMediationDisputeList(),
|
||||
this,
|
||||
new Storage<>(storageDir, this, corruptedStorageFileHandler));
|
||||
return MediationDisputeList.fromProto(proto.getMediationDisputeList(), this);
|
||||
case REFUND_DISPUTE_LIST:
|
||||
return RefundDisputeList.fromProto(proto.getRefundDisputeList(),
|
||||
this,
|
||||
new Storage<>(storageDir, this, corruptedStorageFileHandler));
|
||||
return RefundDisputeList.fromProto(proto.getRefundDisputeList(), this);
|
||||
case PREFERENCES_PAYLOAD:
|
||||
return PreferencesPayload.fromProto(proto.getPreferencesPayload(), this);
|
||||
case USER_PAYLOAD:
|
||||
|
|
Loading…
Add table
Reference in a new issue