mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
support getXmrSeed()
This commit is contained in:
parent
0e30603d15
commit
f4120b869d
4 changed files with 33 additions and 0 deletions
|
@ -268,6 +268,10 @@ public class CoreApi {
|
||||||
public BalancesInfo getBalances(String currencyCode) {
|
public BalancesInfo getBalances(String currencyCode) {
|
||||||
return walletsService.getBalances(currencyCode);
|
return walletsService.getBalances(currencyCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getXmrSeed() {
|
||||||
|
return walletsService.getXmrSeed();
|
||||||
|
}
|
||||||
|
|
||||||
public String getNewDepositAddress() {
|
public String getNewDepositAddress() {
|
||||||
return walletsService.getNewDepositAddress();
|
return walletsService.getNewDepositAddress();
|
||||||
|
|
|
@ -160,6 +160,10 @@ class CoreWalletsService {
|
||||||
return new BalancesInfo(getBtcBalances(), getXmrBalances());
|
return new BalancesInfo(getBtcBalances(), getXmrBalances());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String getXmrSeed() {
|
||||||
|
return xmrWalletService.getWallet().getMnemonic();
|
||||||
|
}
|
||||||
|
|
||||||
String getNewDepositAddress() {
|
String getNewDepositAddress() {
|
||||||
accountService.checkAccountOpen();
|
accountService.checkAccountOpen();
|
||||||
|
|
|
@ -40,6 +40,8 @@ import bisq.proto.grpc.GetTransactionReply;
|
||||||
import bisq.proto.grpc.GetTransactionRequest;
|
import bisq.proto.grpc.GetTransactionRequest;
|
||||||
import bisq.proto.grpc.GetTxFeeRateReply;
|
import bisq.proto.grpc.GetTxFeeRateReply;
|
||||||
import bisq.proto.grpc.GetTxFeeRateRequest;
|
import bisq.proto.grpc.GetTxFeeRateRequest;
|
||||||
|
import bisq.proto.grpc.GetXmrSeedReply;
|
||||||
|
import bisq.proto.grpc.GetXmrSeedRequest;
|
||||||
import bisq.proto.grpc.LockWalletReply;
|
import bisq.proto.grpc.LockWalletReply;
|
||||||
import bisq.proto.grpc.LockWalletRequest;
|
import bisq.proto.grpc.LockWalletRequest;
|
||||||
import bisq.proto.grpc.RemoveWalletPasswordReply;
|
import bisq.proto.grpc.RemoveWalletPasswordReply;
|
||||||
|
@ -117,6 +119,20 @@ class GrpcWalletsService extends WalletsImplBase {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getXmrSeed(GetXmrSeedRequest req,
|
||||||
|
StreamObserver<GetXmrSeedReply> responseObserver) {
|
||||||
|
try {
|
||||||
|
var reply = GetXmrSeedReply.newBuilder()
|
||||||
|
.setSeed(coreApi.getXmrSeed())
|
||||||
|
.build();
|
||||||
|
responseObserver.onNext(reply);
|
||||||
|
responseObserver.onCompleted();
|
||||||
|
} catch (Throwable cause) {
|
||||||
|
exceptionHandler.handleException(log, cause, responseObserver);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getNewDepositAddress(GetNewDepositAddressRequest req,
|
public void getNewDepositAddress(GetNewDepositAddressRequest req,
|
||||||
StreamObserver<GetNewDepositAddressReply> responseObserver) {
|
StreamObserver<GetNewDepositAddressReply> responseObserver) {
|
||||||
|
|
|
@ -856,6 +856,8 @@ message TxInfo {
|
||||||
service Wallets {
|
service Wallets {
|
||||||
rpc GetBalances (GetBalancesRequest) returns (GetBalancesReply) {
|
rpc GetBalances (GetBalancesRequest) returns (GetBalancesReply) {
|
||||||
}
|
}
|
||||||
|
rpc GetXmrSeed (GetXmrSeedRequest) returns (GetXmrSeedReply) {
|
||||||
|
}
|
||||||
rpc GetNewDepositAddress (GetNewDepositAddressRequest) returns (GetNewDepositAddressReply) {
|
rpc GetNewDepositAddress (GetNewDepositAddressRequest) returns (GetNewDepositAddressReply) {
|
||||||
}
|
}
|
||||||
rpc GetXmrTxs (GetXmrTxsRequest) returns (GetXmrTxsReply) {
|
rpc GetXmrTxs (GetXmrTxsRequest) returns (GetXmrTxsReply) {
|
||||||
|
@ -896,6 +898,13 @@ message GetBalancesReply {
|
||||||
BalancesInfo balances = 1;
|
BalancesInfo balances = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message GetXmrSeedRequest {
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetXmrSeedReply {
|
||||||
|
string seed = 1;
|
||||||
|
}
|
||||||
|
|
||||||
message GetNewDepositAddressRequest {
|
message GetNewDepositAddressRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue