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
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.
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.
- 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
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
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)
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.
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.
Extend FeeRateService with necessary logic to support multiple
BitcoinFeeRateProvider instances. Average the retrieved rates and
provide the average via the service getFee() API.
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.
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.
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.
- 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.
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
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.
Without bugfix, method would try to encrypt the wallet using using the
old password argument immediately after encrypting the wallet with
a new password.