Move GetNetworkRequest down to WalletsServiceRequest

This commit is contained in:
ghubstan 2022-06-16 15:45:51 -03:00
parent ae41e98db9
commit b482618403
No known key found for this signature in database
GPG Key ID: E35592D6800A861E
2 changed files with 7 additions and 3 deletions

View File

@ -22,7 +22,6 @@ import bisq.proto.grpc.BalancesInfo;
import bisq.proto.grpc.BsqBalanceInfo; import bisq.proto.grpc.BsqBalanceInfo;
import bisq.proto.grpc.BtcBalanceInfo; import bisq.proto.grpc.BtcBalanceInfo;
import bisq.proto.grpc.GetMethodHelpRequest; import bisq.proto.grpc.GetMethodHelpRequest;
import bisq.proto.grpc.GetNetworkRequest;
import bisq.proto.grpc.GetTradesRequest; import bisq.proto.grpc.GetTradesRequest;
import bisq.proto.grpc.GetVersionRequest; import bisq.proto.grpc.GetVersionRequest;
import bisq.proto.grpc.OfferInfo; import bisq.proto.grpc.OfferInfo;
@ -76,8 +75,7 @@ public final class GrpcClient {
} }
public String getNetwork() { public String getNetwork() {
var request = GetNetworkRequest.newBuilder().build(); return walletsServiceRequest.getNetwork();
return grpcStubs.walletsService.getNetwork(request).getNetwork();
} }
public BalancesInfo getBalances() { public BalancesInfo getBalances() {

View File

@ -24,6 +24,7 @@ import bisq.proto.grpc.BtcBalanceInfo;
import bisq.proto.grpc.GetAddressBalanceRequest; import bisq.proto.grpc.GetAddressBalanceRequest;
import bisq.proto.grpc.GetBalancesRequest; import bisq.proto.grpc.GetBalancesRequest;
import bisq.proto.grpc.GetFundingAddressesRequest; import bisq.proto.grpc.GetFundingAddressesRequest;
import bisq.proto.grpc.GetNetworkRequest;
import bisq.proto.grpc.GetTransactionRequest; import bisq.proto.grpc.GetTransactionRequest;
import bisq.proto.grpc.GetTxFeeRateRequest; import bisq.proto.grpc.GetTxFeeRateRequest;
import bisq.proto.grpc.GetUnusedBsqAddressRequest; import bisq.proto.grpc.GetUnusedBsqAddressRequest;
@ -54,6 +55,11 @@ public class WalletsServiceRequest {
this.grpcStubs = grpcStubs; this.grpcStubs = grpcStubs;
} }
public String getNetwork() {
var request = GetNetworkRequest.newBuilder().build();
return grpcStubs.walletsService.getNetwork(request).getNetwork();
}
public BalancesInfo getBalances() { public BalancesInfo getBalances() {
return getBalances(""); return getBalances("");
} }