[bisq-network/bisq] Call core wallets service methods from CoreApi (#4309)

Stan notifications at github.com
Mon Jun 15 20:03:56 UTC 2020

This change is a refactoring of the gRPC `Wallets` service for the purpose of making `CoreApi` the entry point to  all core implementations. 

Seeing `GrpcWalletsService` using `CoreWalletsService` (that's sensible) made me hesitate to make this change, but if `GrpcWalletsService` doesn't use `CoreApi` instead of `CoreWalletsService`, then we set up an inconsistent situation where some `Grpc*Service` impls use `CoreApi` and some do not.  I think it is better to be consistent for myself other devs, and consistently inject only `CoreApi` into each `Grpc*Service`, instead of a variable number of core services.

Also, the gRPC `Wallet` proto def name was changed to `Wallets` because this service manages BSQ and BTC wallets;  `GrpcWalletService` was renamed to `GrpcWalletsService` for the same reason.   (This change should have been made in PR [4295](https://github.com/bisq-network/bisq/pull/4295)).

This PR should be reviewed/merged after PR [4308](https://github.com/bisq-network/bisq/pull/4308). 
 (This PR's branch was created from the PR 4308 branch.)
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Rename CoreWalletService -> CoreWalletsService
  * Add rpc wallet(s) protection tests
  * Add rpc method 'getfundingaddresses'
  * Replace duplicate code in getFundingAddresses
  * Add rpc method 'getaddressbalance'
  * Add rpc method 'createpaymentacct'
  * Call core wallets service methods from CoreApi

-- File Changes --

    M cli/src/main/java/bisq/cli/CliMain.java (81)
    M cli/test.sh (116)
    M core/src/main/java/bisq/core/grpc/CoreApi.java (63)
    A core/src/main/java/bisq/core/grpc/CorePaymentAccountsService.java (57)
    R core/src/main/java/bisq/core/grpc/CoreWalletsService.java (112)
    A core/src/main/java/bisq/core/grpc/GrpcPaymentAccountsService.java (46)
    M core/src/main/java/bisq/core/grpc/GrpcServer.java (26)
    R core/src/main/java/bisq/core/grpc/GrpcWalletsService.java (54)
    M proto/src/main/proto/grpc.proto (38)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200615/239083c5/attachment.html>

More information about the bisq-github mailing list