Commit Graph

11170 Commits

Author SHA1 Message Date
jmacxx
f2f519ada6
Display correct trade and tx fees in CSV export
When exporting trade history to CSV, users would expect to see
their own transaction and trade fees listed.  Maker fees are
stored on the Offer, Taker fees are stored on the Trade object.
The code was not properly checking whether the user was the
Offer Maker or Taker, and as such the report was always displaying
the Taker information for Tx and Trade fee.  Therefore any trades
where the user was Maker showed the wrong fees.

The column title `Maker Fee` is incorrect and misleading since
the user doing the export is not necessarily the Maker.  We
rename this column to `Trade Fee` to indicate that it is the fee
the user paid for trading regardless of Maker/Taker status.

Fixes #4207
2020-05-12 15:17:10 -05:00
sqrrm
5e5d7d1577
Merge pull request #4225 from cd2357/show-min-max-orderbook
OfferBook: Show min-max range for amount and volume
2020-05-12 12:54:55 +02:00
sqrrm
6d108ead2f
Merge pull request #4182 from jmacxx/fix_issue_2798
Editing an offer should not allow the BTC amount to be changed
2020-05-11 15:45:22 +02:00
sqrrm
d51c4c82e0
Merge pull request #4178 from jmacxx/fix_issue_3871
When accepting an offer do not round the BTC amount outside range
2020-05-11 15:18:47 +02:00
sqrrm
c07988faf3
Merge pull request #4159 from stejbac/remove-unused-PersistableEnvelope-types
Remove PersistableNetworkPayloadList & TradeStatisticsList
2020-05-11 14:52:04 +02:00
Chris Beams
7064f0f2fe
Rename properties used to configure mempool hostnames 2020-05-11 11:45:33 +02:00
Chris Beams
c79bf3edf1
Eliminate unnecessary use of GenericXmlApplicationContext 2020-05-11 11:45:33 +02:00
Chris Beams
714e49461f
Rename BitcoinFeeRateProvider to MempoolFeeRateProvider
The BitcoinFeeRateProvider name was never great; it should technically
have been something like EarnDotComFeeRateProvider. This change renames
the class to reflect that it (and its new subclasses) are specifically
designed to query the Mempool API as found at https://mempool.space.
2020-05-11 11:45:33 +02:00
Chris Beams
d160d9ec5f
Restore BitcoinFeeRateProvider to package-private visibility
This class had been made public in order to access the MIN/MAX_FEE_RATE
fields and to construct dummy instances in FeeRateServiceTest. This
introduced package cycles between bisq.price.mining and
bisq.price.mining.provider, making the implementation more difficult to
understand and maintain. This commit moves these fields to the
already-public FeeRateProvider base class, where they make more sense
to reside anyway. It also reworks tests to remove the need to access
BitcoinFeeRateProvider directly from FeeRateServiceTest. In the end,
BitcoinFeeRateProvider's visibility is returned to package-private as it
originally was, and all package cycles have been eliminated.
2020-05-11 11:45:33 +02:00
Chris Beams
ae4c256103
Eliminate unnecessary TestBase class 2020-05-11 11:45:33 +02:00
Chris Beams
f8c9c72bc7
Polish style
- Wrap comments at 90 chars per bisq-network/style#5
 - Wrap code at 120 chars per bisq-network/style#3
 - Remove unused imports
 - Remove extra newlines
 - Format code where appropriate
 - Remove unused Javadoc tags, e.g. @return, @param
 - End Javadoc summary sentence with a period where missing
 - Remove HTML formatting in Javadoc, e.g. extra <br>s
