Commit Graph

12953 Commits

Author SHA1 Message Date
ghubstan
138822edad
Avoid 'unnecessary use of fully qualified name' codacy issue 2020-11-18 20:05:15 -03:00
ghubstan
08228d07bc
Replace existing api method 'createpaymentacct' impl
In the CLI, this method now takes a single argument, the path to a json
file (a payment account form).  The json text is read from the file
and sent to the server, where it is serialized to a new PaymentAccount
instance, saved, and sent back to the CLI as a protobuf.PaymentAccount.

- Modified existing gRPC boilerplate in grpc.proto and GrpcPaymentAccountsService.

- Modified existing method signatures in CoreApi and CorePaymentAccountsService.

- Replaced existing method impl in CorePaymentAccountsService and
  removed dead code.

- Replaced the CLI's existing 'createpaymentacct' method impl.

- Modified existing tests.
2020-11-18 19:23:21 -03:00
ghubstan
35c1c4e944
Ensure EXPECTED_FORM.clear() is never skipped 2020-11-18 16:42:17 -03:00
ghubstan
fdb89a26d0
Test new api method 'getpaymentacctform' 2020-11-18 16:18:57 -03:00
ghubstan
dc227ec8cc
Add new api method 'getpaymentacctform' to CLI 2020-11-18 16:18:15 -03:00
ghubstan
8996fa1748
Add boilerplate for new 'getpaymentacctform' api method 2020-11-18 16:17:24 -03:00
ghubstan
32dd727a89
Add new PaymentAccountForm to core.api.model
This class uses the gson PaymentAccountTypeAdapter to generate editable
json forms for PaymentAccount sub-types, and instantiate PaymentAccount
instances from edited json forms.
2020-11-18 16:16:04 -03:00
ghubstan
1f84ad0fd1
Add isCountryBasedPaymentAccount to abstract PaymentAccount 2020-11-18 16:15:13 -03:00
ghubstan
c25debaf99
Add new (gson) PaymentAccountTypeAdapter to core.api.model
This class does most of the work of the api's (create) PaymentAccount
json form serialization/de-serialization.
2020-11-18 16:12:42 -03:00
ghubstan
32ed7ac406
Add ReflectionUtils to common.util pkg
This class will aid the api's (create) PaymentAccount json form
serialization/de-serialization.
2020-11-18 16:11:10 -03:00
ghubstan
7d0648afd0
Make codacy happy again 2020-11-18 13:10:39 -03:00
ghubstan
0e0af20900
Avoid codacy issue over use of fully qualified name
Changed the core getPaymentMethods() -> getFiatPaymentMethods() to avoid

"Unnecessary use of fully qualified name 'PaymentMethod.getPaymentMethods'
due to existing static import 'bisq.core.payment.payload.PaymentMethod.*'"
2020-11-18 12:58:58 -03:00
ghubstan
7a7d5ba0a7
Print the payment method id (only) 2020-11-18 12:53:36 -03:00
ghubstan
0046b08f9d
Revert "Avoid codacy issue over use of fully qualified name"
This reverts commit a46526198d.

The service side method name change is not correct.
2020-11-18 12:47:12 -03:00
ghubstan
a46526198d
Avoid codacy issue over use of fully qualified name
Had to change the getPaymentMethods() names to getPaymentMethodIds() to
avoid this codacy issue:

"Unnecessary use of fully qualified name 'PaymentMethod.getPaymentMethods'
due to existing static import 'bisq.core.payment.payload.PaymentMethod.*'"

If 'PaymentMethod.getPaymentMethods' was changed to 'getPaymentMethods',
a recursive loop would result, ending in an out of stack heap crash.

This renaming of the method on the server is correct, but the CLI's
'getpaymentmethods' name was not changed.
2020-11-18 12:29:59 -03:00
ghubstan
ec381522ff
Add api method 'getpaymentmethods'
Returns a list of supported payment method IDs.  This gives CLI users
the correct payment method id for creating a new payment account.

- Added gRPC service GetPaymentMethods to grpc.proto.

- Added gRPC boilerplate method to GrpcPaymentAccountsService.

- Added implimentation to CoreApi -> CorePaymentAccountsService.

- Refactored PaymentAccountTest hierarchy.

- Add api method to CLI.
2020-11-18 12:03:22 -03:00
ghubstan
530a9f95a4
Remove unused imports 2020-11-14 13:34:59 -03:00
ghubstan
34efc049f8
Remove unnecessary fully qualified name 2020-11-14 13:34:22 -03:00
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
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
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
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
50c7d6c126
Merge pull request #4774 from deusmax/market_offers_chart
Market Offers chart modifications
2020-11-12 14:34:39 +01:00
Christoph Atteneder
64fd3a607a
Merge pull request #4782 from sqrrm/cleanup-signed-witness
Refactor trade limit check
2020-11-12 09:38:03 +01:00
Christoph Atteneder
def2b7cc68
Merge pull request #4783 from m52go/account-limits-text
Adapt account limits language for 1.5.0
2020-11-12 09:30:51 +01:00
Christoph Atteneder
34c802d505
Merge pull request #4780 from jmacxx/fix_issue_4719
Add encrypted wallet password prompt when sending funds from BSQ wallet
2020-11-12 09:06:27 +01:00
m52go
adc58bf4d8
Adapt account limits language for 1.5.0 2020-11-11 10:14:19 -05:00
sqrrm
4180ea08fd
Refactor trade limit check
Return early for anything that doesn't have age dependent trade limits
Remove unnecessary method
Fix switch case
2020-11-11 15:15:51 +01:00
sqrrm
24102556e0
Merge pull request #4769 from ripcurlx/update-release-process
Update release process to match new trade statistics delivery
2020-11-11 12:39:41 +01:00
Christoph Atteneder
c707e63f35
Merge pull request #4781 from chimp1984/use-30-day-average-for-marektcap
Use 30 days average USD/BSQ price for market cap
2020-11-11 11:10:54 +01:00
Christoph Atteneder
7701ad35d3
Update release process to match new trade statistics delivery
Also did some minor release process cleanup that was overdue
2020-11-11 10:55:00 +01:00
Christoph Atteneder
0c47cf0e20
Merge pull request #4764 from jmacxx/fix_issue_4727
Don't allow trade start if BitcoinJ is not fully synced
2020-11-11 10:44:07 +01:00