[bisq-network/bisq] Add api method 'getpaymentacctform' (#4819)

Stan notifications at github.com
Wed Nov 18 20:47:08 CET 2020


Takes a paymentMethodId, and returns a new payment account form as a json String to the CLI, which persists the json string to file in the CLI user's current working directory.  The user will edit the json file and pass it as an argument to api method `createpaymentacct`.

- Added new `common.util.ReflectionUtils`, to help with json acct form serialization/de-serialization.  

- Added convenience `isCountryBasedPaymentAccount` method to `abstract PaymentAccount` to help with json acct form serialization/de-serialization.

- Added new (gson) `core.api.model.PaymentAccountTypeAdapter`.

- Added new `core.api.model.PaymentAccountForm`.  This class uses the gson `PaymentAccountTypeAdapter` to generate editable json forms for `PaymentAccount` sub-types, and instantiate `PaymentAccount` instances from edited json forms.

- Added gRPC service `GetPaymentAccountForm`.

- Added gRPC boilerplate method to `GrpcPaymentAccountsService`.

- Added implimentation to `CoreApi` -> `CorePaymentAccountsService`.

- Added api method to CLI.  

- Added api tests.


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

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

-- 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)
  * Delete deprecated api test, adjust api build/run doc
  * Refactor api getbalance methods.
  * Fix typo
  * Remove unnecessary fully qualified name
  * Remove unused imports
  * Add api method 'getpaymentmethods'
  * Avoid codacy issue over use of fully qualified name
  * Revert "Avoid codacy issue over use of fully qualified name"
  * Print the payment method id (only)
  * Avoid codacy issue over use of fully qualified name
  * Make codacy happy again
  * Add ReflectionUtils to common.util pkg
  * Add new (gson) PaymentAccountTypeAdapter to core.api.model
  * Add isCountryBasedPaymentAccount to abstract PaymentAccount
  * Add new PaymentAccountForm to core.api.model
  * Add boilerplate for new 'getpaymentacctform' api method
  * Add new api method 'getpaymentacctform' to CLI
  * Test new api method 'getpaymentacctform'
  * Ensure EXPECTED_FORM.clear() is never skipped

-- File Changes --

    M apitest/docs/build-run.md (2)
    D apitest/src/test/java/bisq/apitest/method/CreatePaymentAccountTest.java (99)
    D apitest/src/test/java/bisq/apitest/method/GetBalanceTest.java (73)
    M apitest/src/test/java/bisq/apitest/method/MethodTest.java (95)
    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)
    A apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java (141)
    A apitest/src/test/java/bisq/apitest/method/payment/CreatePaymentAccountTest.java (307)
    A apitest/src/test/java/bisq/apitest/method/payment/GetPaymentMethodsTest.java (53)
    M apitest/src/test/java/bisq/apitest/method/trade/AbstractTradeTest.java (20)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeBuyBTCOfferTest.java (18)
    M apitest/src/test/java/bisq/apitest/method/trade/TakeSellBTCOfferTest.java (18)
    A apitest/src/test/java/bisq/apitest/method/wallet/BsqWalletTest.java (244)
    A apitest/src/test/java/bisq/apitest/method/wallet/BtcWalletTest.java (107)
    R apitest/src/test/java/bisq/apitest/method/wallet/WalletProtectionTest.java (22)
    D apitest/src/test/java/bisq/apitest/scenario/FundWalletScenarioTest.java (76)
    A apitest/src/test/java/bisq/apitest/scenario/PaymentAccountTest.java (66)
    M apitest/src/test/java/bisq/apitest/scenario/StartupTest.java (8)
    M apitest/src/test/java/bisq/apitest/scenario/WalletTest.java (50)
    M cli/src/main/java/bisq/cli/CliMain.java (134)
    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)
    A common/src/main/java/bisq/common/util/ReflectionUtils.java (108)
    M core/src/main/java/bisq/core/api/CoreApi.java (27)
    M core/src/main/java/bisq/core/api/CoreOffersService.java (8)
    M core/src/main/java/bisq/core/api/CorePaymentAccountsService.java (25)
    M core/src/main/java/bisq/core/api/CoreTradesService.java (8)
    M core/src/main/java/bisq/core/api/CoreWalletsService.java (133)
    A core/src/main/java/bisq/core/api/model/BalancesInfo.java (45)
    A core/src/main/java/bisq/core/api/model/BsqBalanceInfo.java (94)
    A core/src/main/java/bisq/core/api/model/BtcBalanceInfo.java (75)
    M core/src/main/java/bisq/core/api/model/OfferInfo.java (10)
    A core/src/main/java/bisq/core/api/model/PaymentAccountForm.java (216)
    A core/src/main/java/bisq/core/api/model/PaymentAccountTypeAdapter.java (329)
    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 core/src/main/java/bisq/core/payment/PaymentAccount.java (4)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (1)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java (28)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcTradesService.java (1)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java (75)
    M desktop/src/main/java/bisq/desktop/main/dao/wallet/send/BsqSendView.java (41)
    M proto/src/main/proto/grpc.proto (88)

-- Patch Links --

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


More information about the bisq-github mailing list