Commit Graph

5631 Commits

Author SHA1 Message Date
ghubstan
c2c1ac2087
Adjust class level annoations
as per suggested changes
    https://github.com/bisq-network/bisq/pull/5021#discussion_r550903787
    https://github.com/bisq-network/bisq/pull/5021#discussion_r550903843
    https://github.com/bisq-network/bisq/pull/5021#discussion_r550903860
2021-01-03 12:01:10 -03:00
ghubstan
0638701ca3
Merge branch 'master' into fix-annotations 2021-01-03 11:34:30 -03:00
chimp1984
0ce9324cf4
Add cache for signature verification results and a lookup map by ownerPubKey 2021-01-02 17:34:08 -05:00
chimp1984
eddb7cb555
Add option in preferences to hide payment methods which are not part of the users accounts.
Default value is false, so same behaviour as before the change.
If no payment account is setup then we also show all payment methods.
In that case (no payment account) we disable the toggle as well as set it to false.
2021-01-01 21:52:34 -05:00
chimp1984
16ff7c983d
Update commit hash 2021-01-01 17:27:22 -05:00
chimp1984
67c57eb202
Increase tolerance for OfferPayload 2021-01-01 17:26:59 -05:00
chimp1984
d5ef7e66d1
Add option to prevent periodic shutdown for seed nodes 2021-01-01 17:17:29 -05:00
chimp1984
c8bf1d469e
Add support to filter manager for network wide banned nodes 2021-01-01 16:51:24 -05:00
chimp1984
3cf6c60354
Add NetworkFilter, remove BanList 2021-01-01 16:51:05 -05:00
chimp1984
28dd8404f7
Merge branch 'access-concrete-data-stores' into add-filter-support-on-network-level 2021-01-01 13:50:46 -05:00
Christoph Atteneder
13e8d63837
Update translations and fix a broken German translation
dao.wallet.send.sendFunds.details
2021-01-01 18:59:22 +01:00
sqrrm
d79799aaa3
Merge pull request #5006 from Jakub-CZ/instant-error-message-update
Display up-to-date error messages under text fields
2021-01-01 17:42:50 +01:00
ghubstan
81371d477c
Merge branch 'master' into 01-misc 2020-12-31 11:58:18 -03:00
chimp1984
a3e8d4d225
Fix missing param in test 2020-12-31 00:42:23 -05:00
chimp1984
381322f600
Only publish witness if we are in date tolerance 2020-12-30 23:20:38 -05:00
chimp1984
4489e57849
Use concrete dataStorageServices instead
p2PService.getP2PDataStorage().getAppendOnlyDataStoreMap().

p2PService.getP2PDataStorage().getAppendOnlyDataStoreMap() iterates
over all services including the historical data store service. It used the
getMap method which should not be used at historical data store service as
it is not clear if the live data or all data should be accessed.
2020-12-30 20:38:42 -05:00
Christoph Atteneder
115ec78f4d
Merge pull request #5011 from chimp1984/show-stacktrace-in-error-popup-at-view-exceptions
Show stacktrace in error popup at view exceptions
2020-12-29 19:58:01 +01:00
Christoph Atteneder
94cf02303e
Merge pull request #4950 from chimp1984/improve-offer-publishing
Improve offer publishing
2020-12-29 19:51:21 +01:00
Christoph Atteneder
a2a542e11e
Merge pull request #4999 from chimp1984/persist-app-window-layout
Add generic map (cookie) to UserPayload
2020-12-29 19:44:29 +01:00
ghubstan
bb07f10990
Remove unused imports 2020-12-29 12:52:03 -03:00
ghubstan
7e24c57dc8
Adjust lombok annotations to reduce build warnings
This change fixes the underlying problems behind five compiler warnings:
"Generating equals/hashCode implementation but without a call to superclass".

Some core classes use @Value and @Data annotations where not necessary, for
example, where equals, hashCode, and toString are implemented by the developer,
and where final class and field modifiers are defined by the developer.

From lombok classes and documents for the shortcut annotations
	@Value https://projectlombok.org/features/Value and
	@Data  https://projectlombok.org/features/Data,
we find some implicit annotations applied by these shortcuts are not needed.
Adjustments are described below.

- Tx Replace @Value with @Getter.

- TxOutput  Replace @Data with @Getter and @Setter.

- ChangeParamProposal  Replace @Value with @Getter.

- GetInventoryRequest, GetInventoryResponse
  An @EqualsAndHashCode(callSuper = false) is added to supress build
  warnings.
