[bisq-network/bisq] Add 'placeoffer' method (#4574)

Stan notifications at github.com
Tue Sep 29 19:39:23 UTC 2020


New offer placement is moved out of `createoffer` into a separate  method, to give users a chance to review new offer details before broadcasting it.  

When `createoffer` is called, the new offer is cached in `CoreOffersService` for 5 minutes, and details are displayed in the CLI console.  The user can broadcast the cached offer by calling `placeoffer offer-id security-deposit`. The security-deposit parameter is a % as double, e.g., 0.15.


PRs https://github.com/bisq-network/bisq/pull/4554 and https://github.com/bisq-network/bisq/pull/4559 need to be review/merged before this one.

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4574

-- Commit Summary --

  * Replace hardcoded version with Version.java value
  * Remove comment
  * Move test dispute agent type constants to core
  * Fix indentation
  * Add simple create payment acct test
  * Remove final modifiers
  * Don't use static boilerplate helpers if not necessary
  * Remove comment
  * Add get default payment acct helper
  * Stub out createoffer method in CLI
  * Change API's createoffer return value from bool to Offer
  * Add API CreateOfferTest case
  * Fix imports
  * Fix unnecessary use of fully qualified name
  * Add options helper for handling negative number CLI params
  * Add license comment
  * Add license comment and btc-string to satoshi converter
  * Print createoffer's reply in the CLI's console
  * Add comment to empty catch block for codacy
  * Uppercase direction & ccy-code CLI arguments in core
  * Change 'createoffer' argument order
  * Scale & convert (double) fixed price input to long
  * Move 'createoffer' price arg transform to server & test it
  * Push currencyCode.toUpperCase conversion below CoreApi
  * Convert mktPriceMargin to %, make createAndPlaceOffer private
  * Minor createoffer test changes
  * Do not reassign currencyCode parameter
  * Delete trailing spaces from blank line for codacy
  * Add simple mkt-price service & test calculated offer prices
  * Fix abs(dbl) comparison
  * Remove unused import
  * Add license comment
  * Tidy up create offer using mkt price margin % test
  * Redefine DisputeAgentType REFUNDAGENT as REFUND_AGENT
  * Fix asserts
  * Factor out duplicated OfferInfo wrapping
  * Fix 'switch statements should have a default label' codacy problem
  * Revert "Fix 'switch statements should have a default label' codacy problem"
  * Codacy requires default label in switch
  * Fix tx result handling in GrpcOffersService
  * Fix BitcoinCli wrapper create bug
  * Throw exception to CLI if attempted offer placement fails
  * Make task handler's error msg CLI friendly (needs review)
  * Check for null
  * Create 'placeoffer' method

-- File Changes --

    M apitest/scripts/mainnet-test.sh (6)
    A apitest/scripts/version-parser.bash (5)
    M apitest/src/test/java/bisq/apitest/ApiTestCase.java (1)
    A apitest/src/test/java/bisq/apitest/method/CreatePaymentAccountTest.java (98)
    M apitest/src/test/java/bisq/apitest/method/MethodTest.java (70)
    M apitest/src/test/java/bisq/apitest/method/RegisterDisputeAgentsTest.java (15)
    A apitest/src/test/java/bisq/apitest/method/offer/AbstractCreateOfferTest.java (121)
    A apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingFixedPriceTest.java (174)
    A apitest/src/test/java/bisq/apitest/method/offer/CreateOfferUsingMarketPriceMarginTest.java (307)
    A apitest/src/test/java/bisq/apitest/method/offer/ValidateCreateOfferTest.java (64)
    M cli/src/main/java/bisq/cli/CliMain.java (114)
    M cli/src/main/java/bisq/cli/CurrencyFormat.java (30)
    M cli/src/main/java/bisq/cli/GrpcStubs.java (3)
    A cli/src/main/java/bisq/cli/NegativeNumberOptions.java (81)
    M cli/src/main/java/bisq/cli/TableFormat.java (17)
    M common/src/main/java/bisq/common/taskrunner/Task.java (6)
    M core/src/main/java/bisq/core/api/CoreApi.java (86)
    M core/src/main/java/bisq/core/api/CoreDisputeAgentsService.java (57)
    M core/src/main/java/bisq/core/api/CoreOffersService.java (188)
    M core/src/main/java/bisq/core/api/CorePaymentAccountsService.java (2)
    A core/src/main/java/bisq/core/api/CorePriceService.java (55)
    M core/src/main/java/bisq/core/support/dispute/agent/DisputeAgent.java (12)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java (113)
    A daemon/src/main/java/bisq/daemon/grpc/GrpcPriceService.java (58)
    M daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java (7)
    M proto/src/main/proto/grpc.proto (33)

-- Patch Links --

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


More information about the bisq-github mailing list