Skip to content
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

[WIP (redo after atomic-tx merge)] Create XMR <-> BTC offers via API #5690

Closed
wants to merge 28 commits into from

Conversation

ghubstan
Copy link
Contributor

  • Adjusted gRPC CLI related classes to support creating XMR <-> BTC Offers.
  • Added XMR <-> BTC Offer test cases + minor apitest case refactoring.
  • Updated CLI's createoffer help text.

Note: Intellij improved its auto code formatting, resulting in some indentation changes in some of this PRs commits.

This is the 3rd in a series of PRs starting with #5685.
#5687 should be reviewed & merged before this one.

Some i18n property values can be used by the API if long strings are
wrapped before written as commments to json payment account forms, or
written to the CLI console.

This change anticipates the addition of the more complex Swift payment
method (PR 5672). PR 5672's i18n property value for key "payment.swift.info"
will be wrapped and appended to the comments of the Swift payment account's
json form.
Several payment methods support multiple trade currencies and a selected
trade currency, but the api's payment account creation has not let CLI
users specify them in the json form passed to the `createpaymentacct`
command.

This change adds `tradeCurrencies` and `selectedTradeCurrency` fields
to the appropriate json forms.
Define and verify trade currencies and selected trade currency values
in appropriate api test cases, and add test cases for new payment methods.
Method was added on the false assumption `PaymentAccount#hasMultipleCurrencies()`
would not always return a correct value when a `PaymentAccount` instance is created
via reflection.  But `hasMultipleCurrencies()` will work as long as appropriate
PaymentAccount subclasses continue setting their `tradeCurrencies` fields within
their default constructors.
So we can see all fields (especially address) -- not always shown
by annotation generated toString.
Note that newest Intellij code auto-formatter has improved indentation
of method parameters on separate lines.
As usual, method pkg tests are disabled to reduce gradle apitest case
runtimes.  Method pkg tests are run from bisq.apitest.scenario test cases
to reduce # of time test harness setup/shutdown is run.
@ghubstan ghubstan changed the title Create XMR <-> BTC offers via API [WIP] Create XMR <-> BTC offers via API Sep 12, 2021
@ghubstan ghubstan marked this pull request as draft September 12, 2021 16:03
@ghubstan
Copy link
Contributor Author

Additional work required to support margin based price offers (not just fixed price offers, like BSQ).

@ghubstan ghubstan changed the title [WIP] Create XMR <-> BTC offers via API Create XMR <-> BTC offers via API Sep 12, 2021
@ghubstan ghubstan marked this pull request as ready for review September 12, 2021 17:44
@ghubstan ghubstan changed the title Create XMR <-> BTC offers via API [WIP] Create XMR <-> BTC offers via API Sep 13, 2021
@ghubstan
Copy link
Contributor Author

Need to hold off on review until XMR editoffer [--trigger-price] bugs are fixed.

@ghubstan ghubstan marked this pull request as draft September 13, 2021 21:40
@ghubstan ghubstan changed the title [WIP] Create XMR <-> BTC offers via API Create XMR <-> BTC offers via API Sep 14, 2021
@ghubstan ghubstan marked this pull request as ready for review September 14, 2021 12:49
@ghubstan ghubstan marked this pull request as draft October 20, 2021 15:42
@ghubstan ghubstan changed the title Create XMR <-> BTC offers via API [WIP (redo after atomic-tx merge)] Create XMR <-> BTC offers via API Oct 20, 2021
@ghubstan ghubstan closed this Nov 4, 2021
@ghubstan ghubstan deleted the 3-create-xmr-offers branch February 1, 2022 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants