mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-12-12 12:53:32 +01:00
support getXmrSeed()
This commit is contained in:
parent
0e30603d15
commit
f4120b869d
@ -268,6 +268,10 @@ public class CoreApi {
|
||||
public BalancesInfo getBalances(String currencyCode) {
|
||||
return walletsService.getBalances(currencyCode);
|
||||
}
|
||||
|
||||
public String getXmrSeed() {
|
||||
return walletsService.getXmrSeed();
|
||||
}
|
||||
|
||||
public String getNewDepositAddress() {
|
||||
return walletsService.getNewDepositAddress();
|
||||
|
@ -160,6 +160,10 @@ class CoreWalletsService {
|
||||
return new BalancesInfo(getBtcBalances(), getXmrBalances());
|
||||
}
|
||||
}
|
||||
|
||||
String getXmrSeed() {
|
||||
return xmrWalletService.getWallet().getMnemonic();
|
||||
}
|
||||
|
||||
String getNewDepositAddress() {
|
||||
accountService.checkAccountOpen();
|
||||
|
@ -40,6 +40,8 @@ import bisq.proto.grpc.GetTransactionReply;
|
||||
import bisq.proto.grpc.GetTransactionRequest;
|
||||
import bisq.proto.grpc.GetTxFeeRateReply;
|
||||
import bisq.proto.grpc.GetTxFeeRateRequest;
|
||||
import bisq.proto.grpc.GetXmrSeedReply;
|
||||
import bisq.proto.grpc.GetXmrSeedRequest;
|
||||
import bisq.proto.grpc.LockWalletReply;
|
||||
import bisq.proto.grpc.LockWalletRequest;
|
||||
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
|
||||
public void getNewDepositAddress(GetNewDepositAddressRequest req,
|
||||
StreamObserver<GetNewDepositAddressReply> responseObserver) {
|
||||
|
@ -856,6 +856,8 @@ message TxInfo {
|
||||
service Wallets {
|
||||
rpc GetBalances (GetBalancesRequest) returns (GetBalancesReply) {
|
||||
}
|
||||
rpc GetXmrSeed (GetXmrSeedRequest) returns (GetXmrSeedReply) {
|
||||
}
|
||||
rpc GetNewDepositAddress (GetNewDepositAddressRequest) returns (GetNewDepositAddressReply) {
|
||||
}
|
||||
rpc GetXmrTxs (GetXmrTxsRequest) returns (GetXmrTxsReply) {
|
||||
@ -896,6 +898,13 @@ message GetBalancesReply {
|
||||
BalancesInfo balances = 1;
|
||||
}
|
||||
|
||||
message GetXmrSeedRequest {
|
||||
}
|
||||
|
||||
message GetXmrSeedReply {
|
||||
string seed = 1;
|
||||
}
|
||||
|
||||
message GetNewDepositAddressRequest {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user