Skip to content

Commit

Permalink
Move GetNetworkRequest down to WalletsServiceRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
ghubstan committed Jun 16, 2022
1 parent ae41e98 commit b482618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cli/src/main/java/bisq/cli/GrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import bisq.proto.grpc.BsqBalanceInfo;
import bisq.proto.grpc.BtcBalanceInfo;
import bisq.proto.grpc.GetMethodHelpRequest;
import bisq.proto.grpc.GetNetworkRequest;
import bisq.proto.grpc.GetTradesRequest;
import bisq.proto.grpc.GetVersionRequest;
import bisq.proto.grpc.OfferInfo;
Expand Down Expand Up @@ -76,8 +75,7 @@ public String getVersion() {
}

public String getNetwork() {
var request = GetNetworkRequest.newBuilder().build();
return grpcStubs.walletsService.getNetwork(request).getNetwork();
return walletsServiceRequest.getNetwork();
}

public BalancesInfo getBalances() {
Expand Down
6 changes: 6 additions & 0 deletions cli/src/main/java/bisq/cli/request/WalletsServiceRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import bisq.proto.grpc.GetAddressBalanceRequest;
import bisq.proto.grpc.GetBalancesRequest;
import bisq.proto.grpc.GetFundingAddressesRequest;
import bisq.proto.grpc.GetNetworkRequest;
import bisq.proto.grpc.GetTransactionRequest;
import bisq.proto.grpc.GetTxFeeRateRequest;
import bisq.proto.grpc.GetUnusedBsqAddressRequest;
Expand Down Expand Up @@ -54,6 +55,11 @@ public WalletsServiceRequest(GrpcStubs grpcStubs) {
this.grpcStubs = grpcStubs;
}

public String getNetwork() {
var request = GetNetworkRequest.newBuilder().build();
return grpcStubs.walletsService.getNetwork(request).getNetwork();
}

public BalancesInfo getBalances() {
return getBalances("");
}
Expand Down

0 comments on commit b482618

Please sign in to comment.