Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CoreWalletService -> CoreWalletsService #4295

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import static java.util.concurrent.TimeUnit.SECONDS;

@Slf4j
class CoreWalletService {
class CoreWalletsService {

private final Balances balances;
private final WalletsManager walletsManager;
Expand All @@ -31,7 +31,7 @@ class CoreWalletService {
private KeyParameter tempAesKey;

@Inject
public CoreWalletService(Balances balances, WalletsManager walletsManager) {
public CoreWalletsService(Balances balances, WalletsManager walletsManager) {
this.balances = balances;
this.walletsManager = walletsManager;
}
Expand Down
16 changes: 8 additions & 8 deletions core/src/main/java/bisq/core/grpc/GrpcWalletService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@

class GrpcWalletService extends WalletGrpc.WalletImplBase {

private final CoreWalletService walletService;
private final CoreWalletsService walletsService;

@Inject
public GrpcWalletService(CoreWalletService walletService) {
this.walletService = walletService;
public GrpcWalletService(CoreWalletsService walletsService) {
this.walletsService = walletsService;
}

@Override
public void getBalance(GetBalanceRequest req, StreamObserver<GetBalanceReply> responseObserver) {
try {
long result = walletService.getAvailableBalance();
long result = walletsService.getAvailableBalance();
var reply = GetBalanceReply.newBuilder().setBalance(result).build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
Expand All @@ -45,7 +45,7 @@ public void getBalance(GetBalanceRequest req, StreamObserver<GetBalanceReply> re
public void setWalletPassword(SetWalletPasswordRequest req,
StreamObserver<SetWalletPasswordReply> responseObserver) {
try {
walletService.setWalletPassword(req.getPassword(), req.getNewPassword());
walletsService.setWalletPassword(req.getPassword(), req.getNewPassword());
var reply = SetWalletPasswordReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
Expand All @@ -60,7 +60,7 @@ public void setWalletPassword(SetWalletPasswordRequest req,
public void removeWalletPassword(RemoveWalletPasswordRequest req,
StreamObserver<RemoveWalletPasswordReply> responseObserver) {
try {
walletService.removeWalletPassword(req.getPassword());
walletsService.removeWalletPassword(req.getPassword());
var reply = RemoveWalletPasswordReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
Expand All @@ -75,7 +75,7 @@ public void removeWalletPassword(RemoveWalletPasswordRequest req,
public void lockWallet(LockWalletRequest req,
StreamObserver<LockWalletReply> responseObserver) {
try {
walletService.lockWallet();
walletsService.lockWallet();
var reply = LockWalletReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
Expand All @@ -90,7 +90,7 @@ public void lockWallet(LockWalletRequest req,
public void unlockWallet(UnlockWalletRequest req,
StreamObserver<UnlockWalletReply> responseObserver) {
try {
walletService.unlockWallet(req.getPassword(), req.getTimeout());
walletsService.unlockWallet(req.getPassword(), req.getTimeout());
var reply = UnlockWalletReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
Expand Down