[bisq-network/bisq] Add rpc method 'getfundingaddresses' (#4299)

Stan notifications at github.com
Sat Jun 13 23:12:57 UTC 2020


This addresses task 1 in issue [4257](https://github.com/bisq-network/bisq/issues/4257).

This new gRPC Wallet service method displays the BTC wallet's list of receiving addresses.  The balance and number of confirmations for the most recent transaction is displayed to the right of each address.  Instead of returning a gRPC data structure to the client, the service method returns a formatted String.

If the BTC wallet has no unused addresses, one will be created and included in the returned list, and it can be used to fund the wallet.

The new method required injection of the `BtcWalletService` into `CoreWalletsService`, and the usual boilerplate changes to `grpc.proto`, `CliMain`, and `GrpcWalletService`.

Some of the next PRs (for issue [4257](https://github.com/bisq-network/bisq/issues/4257)) will require some common functionality within `CoreWalletsService`.  These additional changes were made:

  * a private, class level `formatSatoshis` function
  * a public `getNumConfirmationsForMostRecentTransaction` method
  * a public `getAddressBalance` method
  * a private `getAddressEntry` method

A unit test that verifies a successful return status was added to `cli/test.sh`.


This PR should be reviewed/merged after PR [4296](https://github.com/bisq-network/bisq/pull/4296).
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4299

-- Commit Summary --

  * Rename CoreWalletService -> CoreWalletsService
  * Add rpc wallet(s) protection tests
  * Add rpc method 'getfundingaddresses'

-- File Changes --

    M cli/src/main/java/bisq/cli/CliMain.java (10)
    M cli/test.sh (97)
    R core/src/main/java/bisq/core/grpc/CoreWalletsService.java (96)
    M core/src/main/java/bisq/core/grpc/GrpcWalletService.java (33)
    M proto/src/main/proto/grpc.proto (9)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4299.patch
https://github.com/bisq-network/bisq/pull/4299.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4299
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200613/301f5e4a/attachment.html>


More information about the bisq-github mailing list