Rename CoreWalletService -> CoreWalletsService

This change fixes the ambiguity in the original class name, which
implied it was a btc wallet service, not a bsq and btc wallets service.
This commit is contained in:
ghubstan 2020-06-12 15:16:14 -03:00
parent 7e0c82a791
commit b1146fdd12
No known key found for this signature in database
GPG Key ID: E35592D6800A861E
2 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,7 @@ import javax.annotation.Nullable;
import static java.util.concurrent.TimeUnit.SECONDS;
@Slf4j
class CoreWalletService {
class CoreWalletsService {
private final Balances balances;
private final WalletsManager walletsManager;
@ -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;
}

View File

@ -20,17 +20,17 @@ import javax.inject.Inject;
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();
@ -45,7 +45,7 @@ class GrpcWalletService extends WalletGrpc.WalletImplBase {
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();
@ -60,7 +60,7 @@ class GrpcWalletService extends WalletGrpc.WalletImplBase {
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();
@ -75,7 +75,7 @@ class GrpcWalletService extends WalletGrpc.WalletImplBase {
public void lockWallet(LockWalletRequest req,
StreamObserver<LockWalletReply> responseObserver) {
try {
walletService.lockWallet();
walletsService.lockWallet();
var reply = LockWalletReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
@ -90,7 +90,7 @@ class GrpcWalletService extends WalletGrpc.WalletImplBase {
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();