Commit Graph

14291 Commits

Author SHA1 Message Date
Christoph Atteneder
d3233bac7a
Update data stores for v1.6.0 2021-03-24 10:53:24 +01:00
jmacxx
39d86b4f80
Fee validation leniency using old DAO param values 2021-03-24 09:58:24 +01:00
jmacxx
508b523186
Review changes for Disputes GUI
highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
2021-03-24 09:46:25 +01:00
jmacxx
8a9843bc15
Pop-up warning for trading with risky payment methods 2021-03-23 15:11:57 +01:00
ghubstan
306dc05a65
Fix method name and error msg 2021-03-22 14:48:34 +01:00
ghubstan
95549d861d
Fix comment, left justify non-numeric column value 2021-03-22 14:48:26 +01:00
ghubstan
1635ede936
Remove log statement, add comment 2021-03-22 14:48:20 +01:00
ghubstan
d21e462d27
Fix typo 2021-03-22 14:48:14 +01:00
ghubstan
d0338d729b
Set WalletsManager key if missing
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda229.
2021-03-22 14:48:04 +01:00
ghubstan
dd2b17fde7
Block UI popups in api startup's encrypted wallet init
Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
2021-03-22 14:47:42 +01:00
Christoph Atteneder
0fd7efd80f
Merge pull request #5000 from stejbac/implement-segwit-for-bsq
Implement Segwit for BSQ
2021-03-22 12:01:15 +01:00
jmacxx
8c312e9ee3
codacy 2021-03-22 12:00:06 +01:00
jmacxx
07cff8cb63
fix race condition in sent confirmation popup 2021-03-22 11:59:54 +01:00
sqrrm
94995da39a
Revert "Lower tolerated small amount"
This reverts commit 99123b7297.
2021-03-22 11:37:49 +01:00
Steven Barclay
f21379160b
Merge branch 'release/v1.6.0' into implement-segwit-for-bsq 2021-03-20 23:18:49 +00:00
Steven Barclay
05ea293595
Activate Segwit DAO hard fork 4 weeks after v1.6.0 release
Push back the (2nd) DAO hard fork activation block height to 680300,
which is 4 weeks after the planned 1.6.0 release around 2021/03/25.
(Also push back the testnet block activation height to 1943000 - 2 weeks
from now assuming an average block time of 10 minutes.)
2021-03-20 21:39:26 +00:00
ghubstan
1bf2fd7642
Validate paymentAccountId in createAndPlaceOffer 2021-03-19 21:24:32 +01:00
ghubstan
344f1613d1
Fix api getfundingaddresses bug
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.
2021-03-19 21:24:26 +01:00
ghubstan
afe1e67504
Add bot convenience: getMyOffersSortedByDate(String currencyCode) 2021-03-19 21:24:12 +01:00
ghubstan
34403e7e3f
Add convenience (get all offers, both directions), and make sorter public 2021-03-19 21:23:59 +01:00
ghubstan
e963391a87
Print trade info to console after successful trade 2021-03-19 21:21:09 +01:00
ghubstan
39cda43208
Add LongRunningTradesTest
This new api testcase can run long series' of regtest trades by looping
over modified TakeBuyBTCOfferTest and TakeSellBTCOfferTest cases.  The
purpose is to help reproduce problems and isolate bugs Bisq's core and
api layers.

LongRunningTradesTest is not enabled by default;  it will not run in a
default test environment (such a Travis CI).  Enviornment variable
LONG_RUNNING_TRADES_TEST_ENABLED must exist for the test to run.
The env variable can be set in a bash shell before running the test
case in a shell (using a gradle command), or the environment variable can
be set in an Intellij test launcher's Evironment variables field.

The modifed (short running) TakeBuyBTCOfferTest and TakeSellBTCOfferTest
cases run as before.

Changes include:

- Add static boolean isLongRunningTest to AbstractOfferTest.

- Add looping control Supplier maxTradeStateAndPhaseChecks to AbstractTradeTest.
  It uses the isLongRunningTest flag in the superclass to help define the
  wait times for trade state/phase changes during short and long running tests.

- Made AbstractTradeTest assert(true, trade.isDepositPublished) conditional upon
  isLongRunningTest value.  Long running trade test asserts have to be looser due
  to increasing latency of wallet, offer and trade operations in the server as the
  trade counts increase.

- Overload ApiTestCase#startSupportingApps with additional flag:
  startSupportingAppsInDebugMode. Default is false.  This makes
  starting background apps in debug mode a bit more convenient
  and self explanatory.
2021-03-19 21:21:02 +01:00
ghubstan
2bd6d72c40
Avoid NPE due to null fee while wrapping tx in TxInfo
Add debugging convenience to core.api.model.TxInfo.
2021-03-19 21:19:42 +01:00
ghubstan
9b62a005df
Refactor takeoffer reply proto & ErrorMessageHandler
- Add description msg TakeOfferReply proto, and fromProto method
  to core.offer.enum AvailabilityResult.  The description field
  maps a client usable error message to the enum.

- Adjust GrpcErrorMessageHandler to add AvailabilityResult.description()
  to takeoffer reply.

