[bisq-network/bisq] Add new api method gettransaction (#4948)
Stan
notifications at github.com
Mon Dec 14 19:21:36 CET 2020
This change was prompted by recent changes in the main branch to allow a tx memo field to be set from the UI and API.
This and the prior [PR](https://github.com/bisq-network/bisq/pull/4937) address the API's need to be able to fetch a tx (with a memo). The API can now get a completed trade's `withdrawalTxId` and use it as a `gettransaction` parameter.
A summary of changes by file:
`grpc.proto`
- Added `withdrawalTxId` field to existing `TradeInfo` proto & wrapper.
- Reordered fields in `TradeInfo` proto.
- Added new fields to be displayed by `TxInfo` proto in CLI.
- Fixed typo: `unsetTxFeeRatePreference` -> `UnsetTxFeeRatePreference`.
- Added new `GetTransaction` rpc.
`GrpcWalletsService` - Added new `getTransaction` gRPC boilerplate.
`CoreWalletsService` - Added new `getTransaction` implementation.
`TxInfo` - Added the new fields for displaying a tx summary in the CLI. This is not intended to be more than a brief summary; a block explorer or bitcoin-core client should be used to see the complete definition.
`TradeInfo` - Added the new withdrawalTxId field defined in grpc.proto.
`CliMain` - Added new `case gettransaction`.
`TransactionFormat` - Formats a TxInfo sent from the server to CLI.
`ColumnHeaderConstants` - Added console headers used by `TransactionFormat`.
`TradeFormat` - Displays a completed trade's `withdrawalTxId` if present.
`apitest` - Adjusted affected tests: assert tx memo is persisted and test `gettransaction`.
This is the 8th in a chain of PRs beginning with https://github.com/bisq-network/bisq/pull/4884.
PR https://github.com/bisq-network/bisq/pull/4937 should be reviewed before this one.
You can view, comment on, or merge this pull request online at:
https://github.com/bisq-network/bisq/pull/4948
-- Commit Summary --
* Refactor BtcWalletService to let api override fee rates
* Merge branch 'master' into 02-refactor-completePreparedSendBsqTx
* Add optional txFeeRate parameter to api sendbsq
* Merge branch 'master' into 03-add-txFeeRate-param
* Add new api method 'sendbtc' and test
* Merge branch 'master' into 04-add-sendbtc-impl
* Support tx memo field for btc withdrawals from api
* Remove unused imports
* Merge branch 'master' into 05-use-memo-tx-field
* Use Bisq's UserThread.executor in gRPC server
* Append nullable withdrawalTxId field to Trade proto message
* Add new api method gettransaction
* Merge branch 'master' into 08-scratch
* Adjust create TransferwiseAccount test
* Disable method test to avoid repetition
-- File Changes --
M apitest/src/test/java/bisq/apitest/method/MethodTest.java (73)
M apitest/src/test/java/bisq/apitest/method/payment/CreatePaymentAccountTest.java (6)
M apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java (10)
M apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java (22)
M apitest/src/test/java/bisq/apitest/method/wallet/BsqWalletTest.java (2)
M apitest/src/test/java/bisq/apitest/method/wallet/BtcWalletTest.java (49)
M apitest/src/test/java/bisq/apitest/scenario/TradeTest.java (1)
M apitest/src/test/java/bisq/apitest/scenario/WalletTest.java (1)
M cli/src/main/java/bisq/cli/CliMain.java (125)
M cli/src/main/java/bisq/cli/ColumnHeaderConstants.java (10)
M cli/src/main/java/bisq/cli/TradeFormat.java (33)
A cli/src/main/java/bisq/cli/TransactionFormat.java (59)
M core/src/main/java/bisq/core/api/CoreApi.java (26)
M core/src/main/java/bisq/core/api/CoreTradesService.java (25)
M core/src/main/java/bisq/core/api/CoreWalletsService.java (126)
M core/src/main/java/bisq/core/api/model/TradeInfo.java (11)
A core/src/main/java/bisq/core/api/model/TxInfo.java (160)
M core/src/main/java/bisq/core/btc/wallet/BsqTransferService.java (5)
M core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java (47)
M core/src/main/java/bisq/core/dao/governance/bond/lockup/LockupTxService.java (2)
M core/src/main/java/bisq/core/dao/governance/bond/unlock/UnlockTxService.java (2)
M core/src/main/java/bisq/core/trade/Trade.java (7)
M core/src/main/java/bisq/core/trade/TradeManager.java (1)
M daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java (2)
M daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java (3)
M daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java (106)
M desktop/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.java (4)
M proto/src/main/proto/grpc.proto (83)
M proto/src/main/proto/pb.proto (1)
-- Patch Links --
https://github.com/bisq-network/bisq/pull/4948.patch
https://github.com/bisq-network/bisq/pull/4948.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/4948
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201214/e2c541f9/attachment.htm>
More information about the bisq-github
mailing list