Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rpc method 'getfundingaddresses' #4299

Merged
merged 4 commits into from
Jun 25, 2020

Commits on Jun 12, 2020

  1. Rename CoreWalletService -> CoreWalletsService

    This change fixes the ambiguity in the original class name, which
    implied it was a btc wallet service, not a bsq and btc wallets service.
    ghubstan committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    b1146fd View commit details
    Browse the repository at this point in the history
  2. Add rpc wallet(s) protection tests

    This commit includes the following changes:
    
     * New tests for methods `lockwallet`, `unlockwallet`,
       `removewalletpassword`, and `setwalletpassword`.
    
     * New `getbalance` method error handing tests to verify
       error message correctness when wallet is locked.
    
     * Update to `getversion` method test -- now expects `1.3.4`.
    
     * Check for new `[params]` column header in help text.
    ghubstan committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    ec66b14 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2020

  1. Add rpc method 'getfundingaddresses'

    This addresses task #1 in issue bisq-network#4257.
    
    This new gRPC WalletService 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 bisq-network#4257) will require some common functionality within
    CoreWalletsService, so these additional changes were included:
    
      * 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.
    ghubstan committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    85c9676 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2020

  1. Replace duplicate code in getFundingAddresses

    Cleaned up the method body and improved the returned string's
    formatting.  Also added a line for this method in the CLI help text.
    ghubstan committed Jun 14, 2020
    Configuration menu
    Copy the full SHA
    2e415de View commit details
    Browse the repository at this point in the history