2020-12-29 12:39:08 -03:00
ghubstan
651e772c18
Merge branch 'master' into 01-misc 2020-12-29 10:37:23 -03:00
sqrrm
9cc3f687c0
Merge pull request #4851 from chimp1984/improve-bsq-get-block-request-handling
Improve getBlocks request handling
2020-12-29 13:55:40 +01:00
chimp1984
cf1b5ef01a
Change trade period for transferwise from 1 day to 4 days 2020-12-28 14:39:07 -05:00
Christoph Atteneder
785c76e9d6
Merge pull request #5010 from chimp1984/dao-performance-improvements
Dao performance improvements
2020-12-28 20:06:58 +01:00
chimp1984
862b12fe03
Apply code inspection
Cleanups
2020-12-28 13:34:50 -05:00
chimp1984
1fc8905634
Improve logs
Cleanups
2020-12-28 13:18:45 -05:00
chimp1984
768541664b
Use stream API
Add checks to tryWithNewSeedNode method
Cleanups
2020-12-28 13:18:19 -05:00
Christoph Atteneder
195c2b8f5d
Merge pull request #4997 from chimp1984/remove-unused-code
Cleanup trade wallet code
2020-12-28 19:18:12 +01:00
chimp1984
fe44a343d0
Remove "hack" for removal of blockDownloadListener
Rename params
Cleanups
2020-12-28 13:17:06 -05:00
ghubstan
25fbd3518e
Merge branch 'master' into 01-misc 2020-12-28 14:38:39 -03:00
ghubstan
bcc7216c9e
Fix tmp file deletion bug 2020-12-28 14:30:07 -03:00
chimp1984
357c980390
Fix leftovers from debugging.
Use else if
Fix typo
2020-12-28 12:24:35 -05:00
chimp1984
0be451a136
Fix typos 2020-12-28 12:24:35 -05:00
chimp1984
5e39477fca
Refactor: Use terminate instead of cancel 2020-12-28 12:24:35 -05:00
chimp1984
5363c8d505
Remove cancel,cleanup and stop method. Use terminate instead.
Fix typo
2020-12-28 12:24:35 -05:00
chimp1984
4a05e5bf0d
Improve getBlocks request handling 2020-12-28 12:24:35 -05:00
Christoph Atteneder
976caeb14e
Merge pull request #5001 from chimp1984/deactivate-open-offer-if-trigger-price-is-reached
Deactivate open offer if trigger price is reached
2020-12-28 17:04:21 +01:00
Christoph Atteneder
78d4176f8a
Merge pull request #5004 from chimp1984/add-mediators-keybase-usernames
Add mediators keybase usernames
2020-12-28 16:50:56 +01:00
Christoph Atteneder
850e031158
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.5.2
# Conflicts:
#	core/src/main/java/bisq/core/account/witness/AccountAgeWitnessService.java
#	core/src/main/java/bisq/core/trade/closed/CleanupMailboxMessages.java
2020-12-28 14:57:08 +01:00
chimp1984
6fe19db233
Only check for downGrade if we are on mainnet
Its a bit annoying for dev testing when switching between release and master...
2020-12-27 23:38:17 -05:00
chimp1984
681fed603e
Fix log 2020-12-27 22:50:56 -05:00
chimp1984
7a9230ef27
Optimize getIssuance(String txId, IssuanceType issuanceType) method
We iterated all map entries instead of a simple get call.
2020-12-27 21:27:17 -05:00
chimp1984
9402ca0c64
Optimize getIssuance method
We iterated all map entries instead of a simple get call.
2020-12-27 21:24:58 -05:00
chimp1984
32cc062872
Refactor: Rename getIssuanceSet to getIssuanceSetForType 2020-12-27 21:21:48 -05:00
chimp1984
686957c809
Add comment 2020-12-27 21:20:17 -05:00
chimp1984
62ca826217
Use java doc at constructor 2020-12-26 19:47:57 -05:00
chimp1984
e38fa9a819
Add user name to dispute window and to trade details window (json contract window) 2020-12-25 13:46:04 -05:00
chimp1984
2b047976af
Add lookup map for support agents keybase user names by onion address
Add it to dispute (client) views
2020-12-25 13:27:14 -05:00
chimp1984
64607de924
Add trigger icon column 2020-12-24 23:44:27 -05:00
chimp1984
39893a6aaf
Add trigger price to OpenOffersView 2020-12-24 23:05:23 -05:00
chimp1984
bb9de0b24c
Add trigger price field to create offer view 2020-12-24 20:01:04 -05:00
Jakub Loucký
74f5d93504
Display up-to-date error messages under text fields
As user types into a validated text field,
if the new string is still invalid but the error message changed,
ensure the new message will be displayed.
2020-12-25 01:52:36 +01:00
chimp1984
d76a810691
Add generic map (cookie) to UserPayload for persisting UI states like app layout 2020-12-24 17:05:04 -05:00
chimp1984
229d013844
Add PriceEventHandler 2020-12-23 21:52:35 -05:00
chimp1984
0e6b983564
Add triggerPrice 2020-12-23 21:50:53 -05:00
chimp1984
0c792a2916
Add comments to make context of parentTx more clear 2020-12-23 16:15:15 -05:00
chimp1984
aa06253b16
Remove unused code 2020-12-23 15:49:16 -05:00
sqrrm
7d7f1b09e7
Merge pull request #4966 from ghubstan/10-callrate-interceptor
Prevent excessive api calls
2020-12-23 16:19:29 +01:00
chimp1984
c5d0fa789b
Move stopPeriodicRefreshOffersTimer before processListForRepublishOffers
The periodicRefreshOffersTimer gets started at offer publishing.
Before the stopPeriodicRefreshOffersTimer got overwritten by the start in offer
publishing so it did not had any effect beside that we restarted it. Now we
process offer publishing without delay and a stop after the call would stop
the refresh timer.
2020-12-22 21:08:42 -05:00
Christoph Atteneder
4e707a59fe
Merge pull request #4980 from Jakub-CZ/improve-msg-in-wallet-info
Improve paragraph under "Wallet balances"
2020-12-22 09:32:54 +01:00
Christoph Atteneder
142d14b58f
Merge pull request #4991 from m52go/walletinfo-path-wording
Improve path text on wallet info screen
2020-12-22 09:32:12 +01:00
Christoph Atteneder
73fdb9f6ec
Merge pull request #4984 from chimp1984/improve-localnode-popup-text
Improve popup text in case a local node is detected
2020-12-22 09:31:28 +01:00
chimp1984
823980c678
Improve text 2020-12-21 16:26:26 -05:00
sqrrm
c5218c66c3
Merge pull request #4971 from chimp1984/use-resource-file-instead-of-resync-from-genesis
Avoid resync from genesis in case of dao state issues
2020-12-21 22:00:42 +01:00
m52go
409b092c1f
Edit path text on wallet info screen 2020-12-21 15:21:05 -05:00
Jakub Loucký
a6f13223d1
Remove dangling line break 2020-12-21 21:06:14 +01:00
Jakub Loucký
9aeb775443
Apply suggestions from code review
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2020-12-21 21:03:28 +01:00
ghubstan
27efc5f3c2
Merge branch '09-refactor-grpc-error-handling' into 10-callrate-interceptor
Adjust to reverting to reverting 6aa385e, and fix test file conflict.
2020-12-21 15:44:34 -03:00
ghubstan
8ee3a1599c
Merge branch '08-gettransaction' into 09-refactor-grpc-error-handling
Adjust to reverting 6aa385e.
2020-12-21 15:35:15 -03:00
ghubstan
bdde24a463
Ajust TradeInfo to reverting 6aa385e494 2020-12-21 15:10:43 -03:00
ghubstan
672eb79f95
Revert "Append nullable withdrawalTxId field to Trade proto message"
This reverts commit 6aa385e494.
2020-12-21 15:05:54 -03:00
Christoph Atteneder
d805b37a60
Merge pull request #4985 from chimp1984/improve-trade-fee-display
Improve trade fee display at create and take offer screens and popups
2020-12-21 11:23:07 +01:00
Christoph Atteneder
a344ae9310
Merge pull request #4977 from chimp1984/add-extra-note-for-amazon-gift-cards
[1.5.2] Add extra note for amazon gift cards
2020-12-21 11:22:13 +01:00
sqrrm
c801a57084
Merge pull request #4981 from chimp1984/fix-wrong-account-age-data-access
[1.5.2] Fix wrong account age data access
2020-12-21 10:14:10 +01:00
sqrrm
b9346883a6
Merge pull request #4975 from chimp1984/fix-isPubKeyValid-check
Improve CleanupMailboxMessages
2020-12-21 10:09:31 +01:00
chimp1984
e59f480392
Improve popup text in case a local node is detected 2020-12-20 19:02:06 -05:00
chimp1984
d689a3974b
Fix param change in test 2020-12-20 19:01:10 -05:00
chimp1984
4050644677
Remove redundant popup 2020-12-20 18:54:32 -05:00
chimp1984
bf720737db
Improve trade fee display at create and take offer screens and popups 2020-12-20 18:01:19 -05:00
sqrrm
99184567b3
Merge pull request #4953 from chimp1984/cache-results-in-account-witness-domain
Cache results in account witness domain
2020-12-20 23:56:51 +01:00
chimp1984
f5bb702d6b
Improve arbitratorSignOrphanWitness method 2020-12-20 10:32:50 -05:00
chimp1984
1462673e57
Use getSignedWitnessSet instead of
iterations over getSignedWitnessMapValues
2020-12-20 10:29:46 -05:00
chimp1984
aea904d24f
We do not need to lookup in getSignedWitnessMapValues
anymore as we maintain the signedWitnessSetByAccountAgeWitnessHash
at each add/remove operation.
2020-12-20 10:28:28 -05:00
chimp1984
b6a01d0ac7
Rename signedWitnessSetCache to signedWitnessSetByAccountAgeWitnessHash
Change comments (after understanding the domain usage better)
Maintain the set at add and remove methods
Use HashMap instead of ConcurrentHashMap as that class is only used
from UserThread and other fields are not threadsafe either.
2020-12-20 10:00:28 -05:00
chimp1984
35e2bf6383
Rename getSignedWitnessSetCache to signedWitnessSetCache 2020-12-20 09:34:00 -05:00
chimp1984
cccaa0a515
Update popup text 2020-12-20 09:31:29 -05:00
chimp1984
264a844274
We need to user accountAgeWitnessStorageService as
this supports the historical data store.
Using p2PService.getP2PDataStorage().getAppendOnlyDataStoreMap()
would not deliver all the data.
User stream API
2020-12-19 20:54:54 -05:00
sqrrm
442d65a730
Merge pull request #4973 from chimp1984/improve-logs
[1.5.2] Improve logs
2020-12-19 23:36:21 +01:00
chimp1984
814c5d13ee
Change text at amazon gift card popup 2020-12-19 17:16:25 -05:00
Jakub Loucký
ae21e709bb
Improve paragraph under "Wallet balances" 2020-12-19 23:11:16 +01:00
chimp1984
3cb3dc4c0c
Remove NGN (Nigerian Naira) as their central bank blocked Transferwise
See: https://twitter.com/cenbank/status/1339196770774093825

