Commit Graph

251 Commits

Author SHA1 Message Date
ghubstan
d902e77710
Add Bisq license banners 2022-01-25 11:44:42 -03:00
ghubstan
89c4ab3c61
Use toTradeFeeBtc, not toTradeFeeBsq 2022-01-23 17:13:52 -03:00
ghubstan
fdd91a8293
Fix displayed bsq-swap's optional trade & tx fees 2022-01-23 17:06:48 -03:00
ghubstan
2a3a2988ec
Fix maker/taker fee column headers & value func defs 2022-01-20 16:57:45 -03:00
ghubstan
b10cb119f2
Display trade.txFee for BSQ swap trades 2022-01-20 15:54:50 -03:00
ghubstan
3cd1e05a9f
Try to display accurate status of closed trades, or "Pending" if still open 2022-01-18 13:01:42 -03:00
ghubstan
ffa31b0af7
Support gRPC gettrades call in CLI 2022-01-16 16:51:28 -03:00
ghubstan
4c7ae49e18
Format gettrades CLI outout 2022-01-16 16:48:58 -03:00
ghubstan
7690ffd953
Add API methods 'failtrade', 'unfailtrade'
Prerequisite for next PR: Add API method 'gettrades'

The `gettrades` method will show 'open', 'closed', and 'failed' trades.
Users already needed to be able to fail and unfail trades for the
same reasons they do in the UI.  API test cases will need to be able to
fail and unfail trades to check correct behavior of 'gettrades' method.

Based on branch `rename-keepfunds2closetrade`.
2022-01-07 19:11:34 -03:00
ghubstan
a9aaba87fa
Rename API method keepfunds -> closetrade
Trade proceeds and deposits have already been transfered to Bisq wallets
before the `keepfunds` command is (was) executed;  `keepfunds` merely moves
open trades to closed trades lists and persistence files.  Renaming `keepfunds`
as `closetrade` makes its purpose clear to API users.

The commit modifies only method names and comments in api server+cli classes,
apitest cases, and api trade simulation scripts.

Based on `master`
2022-01-05 12:10:46 -03:00
ghubstan
cb4df2b1c3
Rename CLI opt '--payment-account' -> '--payment-account-id'
Adjust related docs and scripts.
2021-12-27 13:10:16 -03:00
ghubstan
5f571cccca
Deprecate API 'getmyoffer'
The method 'getoffer' should support looking up a user's open-offers, and other users' available offers.

- Adjust api-beta-test-guide.md to use only 'getoffer'.
- Adjust trade simulation scripts to use only 'getoffer'.
- Adjust api testcases to use 'getoffer' in place of 'getmyoffer'.
- Mark appropriate methods and protobuf msgs as deprecated.
2021-12-27 12:05:17 -03:00
ghubstan
98b41cb56c
Use string in BigDecimal ctor, and make codacy happy too 2021-12-03 13:33:20 -03:00
ghubstan
0f32fe2fc3
Merge branch '5-api-bsqswap-simulation-n-docs-update' into 6-api-xmr-trading 2021-12-03 13:16:26 -03:00
ghubstan
f195b76637
Tell user bsqswap offer cannot be edited, but can be canceled at no charge
Resolves issue described in https://github.com/bisq-network/bisq/pull/5876#pullrequestreview-822692137
2021-12-03 12:47:03 -03:00
ghubstan
65fb8e8225
Add CliMain.main(args) tests
There are no asserts, but helpful for looking at affects of CLI commands
from terminal because apitest cases use gRPC service stubs instead of terminal.
2021-12-02 19:17:03 -03:00
ghubstan
a45c5fa61f
Adjust CLI opts parsers & opt parsing test for XMR support 2021-12-02 19:09:54 -03:00
ghubstan
03b57916a5
Make altcoin offer sorting method names more generic 2021-12-02 19:07:49 -03:00
ghubstan
54f815eb4f
Adjust API cli-side CryptoCurrencyUtil & OffersServiceRequest for XMR support 2021-12-02 19:04:28 -03:00
ghubstan
b1dd20572c
Allow unrecognized options in OfferIdOptionParser where appropriate
The OfferIdOptionParser superclass reduces duplication for parsing
offer-id parameters, but it needs to let subclass parsers' other
options pass validation.
2021-11-29 12:30:13 -03:00
ghubstan
66115f3d81
Revert "There is no --swap opt in editoffer command"
This reverts commit b5981b5b71.

