Commit graph

13168 commits

Author SHA1 Message Date
ghubstan
187a85f95b
Fix typo 2020-11-14 13:19:24 -03:00
ghubstan
7e9ab22d65
Refactor api getbalance methods.
This change fixes the recently bloated wallet balances api.  Now there
is one CLI getbalance [bsq|btc] method that calls a getbalances(currency-code)
on the server.  The server returns full wallet balance information for
BSQ, BTC, or both if the CLI's currency argument is absent.

- grpc.proto:  Reduced number of getbalance(s) proto services from
  four to one.

- GrpcWalletsService:  Reduced number of getbalance(s) gRPC service
  boilerplate methods from four to one.

- CoreApi, CoreWalletsService:  Reduced number of getbalance(s) gRPC
  service implementation methods from four to one.

- CliMain:  Reduced number of getbalance(s) commands from four to one.

- BalancesInfo: Changed BsqBalanceInfo & BtcBalanceInfo field names
  to bsq and btc, respectively, to make calling their accessors
  more readable, less verbose.

- BtcBalanceInfo, BsqBalanceInfo: Defined static final EMPTY instances
  as place holders in a BalancesInfo returned by the gRPC server, when
  one or the other balance types is not requested.  Would be nice
  to serve Optional.empty() instead, but protobuf does not support
  it or null.

- Adjusted affected api tests and build doc.
2020-11-14 13:08:10 -03:00
sqrrm
627e0671b6
Merge pull request #4792 from ripcurlx/update-data-stores-for-v1.5.0
Update data stores for v1.5.0
2020-11-14 12:56:23 +01:00
ghubstan
8157f8fc4e
Delete deprecated api test, adjust api build/run doc 2020-11-13 16:57:18 -03:00
ghubstan
722460e7e5
Support paying trade fees in bsq or btc (api)
- Add optional makerFeeCurrencyCode argument to CLI's 'createoffer'.

- Add optional takerFeeCurrencyCode argument to CLI's 'takeoffer'.

- Add isCurrencyForMakerFeeBtc field to OfferInfo proto wrapper.

- Pass fee currency argument down to CoreOffersService and CoreTradesService's
  create and take offer methods.

- Add maybeSetFeePaymentCurrencyPreference method to OfferUtil to
  conditionally set the 'payFeeInBtc' preference before creating
  or taking an offer.

- Adjust affected tests.
2020-11-13 16:36:06 -03:00
chimp1984
a64c11ebe4
Add additional guards to ensure that the shut down routine is not called multiple times
(which can happen in rare cases) and add guards that we never create multiple instances
for a given file as well not call initialize or other API methods after shutdown was started.
2020-11-13 14:08:01 -05:00
ghubstan
4a90b4008a
Resolve 'Avoid creating BigDecimal with a decimal' issue for codacy 2020-11-13 15:52:30 -03:00
ghubstan
446bd328d8
Refactor desktop's BsqSendView, share with api
Moved just enough code out of BsqSendView to avoid desktop/api
'sendbsq' duplication, at the cost of adding 1 new method to
BsqSendView.

- Created new BsqTransferModel to hold tx details shared by desktop and api.

- Created new BsqTransferService to send bsq using a BsqTransferModel shared
  by desktop and api.

- Uncommented CoreWalletsService#sendBsq implementation.

- Uncommented sendbsq tests.
2020-11-13 15:34:18 -03:00
ghubstan
dc3274ff5f
Re comment sendbsq tests so travis ci does not fail 2020-11-13 14:59:31 -03:00
ghubstan
0d3b3a6ead
Stub out api method 'sendbsq' in core
All the boilerplate for this method is included in this change, but
the implementation in CoreWalletsService#sendBsq is commented out
until the needed logic to send bsq is refactored out of desktop's
BsqSendView class -- to be included in the next PR.

- Added new method to CLI.

- Added the gRPC server boilerplate.

- Added the core implementation, commented out.

- Enabled tests.
2020-11-13 14:57:28 -03:00
ghubstan
7f0f949a2d
Resolve unnecessary use of fully qualified name for codacy 2020-11-13 14:35:26 -03:00
ghubstan
208a37b339
Implement and test new getbalance(s) api methods
- Added three new methods to CLI:

      getbalances   ...	returns complete bsq and btc balance info
      getbsqbalance ...	returns complete bsq balance info
      getbtcbalance ...	returns complete btc balance info

      The old getbalance method is deprecated and will be removed
      if there is agreement to do that.

- Made the needed changes in the CLI's output formatting classes.

- Added new tests to existing BsqWalletTest, added new BtcWalletTest
  and WalletBalancesTest.

- Added disabled tests for funding a bsq wallet (todo in next PR).
2020-11-13 14:21:26 -03:00
ghubstan
8dc1a74c8b
Remove trailing spaces in blank line 2020-11-13 12:55:48 -03:00
ghubstan
7c2068e3c1
Add teardown to test case 2020-11-13 12:45:40 -03:00
ghubstan
c1c099c832
Implement and test api method 'getunusedbsqaddress'
- Added new method to CLI, split some long msg strings into two lines,
  and added a white space after a braceless else statement.

- Added the gRPC server boilerplate.

- Added the core implementation.

- Added a test, and moved method wallet tests into their own package.
2020-11-13 12:40:16 -03:00
ghubstan
9f033ee572
Add proto fields to support trade fee currency choice
This change adds proto support for paying maker fees in bsq or btc.
The implementation will come in a future PR.

- Added makerFeeCurrencyCode field to CreateOfferRequest proto.

- Added isCurrencyForMakerFeeBtc field to OfferInfo proto wrapper.