I tested it with setting that currency, doing offers and trades,
then remove it and continue the trades.
Offers with NGN cannot be taken anymore.
2020-12-19 16:55:34 -05:00
chimp1984
4e108380b8
Check if message matches trade before checking pubKey
Use stream filters instead of checks in method.
Change log level from error to warn.
2020-12-19 16:16:05 -05:00
ghubstan
a3eb4ed59a
Remove unused import 2020-12-19 17:37:24 -03:00
chimp1984
c6b619688a
Change log level
We iterate over all trades and messages, so it is expected that
the msg which are not assigned to that trade fails.
We need to change the handleDecryptedMessageWithPubKey to check
first if the msg and trade matches, but that will be done in a dedicated PR.
2020-12-19 15:30:57 -05:00
chimp1984
1e0dcfbcbc
Change log level to debug to reduce verbosity 2020-12-19 15:07:26 -05:00
chimp1984
cb130fcd8f
Change log level to warn in case the phase is not matching as that is mostly an expected case. 2020-12-19 15:06:48 -05:00
chimp1984
661ec42c56
Add more info to log that this can be an expected case.
As its generic here we cannot influence log level
2020-12-19 15:06:23 -05:00
chimp1984
852ac144f3
Only log if we have banned nodes and soften language as its not really banned, but rather deactivated/revoked node 2020-12-19 14:50:44 -05:00
chimp1984
2b53db2e21
Show all Capabilities 2020-12-19 14:50:08 -05:00
chimp1984
1ca527447e
Change warnings of banned filter to info level 2020-12-19 14:49:55 -05:00
chimp1984
7e77991cb5
Only log if we removed an offer from a trade not if deactivated 2020-12-19 14:49:36 -05:00
chimp1984
d65471e976
Remove dev log 2020-12-19 14:34:49 -05:00
chimp1984
9d4d116508
Change log level.
For 1.3.9 filter we expect a error log but dont want to show it as warning
2020-12-19 14:34:09 -05:00
ghubstan
bb8d2ae7c4
Inject Config into CoreApi 2020-12-19 15:50:00 -03:00
chimp1984
af9f2a9643
In case a reset of the dao state was triggered we delete
now all dao store files and request a shut down of the app.

After a restart the resource files are used. This avoids cases where a resync from
genesis got triggered (observed on seed nodes, not on desktop apps).

Seed nodes and headless apps get shut down automatically.
In case of the desktop app we show a warn popup with shutdown
button and no close button, so we enforce a shutdown to avoid
complications in case the user would continue.
2020-12-18 20:29:47 -05:00
sqrrm
e2c8e4dff6
Merge pull request #4965 from ripcurlx/update-data-stores-for-v1.5.2
[v1.5.2] Update data stores for v1.5.2
2020-12-18 23:09:04 +01:00
Christoph Atteneder
7c0d02ad09
Make it easier to translate trade roles 2020-12-18 20:48:42 +01:00
Christoph Atteneder
9a54ccc077
Make it easier to translate trade roles 2020-12-18 17:06:56 +01:00
Christoph Atteneder
2ba15a97ac
Update bitcoinj checkpoints for v1.5.2 2020-12-17 15:47:36 +01:00
jmacxx
9cb9ed20e4
Privacy improvements for manual payout
Redesign the UI
Add import/export of payout settings
Add ability to import from mediation ticket
Mediator does not need private key
User can sign using own wallet or private key
Validation of input fields
Calculate the tx fee based on inputs
Display of the generated txid & hex so it can be checked
2020-12-17 15:33:21 +01:00
Christoph Atteneder
ceecb404d2
Merge pull request #4899 from jmacxx/4061_privacy_improvement
Privacy improvements for manual payout
2020-12-17 15:32:44 +01:00
Christoph Atteneder
c5c93b213d
Merge pull request #4962 from oscarguindzberg/bloomFilterFix2
Use bitcoinj 0.15.8.bisq.13 (commit dcf8af0)
2020-12-16 21:45:49 +01:00
m52go
b94d06c33f
Remove m52go btc node ip 2020-12-16 19:30:56 +01:00
Oscar Guindzberg
a161376da3
Use bitcoinj 0.15.8.bisq.13 (commit dcf8af0) 2020-12-16 14:57:41 -03:00
m52go
4e4cb42f6a
Remove m52go btc node ip 2020-12-16 12:50:46 -05:00
ghubstan
1cd47fd0aa
Merge branch 'master' into 09-refactor-grpc-error-handling 2020-12-16 13:45:29 -03:00
chimp1984
83e620d462
Fix missing param in test 2020-12-16 10:08:55 -05:00
chimp1984
1049b7da77
Remove delay for publishing
This version is intended to be deployed to a power user to actually
try it out live as testing it with real conditions is very difficult.
2020-12-16 09:04:36 -05:00
chimp1984
24f53e0c01
Add flush method.
Call flush at openOfferManager shutdown.
Remove unused method.