This was a mistake.  There is a swap opt in the createoffer command.
2021-11-28 14:56:57 -03:00
ghubstan
b5981b5b71
There is no --swap opt in editoffer command
BSQ swap offers cannot be edited
2021-11-27 14:17:52 -03:00
ghubstan
b95e4b37b6
Block attempts to edit BsqSwap offers from CLI 2021-11-27 14:01:38 -03:00
ghubstan
05d1916ae9
Fix help text typo 2021-11-26 10:54:28 -03:00
ghubstan
0aa0852407
Add CLI createoffer smoketest (for bsq swaps)
NEVER RUN ON MAINNET!
2021-11-25 18:21:06 -03:00
ghubstan
132ecc9ac3
Adjust CliMain's createoffer for BSQ swaps 2021-11-25 18:20:04 -03:00
ghubstan
eff10842b9
Tighten createoffer param validation (only bsq swaps supported) 2021-11-25 17:31:54 -03:00
ghubstan
35aeb61338
Adjust createoffer opt parser for bsq swaps 2021-11-25 17:10:19 -03:00
ghubstan
b1c872c515
Adjust createoffer opt parser/test for bsq swaps 2021-11-25 17:08:07 -03:00
ghubstan
3077be54f0
Remove API createoffer's paymentAcctId request param (BSQ swap) 2021-11-25 16:12:05 -03:00
ghubstan
0c5c343fe0
Adjust CLI to support getting/taking BSQ swaps
Also refactored some of the opt parsers.
2021-11-24 13:10:34 -03:00
ghubstan
d8f1e446ea
Try to hide from pesky codacy 2021-11-14 14:30:41 -03:00
ghubstan
4ca878a8e1
Adjust API 'gettrade' for Bsq swaps
- Made several adjustments to CLI's 'gettrade' output related code
  so it can show single trade details for either Bisq v1 trades, or
  BSQ swap trades.

- Did minor refactoring of API's core to retrieve # tx confirmations
  for an addresses and transactions.

- Show # of tx confirmations in bsq swap trade detail.
2021-11-14 13:48:12 -03:00
ghubstan
fc53ca48c1
Add CLI output IntegerColumn 2021-11-14 13:40:59 -03:00
ghubstan
564303ac20
Normalize API gRPC bsq-swap related protos & wrappers
This commit refactors the first cut of the BsqSwapTradeInfo and
TradeInfo gRPC proto defs and wrappers.  The change avoids duplication
of fields between BsqSwapTradeInfo and TradeInfo, and adds a
bsqSwapTradeInfo field to the old TradeInfo proto & wrapper.

The immediate goal is moving towards getting the API's 'gettrade'
method to work for both Bisq v1 trades and BSQ swap trades:  the TradeInfo
proto sent to the CLI should represent either a Bisq v1 trade or a BSQ
swap trade.  A mid-term term goal is to also make a new 'gettrades' method
return a List<TradeInfo> to the CLI, where items in the List<TradeInfo>
can be either v1 trades or bsq-swap trades.
2021-11-12 18:48:35 -03:00
ghubstan
16be35790b
Paritally adjust bsq-swap-offer related gRPC CLI side classes
- Adjust to removal of BsqSwapOfferInfo proto, use ammended OfferInfo instead.

- Remove currency-code param from all get(My)BsqSwapOffer(s) requests.

- Add new OfferCategory getAvailableOfferCategory(String offerId) service.
  CLI uses this to determine which kind of gRPC request object should be
  sent with a 'takeoffer' request.

- Adjust GetOffersSmokeTest to help see offer/swap-offer CLI output.
2021-11-11 13:20:58 -03:00
ghubstan
3f61375622
Remove white space 2021-11-07 14:19:38 -03:00
ghubstan
eb57b7e75e
Merge branch '01-use-default-bsq-swap-acct' into 02-cli-console-formatting-api 2021-11-07 14:04:13 -03:00
ghubstan
1d403e7a42
Add CLI test dependency to check console output diffs, and tests 2021-11-07 14:01:36 -03:00
ghubstan
0341104823
Adjust CLI classes to new console output api 2021-11-07 13:59:58 -03:00
ghubstan
08d16e6040
Deprecate old CLI console output formatters
A minor refactoring of some deprecated classes is included.
2021-11-07 13:51:27 -03:00
ghubstan
19436c3e2f
Add new bisq.cli.table classes 2021-11-07 13:47:32 -03:00
ghubstan
edd01418ca
Remove fields/methods/logic for creating redundant bsq-swap accounts
The user's default bsq-swap account is used instead.
2021-11-07 10:36:40 -03:00
ghubstan
eb234bf93a
Remove apitest's create bsq-swap account method
If not present, a default BSQ swap account is saved when a User object
is initialized.  Use the existing default account in API bsq-swap test
cases, and rename the legacy BSQ payment account fixtures to distinguish
them from the new default 'BSQ Swap' payment account.
2021-11-05 13:59:41 -03:00
chimp1984
1c1b2802cc
Apply codacy review suggestions 2021-11-02 16:18:50 +01:00
chimp1984
f7fcaa915e
Add BSQ swap code 2021-11-02 16:18:50 +01:00
chimp1984
54f17b00af
Cleanups 2021-10-21 17:44:48 +02:00
chimp1984
611b944609
Move protobuf OfferPayload.Direction to OfferDirection 2021-10-21 15:40:25 +02:00
ghubstan
55cb126e4f
Show trade.price in margin based altcoin 'gettrade' console output
Fixes problem simlar to other CLI output changes in this PR.
CLI's 'gettrade' output should show contracted trade.price instead of
moving offer.price value for price margin based altcoin offers.

This fixed bug did not affect any fiat or BSQ trades, only price margin
based XMR trades, and API support for XMR trading has not yet been
released.
2021-09-18 13:40:55 -03:00
ghubstan
542aa774b0
Fix typo in help text 2021-09-18 12:40:58 -03:00