mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
support getXmrSeed()
This commit is contained in:
parent
0e30603d15
commit
f4120b869d
@ -269,6 +269,10 @@ public class CoreApi {
|
||||
return walletsService.getBalances(currencyCode);
|
||||
}
|
||||
|
||||
public String getXmrSeed() {
|
||||
return walletsService.getXmrSeed();
|
||||
}
|
||||
|
||||
public String getNewDepositAddress() {
|
||||
return walletsService.getNewDepositAddress();
|
||||
}
|
||||
|
@ -161,6 +161,10 @@ class CoreWalletsService {
|
||||
}
|
||||
}
|
||||
|
||||
String getXmrSeed() {
|
||||
return xmrWalletService.getWallet().getMnemonic();
|
||||
}
|
||||
|
||||
String getNewDepositAddress() {
|
||||
accountService.checkAccountOpen();
|
||||
return xmrWalletService.getWallet().createSubaddress(0).getAddress();
|
||||
|
@ -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