Force broadcaster to send out immediately, otherwise we could
have a 2 sec delay until the bundled messages sent out.
2020-12-16 09:01:12 -05:00
chimp1984
8e71575afd
Add else case for check for offer is in source list and deActivate state
Invert the if branch so the normal case is first
Add comment
2020-12-16 08:24:48 -05:00
Christoph Atteneder
ac6102c4e0
Update translations for v1.5.2 2020-12-16 14:22:11 +01:00
Christoph Atteneder
0789180bb0
Merge pull request #4957 from sqrrm/sign-single-account
Sign single account
2020-12-16 14:07:34 +01:00
sqrrm
4cdd94ac28
Merge pull request #4955 from chimp1984/cache-frequent-method-calls
Cache results of isFiatCurrency and isCryptoCurrency
2020-12-16 12:11:58 +01:00
chimp1984
59cfb2d3a9
Do not use tx broadcast to mempool nodes if a local btc nodes is used
See discussion at: https://github.com/bisq-network/bisq/pull/4943#issuecomment-745615764
2020-12-15 20:04:38 -05:00
chimp1984
f2273e663d
Use ConcurrentHashMap for cache.
As the normal maps are not using a ConcurrentHashMap it is
likely unnecessary as well that I am not aware of a
multi-threaded access.
But as it does not show any difference in performance
it is likely the bit more safe option.
2020-12-15 19:15:40 -05:00
chimp1984
425bfa3bf7
Fix failing test (remove did operate on map
directly and we did not remove the item from the cache)

- Add getSignedWitnessMapValues method for access to signedWitnessMap values
- Remove Getter for signedWitnessMap
- Add removeSignedWitness method (used in test only)
- Use addToMap in test instead of direct access to map
- Remove getSignedWitnessSetCache entry matching
signedWitness.getHashAsByteArray() as well.
See comment. @sqrrm: Can you cross check?
2020-12-15 19:15:40 -05:00
chimp1984
359dc3759d
Add getSignedWitnessSetCache
The getSignedWitnessSet is called very often and is a bit
expensive. We cache the result in that map but we
remove the cache entry if we get a matching SignedWitness
added to the signedWitnessMap.
2020-12-15 19:15:40 -05:00
chimp1984
1314fd61a5
Add accountAgeWitnessCache
The accountAgeWitnessMap is very large (70k items) and
access is a bit expensive. We usually only access less
than 100 items, those who have offers online. So we
use a cache for a fast lookup and only if
not found there we use the accountAgeWitnessMap and
put then the new item into our cache.
2020-12-15 19:15:40 -05:00
chimp1984
ecad724046
Add null checks, improve comment 2020-12-15 19:08:37 -05:00
sqrrm
f61e62c7c0
Merge pull request #4956 from chimp1984/sort-paymentmethods-by-name
Sort payment methods by display string not by id.
2020-12-16 00:17:26 +01:00
sqrrm
9b8073b94a
Merge pull request #4954 from chimp1984/various-small-improvements
Various small improvements
2020-12-15 23:04:15 +01:00
sqrrm
bc60db39ae
Merge pull request #4943 from chimp1984/add-tx-broadcast-to-mempool-explorer-api
Add tx broadcast to mempool explorer api
2020-12-15 22:57:37 +01:00
sqrrm
26024bd6ec
Refactor: rename methods, move return statement 2020-12-15 19:35:49 +01:00
sqrrm
e0f4dc22e7
Fix formatting 2020-12-15 19:27:13 +01:00
sqrrm
4c33f9c999
Sign imported AccountAgeWitness,PubKey
Change the specific sign window to sign an imported account in the form
of accountAgeWitnessString,pubKeyString. The SignSpecificWitness never
worked due to missing pubKey data and this is a way to import the missing data.
2020-12-15 16:08:06 +01:00
ghubstan
a341173412
Merge branch 'master' into 09-scratch 2020-12-15 11:13:37 -03:00
chimp1984
0f084d3aec
Use ConcurrentHashMap
Add comment
2020-12-15 09:05:33 -05:00
sqrrm
de25105fa8
Copy account data to clipboard
Use ctrl+c to copy accountagewitness and pubkey to clipboard in a format to
be used by arbitrator to sign the account
2020-12-15 14:53:34 +01:00
chimp1984
7e145739c3
Cache hash to avoid expensive hash operation. 2020-12-15 01:05:16 -05:00
chimp1984
1ddde42e17
Keep Date as transient field to avoid recreating a
Data object at each getDate call.

Add JsonExclude to Offer.currencyCode

getDate get called very often and we have > 80k objects.
2020-12-15 01:02:49 -05:00
chimp1984
9fc4f61bf6
Cache currencyCode
Extract variable

