-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
Cleaned up the method body and improved the returned string's formatting. Also added a line for this method in the CLI help text.
TODO Re-format the result string as a table, e.g.
|
dmos62
reviewed
Jun 16, 2020
dmos62
suggested changes
Jun 16, 2020
ghubstan
added a commit
to ghubstan/bisq
that referenced
this pull request
Jun 16, 2020
Response to comment in PR 4299: bisq-network#4299 (comment) This PR should be reviewed/merged after PR 4309. bisq-network#4309
dmos62
approved these changes
Jun 19, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. Some of the suggested changes have been introduced in later PRs.
sqrrm
approved these changes
Jun 25, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
eigentsmis
pushed a commit
to eigentsmis/bisq
that referenced
this pull request
Jun 26, 2020
Response to comment in PR 4299: bisq-network#4299 (comment) This PR should be reviewed/merged after PR 4309. bisq-network#4309
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses task 1 in issue 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
intoCoreWalletsService
, and the usual boilerplate changes togrpc.proto
,CliMain
, andGrpcWalletService
.Some of the next PRs (for issue 4257) will require some common functionality within
CoreWalletsService
. These additional changes were made:formatSatoshis
functiongetNumConfirmationsForMostRecentTransaction
methodgetAddressBalance
methodgetAddressEntry
methodA unit test that verifies a successful return status was added to
cli/test.sh
.This PR should be reviewed/merged after PR 4296.