- Add takerFeeCurrencyCode field to TakeOfferRequest proto.
2020-11-13 12:03:15 -03:00
ghubstan
3e98910cc6
Define proto fapi method 'sendbsq'
This change adds the proto to support a future api implementation for
transfering bsq.
2020-11-13 11:44:42 -03:00
ghubstan
4c03b463fe
Define proto for api method 'getunusedbsqaddress'
This change adds a proto to support a future api implementation for
getting an unused, bsq funding address.
2020-11-13 11:35:06 -03:00
ghubstan
faf45ec301
Add proto wrappers for serving bsq, btc or all balances
This change adds proto wrappers for sending bsq, btc, or all balances
to the CLI.  They will be used in future api method implementations:
getbsqbalance, getbtcbalance and getbalances.
2020-11-13 11:24:08 -03:00
ghubstan
fc8af8c072
Define new grpc bsq/btc balances protos
This change adds proto serivces and messages to support new api
implementations for serving bsq, btc or all wallet balances.

- RPC GetBsqBalances will return complete BSQ balance info.
- Message BsqBalanceInfo is proto returned by rpc GetBsqBalances.

- RPC GetBtcBalances wil return complete BTC balance info.
- Message BtcBalanceInfo is proto returned by rpc GetBtcBalances.

- RPC GetBalances returns complete BTC and BSQ balance info.
- Message BalancesInfo is proto returned by rpc GetBalances.

RPC GetBalance remains unchnaged, still returns only the available
BTC balance.  It may be deprecated and removed in a future PR.
2020-11-13 11:01:02 -03:00
Christoph Atteneder
61c8d55a6f
Merge pull request #4791 from wiz/remove-legacy-bsq-explorers
Remove legacy BSQ explorers
2020-11-13 14:07:02 +01:00
wiz
fcf7de611a
Remove legacy BSQ explorers 2020-11-13 13:45:19 +01:00
wiz
2520901350
Temporarily disable wiz's monero explorer node
Will re-enable later after making a new monero node on a new server
2020-11-13 13:45:07 +01:00
Christoph Atteneder
c7c218e1d2
Merge pull request #4790 from wiz/disable-wiz-monero-explorer
Temporarily disable wiz's monero explorer node
2020-11-13 13:43:07 +01:00
wiz
5a08c8b7ba
Remove legacy BSQ explorers 2020-11-13 21:29:36 +09:00
wiz
c2baf3fa7d
Temporarily disable wiz's monero explorer node
Will re-enable later after making a new monero node on a new server
2020-11-13 21:03:30 +09:00
Christoph Atteneder
19432e4a1e
Update data stores for v1.5.0 2020-11-13 13:00:46 +01:00
Christoph Atteneder
3e5bf90bdd
Update release process to match new trade statistics delivery
Also did some minor release process cleanup that was overdue
2020-11-13 12:29:29 +01:00
Christoph Atteneder
37be138830
Update bitcoinj checkpoints for v1.5.0 2020-11-13 12:29:29 +01:00
Christoph Atteneder
b4a4f48f3a
Merge pull request #4786 from chimp1984/fix-historical-data-store-issue
Fix historical data store issue
2020-11-13 12:19:01 +01:00
Christoph Atteneder
4eb43d7975
Merge pull request #4788 from chimp1984/add-amazon-gift-cards
Add Amazon eGift Card payment method
2020-11-13 09:16:20 +01:00
chimp1984
a238c205ab
Add Amazon eGift Card payment method 2020-11-13 00:26:23 -05:00
chimp1984
ee5fca9532
Revert timeout changes and MAX_PERMITTED_MESSAGE_SIZE change 2020-11-12 16:01:30 -05:00
chimp1984
2b807769d4
Update commit hash to 7f83d1b3 2020-11-12 15:58:58 -05:00
chimp1984
8bc78c852b
Cleanup tor dir if all connections lost 2020-11-12 15:58:58 -05:00
chimp1984
2486bd512f
Shut down if more then 1 all connections lost events 2020-11-12 15:58:58 -05:00
chimp1984
1b7c1ce49a
Only reset numAllConnectionsLostEvents if we have nodes connected 2020-11-12 15:58:57 -05:00
chimp1984
6a2583d5fa
Decrease deviationTolerance for numAllConnectionsLostEvents 2020-11-12 15:58:57 -05:00
chimp1984
bb095d413c
Increase timout to 90 sec 2020-11-12 15:58:57 -05:00
chimp1984
69802e232d
Reduce timeout 2020-11-12 15:58:57 -05:00
chimp1984
86a2045284
Fix wrong kb display 2020-11-12 15:58:57 -05:00
chimp1984
04ab507783
Update COMMIT_HASH to 627888f0 2020-11-12 15:58:57 -05:00
chimp1984
5e4156910a
Add hasError util method
Reformattings, cleanups
2020-11-12 15:58:57 -05:00
chimp1984
1eca9dff4b
Use dash for empty filteredSeedNodes value 2020-11-12 15:58:57 -05:00
chimp1984
a0565425df
Add historical data for error msg
Rename 'Number of responses' to 'Number of requests'
Rename timeout err msg

@jmacxx: See comment at `getErrorMsgLine`... If you need those historical
error msg data in the json as well we need to refactor a bit more...
2020-11-12 15:58:57 -05:00
chimp1984
86a853bfb9
Set response time only in non error case 2020-11-12 15:58:56 -05:00
chimp1984
16880b2f6a
Change deviation limits for OfferPayload 2020-11-12 15:58:56 -05:00
chimp1984
33e378accd
Update COMMIT_HASH to fec8f6e3 2020-11-12 15:58:56 -05:00
chimp1984
a1c84741f3
Add comments, revert TTL change at AckMessage as it has no effect anyway 2020-11-12 15:58:56 -05:00
chimp1984
b002c93d78
Increase SOCKET_TIMEOUT to 6 min 2020-11-12 15:58:56 -05:00