getCurrencyCode get called very often (Comparatos) so we cache result.
2020-12-15 00:59:05 -05:00
chimp1984
5112b1a54b
Cache results of isFiatCurrency and isCryptoCurrency
They are called very often and accumulate cpu time as
shown in profilers.
2020-12-15 00:54:26 -05:00
jmacxx
b1d22af1ae
Privacy improvements for manual payout
Redesign the UI
Add import/export of payout settings
Add ability to import from mediation ticket
Mediator does not need private key
User can sign using own wallet or private key
Validation of input fields
Calculate the tx fee based on inputs
Display of the generated txid & hex so it can be checked
2020-12-14 22:19:37 -06:00
chimp1984
7bfbd0fd79
Change handling of delay at republishing
The delay was too long. Some users have 100 - 200
offers and with the 700 ms delay it takes 70-140 sec.
This causes more stress for the network and UI due
permanent adding of offers. We decreased delay to 30 ms per offer.
So with 200 offers it would be about 6 sec. Maybe we could reduce
it even further but as it is hard to test in the live network with
so many offers it is better to not be too radical with the change.
2020-12-14 21:32:35 -05:00
chimp1984
b55313054a
Cleanup
Remove debug and trace logs
Add curly brackets
2020-12-14 21:29:07 -05:00
sqrrm
0e7dd21745
Merge pull request #4916 from chimp1984/fix-access-from-wrong-thread-at-wallet-restore
Property fields must not be set from non JavaFX threads.
2020-12-14 23:56:14 +01:00
chimp1984
5c68ad0b47
Sort payment methods by display string not by id.
Apply sorting in drop down boxes.
2020-12-14 14:42:15 -05:00
Christoph Atteneder
7d12b94c6a
Merge pull request #4933 from chimp1984/add-num-items-to-tables
Improve funds and portfolio screens
2020-12-14 19:48:55 +01:00
Christoph Atteneder
6ae33fe5f2
Merge pull request #4935 from chimp1984/add-wallet-info-view
Add wallet info view
2020-12-14 19:48:23 +01:00
chimp1984
cb289845b6
Add reference to bitcoin RPC error codes 2020-12-14 13:08:12 -05:00
ghubstan
a0f1c22d19
Merge branch 'master' into 08-scratch 2020-12-14 15:02:21 -03:00
chimp1984
33cf657d1d
Clone txBroadcastServices so we do not manipulate source list 2020-12-14 13:02:15 -05:00
ghubstan
5522d0c53e
Add new api method gettransaction
This change was prompted by the recent changes in the main branch to
allow a tx memo field to be set from the UI and API.

This and the prior PR address the API's need to be able to fetch a
tx (with a memo).  The API can now get a completed trade's withdrawal
txid and pass it as a gettransaction parameter.

See previous PR "Append nullable withdrawalTxId field to Trade".

	https://github.com/bisq-network/bisq/pull/4937

A summary of changes by file:

grpc.proto

- Added withdrawalTxId field to existing TradeInfo proto & wrapper.
- Reordered fields in TradeInfo proto.
- Added new fields to be displayed by TxInfo proto in CLI.
- Fixed typo: unsetTxFeeRatePreference -> UnsetTxFeeRatePreference.
- Added new GetTransaction rpc.

GrpcWalletsService - Added new getTransaction gRPC boilerplate.

CoreWalletsService - Added new getTransaction implementation.

TxInfo - Added the new fields for displaying a tx summary from CLI.
This is not intended to be more than a brief summary;  a block explorer
or bitcoin-core client should be used to see the complete definition.

TradeInfo - Added the new withdrawalTxId field defined in grpc.proto.

CliMain - Added new 'case gettransaction'.

TransactionFormat - Formats a TxInfo sent from the server to CLI.

ColumnHeaderConstants - Added console headers used by TransactionFormat.

TradeFormat - Displays a completed trade's WithdrawalTxId if present.

Apitest - Adjusted affected tests: assert tx memo is persisted and
test gettransaction.
2020-12-14 15:01:03 -03:00
chimp1984
478e1224e8
Use MemPoolSpaceTxBroadcaster for withdrawing
funds and for empty wallet call.
2020-12-14 12:52:32 -05:00
chimp1984
f26e76c908
Only check for code 2020-12-14 12:30:37 -05:00
chimp1984
b9b4690671
Add null checks for txId 2020-12-14 12:28:08 -05:00
chimp1984
910441125e
Return if not mainnet 2020-12-14 12:11:24 -05:00
chimp1984
f0eefe7943
Add MemPoolSpaceTxBroadcaster 2020-12-14 11:35:24 -05:00
chimp1984
7d06bf3803
Add mempool nodes to Preferences 2020-12-14 11:23:51 -05:00
chimp1984
149b52859a
Add wallet info view with balance, xpub keys,
hd paths and button to open wallet details
2020-12-14 08:25:46 -05:00
Christoph Atteneder
810c0da0f9
Merge pull request #4930 from chimp1984/use-historical-data-store-for-account-age
Use HistoricalDataStoreService for AccountAgeWitnessStorageService
2020-12-14 11:28:18 +01:00
Christoph Atteneder
b8cec17f8e
Merge pull request #4944 from chimp1984/rename-tw-account-currency-selection
Improve TransferWise account
2020-12-14 11:26:50 +01:00
chimp1984
88f26f9324
Do not autofill all currencies by default but keep all unselected. 2020-12-13 23:50:28 -05:00
chimp1984
484a6be379
Rename 'Supported currencies' to
'Currencies for receiving funds'
2020-12-13 23:49:57 -05:00
chimp1984
ad2a329e08
Improve log 2020-12-13 17:26:09 -05:00
chimp1984
06ce1b6787
Improve thread name 2020-12-13 17:25:49 -05:00
chimp1984
f7790a6b50
Rename PriceNodeHttpClient to PriceHttpClient 2020-12-13 17:19:39 -05:00
chimp1984
3d8d445994
Use @Singleton annotation instead of definition in module 2020-12-13 17:19:02 -05:00
chimp1984
5d664e915e
Improve logs 2020-12-13 17:18:36 -05:00
chimp1984
5be2ea5830
Use dedicated HttpClient for fee requests
We used the same HttpClient for fee and price requests, which cause
problems when one request got completed and closed the connection
at finalize.
2020-12-13 17:17:52 -05:00
chimp1984
561639f046
Check if we have a pending request and return if thats the case 2020-12-13 17:04:24 -05:00
chimp1984
9496691f76
Refactor: Rename 'requestWithGET' to 'get' 2020-12-13 15:23:36 -05:00
ghubstan
6aa385e494
Append nullable withdrawalTxId field to Trade proto message
The withdrawalTxId field will be set in TradeManager#onWithdrawRequest
upon successful trade completion and withdrawal of funds.

Persisting withdrawalTxId will allow the api and ui to find the withdrawalTxId
for a completed trade after the seller withdraws funds to an external wallet.
In turn, the withdrawal tx's memo field will be accessible in a new (todo)
api getTx(txID) api method.

Changed:

- Appended field 'string withdrawal_tx_id = 40' to pb.proto's Trade message.

- Added nullable 'String withdrawalTxId' to Trade entity class.

- Added trade.setWithdrawalTxId(transaction.getTxId().toString()) in
  TradeManager#onWithdrawRequest's callback.
