- 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.
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.
- 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.
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.
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.
This is a bug fix for the CLI's displayed altcoin trade amount
value, which should be trade.volume, not offer.volume. It has been
hidden by the stability of the BSQ price, and exposed while testing
API support for XMR trades.
This is a bug fix for the CLI's displayed fiat trade cost
value, which should be trade.volume, not offer.volume. Offer volume
varies with BTC volatility, and the CLI should be showing the trade.volume
value instead, frozen when the contract is made.
A newly created offer has no OpenOffer+State (AVAILABLE || DEACTIVATED)
when displayed in the CLI's console. This change adds a 'bool isMyPendingOffer'
to the OfferInfo proto + wrapper, and the CLI's console offer output formatter
uses it to determine if it should display a new offer's Enabled column value
as PENDING, instead of an ambiguous NO value.
- Finished API server's verify bsq payment impl.
- Added verifybsqsenttoaddress method to CLI.
- Added verifybsqsenttoaddress-help.txt to server.
- Fixed client getoffers, getmyoffers to work with BSQ offers.
- Added bool tradeInstant field to proto message def.
- Adjusted core createcryptopaymentacct impl to new tradeInstant request param.
- Adjusted cli side createcryptopaymentacct impl to new tradeInstant request param.
- Fixed CliMain's takeoffer help text (was missing the --payment-account opt).
This change adds offer and trade contract detail to the API's Offer
and Trade protos, and improves CLI output formatting.
- Appended missing fields to OfferInfo proto message:
uint64 sellerSecurityDeposit = 20;
string offerFeePaymentTxId = 21;
uint64 txFee = 22;
uint64 makerFee = 23;
- Added new api proto messages ContractInfo and PaymentAccountPayloadInfo.
Lighterweight protos are needed because core Trade/Contract classes are
not visible to CLI.
- Appended ContractInfo field to api proto message TradeInfo.
- Added proto / model converters for ContractInfo and PaymentAccountPayloadInfo,
and adjusted OfferInfo & TradeInfo.
- Improved CLI output formatting. Added more trade detail to CLI's gettrade output,
and prepared to support BTC/BSQ trading pair. Note a reviewer is advised to
look at the CLI outout formatting class files instead getting bogged down in the
many commit changes.
This change supports creation of BSQ BLOCKCHAIN payment method accounts.
- Added proto message defs to grpc.proto.
- Added grpc server boilerplate to GrpcPaymentAccountsService.
- Added server impl to CoreApi, CorePaymentAccountsService.
- Added createcryptopaymentacct-help.txt.
- Added CLI side support for new api method.
- Added opt parsing unit tests to OptionParsersTest.
This is the 1st PR in a series, with the goal of supporting the BTC/BSQ trading
pair. Support for other crypto currency payment accounts will be added later.
This change uses recently added walletService.isAddressUnused to ensure
the api's CoreWalletsService creates an unused address if none exists.
- grpc.proto: Add bool isAddressUnused field to message AddressBalanceInfo.
- AddressBalanceInfo: Adjust AddressBalanceInfo proto wrapper.
- CoreWalletsService: Use walletService.isAddressUnused in getFundingAddresses.
- GrpcClient: Adjust to modified AddressBalanceInfo.
- TableFormat, ColumnHeaderConstants: Add 'Is Used' column to getfundingaddresses output.
Note: bugfix is out of scope for this PR, but the test case helped expose this bug.