[bisq-network/bisq] Support paying trade fees in bsq or btc in api (#4802)

Stan notifications at github.com
Fri Nov 13 20:44:49 CET 2020


- Add optional `makerFeeCurrencyCode` argument to CLI's `createoffer`.

- Add optional `takerFeeCurrencyCode` argument to CLI's `takeoffer`.

- Add `isCurrencyForMakerFeeBtc` field to `OfferInfo` proto wrapper.

- Pass fee currency argument down to `CoreOffersService` & `CoreTradesService's` create & take offer methods.
  
- Add `maybeSetFeePaymentCurrencyPreference` method to `OfferUtil` to conditionally set the `payFeeInBtc` preference before creating or taking an offer.

- Adjust tests to assert create & take offer fee currencies are correct.

This is the 10th in a chain of PRs beginning with https://github.com/bisq-network/bisq/pull/4793.  

PR https://github.com/bisq-network/bisq/pull/4801 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/4802

-- Commit Summary --

  * Define new grpc bsq/btc balances protos
  * Add proto wrappers for serving bsq, btc or all balances
  * Define proto for api method 'getunusedbsqaddress'
  * Define proto fapi method 'sendbsq'
  * Add proto fields to support trade fee currency choice
  * Implement and test api method 'getunusedbsqaddress'
  * Add teardown to test case
  * Remove trailing spaces in blank line
  * Implement and test new getbalance(s) api methods
  * Resolve unnecessary use of fully qualified name for codacy
  * Stub out api method 'sendbsq' in core
  * Re comment sendbsq tests so travis ci does not fail
  * Refactor desktop's BsqSendView, share with api
  * Resolve 'Avoid creating BigDecimal with a decimal' issue for codacy
  * Support paying trade fees in bsq or btc (api)

-- File Changes --

    M apitest/docs/build-run.md (2)
    M apitest/src/test/java/bisq/apitest/method/MethodTest.java (70)
    M apitest/src/test/java/bisq/apitest/method/offer/AbstractOfferTest.java (24)
    M apitest/src/test/java/bisq/apitest/method/offer/CancelOfferTest.java (1)
    M apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingFixedPriceTest.java (11)
    M apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingMarketPriceMarginTest.java (14)
    M apitest/src/test/java/bisq/apitest/method/offer/ValidateCreateOfferTest.java (1)
    M apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java (20)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java (13)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java (13)
    A apitest/src/test/java/bisq/apitest/method/wallet/BsqWalletTest.java (244)
    A apitest/src/test/java/bisq/apitest/method/wallet/BtcWalletTest.java (102)
    R apitest/src/test/java/bisq/apitest/method/wallet/GetBalanceTest.java (7)
    A apitest/src/test/java/bisq/apitest/method/wallet/WalletBalancesTest.java (79)
    R apitest/src/test/java/bisq/apitest/method/wallet/WalletProtectionTest.java (6)
    M apitest/src/test/java/bisq/apitest/scenario/WalletTest.java (60)
    M cli/src/main/java/bisq/cli/CliMain.java (97)
    M cli/src/main/java/bisq/cli/ColumnHeaderConstants.java (13)
    M cli/src/main/java/bisq/cli/CurrencyFormat.java (9)
    M cli/src/main/java/bisq/cli/TableFormat.java (76)
    M core/src/main/java/bisq/core/api/CoreApi.java (29)
    M core/src/main/java/bisq/core/api/CoreOffersService.java (8)
    M core/src/main/java/bisq/core/api/CoreTradesService.java (8)
    M core/src/main/java/bisq/core/api/CoreWalletsService.java (115)
    A core/src/main/java/bisq/core/api/model/BalancesInfo.java (42)
    A core/src/main/java/bisq/core/api/model/BsqBalanceInfo.java (87)
    A core/src/main/java/bisq/core/api/model/BtcBalanceInfo.java (70)
    M core/src/main/java/bisq/core/api/model/OfferInfo.java (10)
    A core/src/main/java/bisq/core/btc/model/BsqTransferModel.java (77)
    A core/src/main/java/bisq/core/btc/wallet/BsqTransferService.java (59)
    M core/src/main/java/bisq/core/offer/OfferUtil.java (18)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (1)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java (1)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java (121)
    M desktop/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.java (41)
    M proto/src/main/proto/grpc.proto (84)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4802.patch
https://github.com/bisq-network/bisq/pull/4802.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/4802
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201113/df6c0c35/attachment.html>


More information about the bisq-github mailing list