2020-12-12 12:01:55 -03:00
chimp1984
4d8a327567
Add enable/diable all toggle button to open offers
Add search field to openoffer and failed trades
Improve search
2020-12-11 00:21:47 -05:00
chimp1984
d3b68bf9e6
Add num items text field below tables
Move filter in history to top, fix wrong label
Add export to cvs to reserved and locked balances
2020-12-10 11:20:54 -05:00
chimp1984
bc1f6ddac5
Show num trades > 9 as number (not as star) for main menu badge 2020-12-10 11:18:27 -05:00
ghubstan
259bad629a
Merge branch 'master' into 05-use-memo-tx-field 2020-12-10 11:59:28 -03:00
Christoph Atteneder
f4df51c213
Merge pull request #4929 from chimp1984/make-sign-age-column-sortable
Make sign age column sortable
2020-12-10 12:00:04 +01:00
Christoph Atteneder
9498fd9b7d
Merge pull request #4917 from chimp1984/handle-invalid-maker-fee-tx
Detect and handle invalid maker fee tx
2020-12-10 11:57:32 +01:00
Christoph Atteneder
aa0e091906
Merge pull request #4927 from chimp1984/improve-shutdown-routine
Improve shutdown routine
2020-12-10 11:46:16 +01:00
chimp1984
fae8ddad4b
Add check in case bsqPrice is 0 (thrown an exception otherwise) 2020-12-10 00:12:11 -05:00
chimp1984
17ec32588b
Use HistoricalDataStoreService for AccountAgeWitnessStorageService 2020-12-09 23:46:44 -05:00
chimp1984
a2d2e6c4fb
Shutdown PriceFeedService and related services
at shutdown routine
2020-12-09 18:33:15 -05:00
chimp1984
de2755d2d7
Remove debug log 2020-12-09 18:32:24 -05:00
chimp1984
bcf956530f
Limit delay for remove offer result handler to 3 sec 2020-12-09 18:14:50 -05:00
sqrrm
63fc486896
Merge pull request #4918 from bisq-network/hotfix/v1.5.1
Hotfix/v1.5.1
2020-12-09 22:21:52 +01:00
ghubstan
bd66008062
Support tx memo field for btc withdrawals from api
- Added optional memo parameter to the api's sendbtc and
  withdrawfunds commands.

- Removed the @Nullable annotation was removed because protobuf
  does not support null.

- Visibility in two wallet check methods were changed from private
  to pkg protected so the CoreTradeService could use them.

- Adjusted affected tests.  (Asserting the memo field was set on a
  transaction cannot be checked from apitest yet.)
2020-12-09 16:51:56 -03:00
chimp1984
c962c1a183
Refactor: Rename presentation to displayString (no code change) 2020-12-09 14:02:57 -05:00
chimp1984
ed099981fa
Make findWitness public
Improve logs if trade limit was violated
2020-12-09 13:58:16 -05:00
ghubstan
144c5a82cc
Merge branch 'master' into 04-add-sendbtc-impl 2020-12-09 10:44:17 -03:00
ghubstan
6c9f0c252d
Add new api method 'sendbtc' and test
Takes an address, amount, and optional txfeerate param,
returns a lightweight TxInfo proto.

Also overloaded two BtcWalletService methods to allow sendbtc
to pass in the tx fee rate -- overriding the fee service and
custom fee rate setting.
2020-12-08 21:12:02 -03:00
chimp1984
ce68f2e24a
Check also for depositTxId in trade and check if both
txId and tx.getId are the same.

We got some reports where users have no deposit tx displayed in the
trade after spv resync but cannot move the trade to failed trades.
It seems the invalid txId is still stored in the trade but the tx itself
got removed from the wallet after reysnc. We check not that both the tx
and the txId need to be present.
2020-12-08 17:11:58 -05:00
ghubstan
2842070afd
Merge branch 'master' into 03-add-txFeeRate-param 2020-12-08 19:04:27 -03:00
Christoph Atteneder
29c2e0002d
Merge branch 'master' of github.com:bisq-network/bisq into hotfix/v1.5.1
# Conflicts:
#	build.gradle
#	core/src/main/java/bisq/core/btc/setup/WalletConfig.java
#	desktop/package/linux/Dockerfile
#	desktop/package/linux/package.sh
#	desktop/package/linux/release.sh
#	desktop/package/macosx/create_app.sh
#	desktop/package/macosx/finalize.sh
#	desktop/package/macosx/insert_snapshot_version.sh
#	desktop/package/windows/package.bat
#	desktop/package/windows/release.bat
#	relay/src/main/resources/version.txt
#	seednode/src/main/java/bisq/seednode/SeedNodeMain.java
2020-12-08 22:19:11 +01:00
chimp1984
960b835f3f
Check if maker fee tx is already spent or has invalid structure.
If so show popup to remove that offer.
Add maker fee tx ix to offer details window.
If invalid, add error msg to offer details window.
2020-12-08 15:45:51 -05:00
chimp1984
cd98617ec8
Property fields must not bet set from non JavaFX threads.
So we map those setters to our UserThread.

How to reproduce issue?
Restore from seed triggered following exception:

Dec-08 13:20:04.547 [ STARTING] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.IllegalStateException: Not on FX application thread; currentThread =  STARTING
	at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:291)
	at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:424)
	at javafx.scene.Parent$3.onProposedChange(Parent.java:471)
	at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:113)
	at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:108)
	at javafx.scene.control.skin.LabeledSkinBase.updateChildren(LabeledSkinBase.java:272)
	at javafx.scene.control.skin.LabeledSkinBase.lambda$new$11(LabeledSkinBase.java:220)
	at com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler.lambda$new$1(LambdaMultiplePropertyChangeListenerHandler.java:49)
	at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:86)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
	at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
	at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:145)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:50)
	at bisq.core.app.WalletAppSetup.lambda$init$1(WalletAppSetup.java:170)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:170)
	at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.IntegerPropertyBase.fireValueChangedEvent(IntegerPropertyBase.java:107)
	at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:114)
	at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148)
	at bisq.core.btc.setup.WalletsSetup$1.onSetupCompleted(WalletsSetup.java:245)