2020-05-11 11:45:33 +02:00
jmacxx
f4064dfcfb
Fix address validation for whitespace after comma
Typical comma separated values have a space after each comma
in order to make the list more human-readable.  In some areas
of bisq, comma separated lists are generated this way (see #4203),
but the validation of comma separated addresses was not accepting
spaces after commas.  This change to the regex allows optional
whitespace after comma separators.  A new test has been
added to validate the scenario of whitespace after comma.

Fixes #4203
2020-05-10 16:40:36 -05:00
Dominykas Mostauskis
482d09e8ad
Check if these *_MIN_AMOUNTs don't exceed 200k BSQ
Manfred [0] pointed out that COMPENSATION_REQUEST_MIN_AMOUNT and
REIMBURSEMENT_MIN_AMOUNT should be checked for not exceeding 200k BSQ
too.

[0] 4ec6bac658..fb76fd6548 (r420249962)
2020-05-10 15:01:32 +02:00
dmos62
a381cb2a4b
Fix forgotten break in switch statement #2
Without the break statement, the execution would continue through the subsequent case clauses until it encountered a break, executing `checkArgument` calls meant for `REIMBURSEMENT_MAX_AMOUNT`. More specifically, the bug would cause a failed check in the case where `inputValueAsCoin.value <= 200000000` is false.
2020-05-10 15:01:28 +02:00
dmos62
58db561d10
Fix forgotten break in switch statement #1
This omission is currently not disruptive, since the next case clause only contains a break.
2020-05-10 15:01:23 +02:00
dmos62
addf5be24b
Typo short-circuit boolean operator
Non-bug; only effect that the other instanceof is always evaluated.
2020-05-10 14:51:25 +02:00
cd2357
45636f160e
Fix unit test
Fix a unit test that failed after a few related classes were refactored.
2020-05-09 18:32:57 +02:00
cd2357
9f7eca2734
Update README.md
Add a section explaining how the mining fee average is calculated and
how the queried API endpoints can be modified.
2020-05-09 18:02:49 +02:00
cd2357
1c6a5b22a3
Scale number of fee providers using config
Automatically instantiate up to 5 parallel fee estimation providers
based on configured API endpoints in application.properties.

By default, two endpoints are active.

When none are configured, one primary provider defaults to querying
mempool.space.
2020-05-09 17:50:46 +02:00
cd2357
a5e1d75cfa
Add support for N>1 providers in FeeRateService
Extend FeeRateService with necessary logic to support multiple
BitcoinFeeRateProvider instances. Average the retrieved rates and
provide the average via the service getFee() API.
2020-05-09 16:20:09 +02:00
cd2357
efb1fd835f
Add ExchangeRateService test for N>1 providers
Add unit test which covers the scenario that an ExchangeRateService
queries multiple ExchangeRateProviders.
2020-05-09 12:43:56 +02:00
cd2357
a2c9b18f6a
Extend unit tests for ExchangeRateService
Extend the unit tests with more granular checks.
2020-05-09 12:34:02 +02:00
cd2357
1ad7169682
Add unit test for Version controller
Add unit test for existing functionality of the Version controller.
2020-05-09 09:40:52 +02:00
wiz
cd2d867c11
Increase BSQ explorer TMPFS allocation to 2GB for growing datastore 2020-05-09 12:30:15 +09:00
ghubstan
a79ae57ef0
Cache aesKey in unlockwallet, clear it in lockwallet
There is no need to decrypt and re-encrypt wallet files in the unlock
and lock wallet methods.  The temporary aesKey saved in the unlock
method will used for operations on an encrypted wallet.

There is also no need to cache a tempKeyCrypterScrypt;  this class
level variable was removed.
2020-05-07 14:21:51 -03:00
ghubstan
24248d4367
Backup wallets after each encrypt/decrypt operation
This is consistent with :desktop's PasswordView#onApplyPassword.
2020-05-06 15:40:15 -03:00
ghubstan
4262f29462
Cache temp key and crypter scrypt in unlockwallet
Cache the aesKey instead of the password in unlock wallet method,
avoiding extra overhead of deriving it from the temp password in the
lock method.

The KeyCrypterScrypt used in the unlock method must also be cached for
use in the manual lock method.  Creating a new KeyCrypterScrypt instance
in the manual lock method would have a different random salt value,
invalidating the password used in the unlock method.
2020-05-06 15:20:41 -03:00
cd2357
d3a9ce9620
Extend CONTRIBUTING.md with info on IDEA settings
Add a link to a StackOverflow answer showing how to configure IDEA to
automatically check and enforce the format of the commit message.

More specifically, the 50-character limit for the commit title and
72-character limit for the commit body.
2020-05-06 19:19:15 +02:00
ghubstan
fbb025adb1
Factor out two small duplcated code blocks 2020-05-06 12:30:59 -03:00
sqrrm
246d5ee37a
Merge pull request #4238 from bisq-network/revert-4212-bugfix-and-typofix
Revert "Bugfix and typofix"
2020-05-06 10:49:05 +02:00
sqrrm
f720764d6b
Merge pull request #4232 from cbeams/rename-rocket-chat-role
Rename "Rocket Chat Admin" role to "Keybase Admin"
2020-05-05 19:04:56 +02:00
sqrrm
b1f593a2d7
Merge pull request #4235 from cd2357/improve-fee-estimation
Switch to more accurate fee estimation endpoint
2020-05-05 19:04:14 +02:00
sqrrm
3f3ee0a096
Revert "Bugfix and typofix" 2020-05-05 18:08:00 +02:00
sqrrm
55c5ac02fc
Merge pull request #4226 from petrhejna/doc-peerbloomfilters
Add mention `peerbloomfilters=1` attibute
2020-05-05 17:46:57 +02:00
Chris Beams
86fcecc5d0
Review and polish migration to mempool.space API
- Polish whitespace and newlines; wrap comments at 90 chars

 - Use package-private vs protected visibility when exposing
   BitcoinFeeRateProvider constants for testing

 - Document that 'maxBlocks' is dead code, but do not remove it yet, as
   it would disrupt the process of getting this fix out quickly because
   it would require operators to change the way they start their
   pricenodes.
2020-05-05 17:38:32 +02:00
sqrrm
d29385f295
Merge pull request #4213 from danielabrozzoni/improve_dust_limit_messaging
Improve dust limit error messaging
2020-05-05 17:33:12 +02:00
sqrrm
5e9bbfc3ad
Merge pull request #4212 from dmos62/bugfix-and-typofix
Bugfix and typofix
2020-05-05 17:18:55 +02:00
sqrrm
a76fad8f39
Improve proof of burn layout 2020-05-05 17:16:07 +02:00
cd2357
e18f0406af
Switch to more accurate fee estimation endpoint
The API endpoint for fee estimations has been changed to one that delivers more accurate fee estimations.

This is a temporary solution, until a more decentralized approach is found.

Fixes projects/issues/27
2020-05-05 17:11:54 +02:00
sqrrm
a731957aa7
Merge pull request #4223 from jmacxx/fix_stale_qrcode_display
Fix QR code display of offer funding amount
2020-05-05 16:48:55 +02:00
sqrrm
daa6351bbd
Merge pull request #4221 from stejbac/fix-proof-of-burn-signing-for-encrypted-wallets
Fix proof-of-burn signing for password protected wallets
2020-05-05 16:48:40 +02:00
sqrrm
cdad01a5c0
Merge pull request #4222 from cd2357/fix-sorting-bondsview
BondsView: Fix sorting of numeric columns
2020-05-05 15:57:47 +02:00
ghubstan
9b156b86dd
Remove unlockwallet timeout variable initializer
This variable no longer needs to be initialized to avoid a compiler error.
2020-05-04 15:19:18 -03:00
Chris Beams
d48f9eb6f0
Tighten up error handling
This commit factors out a run() method in CliMain that either returns
(void) or throws an exception. This eliminates the need to call
System.exit in so many places as were previously. Indeed, now there is
only one place where System.exit is called.

It also removes the duplication of printing "Error: ..." to stderr when
something goes wrong by doing this once in the global catch clause in
the main method.
2020-05-04 13:58:46 +02:00
Chris Beams
b0e5da8e2e
Refactor setwalletpassword handling to eliminate duplication 2020-05-04 12:22:13 +02:00
Chris Beams
9abe4aad95
Rename "Rocket Chat Admin" role to "Keybase Admin"
Per https://github.com/bisq-network/roles/issues/79#issuecomment-618483481

Note that the ROCKET_CHAT_ADMIN enum label has not been renamed for
the backward compatibility reasons discussed in BondedRoleType Javadoc.

See also bisq-network/roles#60.
2020-05-04 09:22:57 +02:00
ghubstan
f5a4ca51a8
Add missing return statement in CoreWalletService#setWalletPassword
Without bugfix, method would try to encrypt the wallet using using the
old password argument immediately after encrypting the wallet with
a new password.
2020-05-03 15:09:23 -03:00
ghubstan
3ef7286465
Return void vs Tuple2 from CoreWalletService#unlockWallet
Also remove unused StatusApi class.
2020-05-03 14:29:32 -03:00
ghubstan
ec2ee45e58
Return void vs Tuple2 from CoreWalletService#lockWallet
And delete unused StatusApi enum.
2020-05-03 14:25:19 -03:00
Chris Beams
ab17b67229
Remove obsolete try/catch block in #setWalletPassword 2020-05-03 18:54:01 +02:00