- Refactor (split up) GrpcClient's takeOffer.  Add getTakeOfferReply()
  to give clients a chance to make choices based on the reply's
  AvailabilityResult when the takeoffer command did not result in a
  trade. (Some errors are fatal, some not.)
2021-03-19 19:38:03 +01:00
ghubstan
c58366090f
Derive AvailabilityResult from Task errorMessage 2021-03-19 19:37:41 +01:00
ghubstan
56345a2256
Add missing grpc exception catch blocks 2021-03-19 19:37:31 +01:00
ghubstan
8f32aa06c5
Convert AvailabilityResult to error msg when takeoffer fails 2021-03-19 19:37:21 +01:00
ghubstan
14215a1fbd
Adjust grpc & core services to new takeoffer error handling
- GrpcErrorMessageHandler  A new ErrorMessageHandler implementation
  to get around the api specific problem of having to use Task
  ErrorMessageHandlers that build task error messages for the UI.

- GrpcExceptionHandler  A new method for working with the
  ErrorMessageHandler interface.

- GrpcTradesService, CoreApi, CoreTradesService:  Ajdusted takeoffer
  error handling to give a failure reason provided by the new
  GrpcErrorMessageHandler.
2021-03-19 19:37:10 +01:00
ghubstan
7683569abf
Inject CoreContext into OpenOfferManager, adjust test 2021-03-19 19:37:00 +01:00
ghubstan
d747acc567
Adjust protos for takeoffer error handing
- Add PRICE_CHECK_FAILED to enum AvailabilityResult.
- Add enum AvailabilityResult to TakeOfferReply message.
2021-03-19 19:36:48 +01:00
ghubstan
0b22c98802
Disambiguate payment acct json form's "country" field
Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
2021-03-18 20:34:10 +01:00
Christoph Atteneder
3cf1f53e4f
Update translations for v1.6.0 2021-03-18 19:20:53 +01:00
Christoph Atteneder
378fd026bf
Bump version number for v1.6.0 2021-03-18 19:19:26 +01:00
Christoph Atteneder
c8d01a2d4c
Merge pull request #5328 from ghubstan/01-apidoc-changes-for-ripcurlx
Improve apitest docs
2021-03-18 19:15:09 +01:00
Christoph Atteneder
d34a73276e
Merge pull request #5326 from sqrrm/lower-deposit
Lower min deposit to 0.001 BTC
2021-03-18 19:02:24 +01:00
ghubstan
14b2bc2544
Make codacy happy (I hope) 2021-03-18 14:49:57 -03:00
ghubstan
f732983d6c
Make multi-line bash command copy/pastable from rendered md 2021-03-18 14:20:47 -03:00
ghubstan
514e7b74ce
Refactor, include section about running on mainnet 2021-03-18 13:22:31 -03:00
ghubstan
ec65c010f7
Don't be polite 2021-03-18 13:12:32 -03:00
ghubstan
d07a26d560
Add missing withdrawfunds options 2021-03-18 12:58:26 -03:00
ghubstan
d3b5e1ee4b
Alternate ports to improve api/protocol guide 2021-03-18 12:56:18 -03:00
sqrrm
e6b7c88bed
Lower min deposit to 0.001 BTC
Lower min refund to half of min deposit as it doesn't make sense to have
a higher min refund than the min deposit.
2021-03-18 13:44:05 +01:00
Christoph Atteneder
87d8f5f28a
Merge pull request #5160 from jmacxx/mempool_check_maker_tx
Verify maker & taker fee transactions via Mempool lookup
2021-03-17 22:38:54 +01:00
jmacxx
47ad4219e2
Merge branch 'master' into mempool_check_maker_tx 2021-03-17 16:26:38 -05:00
Christoph Atteneder
3b897085b1
Merge pull request #5325 from jmacxx/fix_not_synced_bitcoind
Prevent trading when not connected to the Bitcoin network
2021-03-17 22:25:37 +01:00
jmacxx
9fcd65f320
Validate maker/taker fees using mempool lookup
apply @chimp1984 patch.txt code review suggestions
taker tx check moved to trade step 2, after confirmation
solve issue with calculating expected fees for unconfirmed tx
resolve conflict with PR5207 (Disputes UI)
check new offers after 1 block; check Json string not null; warn -> info
remove unused parameter
remove debugging log.warn message
2021-03-17 16:23:18 -05:00
jmacxx
8dd2328b03
handle case where bitcoind chain height is stale
improve description of chain height display
2021-03-17 16:00:57 -05:00
Christoph Atteneder
38cdea740b
Merge pull request #5323 from wallclockbuilder/patch-4
Update commands for mediator/refund agent
2021-03-17 10:23:25 +01:00
Christoph Atteneder
9270398fb3
Merge pull request #5207 from jmacxx/improve_dispute_chat
Improve chat functionality of mediation/arbitration
2021-03-17 09:38:35 +01:00
Christoph Atteneder
16230c7723
Merge pull request #5316 from chimp1984/add-pay-from-bsq-wallet-button
Add pay from BSQ wallet button
2021-03-17 09:35:09 +01:00