2020-12-08 13:22:43 -05:00
Christoph Atteneder
6431d639ae
Merge pull request #4908 from chimp1984/add-memo-field-at-step4
Add memo field at step4
2020-12-08 16:35:16 +01:00
chimp1984
455c9b0ff3
Avoid logging warning at startup 2020-12-08 10:13:31 -05:00
Christoph Atteneder
d41692602a
Merge pull request #4903 from oscarguindzberg/bloomFilterFix
Upate bitcoinj to commit dcf8af0 - Bloom filter fix
2020-12-08 15:03:28 +01:00
Christoph Atteneder
89e55774c7
Merge pull request #4910 from chimp1984/remove-log-entry
Improve logs
2020-12-08 15:03:09 +01:00
sqrrm
2a2f05f408
Merge pull request #4912 from chimp1984/add-serialized-tx-as-hex-to-trade-details
Add "Raw deposit transaction as hex" to details window
2020-12-08 12:28:15 +01:00
chimp1984
25d227556b
Add "Raw deposit transaction as hex" to details window
Rename Contract as json button to detail data
2020-12-07 20:25:29 -05:00
chimp1984
d0005e45f4
Add logs of tx in case of exceptions 2020-12-07 19:47:44 -05:00
chimp1984
a3df372ecd
Apply project format rules (no code change) 2020-12-07 19:47:05 -05:00
chimp1984
b5e19312c5
Remove logs logging absolute path to data directory 2020-12-07 19:35:01 -05:00
chimp1984
38d52ff6f9
Add more logs to AddressEntry domain 2020-12-07 19:32:32 -05:00
chimp1984
f4fd286b86
Remove verbose log 2020-12-07 17:56:28 -05:00
chimp1984
30ff8c3853
Remove paymentAccount from log 2020-12-07 14:53:45 -05:00
chimp1984
249c6143c9
Use preferredTradeCurrency is fiat, otherwise the users country currency 2020-12-07 13:48:43 -05:00
chimp1984
a7765d0cce
Use 30 day average BSQ price for calculating BSQ fee 2020-12-07 13:45:02 -05:00
chimp1984
5a0634f94d
Move methods to AveragePriceUtil 2020-12-07 13:24:17 -05:00
chimp1984
f745f0f0d6
Move methods from AxisInlierUtils to InlierUtil
We will need some of those methods later inside another core util class.
2020-12-07 13:21:44 -05:00
chimp1984
104b7edc99
Add memo field at withdraw to external wallet screen
Implements https://github.com/bisq-network/bisq/issues/4869
2020-12-07 12:32:56 -05:00
chimp1984
959c53c18d
Apply project format rules (no code change) 2020-12-07 12:31:34 -05:00
chimp1984
e2f9009fce
Remove dev log, fix typo in log 2020-12-07 10:33:41 -05:00
Oscar Guindzberg
9ca20d8b3d
Use bitcoinj 0.15.8 (commit dcf8af0) 2020-12-07 11:39:58 -03:00
sqrrm
74485f0844
Merge pull request #4884 from ghubstan/01-refactor-getdust
Refactor: move getDust(Transaction transaction)
2020-12-07 14:12:59 +01:00
ghubstan
159d4cc6f5
Add optional txFeeRate parameter to api sendbsq
If present in the sendbsq command, the parameter will override the fee
service and custom fee rate setting for the BSQ transaction.

Also changed the sendbsq grpc return type to a lightweight TX proto wrapper.

Besides some small refactoring in the CLI, all the changes are
adjustments for this new sendbsq parameter and its new grpc return value.
2020-12-04 17:17:37 -03:00
chimp1984
82445c0e28
In case the peers witness is not found and the trade amount
is not exceeding TOLERATED_SMALL_TRADE_AMOUNT (0.01 BTC) we
return true for verifyPeersTradeAmount.
Before such offers could not be taken even the witness
check would be irrelevant as the trade amount is below the
threshold where we require account age witness.
2020-12-04 12:40:30 -05:00
ghubstan
900d498ee1
Merge branch 'master' into 02-refactor-completePreparedSendBsqTx 2020-12-04 14:22:45 -03:00
ghubstan
dc6144d337
Refactor BtcWalletService to let api override fee rates
BtcWalletService was changed to allow the api to override tx fee
rates from the sendbsq and sendbtc methods.  The api methods will
still be able to use the network fee service and custom tx fee rate
preference, and set / unset the custom tx fee rate preference, but
the change will permit the addition of an optional txFeeRate parameter
to the sendbsq and sendbtc methods (todo).  A few other minor changes
(style and removal of never thrown ex spec) were also made to this class.

Two BtcWalletService methods were refactored.

- The redundant (was always true) boolean isSendTx argument was removed
  from the completePreparedVoteRevealTx method signature.

- The redundant (was always true) boolean useCustomTxFee was removed
  from the completePreparedBsqTx method signature.

- The completePreparedSendBsqTx method was overloaded with a 2nd parameter
  (Coin txFeePerVbyte) to allow api to override fee service and custom
  tx fee rate when sending BSQ or BTC.

- The completePreparedBsqTx method was overloaded with a 3rd parameter
  (Coin txFeePerVbyte) to allow api to override fee service and custom
  tx fee rate when sending BSQ or BTC.

The following line was deleted from the completePreparedBsqTx method
because txFeePerVbyte is now an argument:

	Coin txFeePerVbyte = useCustomTxFee ? getTxFeeForWithdrawalPerVbyte() : feeService.getTxFeePerVbyte();

This useCustomTxFee value was always true, and redudant here because
getTxFeeForWithdrawalPerVbyte() returns feeService.getTxFeePerVbyte()
or the custom fee rate preference. i.e.,

Coin txFeePerVbyte = useCustomTxFee ? getTxFeeForWithdrawalPerVbyte() : feeService.getTxFeePerVbyte();

	is equivalent to

Coin txFeePerVbyte = getTxFeeForWithdrawalPerVbyte();

LockupTxService, UnlockTxService, BsqSendView, and BsqTransferService
were adjusted to this BtcWalletService refactoring.
2020-12-04 14:17:24 -03:00
Christoph Atteneder
588623eb2d
Merge pull request #4885 from chimp1984/fix-bug-with-reapplying-past-trade-state
Avoid that buyer switches back to trade step 2 at startup after payment confirmed
2020-12-04 16:41:41 +01:00
chimp1984
c04b95b996
Remove checkNotNull for takerFeeTxId 2020-12-04 10:10:57 -05:00
sqrrm
57681245ff
Merge pull request #4889 from chimp1984/avoid-case-of-multi-trades-with-same-offer-id
Avoid case of multi trades with same offer
2020-12-04 00:48:45 +01:00
chimp1984
8f99ca0b63
Add uid to trade to make sure that look up for process model cannot
fail in case of multiple trades with the same offer id.
Use uid instead of the weaker offerId as key for the tradeProtocolByTradeId map
2020-12-03 14:43:35 -05:00
chimp1984
2d5fc33ba4
Move MakerRemovesOpenOffer to first task to avoid that if take offer
fails early that we get another trade with same id at maker in case another use takes the offer afterwards.
2020-12-03 14:19:24 -05:00
Christoph Atteneder
91a1a92ac4
Merge pull request #4877 from Jakub-CZ/fix_warning_message
Fix warning about rejected transaction
2020-12-03 19:28:06 +01:00
Christoph Atteneder
baa038aa39
Merge pull request #4886 from jmacxx/hotfix/v1.5.1
add logging of Tx hex
2020-12-03 19:18:50 +01:00
chimp1984
1fdc43e4d0
Increase timeout for trade protocol task runners from 30 to 60 sec 2020-12-03 11:53:35 -05:00
jmacxx
fa80553890
add logging of Tx hex 2020-12-03 10:22:07 -06:00
chimp1984
f843b5477b
Fixes https://github.com/bisq-network/bisq/issues/4864
When seller if offline we resend the CounterCurrencyTransferStartedMessage at startup.
That caused the trade state set to BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG and then after
the msg was stored in mailbox to BUYER_STORED_IN_MAILBOX_FIAT_PAYMENT_INITIATED_MSG.
Those 2 msg trigger diff. UI states which led to the UI glitch that the UI moved to
step 2 and then to step 3 which was correct but confusing to the user.

Now we only apply BUYER_SENT_FIAT_PAYMENT_INITIATED_MSG is trade state ordinal is
smaller avoiding that UI glitch.
2020-12-03 11:19:18 -05:00
ghubstan
74261b1749
Refactor: move getDust(Transaction transaction)
The api is going to need this method, so it was moved from desktop to core.

- Moved the method from WithdrawalView to WalletService.

- Removed an unused initilizer in WithdrawalView.
2020-12-03 12:16:04 -03:00
chimp1984
29d757b741
- revent that a wrong tx is set as deposit tx
We check if the txIds of the inputs matches our maker fee tx and taker fee tx and if the depositTxAddress we
use for the confidence lookup is use as an output address.
This prevents that past txs which have the our depositTxAddress as input or output (deposit or payout txs) could
be interpreted as our deposit tx. This happened because if a bug which caused re-use of the Multisig address
entries and if both traders use the same key for multiple trades the depositTxAddress would be the same.
We fix that bug as well but we also need to avoid that past already used addresses might be taken again
(the Multisig flag got reverted to available in the address entry).

- Add check to swapTradeEntryToAvailableEntry to not swap MULTI_SIG entries.

- Remove swap for MULTI_SIG entries at resetAddressEntriesForPendingTrade

- Add check to swapToAvailable to not swap MULTI_SIG entries.

- Remove swaps for MULTI_SIG entries

- Add setCoinLockedInMultiSigAddressEntry method

- Make coinLockedInMultiSig final and remove setter but use it in constructor.

- Rename getCoinLockedInMultiSig to getCoinLockedInMultiSigAsCoin
We use an immutable list when operating on AddressEntry so changes on the
object would not be reflected in the list.
The only mutable field (beside non critical cache fields) is the keyPair.
Might be good to refactor that as well at some point.

- Add setCoinLockedInMultiSigAddressEntrymethods

- Apply API changes:
-- resetCoinLockedInMultiSigAddressEntry
-- setCoinLockedInMultiSigAddressEntry
-- renamed methods
2020-12-03 10:01:01 -05:00
chimp1984
a39f2e8fcb
Apply project format rules (no code change) 2020-12-03 09:54:43 -05:00
sqrrm
9b774d1515
Merge pull request #4858 from ghubstan/21-fee-rate-apis
Add tx fee rate api methods:  gettxfeerate, settxfeerate, unsettxfeerate
2020-12-03 10:41:54 +01:00
Jakub Loucký
b8bdbbc551
Fix warning for rejected transaction 2020-12-02 21:16:41 +01:00
ghubstan
7f636e45f9
Prevent attempt to send amount of BSQ < dust 2020-12-02 15:21:20 -03:00
ghubstan
2efd094f68
Remove method only used in class' toString 2020-12-02 15:01:34 -03:00
ghubstan
65df9e1503
Change sendbsq's amount parameter type to String 2020-12-02 14:52:05 -03:00
ghubstan
9b4bdfc5ad
Make salt an editable payment acct json form field
Users need to be able to preserve their acct age when moving a
payment account to a new client.

Also adjusted affected tests, and did some minor refactoring
of the custom gson type adaptor.
2020-12-02 13:52:39 -03:00
ghubstan
987d89319e
Use ListenableFuture and callback when requesting tx fee
This change fixes the blocking problem in the fee rate request api.
Also redefined the TxFeeRateInfo.

- Redefined grpc.proto message TxFeeRateInfo, added
  lastFeeServiceRequestTs field. (CLI user may want to know
  TS of last fee request.)

- Adjusted TxFeeRateInfo proto wrapper.

- Adjusted CurrencyFormat and BtcTxFeeRateTest to new TxFeeRateInfo.

- Added @Getter annotation to FeeService.  (CLI user may want to know
  TS of last fee request).

- Pass resultHandler from GrpcWalletsService through CoreApi, to
  CoreWalletsService's tx fee rate api methods.
2020-12-01 21:10:47 -03:00
ghubstan
faf030fbc5
Add useCustomTxFeeRate field to TxFeeRateInfo proto wrapper
This is set from the core preferences.isUseCustomWithdrawalTxFee(),
and simplifies fee changing logic in the API.
2020-12-01 17:14:08 -03:00
ghubstan
62a2aa8543
Don't be so polite 2020-12-01 15:55:53 -03:00
ghubstan
45cfb95245
Remove many log.isDebugEnabled() checks
These do not buy enough in the way of performance, at the cost of
so many additional lines.  Buy these checks should be done for
debug log statements that have expensive parameters.
2020-12-01 15:48:11 -03:00
Christoph Atteneder
740071d54c
Merge pull request #4859 from oscarguindzberg/fixEmergencyPayout
Fix emergency payout
2020-12-01 13:58:01 +01:00
Christoph Atteneder
49d0e75eac
Merge pull request #4852 from chimp1984/stop-rpc-service-at-shutdown
Shut down rpc service at app shut down routine
2020-11-30 15:29:36 +01:00
Christoph Atteneder
c7b92c36c9
Merge pull request #4850 from chimp1984/improve-stratup-info-display
Improve startup info display
2020-11-27 16:08:07 +01:00
Steven Barclay
d59b425c94
Add missing output value check to takerSignsDepositTx
Make sure the taker checks the value of the 2-of-2 multisig output of
the deposit tx created by the maker, before signing it. This avoids a
potential security hole, where the maker attempts to steal most of the
deposit by using the wrong output value and adding an extra 'change'
output to himself.

Note that there's no actual vulnerability at present, as the output
value is indirectly checked via the validation of the delayed payout tx.
In particular, the extra checks added in 345426f as part of #4789 (Fix
remaining blackmail vulnerabilities) place a lower bound on the delayed
payout tx input value and with it the deposit tx output value. However,
explicitly checking the amount is more robust.
2020-11-26 23:39:51 +00:00
Oscar Guindzberg
f2acf42edc
Set payoutTx as parent tx 2020-11-26 20:30:23 -03:00