Commit Graph

3829 Commits

Author SHA1 Message Date
Julian Knutsen
9f69134568
[REFACTOR] Clean up ClientAPI for refreshTTL
Remove isDataOwner from the client API. All users pass in true. All test
users don't care.
2019-12-03 12:30:07 -08:00
Julian Knutsen
77413c9671
[REFACTOR] Clean up ClientAPI for remove
Remove isDataOwner from the client API. All users pass in true. All test
users don't care.
2019-12-03 12:30:06 -08:00
Julian Knutsen
0e6b1a2044
[REFACTOR] Clean up ClientAPI for addProtectedStorageEntry
Remove isDataOwner from the client API. All users pass in true. All test
users don't care.
2019-12-03 12:30:06 -08:00
Julian Knutsen
ecae31eddb
[RENAME] LazyProcessedPayload to ProcessOncePersistableNetworkPayload
Name is left over from previous implementation. Change it to be more
relevant to the current code and update comments to indicate the
current usage.
2019-12-03 12:20:41 -08:00
wiz
f0cbddc545
Add Chinese Traditional file to update_translations.sh script 2019-12-03 12:01:02 +01:00
wiz
2d188000c2
Add zh-hant translations (Chinese Traditional) 2019-12-03 12:00:54 +01:00
wiz
ba492b88e6
Adjust update_translations.sh language tags for script/regional variants 2019-12-03 11:50:55 +01:00
wiz
0bf75aeb42
Fix language tags so script and regional variants work correctly 2019-12-03 11:50:45 +01:00
wiz
4dab4fc25e
Add Chinese Traditional file to update_translations.sh script 2019-12-03 19:49:47 +09:00
wiz
62fde1e7ab
Add zh-hant translations (Chinese Traditional) 2019-12-03 19:49:44 +09:00
Christoph Atteneder
5a0db50d3c
Update strings to reflect bisq is exchange network (#3681)
* Update strings to reflect bisq is exchange network

Motivated by changes done to the website, as described in
https://github.com/bisq-network/bisq-website/pull/280

* Use lowercase 'bitcoin'

Based on feedback mentioned in this comment:
https://github.com/bisq-network/bisq-website/pull/280#discussion_r351491215
2019-12-03 11:43:47 +01:00
Christoph Atteneder
d8e19c4e8c
Use correct language tags for script and regional language variants (#3716)
* Fix language tags so script and regional variants work correctly

* Adjust update_translations.sh language tags for script/regional variants

ACKs for top commit:
  @ripcurlx:
    ACK 089232716d
2019-12-03 11:37:32 +01:00
chimp1984
c2e8806d16
Add handling of mediationResultState to isFundsLockedIn
Fixes https://github.com/bisq-network/bisq/issues/3721
(part of the problem was that the trade ended up in failed trade)

Refactor method and add comments.
We did not handle the case of a mediated payout. isPayoutPublished() is
only reflecting non-disputed trade payouts.
2019-12-02 11:58:12 +01:00
chimp1984
04c02589aa
Refactoring: Replace isGreaterThan(Coin.ZERO) with isPositive() 2019-12-02 11:57:25 +01:00
chimp1984
fdc582a60e
Do not add an output if value is 0 BTC
Fixes https://github.com/bisq-network/bisq/issues/3721 and
https://github.com/bisq-network/bisq/issues/3722

There are still more issues as such a payout tx will cause that the
trade ends up in failed trades. This commit only fixes the invalid
tx issue.
2019-12-02 11:57:12 +01:00
Christoph Atteneder
51982fdcd6
Merge pull request #3726 from chimp1984/do-not-move-mediated-trades-to-failed-trades
Add handling of mediationResultState to isFundsLockedIn
2019-12-02 11:12:21 +01:00
chimp1984
9ac64e5e3e
Add handling of mediationResultState to isFundsLockedIn
Fixes https://github.com/bisq-network/bisq/issues/3721
(part of the problem was that the trade ended up in failed trade)

Refactor method and add comments.
We did not handle the case of a mediated payout. isPayoutPublished() is
only reflecting non-disputed trade payouts.
2019-12-01 19:23:45 -05:00
chimp1984
c126f0ec09
Refactoring: Replace isGreaterThan(Coin.ZERO) with isPositive() 2019-12-01 18:34:58 -05:00
chimp1984
bfa123bf6c
Do not add an output if value is 0 BTC
Fixes https://github.com/bisq-network/bisq/issues/3721 and
https://github.com/bisq-network/bisq/issues/3722

There are still more issues as such a payout tx will cause that the
trade ends up in failed trades. This commit only fixes the invalid
tx issue.
2019-12-01 18:34:13 -05:00
wiz
089232716d
Adjust update_translations.sh language tags for script/regional variants 2019-11-29 11:34:22 +09:00
wiz
9d25041746
Fix language tags so script and regional variants work correctly 2019-11-29 11:29:21 +09:00
Devin Bileck
e443b8fade
Use lowercase 'bitcoin'
Based on feedback mentioned in this comment:
https://github.com/bisq-network/bisq-website/pull/280#discussion_r351491215
2019-11-27 22:36:53 -08:00
Steve Jain
548a217751
Replace arbitration link in tac
With link to v1.2 dispute resolution documentation.
2019-11-27 10:30:39 +01:00
chimp1984
88cbecd8ed
Use 2of2 multisig deposit tx version for manual payout
With v1.2 we use 2of2 multisig for deposit tx. This commit changes the
manual payout window to reflect that.

- Remove unused code from legacy arbitration
- Fix comments
2019-11-27 10:30:25 +01:00
Christoph Atteneder
e00ae654d4
Merge pull request #3696 from m52go/fix-ua-arblink
Replace arbitration link in tac
2019-11-27 09:11:15 +01:00
Christoph Atteneder
c131a890f2
Update translations 2019-11-27 08:54:35 +01:00
Christoph Atteneder
cf3a13e08a
Update bitcoinj checkpoints file 2019-11-27 08:51:49 +01:00
Steve Jain
4c27da7644
Replace arbitration link in tac
With link to v1.2 dispute resolution documentation.
2019-11-26 23:33:25 -05:00
chimp1984
a67b960df9
Update comment 2019-11-26 15:47:21 -05:00
chimp1984
477f9de23a
Use 2of2 multisig deposit tx version for manual payout
With v1.2 we use 2of2 multisig for deposit tx. This commit changes the
manual payout window to reflect that.

- Remove unused code from legacy arbitration
- Fix comments
2019-11-26 13:33:30 -05:00
chimp1984
91b76d4231
Add list of shortcuts 2019-11-26 12:51:57 -05:00
Christoph Atteneder
06f0d6b191
Reputation BSQ added to BSQ Wallet screen (#3366)
* BSQ Merit now displayed - fixes issue #3352

* Broke merit text setting to 2 lines.

* Fix formatting
2019-11-26 15:50:35 +01:00
Christoph Atteneder
a7b9cfdec7
Merge pull request #3676 from chimp1984/dont-show-rejected-bonded-roles
Only show accepted bonded roles in bond view.
2019-11-26 14:43:54 +01:00
Christoph Atteneder
e0a92ca9fe
Prevent taking of offers with unequal bank account types (excl. SEPA) (#3673)
* Use strict stubbing for ReceiptValidatorTest to avoid confusion

Remove redundant stubs from the MoneyGram and Western Union tests and
ensure that all such stubs result in failure. In particular, the 'offer'
mock is never accessed directly by ReceiptValidator.

* Prevent taking of offers with unequal bank account types

Use stricter criteria when deciding which of the taker's accounts (if
any) are valid for a given offer. Specifically, prevent National Bank
accounts from being used to take Same / Specific Bank(s) offers, so the
three payment method types can never being mixed.

This prevents an error on the trading peer when the trade starts, due to
enforcement of equal maker & taker payment method IDs (except for SEPA)
in the Contract payload constructor.

This partially addresses #3602, where the erroneous peer response causes
the taker to be presented with a confusing timeout.
2019-11-26 14:39:18 +01:00
Christoph Atteneder
62aea83308
Cleanup fmxlview and javax imports (#3661)
* Remove @FxmlView from abstract view classes

* Use generic javax imports for DI

* Additional cleanup of redundant DI annotations
2019-11-26 14:36:01 +01:00
Christoph Atteneder
66b2306ed9
P2PDataStorage and FileManager improvements (#3690)
* [PR COMMENTS] Make maxSequenceNumberBeforePurge final

Instead of using a subclass that overwrites a value, utilize Guice
to inject the real value of 10000 in the app and let the tests overwrite
it with their own.

* [TESTS] Clean up 'Analyze Code' warnings

Remove unused imports and clean up some access modifiers now that
the final test structure is complete

* [REFACTOR] HashMapListener::onAdded/onRemoved

Previously, this interface was called each time an item was changed. This
required listeners to understand performance implications of multiple
adds or removes in a short time span.

Instead, give each listener the ability to process a list of added or
removed entrys which can help them avoid performance issues.

This patch is just a refactor. Each listener is called once for each
ProtectedStorageEntry. Future patches will change this.

* [REFACTOR] removeFromMapAndDataStore can operate on Collections

Minor performance overhead for constructing MapEntry and Collections
of one element, but keeps the code cleaner and all removes can still
use the same logic to remove from map, delete from data store, signal
listeners, etc.

The MapEntry type is used instead of Pair since it will require less
operations when this is eventually used in the removeExpiredEntries path.

* Change removeFromMapAndDataStore to signal listeners at the end in a batch

All current users still call this one-at-a-time. But, it gives the ability
for the expire code path to remove in a batch.

* Update removeExpiredEntries to remove all items in a batch

This will cause HashMapChangedListeners to receive just one onRemoved()
call for the expire work instead of multiple onRemoved() calls for each
item.

This required a bit of updating for the remove validation in tests so
that it correctly compares onRemoved with multiple items.

* ProposalService::onProtectedDataRemoved signals listeners once on batch removes

#3143 identified an issue that tempProposals listeners were being
signaled once for each item that was removed during the P2PDataStore
operation that expired old TempProposal objects. Some of the listeners
are very expensive (ProposalListPresentation::updateLists()) which results
in large UI performance issues.

Now that the infrastructure is in place to receive updates from the
P2PDataStore in a batch, the ProposalService can apply all of the removes
received from the P2PDataStore at once. This results in only 1 onChanged()
callback for each listener.

The end result is that updateLists() is only called once and the performance
problems are reduced.

This removes the need for #3148 and those interfaces will be removed in
the next patch.

* Remove HashmapChangedListener::onBatch operations

Now that the only user of this interface has been removed, go ahead
and delete it. This is a partial revert of
f5d75c4f60 that includes the code that was
added into ProposalService that subscribed to the P2PDataStore.

* [TESTS] Regression test for #3629

Write a test that shows the incorrect behavior for #3629, the hashmap
is rebuilt from disk using the 20-byte key instead of the 32-byte key.

* [BUGFIX] Reconstruct HashMap using 32-byte key

Addresses the first half of #3629 by ensuring that the reconstructed
HashMap always has the 32-byte key for each payload.

It turns out, the TempProposalStore persists the ProtectedStorageEntrys
on-disk as a List and doesn't persist the key at all. Then, on
reconstruction, it creates the 20-byte key for its internal map.

The fix is to update the TempProposalStore to use the 32-byte key instead.
This means that all writes, reads, and reconstrution of the TempProposalStore
uses the 32-byte key which matches perfectly with the in-memory map
of the P2PDataStorage that expects 32-byte keys.

Important to note that until all seednodes receive this update, nodes
will continue to have both the 20-byte and 32-byte keys in their HashMap.

* [BUGFIX] Use 32-byte key in requestData path

Addresses the second half of #3629 by using the HashMap, not the
protectedDataStore to generate the known keys in the requestData path.

This won't have any bandwidth reduction until all seednodes have the
update and only have the 32-byte key in their HashMap.

fixes #3629

* [DEAD CODE] Remove getProtectedDataStoreMap

The only user has been migrated to getMap(). Delete it so future
development doesn't have the same 20-byte vs 32-byte key issue.

* [TESTS] Allow tests to validate SequenceNumberMap write separately

In order to implement remove-before-add behavior, we need a way to
verify that the SequenceNumberMap was the only item updated.

* Implement remove-before-add message sequence behavior

It is possible to receive a RemoveData or RemoveMailboxData message
before the relevant AddData, but the current code does not handle
it.

This results in internal state updates and signal handler's being called
when an Add is received with a lower sequence number than a previously
seen Remove.

Minor test validation changes to allow tests to specify that only the
SequenceNumberMap should be written during an operation.

* [TESTS] Allow remove() verification to be more flexible

Now that we have introduced remove-before-add, we need a way
to validate that the SequenceNumberMap was written, but nothing
else. Add this feature to the validation path.

* Broadcast remove-before-add messages to P2P network

In order to aid in propagation of remove() messages, broadcast them
in the event the remove is seen before the add.

* [TESTS] Clean up remove verification helpers

Now that there are cases where the SequenceNumberMap and Broadcast
are called, but no other internal state is updated, the existing helper
functions conflate too many decisions. Remove them in favor of explicitly
defining each state change expected.

* [BUGFIX] Fix duplicate sequence number use case (startup)

Fix a bug introduced in d484617385 that
did not properly handle a valid use case for duplicate sequence numbers.

For in-memory-only ProtectedStoragePayloads, the client nodes need a way
to reconstruct the Payloads after startup from peer and seed nodes. This
involves sending a ProtectedStorageEntry with a sequence number that
is equal to the last one the client had already seen.

This patch adds tests to confirm the bug and fix as well as the changes
necessary to allow adding of Payloads that were previously seen, but
removed during a restart.

* Clean up AtomicBoolean usage in FileManager

Although the code was correct, it was hard to understand the relationship
between the to-be-written object and the savePending flag.

Trade two dependent atomics for one and comment the code to make it more
clear for the next reader.

* [DEADCODE] Clean up FileManager.java

* [BUGFIX] Shorter delay values not taking precedence

Fix a bug in the FileManager where a saveLater called with a low delay
won't execute until the delay specified by a previous saveLater call.

The trade off here is the execution of a task that returns early vs.
losing the requested delay.

* [REFACTOR] Inline saveNowInternal

Only one caller after deadcode removal.
2019-11-26 14:34:32 +01:00
Florian Reimair
d12843a74c
Merge pull request #3682 from ripcurlx/improve-account-signing
Improve account signing security
2019-11-26 12:50:12 +01:00
Devin Bileck
70296a94af
Update strings to reflect bisq is exchange network
Motivated by changes done to the website, as described in
https://github.com/bisq-network/bisq-website/pull/280
2019-11-25 00:28:50 -08:00
chimp1984
ff10f7cf3f
Only show accepted bonded roles in bond view.
Fixes #3271

Replaces https://github.com/bisq-network/bisq/pull/3320
2019-11-24 13:10:10 -05:00
Justin Carter
fe00f4aac9
Use correct monetary format in BsqFormatter
Also remove logic regarding base currency. Only BTC is currently
supported so there is no need to keep the logic around.
2019-11-24 07:59:02 +01:00
Steven Barclay
fc7d31ef83
Prevent taking of offers with unequal bank account types
Use stricter criteria when deciding which of the taker's accounts (if
any) are valid for a given offer. Specifically, prevent National Bank
accounts from being used to take Same / Specific Bank(s) offers, so the
three payment method types can never being mixed.

This prevents an error on the trading peer when the trade starts, due to
enforcement of equal maker & taker payment method IDs (except for SEPA)
in the Contract payload constructor.

This partially addresses #3602, where the erroneous peer response causes
the taker to be presented with a confusing timeout.
2019-11-24 05:08:42 +00:00
Steven Barclay
e5afb17269
Use strict stubbing for ReceiptValidatorTest to avoid confusion
Remove redundant stubs from the MoneyGram and Western Union tests and
ensure that all such stubs result in failure. In particular, the 'offer'
mock is never accessed directly by ReceiptValidator.
2019-11-24 02:22:11 +00:00
Justin Carter
d4e7f86ff6
Use generic javax imports for DI 2019-11-22 14:50:21 +01:00
Christoph Atteneder
0ac6bf1307
Only allow seller side to sign accounts
This prevents a scammer to use publicly known account details
(without being in control of the account) as a seller to get
signed by a buyer. The money received in the seller account might
not be detected by the legitimate owner and/or the money not sent back.
30 days later the scammer could use this signed account as seed to peer sign other stolen accounts.
2019-11-22 11:32:43 +01:00
Christoph Atteneder
46ce873b01
Add additional trade amount limit for trades that qualify for account signing
Should make it easier to detect by a stolen bank account owner as buyer that an outgoing transactions is taking place.
2019-11-22 11:26:46 +01:00
Julian Knutsen
e212240b88
[BUGFIX] Reconstruct HashMap using 32-byte key
Addresses the first half of #3629 by ensuring that the reconstructed
HashMap always has the 32-byte key for each payload.

It turns out, the TempProposalStore persists the ProtectedStorageEntrys
on-disk as a List and doesn't persist the key at all. Then, on
reconstruction, it creates the 20-byte key for its internal map.

The fix is to update the TempProposalStore to use the 32-byte key instead.
This means that all writes, reads, and reconstrution of the TempProposalStore
uses the 32-byte key which matches perfectly with the in-memory map
of the P2PDataStorage that expects 32-byte keys.

Important to note that until all seednodes receive this update, nodes
will continue to have both the 20-byte and 32-byte keys in their HashMap.
2019-11-20 16:15:52 -08:00
Dimitris Apostolou
587b55d37b
Fix typos and cleanup 2019-11-20 22:56:19 +02:00
Julian Knutsen
a8139f3a04
Remove HashmapChangedListener::onBatch operations
Now that the only user of this interface has been removed, go ahead
and delete it. This is a partial revert of
f5d75c4f60 that includes the code that was
added into ProposalService that subscribed to the P2PDataStore.
2019-11-19 08:37:40 -08:00
Julian Knutsen
a50e59f7eb
ProposalService::onProtectedDataRemoved signals listeners once on batch removes
#3143 identified an issue that tempProposals listeners were being
signaled once for each item that was removed during the P2PDataStore
operation that expired old TempProposal objects. Some of the listeners
are very expensive (ProposalListPresentation::updateLists()) which results
in large UI performance issues.

Now that the infrastructure is in place to receive updates from the
P2PDataStore in a batch, the ProposalService can apply all of the removes
received from the P2PDataStore at once. This results in only 1 onChanged()
callback for each listener.

The end result is that updateLists() is only called once and the performance
problems are reduced.

This removes the need for #3148 and those interfaces will be removed in
the next patch.
2019-11-19 08:37:39 -08:00
Julian Knutsen
b281566e14
[REFACTOR] HashMapListener::onAdded/onRemoved
Previously, this interface was called each time an item was changed. This
required listeners to understand performance implications of multiple
adds or removes in a short time span.

Instead, give each listener the ability to process a list of added or
removed entrys which can help them avoid performance issues.

This patch is just a refactor. Each listener is called once for each
ProtectedStorageEntry. Future patches will change this.
2019-11-19 08:37:38 -08:00
Justin Carter
80fda1ec2c
Inject CoinFormatter via BTC_FORMATTER_KEY 2019-11-19 15:54:18 +01:00
Justin Carter
68a988b3a8
Remove dead code 2019-11-19 14:24:30 +01:00
Justin Carter
cb8873fa6d
Move BsqFormatter and ImmutableCoinFormatter under .coin package 2019-11-19 14:23:18 +01:00
Justin Carter
d23ae558e7
Rename BSFormatter to ImmutableCoinFormatter 2019-11-19 14:11:01 +01:00
Justin Carter
ed97f7a9e5
Use interface instead of class name for CoinFormatter 2019-11-19 14:00:22 +01:00
Justin Carter
d10683e192
Extract CoinFormatter interface 2019-11-19 12:30:31 +01:00
Justin Carter
2f7a924792
Remove dead code from BSFormatter 2019-11-19 12:18:10 +01:00
Christoph Atteneder
8c8c7117d3
Refactorings for api support (#3611)
* Remove trailing spaces

* Add toProtoTradeStatistics2 method

API will use getTradeStatistics and expect TradeStatistics2 not
PersistableNetworkPayload

* Add CreateOfferService class

* Remove commented out code

* User weaker access, add final

* Add getRandomOfferId method

* Add getSellerSecurityDeposit method

* Add getEstimatedFeeAndTxSize method

- Rename estimateTxSize to updateEstimatedFeeAndTxSize
- Add getEstimatedFeeAndTxSize method to CreateOfferService
- Add dependent methods and fields

* Use methods from createOfferService

- Use getBuyerSecurityDepositAsCoin and getSellerSecurityDepositAsCoin
from CreateOfferService

* Use txFeeFromFeeService from createOfferService

- Use getEstimatedFeeAndTxSize from CreateOfferService for
txFeeFromFeeService

* Use getPriceAsLong from createOfferService

* Use marketPriceMarginParam from createOfferService

* Pass useMarketBasedPriceValue to getPriceAsLong

* Use getMaxTradeLimit from createOfferService

* Use createAndGetOffer from createOfferService

* Remove unused fields

* Add createOfferService, remove unused params

* Use weaker access

* Add null checks

* Add log of params, Cleanup

* Remove unused fields

* Use weaker access

* Remove trivial methods

* Remove trivial methods, rename methods

* Sort params for offer as they are used

* Use getReservedFundsForOffer from createOfferService

* Add MakerFeeProvider

* Adjust to new super class params

* Remove sellerSecurityDeposit field, refactor placeOffer

* Adjust tests to new params
2019-11-19 09:49:38 +01:00
Justin Carter
cfaa23effc
Move functions that only have 1 call-site out of BSFormatter
Make them private instance functions at call site to minimize
dependencies.
2019-11-19 09:24:06 +01:00
Justin Carter
dc741984ce
Move Currency related helpers out of BSFormatter to CurrencyUtils 2019-11-19 09:24:05 +01:00
Justin Carter
06c2fa5ea0
Remove dead Code from BSFormatter 2019-11-19 09:24:05 +01:00
Justin Carter
df6812a4c9
Extract FormattingUtils from BSFormatter
All formatting related functions that are depended on by core and
desktop jars are extracted to the new class FormattingUtils.
2019-11-19 09:23:57 +01:00
Christoph Atteneder
7c83230724
Merge pull request #3625 from rafaelpac/account-validation-bug
[BUGFIX] Account validation comparing user trade limit with MAX amount of offer
2019-11-18 16:00:01 +01:00
Christoph Atteneder
ec5e2b76d4
Avoid unchecked casts/assignments/calls (#3626)
* Don't extend ActivatableViewAndModel when the model is empty

Remove the no-arg constructor from ActivatableViewAndModel, which sets
a dummy Activatable singleton as the model. (Since the model type param
can't be checked at runtime, improper use of the constructor could cause
heap pollution.)

Instead, extend 'ActivatableView<R, Void>' consistently, as other views
without a model currently do.

* Improve type safety of the fluent interface of Overlay<T>

Refactor all the unchecked casts from Overlay<T> to T into a single
private cast() method. Also add a runtime type check to the constructor
to prevent creation of window objects of the form "A extends Overlay<B>"
for unrelated A & B, as such casts would then subvert the type system.

* Improve type safety of ProtoUtil.collectionToProto(Collection)

Add a Class<T> parameter to the method, in order to avoid an unchecked
cast to the Message type T. The cast was wrapped in a try-catch block,
which is useless due to erasure, so use Class.cast(..) instead.

* Avoid raw types to prevent unchecked casts in Log.java

Add missing ILoggingEvent type arg to local variable declarations.

* Avoid unchecked casts when deserializing JSON using Gson

* Fix unchecked casts in views due to raw chart point types

Add missing 'Number' coord type args to some XYChart.(Data|Series) &
AreaChart declarations, and avoid passing them as generic varargs, in
order to eliminate some more unchecked cast warnings.

Also simplify OfferBookChartView.updateChartData() by unboxing the x-
coordinate of each (buy & sell) datapoint.

* Avoid raw type bounds in class declarations to fix unchecked warnings

Make sure the generic classes MutableOfferView & AgentRegistrationView
don't use raw bounds for their associated view models, as that leads to
unchecked assignments from the model fields further down.

* Fix some remaining suppressed unchecked casts in the UI logic

(This still leaves a few more which are hard to avoid.)

* Fix a few remaining unsuppressed unchecked warnings
2019-11-18 15:41:23 +01:00
Christoph Atteneder
b38c695a86
Merge pull request #3568 from julianknutsen/manual-clock-in-tests
(5/8) Test P2PDataStore expiration code and make testing time sensitive code easier.
2019-11-18 11:31:19 +01:00
Pac
894a2c6b90
[BUGFIX] Account validation was comparing user trade limit with MAX amount of offer
Fixes issues #3601 and #3537.
The bug only happens when the offer has MIN-MAX value range.
The new isAmountValidForOffer in PaymentAccountUtil.java consider only the MAX amount, but the button to take the offer is ungrayed considering the MIN amount, which causes the bug.
2019-11-17 19:24:22 -03:00
Steven Barclay
5e69073280
Fix a few remaining unsuppressed unchecked warnings 2019-11-17 22:00:40 +00:00
Steven Barclay
77a8c20ce9
Avoid unchecked casts when deserializing JSON using Gson 2019-11-17 01:25:11 +00:00
Steven Barclay
dd6db4687c
Improve type safety of ProtoUtil.collectionToProto(Collection)
Add a Class<T> parameter to the method, in order to avoid an unchecked
cast to the Message type T. The cast was wrapped in a try-catch block,
which is useless due to erasure, so use Class.cast(..) instead.
2019-11-17 01:25:10 +00:00
chimp1984
9092160700
Adjust tests to new params 2019-11-15 00:03:52 -05:00
chimp1984
50fc1393e0
Remove sellerSecurityDeposit field, refactor placeOffer 2019-11-14 23:58:31 -05:00
chimp1984
41535fb7d4
Add MakerFeeProvider 2019-11-14 23:56:11 -05:00
chimp1984
84b49eda14
Sort params for offer as they are used 2019-11-14 23:33:11 -05:00
chimp1984
018cccfe03
Remove trivial methods, rename methods 2019-11-14 23:26:45 -05:00
chimp1984
98c2601a36
Remove trivial methods 2019-11-14 23:24:38 -05:00
chimp1984
a881519857
Use weaker access 2019-11-14 23:21:34 -05:00
chimp1984
fe52a33c5f
Add log of params, Cleanup 2019-11-14 23:18:11 -05:00
chimp1984
35f0040e0c
Add null checks 2019-11-14 23:04:25 -05:00
chimp1984
c4b88ab512
Use createAndGetOffer from createOfferService 2019-11-14 22:56:42 -05:00
chimp1984
ef27dbd03d
Use getMaxTradeLimit from createOfferService 2019-11-14 22:44:40 -05:00
chimp1984
b584825101
Pass useMarketBasedPriceValue to getPriceAsLong 2019-11-14 22:42:39 -05:00
chimp1984
646808623c
Use marketPriceMarginParam from createOfferService 2019-11-14 22:41:53 -05:00
chimp1984
7d2016a839
Use getPriceAsLong from createOfferService 2019-11-14 22:34:22 -05:00
chimp1984
8eea87ef32
Use txFeeFromFeeService from createOfferService
- Use getEstimatedFeeAndTxSize from CreateOfferService for
txFeeFromFeeService
2019-11-14 22:14:44 -05:00
chimp1984
8423845f37
Use methods from createOfferService
- Use getBuyerSecurityDepositAsCoin and getSellerSecurityDepositAsCoin
from CreateOfferService
2019-11-14 22:03:53 -05:00
chimp1984
947fe5ae19
Add getEstimatedFeeAndTxSize method
- Rename estimateTxSize to updateEstimatedFeeAndTxSize
- Add getEstimatedFeeAndTxSize method to CreateOfferService
- Add dependent methods and fields
2019-11-14 21:53:59 -05:00
chimp1984
15f9860513
Add getSellerSecurityDeposit method 2019-11-14 21:35:01 -05:00
chimp1984
9865c80b96
Add getRandomOfferId method 2019-11-14 21:34:14 -05:00
chimp1984
838113f986
Add CreateOfferService class 2019-11-14 21:31:01 -05:00
chimp1984
f6b097235f
Add toProtoTradeStatistics2 method
API will use getTradeStatistics and expect TradeStatistics2 not
PersistableNetworkPayload
2019-11-14 21:06:42 -05:00
chimp1984
a20449458b
Remove trailing spaces 2019-11-14 21:05:34 -05:00
Niyi Dada
fb073c7056
BSQ Merit now displayed - fixes issue #3352 2019-11-14 21:55:14 +01:00
Christoph Atteneder
21b76cb869
Updating trading instructions for XMR (Monero) (#3596)
* Updating trading instructions for XMR (Monero)

Prove payments:
- clarifying that the official wallets (Monero GUI or CLI) are NOT required to send XMR, since user can use some alternative wallets (desktop: MyMonero, Exodus / mobile: Cake Wallet, MyMonero, Monerujo) that provide the information required to prove a payment (transaction key, transaction ID and destination address). This information is not provided by the remaining desktop and mobile wallets that currently support Monero, but since they could provide it in the future, I kept the warning about using other wallets different from the previously mentioned.
- listing Monero GUI as first option (for most users), and CLI as second option (for advanced users)
- renaming "transaction hash" to "transaction ID", which is used in official wallets
- renaming "tx private key" to "transaction key", which is used in official wallets
- adding "Secret key" as synonymous for "transaction key" (used in MyMonero wallet)
- adding "destination address" and keeping  "recipient's address" as synonymous
- renaming History tab to Transactions tab in Monero GUI
- adding "save recipient address" option must be enabled in Cake Wallet settings

Check payments:
- adding Monero GUI must be in Advanced mode
- adding Monero GUI verification must be done in Check Transaction section of Prove/check page
- adding parameters TXID TXKEY ADDRESS to the command check_tx_key in Monero CLI, as instructions in (https://www.getmonero.org/resources/user-guides/prove-payment.html)
- adding Explore Monero website (https://www.exploremonero.com/receipt) as alternative to verify payments
- removing payment ID instructions (it is being deprecated at the end of November in v0.15)

More info:
- directing to subreddit Monero support (https://www.reddit.com/r/monerosupport/), which is actively maintained, instead of Monero forum (https://forum.getmonero.org).

* Add max allowed message option to Popup and increase window size for Monero to improve readability
2019-11-14 17:01:27 +01:00
Christoph Atteneder
459646ad68
Merge pull request #3573 from beingindot/account_validate_mg_nationalbank
Added check for empty validation
2019-11-13 17:40:47 +01:00
beingindot
755ca19ef6
Added check for empty validation
This commit is for github issue #3458 and #3459
check added for moneybeam and national bank transfer
2019-11-13 21:18:02 +05:30
Julian Knutsen
10eb9c0d01
Use Clock in ProtectedStorageEntry
Switch from System.currentTimeMills() to
Clock.millis() so dependency injection can
be used for tests that need finer control of time.

This involves attaching a Clock to the resolver
so all fromProto methods have one available when they
reconstruct a message. This uses the Injector for the APP
and a default Clock.systemDefaultZone is used in the manual
instantiations.

Work was already done in #3037 to make this possible.

All tests still use the default system clock for now.
2019-11-12 15:58:01 -08:00
Christoph Atteneder
ce20bb4231
Update MobileModel parseDescriptor to support iPhone 11 (#3277)
* Update MobileModel parseDescriptor to support iPhone 11

It was parsing only the first digit of the version and using that in a
comparison check to determine if the version is greater than 5.
This meant for the iPhone 11 it was comparing 1 > 5, returning an
incorrect result.

It now supports multi-digit version numbers (i.e. 11), including
support for a suffix in the version (i.e. 11S), just in case...

* Update to reflect isContentAvailable supports iPhone 6s and newer
2019-11-12 13:02:17 +01:00
rating89us
1d813c347c
Updating trading instructions for XMR (Monero)
Prove payments:
- clarifying that the official wallets (Monero GUI or CLI) are NOT required to send XMR, since user can use some alternative wallets (desktop: MyMonero, Exodus / mobile: Cake Wallet, MyMonero, Monerujo) that provide the information required to prove a payment (transaction key, transaction ID and destination address). This information is not provided by the remaining desktop and mobile wallets that currently support Monero, but since they could provide it in the future, I kept the warning about using other wallets different from the previously mentioned.
- listing Monero GUI as first option (for most users), and CLI as second option (for advanced users)
- renaming "transaction hash" to "transaction ID", which is used in official wallets
- renaming "tx private key" to "transaction key", which is used in official wallets
- adding "Secret key" as synonymous for "transaction key" (used in MyMonero wallet)
- adding "destination address" and keeping  "recipient's address" as synonymous
- renaming History tab to Transactions tab in Monero GUI
- adding "save recipient address" option must be enabled in Cake Wallet settings

Check payments:
- adding Monero GUI must be in Advanced mode
- adding Monero GUI verification must be done in Check Transaction section of Prove/check page
- adding parameters TXID TXKEY ADDRESS to the command check_tx_key in Monero CLI, as instructions in (https://www.getmonero.org/resources/user-guides/prove-payment.html)
- adding Explore Monero website (https://www.exploremonero.com/receipt) as alternative to verify payments
- removing payment ID instructions (it is being deprecated at the end of November in v0.15)

More info:
- directing to subreddit Monero support (https://www.reddit.com/r/monerosupport/), which is actively maintained, instead of Monero forum (https://forum.getmonero.org).
2019-11-11 20:57:35 +01:00
chimp1984
b56e383947
Update support text 2019-11-10 08:10:59 -05:00
Christoph Atteneder
585ccd3088 Update data stores and bitcoinj checkpoints (#3570) 2019-11-07 10:36:32 +01:00
Christoph Atteneder
2fc260b476 Update translations (#3569) 2019-11-07 10:28:44 +01:00
sqrrm
61e51a0b7a Fix trade view peer info (#3549)
* Rename: PeerInfoIcon makersAccount -> peersAccount

* Fix peer info in trade view peerinfoicon popup, fix #3548
2019-11-06 18:55:09 +01:00
chimp1984
fee7850f32 Improve handling of failed trades and offers (#3566)
* Improve handling of failed trades and offers

- Check if deposit tx is null
- Check if trade fee tx is rejected
- Listen to reject tx errors
- Cleanup addressEntryList
- Prevent opening disputes with if deposit tx is null
- Add null checks
- Improve logs
- Cleanups

* Add move to failed trade button to popup

In case the deposit tx is null we show a popup telling the user to move
the trade to failed trades after a restart if the problem persist.

* Change log level
2019-11-06 18:53:45 +01:00
chimp1984
b976bec492 Limit max. nr. of PersistableNetworkPayload and ProtectedStorageEntries (#3562)
* Limit max. nr. of PersistableNetworkPayload and ProtectedStorageEntry to 10000

To avoid that seed nodes get overloaded with requests for too many
PersistableNetworkPayload and ProtectedStorageEntry data we limit nr. of
entries to max 10000.

* Add peers node address to logs

* Improve logs

- Add log of size to GetBlocksResponse.toProtoNetworkEnvelope method
- Log in kb

* Log connection UID if not peer address available

* Add cleanup code or invalid objects

We have an invalid Filter object in the live network (prob. some dev
made some mistake). This code helps so clean that up.

* Add log
2019-11-05 20:50:38 +01:00
Christoph Atteneder
33c9dd133e
Merge pull request #3551 from ripcurlx/add-missing-capability
Add missing network capability for trade statistics hash update
2019-11-04 14:56:48 +01:00
Florian Reimair
415aa105fb
Merge pull request #3434 from lusarz/refactor-bisq-environment-5
Refactor BisqEnvironment - change type of ignoreLocalBtcNode to boolean
2019-11-04 13:37:25 +01:00
Christoph Atteneder
6d6a4d0b5c
Add missing network capability for trade statistics hash update 2019-11-04 11:35:19 +01:00
Christoph Atteneder
9a8615a61c
Merge pull request #3550 from bisq-network/release/v1.2.2
Release/v1.2.2
2019-11-04 10:16:20 +01:00
lukasz
fe32649956 Refactor BisqEnvironment - change type of ignoreLocalBtcNode to boolean 2019-11-03 14:18:49 +01:00
Florian Reimair
df45102db3
Merge pull request #3511 from devinbileck/remove-donate-link
Remove donation link
2019-11-01 11:25:35 +01:00
Florian Reimair
c1e7a0bb6c
Merge pull request #3432 from lusarz/refactor-bisq-environment-3
Refactor BisqEnvironment - create getListProperty
2019-11-01 11:17:33 +01:00
Florian Reimair
9d6630790e
Merge pull request #3433 from lusarz/refactor-bisq-environment-4
Refactor BisqEnvironment - use @Getter annotation for appDataDir
2019-11-01 11:06:34 +01:00
Florian Reimair
d174535bc8
Merge pull request #3327 from christophsturm/fix-dust-check
Check for dust after subtracting fee, not before.
2019-11-01 10:35:19 +01:00
Florian Reimair
8ee2d53219
Merge pull request #3251 from stejbac/fix-invalid-comparators
Fix invalid comparators
2019-11-01 10:07:25 +01:00
Christoph Atteneder
04777c4f2b
Update translations 2019-11-01 09:03:16 +01:00
Christoph Atteneder
b976570426
Release/v1.2.0 (#3532)
* New trade protocol (#3333)

* Remove arbitration key, cleanup

* Add BuyerAsMakerProcessDepositTxAndDelayedPayoutTxMessage

* Adopt trade protocol

- Add handler for DepositTxAndDelayedPayoutTxMessage
- Change handler for DepositTxPublishedMessage
- Add MakerSetsLockTime
- Rename MakerProcessPayDepositRequest to MakerProcessPayDepositRequest
- Rename MakerSendPublishDepositTxRequest to MakerSendsProvideInputsForDepositTxMessage
- Rename DepositTxPublishedMessage to DelayedPayoutTxSignatureRequest
- Rename MakerProcessDepositTxPublishedMessage to MakerAsBuyerProcessSignDelayedPayoutTxMessage

* Remove arbitratorKey

* Add new classes

* Add new message classes

* Add new task classes

* Renamed classed (no functional change yet)

* Add lockTime

* Add delayedPayoutTxSignature field

* Add useReimbursementModel field

* Add new classes

* Add setting.preferences.useReimbursementModel

* Apply renamed classes (new classes not added yet)

* Add useReimbursementModel

* Add preferences param

* Add new methods, cleanup

* Add daoFacade param, apply renaming

* Add delayedPayoutTx, lockTime and delayedPayoutTxId

- Support daoFacade param

* Remove DirectMessage interface

* Rename emergencySignAndPublishPayoutTx method, add new one for 2of2 MS

* Apply new protocol

* Apply new protocol

* Add renaming (no functional change yet)

* Add new messages, apply renaming

* Remove unneeded P2SHMultiSigOutputScript

* Remove PREFERRED_PROJECT_CODE_STYLE

* Refactor: Rename class

* Use InputsForDepositTxRequest instead of TradeMessage in handleTakeOfferRequest

* Do not sign deposit tx if maker is seller

We change behaviour that the maker as seller does not send the pre
signed deposit tx to the taker as the seller has more to lose and he
wants to control the creation process of the delayed payout tx.

* Apply new trade protocol to seller as maker version

* Apply new trade protocol

Delayed payout tx are now working for all scenarios but we use a small
hack to get around an issue with not receiving confirmations and the
peers tx.
We add a tiny output to both peers, so we see the tx and confirmation.
Without that only the publisher sees the tx and confirmations are not
displayed. Need further work to get that working without that extra
outputs.

* Set TRADE_PROTOCOL_VERSION to 2

* Add PeerPublishedDelayedPayoutTxMessage

We need add the delayed payout tx to the wallet once the peer publishes
it. We will not see the confidence as we do not receive or sent funds
from our address. Same is with dispute payouts where one peer does not
receive anything. Then the confidence is not set. It seems that is a
restriction in BitcoinJ or it requires some extra handling. We set the
confidence indicator invisible in the dispute case and that might be an
acceptable option here as well.

* Add refund agent domain

* Add refundAgentNodeAddress

* Apply refund domain

* Add refund views

* Apply refundAgent domain

* Support refundAgent

* Remove useReimbursementModel field

We dont need in the offer anymore the decision if reimbursement or
arbitration is chosen.

* Apply refundAgent payout

* Handle tx info and balances

* Remove mediation activation

* Add new tac accepted flag for v1.2.0 and adjust text

* Fix params for test classes

* Signed witness trading (#3334)

* Added basic UI for account signing for arbitrators

* Add domain layer for signed account age witnesses (credits ManfredKarrer and oscarguindzberg)

* Remove testing gridlines

* Arbitrator sign accountAgeWitnesses

Automatically filter to only sign accounts that
- have chargeback risk
- bought BTC
- was winner in dispute

* Handle chargebackrisk by currency

* Check winners only for closed disputes

* Show sign status of paymentaccounts in AccountsView

* Rename service to accountAgeWitnessService

* Refactor: Move account signing helpers to AccountAgeWitnessService

* Refactor: rename hasSignedWitness to myHasSignedWitness

* Show if witness is signed in offerbook view

* Use witness sign age for age comparison

* Refactor: rename to isTaker... to isMyTaker...

* Allow trading with signed witnesses

* Use witness age for showing account age icon

* Move AccountAgeRestrictions into AccountAgeWitnessService

* Handle trade limit of unverified accounts as normal case

* Avoid optional as argument

* Set trade limit depending on trade direction

* Avoid optional arguments

* Add text for seller as signer

* Seller with signer privilege signs buyer witness

* Fix merge issues

* Remove explicit check for risky offers

* Remove sellers explicit account age check

* Add limit check based on common accountAgeWitness function

* Fix arbitrator key event handling

* Filter accounts on tradelimit instead of maturity

* Fix test

* Buyer sign seller account

Add SIGNED_ACCOUNT_AGE_WITNESS capability

* Fix checks for signing at end of trade

Get correct valid accounts for offer

* Rename BuyerDataItem -> TraderDataItem

* Arbitrator sign both parties in a buyer payout dispute

* Only sign unsigned accountAgeWitnesses

* Remove unused code

* Add demo for material design icons

* Use different account age limits for sell/buy

* Fix signing interface for arbitrator

* Add signing state column to offer book

* Add signing state to fiat accounts overview

* Add signing state to selected fiat account

* Fix popover padding

* Add account signing state to peer info popup

* Retrieve only unsigned witnesses for arbitrator to sign

* Accounts signed by arbitrators are signers

* Disable test due to travis issues

* Improve witness handling (#3342)

* Fix comparison

* Add display strings for witness sign state

* Fix immaturity check

* Use accountAgeWitness age for non risky payment methods

* Show information about non risky account types

* Fix peer info icon account age text

* Complete new trade protocol (#3340)

* Improve handling of adding tx to wallet

* Add delayedPayoutTx to dispute

* Fix test

* Use RECIPIENT_BTC_ADDRESS from DAO for trade fee

* Set lockTime to 10 days for altcoins, 20 days others.

- Devmode uses 1 block

* Fix params

* Update text

* Update docs

* Update logging

if (log.isDebugEnabled()) only matches if logLevel is debug not
if it is INFO

* Remove log

* Remove arbitrator checks

* Remove arbitrator address

- It works not if not legacy arbitrator is registered.
We cannot remove too much from arbitration as we would risk to break
account signing and display of old arbitration cases.
Though if testing time permits we should try to clean out more of
arbitration domain what is not needed anymore.

* Use account signing state in accounts view (#3365)

* Add account signing icons to signing state in account display

* Remove unnecessary "." that caused layout issues in the past

* Add additional warning in the received payment popup for account signer

* Fix Revolut padding issues for currencies

* Hide signing icon for non-high-risk payment methods

* Add correct icon state and info text for account signing state

* Remove not implemented notification part

* Test self signing witnesses

* Change verified account limit factor to 0.5

* Account Signing: Add information popups for signing state (#3374)

* Add account signing icons to signing state in account display

* Remove not implemented notification part

* Hide time since signing column when not needed

* Remove fiat rounding popup as feature was introduced a long time ago already

* Add information popups for new signed states (only shown once for user) and minor clean-ups

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>

* Account Signing: Improve signed state notificaton (#3388)

* Remove new badge from Altcoin instant feature

* Remove new badge from percentage user deposit feature

* Fix line break issues in received payment confirmation popup

* Check if received payload fulfills signing state condition and not any personal witness

* Show additional badge for account sections to guide user to check out new signing states

* Fix account signing state in offer book (#3390)

* Account Signing: Fix verified usage (#3392)

* Rename witnessHash -> accountAgeWitnessHash

* Add enum for SignedWitness verification method

* Fix usage of isValidAccountAgeWitness

* Revert icon for signstate change

* Account signing: add signing state to payment account selection (#3403)

* Clean up dead code parts

* Add account signing state to payment account selection

* Account signing: revert dev date setting for trusted accounts (#3404)

* Revert temporary value for dev testing

* Only enable button if there are accounts to be signed

* Add trade limit exceptions (#3406)

* Remove dead code

* Add trade limit exception for accounts signed by arbitrator

* Update translations to adapt to new unified delay (#3409)

* NTP: Fix a couple of UI issues in the New Trade Protocol (#3410)

* Add badge support for refund agent (new arbitrator) tickets

* Fix translation typo

* Clean up arbitrator issues in translation

* Only show refund agent label to support staff

Every user should still see this role as arbitration

* NTP: Improve differentiation between mediation and new arbitration (#3414)

* Clean up property exposure

* Improve differentiation between mediation and arbitration cases

* Go to new refund view if it is no mediation and not open mediation notification if refund is already in progress

* Don't sign filtered accounts

* NTP: merge with master (#3420)

* Temporarily disable onion host for @KanoczTomas's BTC node

* Add Ergo (ERG) without Bouncy Castle dependency.

See #3195.

* List CTSCoin (CTSC)

* Tweak the English name of Japan Bank Transfer payment method

* Add mediator prefix to trade statistics

* List Faircoin (FAIR)

* List uPlexa (UPX)

* Remove not used private methods from BisqEnvironment

* Add onInitP2pNetwork and onInitWallet to BisqSetupListener

- Rename BisqSetupCompleteListener to BisqSetupListener
- Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- make onInitP2pNetwork and onInitWallet default so no impl. required

* Start server at onInitWallet and add wallet password handler

- Add onInitWallet to HttpApiMain and start http server there
- Add onRequestWalletPassword to BisqSetupListener
- Override setupHandlers in HttpApiHeadlessApp and adjust
setRequestWalletPasswordHandler (impl. missing)
- Add onRequestWalletPassword to HttpApiMain

* Add combination (Blockstream.info + Mempool.space) block explorer

* Revert "Temporarily disable onion host for @KanoczTomas's BTC node"

This reverts commit d3335208bb.

* Temporarily disable KanoczTomas btcnode on both onion and clearnet

* Refactor BisqApp - update scene size calculation

* Refactor BisqApp - update error popup message build

* Refactor BisqApp - move icon load into ImageUtil

* Remove unused Utilities

* Increase minimum TX fee to 2 sats/vByte to fix #3106 (#3387)

* Fix mistakes in English source (#3386)

* Fix broken placeholders

* Replace non existing pending trades screen with open trades screen

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update message in failed trade popup

* Refactor BisqEnvironment

* Account Signing: Improve arbitrator signing flow (#3421)

* Pre-select a point of time 2 months in the past

So all arbitrator signed payment accounts will have their limits lifted completely

* Only show payment methods with high chargeback risk to be signed

* Show connected Bitcoin network peer info

* List Ndau (XND)

- Official project URL: https://ndau.io/
- Official block explorer URL: https://explorer.service.ndau.tech

* List Animecoin (ANI)

* Apply rule to not allow BSQ outputs after BTC output for regular txs (#3413)

* Apply rule to not allow BSQ outputs after BTC output for regular txs

* Enforce exactly 1 BSQ output for vote reveal tx

* Fix missing balance and button state update

* Refactor isBtcOutputOfBurnFeeTx method and add comments and TODOs

No functional change.

* Handle asset listing fee in custom method

We need to enforce a BSQ change output

As this is just tx creation code it has no consequences for the hard
fork.

* Use getPreparedBurnFeeTxForAssetListing

* Update comments to not use dust output values

* Fix missing balance and button state update

* Use same method for asset listing fee and proof of burn

Use same method for asset listing fee and proof of burn as tx structure
is same.
Update comments to be more general.

* Use getPreparedProofOfBurnTx

* Require mandatory BSQ change output for proposal fee tx.

We had in the doc stated that we require a mandatory BSQ change output
but it was not enforced in the implementation, causing similar issues
as in Asset listing and proof of  burn txs.

* Add fix for not correctly handled issuance tx

* Use new method for issuance tx

// For issuance txs we also require a BSQ change output before the issuance output gets added. There was a
    // minor bug with the old version that multiple inputs would have caused an exception in case there was no
    // change output (e.g. inputs of 21 and 6 BSQ for BSQ fee of 21 BSQ would have caused that only 1 input was used
    // and then caused an error as we enforced a change output. This new version handles such cases correctly.

* Handle all possible blind vote fee transactions

* Move check for invalid opReturn output up

* Add dust check at final sign method

* Fix incorrect comments

* Refactor

- Remove requireChangeOutput param which is always false
- Remove method which is used only by one caller
- Cleanup

* Add comment

* Fix comments, rename methods

* Move code of isBlindVoteBurnedFeeOutput to isBtcOutputOfBurnFeeTx

* Update account signing strings for v1.2 release (#3435)

* Update account signing strings for v1.2 release

* Add minor corrections from ripcurlx review

* Adjust tradeLimitDueAccountAgeRestriction string

So that it describes why an account isn't signed (in general) instead of
why it wasn't signed by an arbitrator.

* Account Signing/NTP: More improvements and fixes (#3436)

* Select the the correct sub view when a dispute is created

* Require capability REFUND_AGENT to receive RefundAgent Messages

* Remove unused return type for account signing

* Add new feature popup for account signing and new trade protocol

* Return void from account signing

* Fix bug with not updating vote result table at vote result block

* NTP: improve backwards compatibility for mediation (#3439)

* Improve readability of offer update

* Add type safeguard for dispute lists

* Set not existing dispute support type for clients < 1.2.0 from message support type

* Enable handling of mediation cases for old trade protocol disputes in 1.2.0 clients

* Remove unnecessary forEach

* Use correct formatter and add missing value for placeholder

* Bump version number

* Add sign all checkbox. Fix list entry display (#3450)

* Add sign all checkbox. Fix list entry display

* Add summary to log and clipboard

* Use safe version for seednodes (#3452)

* Apply shutdown and memory check again

To not risk issues with the release and seed nodes we merge back the
old code base for handling memory check and shutdowns.
The newly added changes for cross connecting between seed nodes cause
out of memory issues and require more work and testing before it can be
used.

* Revert code change for periodic updates between seed nodes.

The periodic updates code caused out of memory issues and require more
work and testing before it can be used.

* Arbitrator republish signedWitnesses on startup (#3448)

* Arbitrator republish signedWitnesses on startup

* Keep republish internal to SignedWitnessService

* Improve new feature popup for ntp and account signing (#3453)

* Do not commit delayedPayoutTx to avoid publishing at restart

Fixes https://github.com/bisq-network/bisq/issues/3463

BitcoinJ publishes automatically committed transactions.
We committed it to the wallet to be able to access it later after a
restart. We stored the txId in Trade and used that to request the tx
from the wallet (as it was committed). Now we store the
bitcoin serialized bytes of the tx and do not commit the tx before
broadcasting it (if a trader opens refund agent ticket).

* [1.2.0] Update client resources (#3456)

* Update bitcoinj checkpoint file

* Update data stores

* Update translations

* [1.2.0] Improve new feature popup (#3465)

* Improve layout of new feature popup

* Extract external hyperlinks into component to make it easier to update

* Comment in necessary showAgain check

* Add Raspberry Pi to build process (#3466)

* Add Raspberry Pi to build process

* Rename deploy variable to improve readability

* Update informational prompt upon creating fiat account with account signing details (#3467)

* Update informational prompt upon creating fiat account with account signing details

* Fix wrong buyer limit for first 30 days

* Set delayedPayoutTxBytes when setting delayedPayoutTx

Fixes https://github.com/bisq-network/bisq/issues/3473

The delayedPayoutTx is not committed to the wallet as long it is not
published. The seller who creates the delayedPayoutTx has not stored the
delayedPayoutTxBytes which caused a nullpointer after restart.

* Minor updates (#3474)

* Remove unnecessary log statement

This seems to be a left over log statement from debugging.

* Use a small delay for MakerSetsLockTime on regtest

When testing on regtest, not in devmode, we want a relatively short
delay to be able to test the delay period.

* Clarify payment limits up to 30 days after signing

* Update RECIPIENT_BTC_ADDRESS for regtest (#3478)

Use an address that is owned by the regtest wallet in the dao-setup.zip
file. This allows for easily verifying BTC trading fees are sent to
this address correctly. Also, it helps verify spending of the time lock
payout.

* Remove btc nodes from Manfred Karrer (#3480)

* Avoid null objects (#3481)

* Avoid null objects

* Remove check for type

Historical data can be arbitration instead of mediation (arbitration
was fallback at last update), so we need to tolerate the incorrect type
here. Is only for tickets from pre 1.2.

* Display appropriate account age info header

Depending on charge back risk type, accounts should show
accountAgeWitness age or time since signing

* Set amount for delayed payout tx to 0 (#3471)

We have shown the spent funds from the deposit tx to the bisq donation
address before. But that was incorrect from the wallet perspective and
would have lead to incorrect summary of all transaction amounts. We set
it now to 0 as we are not spending funds nor receiving any in our wallet.

* Check for result phase at activate method

Fixes https://github.com/bisq-network/bisq/issues/3487

* Only show warning for risky payment menthods (#3497)

* Fix style issues with dark mode (#3495)

* Addresses issues mentioned in https://github.com/bisq-network/bisq/issues/3482#issuecomment-546812730 (#3496)

* Clean up trade statistics from duplicate entries (#3476)

* Clean up trade statistics from duplicate entries

At software updates we added new entries to the extraMap which caused
duplicate entries (if one if the traders was on the new and the other on
the old version or at republishing). We set it now json exclude so avoid
that in future and clean up the map.

* Avoid repeated calls to addPersistableNetworkPayloadFromInitialRequest

For trade stat cleanup we don't want to apply it multiple times as it
is a bit expensive. We get from each seed node the initial data response
and would pollute with the second response our map again and if our node
is a seed node, the seed node itself could not get into a clean state and
would continue pollution other nodes.

* Refactor

Remove not used param
Rename method
Inline method
Cleanups

* Change unsigned to N/A

* [1.2.0] Update data stores and adding SignedWitnessStore (#3494)

* Update data stores and adding SignedWitnessStore

* Update translations

* Update cleaned TradeStatistics2Store and changes in other stores

* VoteResultView update results on any block in result phase

Avoid updating the result more than once per result phase but make
sure it's done if activated during the result phase

* [1.2.0] Format maker fee for BTC and BSQ correctly (#3498)

* Format maker fee for BTC and BSQ correctly

* Update tests

* Only automatically open popup if result wasn't accepted and disable action button when being accepted (#3503)

* Fix tradestatistics (#3469)

* Remove delayed re-publishing of tradeStatistics

This was done earlier when only maker was publishing trade statistics.
Now both traders do it so we get already higher resilience.

* Remove unused method

Forgot in prev. commit to remove also the method.

* Remove support for TradeStatistics2.ARBITRATOR_ADDRESS

* Add comment and set ARBITRATOR_ADDRESS deprecated

* Remove setting of arbitrator data from makers side

The 2 arbitrator related fields in Trade are only set by the maker and
not used anymore for reading, so it can be removed. The whole arbitrator
domain should be cleaned out some day, but because of backward
compatibility issues it id difficult to do it entirely at release date.
With release after v 1.2. when no old offers are out anymore we are
able to clean up that domain.

* Remove dev log

* Update translations

* [1.2.0] Improve dispute section (#3504)

* Improve wording for mediation summary and add specific next steps for refund agent case

* Select the first dispute case when entering the support section

* Revert to SNAPSHOT version

* Fix but with initialRequestApplied (#3512)

* Fix resource name (#3514)

* Remove minor version number in news popup

* Fix copy SignedWitnessStore db script

* Not show payment account details for blocked offers

* Use age of accountAgeWitness as basis for sell limits

* Bump version number

* Revert to SNAPSHOT version

* Merge v1.2.0/v1.2.1 with master (#3521)

* List Krypton (ZOD)

* Temporarily disable onion host for @KanoczTomas's BTC node

* Add Ergo (ERG) without Bouncy Castle dependency.

See #3195.

* List CTSCoin (CTSC)

* Tweak the English name of Japan Bank Transfer payment method

* List Animecoin (ANI)

* Add mediator prefix to trade statistics

* List Faircoin (FAIR)

* List uPlexa (UPX)

* Remove not used private methods from BisqEnvironment

* Add onInitP2pNetwork and onInitWallet to BisqSetupListener

- Rename BisqSetupCompleteListener to BisqSetupListener
- Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- make onInitP2pNetwork and onInitWallet default so no impl. required

* Start server at onInitWallet and add wallet password handler

- Add onInitWallet to HttpApiMain and start http server there
- Add onRequestWalletPassword to BisqSetupListener
- Override setupHandlers in HttpApiHeadlessApp and adjust
setRequestWalletPasswordHandler (impl. missing)
- Add onRequestWalletPassword to HttpApiMain

* Add combination (Blockstream.info + Mempool.space) block explorer

* Revert "Temporarily disable onion host for @KanoczTomas's BTC node"

This reverts commit d3335208bb.

* Temporarily disable KanoczTomas btcnode on both onion and clearnet

* Refactor BisqApp - update scene size calculation

* Refactor BisqApp - update error popup message build

* Refactor BisqApp - move icon load into ImageUtil

* Remove unused Utilities

* Increase minimum TX fee to 2 sats/vByte to fix #3106 (#3387)

* Fix mistakes in English source (#3386)

* Fix broken placeholders

* Replace non existing pending trades screen with open trades screen

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update message in failed trade popup

* Refactor BisqEnvironment

* List Ndau (XND)

- Official project URL: https://ndau.io/
- Official block explorer URL: https://explorer.service.ndau.tech

* Show connected Bitcoin network peer info

* Not show payment account details for blocked offers (#3425)

* Add GitHub issue template for user reported bugs (#3454)

* Add issue template with steps to reproduce and actual/expected behavior

* Fix typo in .github/ISSUE_TEMPLATE.md

* Fix wrong auto merge

* Add CapabilityRequiringPayload to TradeStatistics2

With v1.2.0 we changed the way how the hash is created.
To not create too heavy load for seed nodes from
requests from old nodes we use the SIGNED_ACCOUNT_AGE_WITNESS
capability to send trade statistics only to new nodes.
As trade statistics are only used for informational purpose it will
not have any critical issue for the old nodes beside that they don't see the latest trades.

* Fix tradestat hash issue (#3529)

* Recreate hash from protobuf data

To ensure all data are using the new hash method (excluding extraMap) we
do not use the hash field from the protobug data but pass null which
causes to create the hash new based on the new hash method.

* Add filter.toString method and log filter in case of wrong signature

We have atm a invalid filter (prob. some dev polluted a test filter to mainnet)

* Change log level, add log

* Refactor: Move code to dump method

* Add TRADE_STATISTICS_HASH_UPDATE capability

We changed the hash method in 1.2.0 and that requires update to 1.2.2
for handling it correctly, otherwise the seed nodes have to process too
much data.

* Add logs for size of data exchange messages

* Add more data in log

* Improve logs

* Fix wrong msg in log, cahnge log level

* Add check for depositTxId not empty

* Remove check for duplicates

As we recreate the hash for all trade stat objects we don't need that
check anymore.

* Add logs

* Temporarily remove this part of the statistics

It prevents merging with master because through auto merge a duplication of this part of the code is happening and prevents Travis from succeeding
2019-10-31 12:49:26 +01:00
Devin Bileck
4c27d08b73
Update to reflect isContentAvailable supports iPhone 6s and newer 2019-10-29 17:09:21 -07:00
Devin Bileck
2d4c091b11
Remove donation link
Fixes #2745
2019-10-29 16:11:57 -07:00
lukasz
4f4b3948d9 Refactor BisqEnvironment - use @Getter annotation for appDataDir 2019-10-19 17:33:40 +02:00
lukasz
d0357af9da Refactor BisqEnvironment - create getListProperty 2019-10-19 17:29:00 +02:00
Devin Bileck
c8cb7fff1e
Show connected Bitcoin network peer info 2019-10-17 14:18:59 -07:00
lukasz
d8dd01403f Refactor BisqEnvironment 2019-10-14 09:56:56 +02:00
Christoph Atteneder
57fc862dee
Merge pull request #3363 from lusarz/refactor-bisq-environment-2
Remove not used private methods from BisqEnvironment
2019-10-14 09:59:52 +02:00
Christoph Atteneder
ccfbf6f0da
Fix mistakes in English source (#3386)
* Fix broken placeholders

* Replace non existing pending trades screen with open trades screen

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update message in failed trade popup
2019-10-10 14:57:16 +02:00
wiz
679985d82e Increase minimum TX fee to 2 sats/vByte to fix #3106 (#3387) 2019-10-10 12:55:20 +02:00
Christoph Atteneder
f3950bd3c0
Merge pull request #3377 from wiz/add-mempool-space-transaction-tracker
Add combo block explorer for Blockstream.info + Mempool.space
2019-10-09 12:30:33 +02:00
wiz
5babcec38a
Temporarily disable KanoczTomas btcnode on both onion and clearnet 2019-10-09 00:47:18 +09:00
wiz
3c1f8a107f
Revert "Temporarily disable onion host for @KanoczTomas's BTC node"
This reverts commit d3335208bb.
2019-10-09 00:46:41 +09:00
wiz
5ecc897011
Add combination (Blockstream.info + Mempool.space) block explorer 2019-10-09 00:45:29 +09:00
Christoph Atteneder
560d66b05b
Merge pull request #3348 from blabno/changes-needed-for-minimal-api
Changes needed for minimal api
2019-10-07 13:21:09 +02:00
Christoph Atteneder
3cfa73a7b5
Merge pull request #3263 from wiz/disable-kanocztomas-onion-btcnode
Temporarily disable onion host for @KanoczTomas's BTC node
2019-10-07 11:09:09 +02:00
Manfred Karrer
fb9f59db95
Start server at onInitWallet and add wallet password handler
- Add onInitWallet to HttpApiMain and start http server there
- Add onRequestWalletPassword to BisqSetupListener
- Override setupHandlers in HttpApiHeadlessApp and adjust
setRequestWalletPasswordHandler (impl. missing)
- Add onRequestWalletPassword to HttpApiMain
2019-10-05 10:06:40 +02:00
Manfred Karrer
b6cc3518a9
Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- Rename BisqSetupCompleteListener to BisqSetupListener
- Add onInitP2pNetwork and onInitWallet to BisqSetupListener
- make onInitP2pNetwork and onInitWallet default so no impl. required
2019-10-05 10:06:38 +02:00
Christoph Atteneder
70d17eaf38
Merge pull request #3350 from QuantumLeaper/list-upx-asset
List uPlexa (UPX)
2019-10-04 12:10:26 +02:00
lukasz
d20afd6ec5 Remove not used private methods from BisqEnvironment 2019-10-03 20:16:13 +02:00
Kyle Pierce
f5f461111e List uPlexa (UPX) 2019-10-03 05:53:52 -04:00
chimp1984
b1c8141d48
Add mediator prefix to trade statistics 2019-10-02 00:18:32 -05:00
wiz
c63c77ce1e
Tweak the English name of Japan Bank Transfer payment method 2019-09-28 18:00:28 +09:00
Christoph Sturm
b2befde867 Check for dust after subtracting fee, not before. 2019-09-25 15:17:59 +02:00
Christoph Sturm
939f48a29b remove instance 2019-09-24 18:17:38 +02:00
Christoph Sturm
9cd5c9f83f inject DaoKillSwitch 2019-09-24 16:56:40 +02:00
Christoph Atteneder
4201e065bc
Merge branch 'master' of github.com:bisq-network/bisq into hotfix/v1.1.6
# Conflicts:
#	build.gradle
#	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
2019-09-23 10:57:03 +02:00
Christoph Atteneder
39a811ec26
Fix broken line break 2019-09-23 10:07:53 +02:00
chimp1984
8cf49e0308
Add missing handling for mailbox messages
- Without that fix mediated payouts would only succeed if both users are
online.
2019-09-23 09:43:13 +02:00
chimp1984
29f1cb29e3
Fix potential ConcurrentModificationException
We need to delay that call as we might get executed at startup after
mailbox messages are applied where we iterate over out pending trades.
The closeDisputedTrade method would remove that trade from the list
causing a ConcurrentModificationException.
To avoid that we delay for one render frame.
2019-09-23 09:43:02 +02:00
chimp1984
94724a2365
Fix potential ConcurrentModificationException
We need to delay that call as we might get executed at startup after
mailbox messages are applied where we iterate over out pending trades.
The closeDisputedTrade method would remove that trade from the list
causing a ConcurrentModificationException.
To avoid that we delay for one render frame.
2019-09-23 01:06:20 +02:00
chimp1984
8cd9f29b5a
Add missing handling for mailbox messages
- Without that fix mediated payouts would only succeed if both users are
online.
2019-09-23 01:05:44 +02:00
wiz
593abc24c2
Add new pricenode gztmprecgqjq64zh operated by @wiz 2019-09-20 16:22:16 +09:00
initCCG
08bbfe8ab4 add Right-to-Left support (#2774)
* add Right-to-Left support

* make requested changes in PR #2774
2019-09-19 16:06:21 +02:00
Steven Barclay
10bed7aafe Remove redundant/invalid null handling from PaymentMethod.compareTo
Don't return 0 in the case of a null 'this.id' field, as that violates
the Comparable contract and leads to inconsistent NPE throwing when the
arguments are swapped. Instead, just assume (reasonably) that the ID
field will never be null.
2019-09-17 18:59:31 +01:00
Christoph Sturm
feadfb86a0 Add an explaining comment 2019-09-17 18:42:46 +02:00
Christoph Sturm
f2ec433cc2 use /usr/bin/caffeinate to disable power management on macOS 2019-09-17 18:22:46 +02:00
Christoph Atteneder
736da2a006
Merge pull request #3278 from erciccione/DAO-username
Change dao.proposal.display.name to 'Exact GitHub username'
2019-09-17 17:05:37 +02:00
chimp1984
b26a15600d
Use static method, remove unused formatter field 2019-09-17 16:56:30 +02:00
Christoph Atteneder
cc3128d4e0
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.1.6
# Conflicts:
#	core/src/main/java/bisq/core/offer/OfferUtil.java
#	core/src/main/resources/i18n/displayStrings.properties
#	desktop/src/main/java/bisq/desktop/main/MainView.java
#	desktop/src/main/java/bisq/desktop/main/MainViewModel.java
#	desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java
#	desktop/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java
#	desktop/src/main/java/bisq/desktop/main/overlays/windows/DisputeSummaryWindow.java
#	desktop/src/main/java/bisq/desktop/main/overlays/windows/OfferDetailsWindow.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersViewModel.java
#	desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java
#	desktop/src/main/java/bisq/desktop/main/support/dispute/DisputeView.java
#	desktop/src/main/java/bisq/desktop/main/support/dispute/agent/DisputeAgentView.java
2019-09-17 15:52:51 +02:00
erciccione
072fb137bb
Change dao.proposal.display.name to 'Exact GitHub username' 2019-09-17 11:10:54 +02:00
Devin Bileck
0cdf54a992
Update MobileModel parseDescriptor to support iPhone 11
It was parsing only the first digit of the version and using that in a
comparison check to determine if the version is greater than 5.
This meant for the iPhone 11 it was comparing 1 > 5, returning an
incorrect result.

It now supports multi-digit version numbers (i.e. 11), including
support for a suffix in the version (i.e. 11S), just in case...
2019-09-17 00:13:18 -07:00
wiz
db62d0df0f
Update IP address for @mrosseel's 2 hard-coded BTC nodes 2019-09-16 09:26:30 +02:00
Christoph Atteneder
85f9ead931
Merge pull request #3262 from wiz/fix-mrosseel-btcnode-ip-addresses
Update IP address for @mrosseel's 2 hard-coded BTC nodes
2019-09-16 09:26:15 +02:00
wiz
8327d35ad5
Remove bitcoin4-fullnode.csg.uzh.ch / 192.41.136.217 btcnode 2019-09-16 09:25:37 +02:00
wiz
683b8b590a
Remove bitcoin4-fullnode.csg.uzh.ch / 192.41.136.217 btcnode 2019-09-15 11:06:19 +09:00
wiz
d3335208bb
Temporarily disable onion host for @KanoczTomas's BTC node 2019-09-15 09:59:11 +09:00
wiz
ec9cc04eb8
Update IP address for @mrosseel's 2 hard-coded BTC nodes 2019-09-15 09:50:57 +09:00
wiz
4cc636dfea
Fix various bugs related to Japan Bank Transfer payment method (#3258)
* Fix various bugs related to Japan Bank Transfer payment method

* Add missing call to addFormForBuyer(), improve BuyerStep2View UI
* Fix Account Creation UI elements width to fill entire pane
* Fix Account Creation UI elements padding to avoid overlap
* Tweak trade display popup text and various strings
* Remove @Deprecated tag

* Remove unnecessary line break

* Improve layout of fields
2019-09-14 19:57:24 +02:00
wiz
f9687ad563 Fix various bugs related to Japan Bank Transfer payment method (#3258)
* Fix various bugs related to Japan Bank Transfer payment method

* Add missing call to addFormForBuyer(), improve BuyerStep2View UI
* Fix Account Creation UI elements width to fill entire pane
* Fix Account Creation UI elements padding to avoid overlap
* Tweak trade display popup text and various strings
* Remove @Deprecated tag

* Remove unnecessary line break

* Improve layout of fields
2019-09-14 19:55:58 +02:00
chimp1984
9f84f023fa
Remove CapabilityRequiringPayload from GetBlocksRequest
We remove CapabilityRequiringPayload as it would cause problems if the
lite node connects to a new seed node and they have not exchanged
capabilities already. We need to improve capability handling the we
can re-enable it again. As this message is sent any only to seed nodes
it does not has any effect. Even if a lite node receives it it will
be simply ignored.
2019-09-14 19:51:15 +02:00
sqrrm
e6179990bd
Merge pull request #3255 from ripcurlx/update-data-stores-and-dates-for-v1.1.6
Update data stores and dates for v1.1.6
2019-09-14 01:25:20 +02:00
Christoph Atteneder
690ceb013e
Fix typo 2019-09-13 18:55:04 +02:00
Christoph Atteneder
ac98a616f1
Update migration dates for v1.1.6 and remove testing code 2019-09-13 14:46:09 +02:00
Christoph Atteneder
bd656d5b3e
Rename review and accept or reject button to prevent confusion 2019-09-13 13:39:29 +02:00
Christoph Atteneder
15f71c9e02
Add information what to do next after mediation is completed 2019-09-13 12:16:40 +02:00
Christoph Atteneder
982f610a16
Add alternative text until mediation is activated 2019-09-13 11:57:57 +02:00
wiz
a09557fc45
Add new payment method: Japan Bank Transfer (furikomi) 2019-09-13 09:37:16 +02:00
Christoph Atteneder
13f00a9f48
Merge pull request #3225 from wiz/japan-bank-transfer-payment-method
Add new payment method: Japan Bank Transfer
2019-09-13 09:36:09 +02:00
wiz
fb385a0074
Add new payment method: Japan Bank Transfer (furikomi) 2019-09-13 11:46:21 +09:00
chimp1984
e71b6d69a7
Remove CapabilityRequiringPayload from NewBlockBroadcastMessage
We remove the CapabilityRequiringPayload interface to avoid risks
that new BSQ blocks are not well distributed in case the capability is
not exchanged at the time when the message is sent. We need to improve
the capability handling so that we can be sure that we know the actual
capability of the peer.
2019-09-13 00:38:59 +02:00
chimp1984
4a3d070259
Close trader chat popup once trade gets closed
Fixes https://github.com/bisq-network/bisq/issues/3243
2019-09-11 17:53:39 +02:00
chimp1984
5e48845d4c
Remove dev log, change log level 2019-09-11 17:52:57 +02:00
chimp1984
617ae35adf
Fix wrong error string 2019-09-11 16:53:53 +02:00
Justin Carter
3b46f3584f
Extract parsing functions from BSFormatter to ParsingUtils
Parsing and formatting are 2 different concerns, its better to have 2
classes that handle these.
2019-09-11 16:14:18 +02:00
Justin Carter
fe33a80de5
Extract DisplayUtils from BSFormatter
All methods that are only used in the desktop project are removed from
BSFormatter to DisplayUtils. This reduces the entanglement between the desktop and core
project by reducing the surface area of the coupling.
2019-09-11 15:58:48 +02:00
Florian Reimair
be21535a4b
Merge pull request #3239 from bodymindarts/static-BSFormatter-functions
Make stateless BSFormatter functions static and remove dead code
2019-09-11 13:10:37 +02:00
Justin Carter
57d9badf8f
Make stateless BSFormatter functions static and remove dead code
Making these functions static is a preparation for extraction.
2019-09-11 12:51:12 +02:00
sqrrm
deeb6e4315
Merge pull request #3204 from ripcurlx/add-brazilian-portuguese
Add portuguese (Brazil) locale
2019-09-11 12:48:27 +02:00
wiz
fc72225fa3 Revert DAO changes to add bonded role for Analytics Operator (#3241)
* Revert "Increase analytics operator bond amount from 1 to 2"

This reverts commit 322fe23ea7.

* Revert "Add new BondedRoleType for Analytics Operator"

This reverts commit a3a3bf2b2a.
2019-09-11 10:06:52 +02:00
chimp1984
d55114e019 Add mediation support (#3221)
* Refactoring: Move arbitration package inside dispute package

* Use abstract base class DisputeResolver for arbitrator

* Refactoring: Move mediator to mediator package.

* Let Mediator inherit DisputeResolver.

* Do not use protobuf inheritance

- Do not use protobuf inheritance for Arbitrator and Mediator as it
would break backward compatibility (and protobuf inheritance sucks
anyway)

* Refactoring: Move ArbitratorModule to parent package

* Refactoring: Rename ArbitratorModule to DisputeModule

* Add mediators to Filter

* Add mediators to filter window

* Use abstract DisputeResolverService as base class for ArbitratorService

- Add common base class for ArbitratorService and MediatorService

* Fix test

* Use abstract DisputeResolverManager as base class for ArbitratorManager

- Add common base class for ArbitratorManager and MediatorManager

* Refactor: Move arbitratorregistration package inside register pkg

* Refactor: Rename arbitratorregistration package to arbitrator

* Add registration view for mediator

- With cmd+D one can open the mediator regisration in account screen.
For arbitrator its cmd+R

* Separate pub key list for mediator (no new keys added yet)

* Set new pubkeys for mediator registration

- Before release set new keys from maintainer who manages keys

* Set disputes @Nullable. Add null checks

* Remove pre v0.9 handling for supported arbitrators from offer

- We changed handling of arbitrator selection with v0.9 so the
supported arbitrators in the offer is not used anymore. As we
enforced v1.2 a while back for trading we can be sure no pre v0.9
clients are used anymore and we can remove the optional code part.

* Remove supported arbitrators info in offer details window

- As we do not use supported arbitraors in offer anymore since v0.9
we can remove that.

* Remove check for matching arbitrator languages

As we do not use the supported arbitratos from offer since v0.9 we can
remove that check.

* Remove not used classes

* Remove checks for arbitrator and mediator in offer

We do not use those fields anymore. We still need to keep the fields
not nullable as old clients have the check still.

* Add check if sig of proto object is not empty

We got in dev testing sometimes an empty protobuf Alert. Might be
caused from protobuf copatibility issues during development but not
100% clear.
As it causes an exception and corrupted user db file we prefer to set
it to null.

* Remove TakerSelectMediator

This is not used anymore. Currently we would get an exception in the
trade but with follow up changes we will fix that...

Mediator handling and selection will be done the same way like
arbitrator. The current mediator handling was a relict from earlier
partial support for mediators which never got completed. As still a
null check is in place we need to ensure backward compatibility.

* Set arbitratorNodeAddresses and mediatorNodeAddresses to deprecated

We do not use arbitratorNodeAddresses and mediatorNodeAddresses anymore
but as there is a null check we still need to keep the field ans set it
to an empty arrayList.

* Make ArbitratorSelection generic. Add MEDIATOR_ADDRESS

We want to use the same selection algorithm for mediators as for
arbitrators, so we make ArbitratorSelection generic.
We add MEDIATOR_ADDRESS as extraMap entry to TradeStatistics2 to be
able to track number of trades with specific mediators.

ExtraMap is used to add new data to existing protobuf definitions which
is supported also by not updated clients. Adding a new protobuf field
would only be supported by new clients. As mediator support is a new
feature we could add a new field but to keep it in the same style like
arbitrator we prefer to use the map here as well.

* Refactor: Rename ArbitratorSelection to DisputeResolverSelection

* Add mediator to OfferAvailabilityResponse and mediatorNodeAddress to OpenOffer

WIP for supporting mediator selection the same way like arbitrators.

* Make arbitrator not nullable

We can ensure that all users are post v0.9 so we can remove the nullable
 support.

* Add selectedMediator to OfferAvailabilityModel

Remove nullable support in ProcessOfferAvailabilityResponse as we can
ensure all clients are post v0.9

* Refactor: Rename method

* Add todo for using more generic keys for display strings

* Refactor: Rename method

* Fix wrong handling of registeredMediator

Fix copy/paste error

* Add mediatorNodeAddress to trade

* Handle nullable mediator in ProcessOfferAvailabilityResponse

We do not get the mediator set from old clients but we expect a not null
value so we use the DisputeResolverSelection in case it is null.
We need to pass mediatorManager and tradeStatisticsManager to the
OfferAvailabilityModel.

* Change log level, cleanup

* Revert changes in OfferPayload due backward compatibility issues

Because of backward compatibility issues we needed to revert the removal
of arbitratorNodeAddresses and mediatorNodeAddresses. The signature
check for the offer  would fail as an old client would send a not-empty
list but new clients would have had an empty list, so the hash
would be different and the sig check fail and we would not accept that
offer. That is the reason why we still need to support those data even
it is not used anymore.

This is one of the more tricky cases for backward compatibility issues.

This version now is tested between new and old clients and trade and
disputes work.

* Add checks if any mediator is available

* Cleanup classes

* Fix test

* Add mediator DisputeStates

Add isMediationDispute to Dispute class.

If a dispute opening gets requested we check if state is
DisputeState.NO_DISPUTE and the open mediation. If state is
DisputeState.MEDIATION_REQUESTED we open arbitration.

* Cleanup; support isMediationDispute

* Handle mediator data in Dispute domain

- Add getConflictResolverNodeAddress method to Dispute to resolve
arbitrator or mediator address based on isMediationDispute flag.

- Rename arbitratorPubKeyRing to conflictResolverPubKeyRing in Dispute.
We cannot rename arbitratorPubKeyRing in the protobuf definition
as it would break backward compatibility.

* Add support for mediation in dispute domain

- Add isMediationDispute method to ChatSession
- Add isMediationDispute method to DisputeCommunicationMessage
- Add isMediationDispute to dispute id
- Refactor findDispute method
- Add null checks
- Cleanups

* Remove impossible case

Reserved and locked funds are used for offers and trades only.

* Fix typos

* Handle mediator and arbitrator strings

- Work in progress of adjusting correct terms.
- Cleanups

* Refactor: Rename arbitrator package to disputeresolvers

* Refactor: Rename ArbitratorDisputeView classes to DisputeResolverView

* Add support for close ticket from mediator (WIP)

In mediator case we do not create any transaction but only send the
dispute result which contains the mediators recommended payout
distribution. At teh traders we set the disputeState in the trade to
closed. This will be used in the next commits to update the trade so
that the traders get displayed the recommended payout and get asked if
they agree to that.

* Refactoring: Rename class

Rename MessageDeliveryFailedException to
DisputeMessageDeliveryFailedException

* Refactoring: Move dispute classes to dispute package

* Refactoring: Move Attachment class to dispute package

* Refactoring: Move package one level up

Move bisq.core.dispute.arbitration.messages to
bisq.core.dispute.messages

* Add todo comment

* Use ARBITRATION instead of DISPUTE

* Make DisputeManager abstract base class for ArbitrationDisputeManager

WIP for separating DisputeManager to ArbitrationDisputeManager and
MediationDisputeManager

* Add MediationDisputeManager

* Add MediationDisputeManager and ArbitrationDisputeManager to test

* Add mediationDisputeManager to relevant classes

There are some cases where arbitrationDisputeManager only is used.
Those are usually related to the payout tx. As mediators do not do a
payout we don't need it there.

* Add TradersArbitrationDisputeView and TradersMediationDisputeView

WIP for separating TraderDisputeView

* Refactor:  Rename class

* Refactor: Rename support.tab.support to support.tab.mediation.support

I am aware that committing non default translation files is not
recommended, but I think in that case it helps to avoid to show errors
for developers who use non-english locale. The changes will be
overwritten by transifex once it gets synced...

* Add DisputeView as common base class

Further refactor separation of diff. dispute views

* Refactor: Rename package

* Refactor: Rename DisputesView to SupportView

* Refactor: Rename package

* Add MediationDisputeManager to CorePersistedDataHost

* Add MediationDisputeList as db file, refactor DisputeList

WIP for making Dispute domain more generic. We want to separate
arbitration and mediation clearly.

* Further refactoring to split mediation and arbitration

* Further refactoring to split mediation and arbitration

Move methods used for arbitration only to ArbitrationDisputeManager

* Refactor: Rename package

Rename bisq.core.dispute to bisq.core.support

No other changes in that commit.
We want to improve the data structure with the trader chat.
Support will be the top level.
Then dispute containing arbitration and mediation.
Next to dispute will be trader chat.

bisq.core.support
bisq.core.support.dispute.arbitration
bisq.core.support.dispute.mediation
bisq.core.support.traderchat  (not happy with name for that yet)

* Refactor: Move dispute domain classes into isq.core.support.dispute package

* Refactor: Move classes

Move bisq.core.chat.ChatSession to bisq.core.support.ChatSession
Move bisq.core.chat.ChatManager to bisq.core.support.ChatManager
Move bisq.core.trade.TradeChatSession to bisq.core.support.traderchat.TradeChatSession

* Refactor: Move DisputeCommunicationMessage

* Refactor: Rename DisputeCommunicationMessage to ChatMessage

* Add comments

* Refactor: Move class

* Refactor: Rename class

* Refactor: Rename addDisputeCommunicationMessage and strings and variables

Rename disputeCommunicationMessage to chatMessage

* Refactor: Rename method

* Refactor: Rename methods and strings

* Add ArbitrationChatMessage and DisputeChatMessage

* Refactor: Rename class

* Move ChatMessage.Type to SupportType

Add to all supportMessages the SupportType so that we can filter in our
chatSessions the messages we are interested in.

* Refactor: Move classed to new package

* Refactor: Rename package

* Refactor: Move classed to new package

* Refactor: Move classed to new package

* Refactor: Rename classes

* Refactor: Rename package

* Refactor: Rename classes

* Refactor: Rename classes

* Remove empty DisputeModule

* Refactor: Rename classes

* Refactor SupportManager domain (WIP)

* Refactor SupportSession domain (WIP)

* Remove methods from SupportSession

* Dont expose p2pService in SupportManager

* Remove supportType in SupportSession

* Remove supportSession from getPeerNodeAddress method

* Remove isBuyer from supportSession

* Move creation of ChatMessage to SupportManager

* Remove isMediationDispute fielf in ChatMessage

* Remove chatMessage.isMediationDispute()

* Refactor: Rename trade.getCommunicationMessages()

* Move creation of ChatMessage to Chat

* Refactor: Rename class

* Refactor: Move ChatView class

* Refactor: Move PriceFeedComboBoxItem class to shared package

* Refactor: Use 'public abstract' instead of 'abstract public'

* Refactor: Use 'protected abstract' instead of 'abstract protected'

* Add traderChatManager.onAllServicesInitialized() to BisqSetup

* Remove unused param

* Refactor: Rename addChatMessage to addAndPersistChatMessage

* Fix missing check at ack msg handling

Various WIP refactorings/improvements

* Remove addAndPersistChatMessage from SupportSession

* Remove disputeManager from DisputeSession

* Fix missing getConcreteDisputeChatSession impl.

* Refactor: Rename package

* Refactor: Rename classes

Avoid trader as it might confuse with trader chat.
As for mediation/arbitration the agent (mediator/arbitrator) are acting
a bit like a server we use the client terminology for the traders.

* Refactor: Move classes to new package

* Fix missing protobuf data

- Add missing SupportType to protobuf
- Remove is_mediation_dispute from Dispute protobuf
 definition
- Add getAgentNodeAddress method
- Var. other refactorings, cleanups

* Clone list at persisting to avoid ConcurrentModificationException

* Fix order of SupportType

Old clients fall back to enum at slot 0.

* Add getDisputeState_StartedByPeer template method

* Add trade protocol tasks for mediation result tx signing and msg sending

* Complete protocol tasks for mediation

* Refactor: Remove unneeded SuppressWarnings type: "WeakerAccess"

* Complete mediation result protocol

Works now all but not much tested....

* Add activation date and capability

We need to make sure that not updated users cannot cause problems once mediation is supported. We would get mixed cases where one has a mediation ticket and the not updated user an arbitration ticket. To avoid that we set an activation date with about 10 days from release. Until that date mediation is not supported.
Additionally we use OfferRestrictions.REQUIRE_UPDATE_DATE for hiding offers from users how have not updated (we use the fact that mediator and arbitrator has been same in old version, in new version they are different).
An old client cannot take an offer from a new maker as he does not has set the new MEDIATION capability. He will get an null value as AvailabilityResult as he has not the new entry MISSING_MANDATORY_CAPABILITY.
We will also use the min version for trading in the filter, so that not updated users get a popup telling them to update and they see all offers deactivated.

* Various fixes

* Remove code part which does not make sense (anymore)

Maybe in older versions there was use of openDisputes and closedDisputes
but now it does not make sense anymore and arbitrator never gets 4 cases
opened if offline.

* Add check of balance is > 0

* Only close trade if payout tx is set

* Add missing check if arbitrator and mediator are available

* Fix wrong key

* Improve handling of checks and popup display

For create and take offer we check certain conditions and show a
popup if not met. This commit moves that to GuiUtils.

* Rename any occurrance of DisputeResolver to DisputeAgent

* Fix handling of mediatorPubKeyRing

* Remove disputeSummaryWindow.evidence fields

* Add missing persistence for MediationResultState

* Fix tests

* Make text more compact to not exceed space

* Refactor NotificationGroup

* Improve text, add dev testing feature for popups

* Improve text

* Renamed a key and assigned a new text

* Fix states

* Do not set errorMessage

Do not set errorMessage if both peers have opened a dispute and agent
was not online

* Remove logs used for dev testing

* Fix getMedian method with empty list

* Add new methods and tests

Add fromCommaSeparatedOrdinals and toCommaSeparatedOrdinals to convert
from string representations (used for handling backward compatibility
with mediation release).

Add check if int >= 0 to fromIntList

* Move error log outside of delayed call

* Add capabilities entry to extraDataMap in offer

The previous implementation did not work for supporting updates and
hiding offers from not updated clients.
We use now the capabilities converted to a string list and put it into
the extraDataMap. If a use with old persisted offers updates his offers
gets converted to add the capabilities. Updated clients will ignore
offers without the mediation capability set in the offer.

* Rename non sync protobuf definitions

As Christoph Sturm pointed out we can rename protobuf entries.
Only index number must not be changed.

* Fix UI state when arbitration has started

Only set mediation state if we are not in arbitration state.

* Remove restriction

* Fix typo; remove errorMessage

If both have opened a dispute and agent was not online we dont treat it
as error.

* Improve text

* Store full address for localhost dev testing

The arbitrator/mediator selection is based on statistics of usage of
agents in past trades. We put the first 4 chars into the trade
statistics, but for localhost that would be same vale for 2 diff nodes.

* Remove errorMessage

If both have opened a dispute and agent was not online we dont treat it
as error.

* Improve text

* Keep accept or reject button enabled after accept

- If peer never accepts the trader who has accepted first can change
to reject to open a arbitration dispute.
We could improve that by adding a new state to open arbitration
directly and show a diff. button text and popup. But I think for now
thats ok as well....

* Cleanups (no functional change)

- remove unused params
- remove not used code
- reformat
- clean up comments
- fix log levels
- remove redundant annotations

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Update core/src/main/resources/i18n/displayStrings.properties

Co-Authored-By: Steve Jain <mfiver@gmail.com>

* Improve text

* Auto fill remaining amount in custom payout

If mediator or arbitrator are doing a custom payout, we auto-fill
counterpart field with remaining amount, so he does not need to
calculate.
2019-09-09 20:51:57 +02:00
wiz
322fe23ea7 Increase analytics operator bond amount from 1 to 2
As discussed in:
https://github.com/bisq-network/proposals/issues/115#issuecomment-529490565
2019-09-09 20:47:04 +02:00
chimp1984
bb806cfbc3 Add bsq price trend indicator (#3226)
* Change text field for median to average 30

The average 30 days price is more relevant information than the small
different between average and median price. To add a second tuple of
both would be another option would overload the screen with not that
relevant information.

In a follow up commit we want to add an ip/down indication so see
price trend.

Fixes also handling of 0 values.

* Apply reformat (no code change)

* Add support for columnIndex

* Add price trend indicator

If average 30 days price is > av. 90 days price we show a green
arrow up, otherwise a red arrow down. If same we don't show an arrow.

* Fix dev test change

Forgot to change back a small change to test directions...

* Fix padding issues
2019-09-09 12:39:08 +02:00
wiz
a3a3bf2b2a
Add new BondedRoleType for Analytics Operator 2019-09-09 11:56:17 +09:00
chimp1984
b210118821
Set old DAO Capabilities Deprecated
All nodes have DAO capabilities now so we can set those which are not
optional (DAO_FULL_NODE, RECEIVE_BSQ_BLOCK) as deprecated and remove
the CapabilityRequiringPayload interface from the relevant messages.

To support non-DAO nodes in the future if needed we can use the
existing options for deactivating the DAO.
2019-09-07 13:21:23 +02:00
Christoph Atteneder
7c034a49c6
Merge pull request #3212 from chimp1984/add-average-bsq-price
Add average bsq price
2019-09-06 17:10:25 +02:00
Florian Reimair
69d70f386e
Revert non-changes 2019-09-06 16:21:22 +02:00
Christoph Atteneder
211eb1b4f1
Merge pull request #3213 from christophsturm/cleanup-thread-handling
Simplify thread handling and ensure proper they all have names
2019-09-06 16:15:15 +02:00
Christoph Atteneder
ec0b657967
Merge pull request #3216 from christophsturm/optimize-logging
More logging optimisations.
2019-09-06 16:12:55 +02:00
Christoph Sturm
934e31d28c don't calculate values twice 2019-09-06 12:25:30 +02:00
Christoph Sturm
42311ea7d3 optimize debug logging. 2019-09-06 12:25:30 +02:00
chimp1984
9be4b71088
Add comments 2019-09-06 11:49:33 +02:00
chimp1984
7856722fa5
Remove CapabilityRequiringPayload from TradeStatistics2
We do not have any old versions anymore which might not support
TradeStatistics2, so we can remove it.
2019-09-06 11:49:21 +02:00
chimp1984
206c4bc6e1
Remove CapabilityRequiringPayload from AccountAgeWitness
We do not have any old versions anymore which might not support
AccountAgeWitness, so we can remove it.
2019-09-06 11:49:07 +02:00
Christoph Sturm
6273a58c3b Assign even more thread names at thread creation. 2019-09-06 11:07:34 +02:00
Christoph Sturm
bcaac51830 Assign more thread names at thread creation. 2019-09-06 11:07:34 +02:00
Christoph Sturm
6cb206c257 Inline unused variable 2019-09-06 11:07:34 +02:00
Christoph Sturm
175899486e Use try with resource. 2019-09-06 11:07:34 +02:00
Christoph Sturm
ac78f72c1e Set thread name at thread creation 2019-09-06 11:07:34 +02:00
chimp1984
5d4f9afa71
Add 90 days average and median BSQ price 2019-09-06 04:43:30 +02:00
battleofwizards
82e9672e91
Remove PGP keys from the KeyRing
The PGP support was envisioned in the KeyRing but never fully
implemented. This removes the (essentially) dead code.

The protobuf message compatibility is implemented with `reserved`.
2019-09-05 14:30:33 +02:00
Christoph Atteneder
5dcfa96741
Add portuguese (Brazil) locale 2019-09-05 10:35:35 +02:00
Christoph Atteneder
285e5f236d
Merge pull request #3189 from gordonel/patch-1
Change trader-facing language to gender-neutral
2019-09-04 10:33:23 +02:00
battleofwizards
1c580da5ed
Remove bouncycastle:bcprov from *direct* dependencies
We still depend on this jar *indirectly* via bouncycastle:bcpg,
which is used for PGP signature verification of Bisq Desktop updates.

This gets us closer to prospect of removing Bounce Castle dependency
entirely in the future.

Rationale for this direction:

* We are really only using Bouncy Castle for PGP sig verification
* Java's builtin cryptography got vastly better since 2000
* We should prefer boring and proven cryptography anyway
* Australian projects should be considered compromised,
  and Bouncy Castle is run by Australian non-profit organization
* Bouncy Castle is a heavy dependency totaling 3.6MB
2019-09-03 15:07:22 +02:00
Gordon E
7b2ab4adda
Update ApplyFilter.java 2019-09-03 12:36:42 +03:00
Gordon E
688bb4e423
Update displayStrings.properties 2019-09-03 12:35:38 +03:00
Gordon E
42a69c73bb
add missing corrections 2019-09-03 12:31:35 +03:00
Gordon E
e257df4244
Update displayStrings.properties 2019-09-03 12:12:19 +03:00
Christoph Atteneder
4139e022df
Update bitcoinj checkpoint 2019-09-02 15:14:42 +02:00
Christoph Atteneder
3fc19f92b8
Merge pull request #3182 from christophsturm/fix-npe
fix NPE in shutdown hook
2019-09-02 14:39:12 +02:00
chimp1984
3f885c21e5
Use ARBITRATION instead of MEDIATION 2019-09-02 14:15:15 +02:00
chimp1984
629a16f163
Change DisputeCommunicationMessage.Type enum
To support future mediation chats
2019-09-02 14:10:54 +02:00
Christoph Sturm
ba099d9262 fix NPE in shutdown hook 2019-09-02 13:04:29 +02:00
Chris Beams
fdecf6f33c
Remove cbeams pricenode from ProvidersRepository
The BitcoinAverage developer plan API keys in use for this node have
recently expired. Given that we already have four other pricenodes
up and running, there's no compelling reason to keep this fifth one in
place and to pay for hosting and API keys for it every month.
2019-09-02 12:34:22 +02:00
Christoph Atteneder
5d260ad42b
Update translations 2019-09-02 11:26:50 +02:00
Christoph Atteneder
a212a5889c
Merge pull request #3149 from ghubstan/validate-phone
Validate phone numbers
2019-09-02 09:47:11 +02:00
Christoph Atteneder
e0c91d22b3
Merge pull request #3176 from sqrrm/blocknotify-option
Add rpcBlockNotificationHost option
2019-09-02 09:20:13 +02:00
Christoph Atteneder
9c0be827c9
Merge pull request #3177 from chimp1984/fix-bsq-wallet-performance-issue
Fix performance issue in BsqWalletService
2019-09-02 09:19:55 +02:00
chimp1984
3412725a48
Update core/src/main/java/bisq/core/dao/monitoring/DaoStateMonitoringService.java
Co-Authored-By: sqrrm <sqrrm@users.noreply.github.com>
2019-09-02 01:29:54 +02:00
chimp1984
8521164adc
Add duration log for DaoStateMonitoringService
Creating the daoStateHash is quite expensive (about 20-30 ms/block).
As this happens while parsing it delays the parsing time (parsing is
very fast). We persist t the hashes so it is only done for new blocks.
For 1 month of blocks (4000) it would take about 80-120 seconds.
It is not blocking the user thread as it is done per block and those
are parsed one after another.
2019-09-01 23:24:08 +02:00
chimp1984
a876273c52
Reset daoFullNode in preferences if rpc data are not set 2019-09-01 22:58:51 +02:00
chimp1984
40de3c528d
Improve logging
- Add better logs and duration measurements for expensive operations
- Convert debug logs to trace to avoid flooding the output in debug log
mode.
- Cleanups
2019-09-01 22:57:40 +02:00
chimp1984
6dafafd7b1
Fix performance issue in BsqWalletService
The updateBsqWalletTransactions method got called at each block for all
transactions. During block download that wasted a lot of cpu and
led to stuck UI thread and lost connections.
The updateBsqBalance is not cheap (a few ms) and called for 100s of txs
at each block was very problematic.
Furthermore the listeners on the walletTransactions observableList got
triggered which made the situation worse.

We changed the observableList to a ArrayList and use a listener which
gets called after the list is updated.
We also make sure the onTransactionConfidenceChanged listener is not
calling updateBsqWalletTransactions if bsq parsing is not complete and
if the depth of the tx is > 1.
In the updateBsqWalletTransactions method we use a flag and a delay
to ensure that the updateBsqBalance is not called more then once
in 100 ms.

We changed also the getter to return a cloned version of the list to
avoid potential concurrent modification exceptions at clients.

Closes #3175
2019-09-01 22:47:10 +02:00
sqrrm
f30b68b39f
Fix tests 2019-09-01 19:10:26 +02:00
sqrrm
a13600f2f3
Add rpcBlockNotificationHost option 2019-09-01 18:42:48 +02:00
chimp1984
39e22ca44e
Fix bug with not showing system msg at peer who receives msg
- We only added the system msg when one opens the chat but not when
one received a message.
2019-08-31 01:14:43 +02:00
ghubstan
de4b59048b
Integrate PhoneNumberValidator into SwishForm
PhoneNumberValidator + Test Changes:
  Added no-arg constuctor required for Guice injection.
  Added isoCountryCode setter;  this field must be set before
  validation.
  Added validation of isoCountryCode.
  Added missing country code test.

SwishValidator Changes:
  SwishValidator now extends PhoneValidator.
  Added no-arg constuctor required for Guice injection.
  Set isoCountryCode = SE in constructor.

SwishForm Changes:
  Sets Swish acct phone number to normalized phone number if
  phone # validation is successful.
  Replaced Logger declaration with @Slf4j annotation.
  Formatted source.

Added 'validation.phone.missingCountryCode' property to i18n file.
2019-08-30 15:27:46 -03:00
Christoph Atteneder
b5f871b8ed
Merge pull request #3165 from chimp1984/trade-chat
Traders chat
2019-08-30 19:00:03 +02:00
chimp1984
50baa9b023
Close chat window if dispute gets closed 2019-08-30 18:44:43 +02:00
chimp1984
c615780333
Update tradeChat.rules 2019-08-30 17:07:35 +02:00
chimp1984
16d3bc5d26
Update core/src/main/resources/i18n/displayStrings.properties
Co-Authored-By: Steve Jain <mfiver@gmail.com>
2019-08-30 16:54:16 +02:00
chimp1984
fa307207ac
Update core/src/main/resources/i18n/displayStrings.properties
Co-Authored-By: Steve Jain <mfiver@gmail.com>
2019-08-30 16:53:39 +02:00
sqrrm
dec5982b2a
Add BRL as mature market
Move mature currency settings to CurrencyUtil as that seems a better fit
2019-08-30 13:57:23 +02:00
chimp1984
5e267fa461
Handle nullables 2019-08-30 01:01:29 +02:00
chimp1984
663d8591c4
Add chat rules system msg; cleanups 2019-08-30 00:58:06 +02:00
chimp1984
5c1999f180
Fix wrong pubkey 2019-08-30 00:57:21 +02:00
chimp1984
a2cd80866d
Add missing setWasDisplayed 2019-08-30 00:07:32 +02:00
sqrrm
cb55693d4e
Set active currencies as high chargeback risk 2019-08-30 00:01:40 +02:00
chimp1984
81a93b56b1
Add onAllServicesInitialized call, rename method 2019-08-29 22:55:02 +02:00
chimp1984
e0c1a85406
Add wasDisplayed field to chatMsg
- Fix logger
- Manage display state off trade chat msg (wip)
2019-08-29 22:29:36 +02:00
chimp1984
855cb4f620
Add missing allServicesInitialized check 2019-08-29 21:40:32 +02:00
chimp1984
fa43f03151
Merge branch 'master_upstream' into sq-add-trader-chat
# Conflicts:
#	desktop/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java
2019-08-29 19:09:49 +02:00
chimp1984
bfb111da67
Add close handler to popup
- Close already open chat if new one opens
2019-08-29 18:56:11 +02:00
Christoph Atteneder
3ccae6922d
Merge pull request #3152 from wiz/darkmode
Dark Mode
2019-08-29 18:53:49 +02:00
chimp1984
2189cba41b
Show chat in popup instead of tab (WIP) 2019-08-29 17:50:14 +02:00
chimp1984
8e3a3514a3
Add comments, cleanup, fix wrong param name 2019-08-29 17:14:56 +02:00
chimp1984
cb673764df
Update string 2019-08-29 17:13:57 +02:00
chimp1984
5d338e693c
Fix merge issues 2019-08-29 17:07:39 +02:00
chimp1984
329572cc5d
Merge branch 'master_upstream' into sq-add-trader-chat
# Conflicts:
#	core/src/main/java/bisq/core/arbitration/DisputeManager.java
#	core/src/main/java/bisq/core/arbitration/messages/DisputeCommunicationMessage.java
#	core/src/main/java/bisq/core/trade/Trade.java
2019-08-29 16:50:32 +02:00
Florian Reimair
4e7cb04043
Merge pull request #3154 from chimp1984/Fix-small-P2P-network-issues
Fix small p2p network issues
2019-08-29 16:15:18 +02:00
wiz
4eb85b955e
Add toggle switch UI preference for Dark Mode on/off
* Store preference for Dark Mode as int32 css_theme
2019-08-29 20:20:25 +09:00
chimp1984
a0e690997a
Merge branch 'master_upstream' into Fix-small-P2P-network-issues
# Conflicts:
#	core/src/main/java/bisq/core/setup/CoreNetworkCapabilities.java
2019-08-28 19:49:18 +02:00
Devin Bileck
70a4009e85
Update backup operator 2019-08-28 09:16:06 -07:00
Devin Bileck
9c7c301860
Merge branch 'master' of https://github.com/bisq-network/bisq into add-seednode-backup
# Conflicts:
#	core/src/main/resources/btc_mainnet.seednodes
2019-08-28 09:14:14 -07:00
Christoph Atteneder
4478476763
Merge pull request #3151 from chimp1984/dont-send-bsq-blocks-to-full-nodes
Do not send BSQ blocks to full nodes
2019-08-28 12:42:16 +02:00
sqrrm
f8fe464ca3
Merge pull request #3121 from sqrrm/arbitrator-to-sign
Arbitrator to sign
2019-08-28 11:13:35 +02:00
wiz
80ce113cae
Add @nicolasdorier as backup seednode operator for jhgcy2won7xnslrb 2019-08-28 17:04:44 +09:00
chimp1984
79c08b6e04
Remove Capability.SIGNED_ACCOUNT_AGE_WITNESS 2019-08-28 01:20:10 +02:00
Devin Bileck
1790637c84
Add backup operator for seeds 3f3cu2yw7u457ztq and fl3mmribyxgrv63c 2019-08-27 15:32:55 -07:00
chimp1984
4bc6616e7a
Do not send BSQ blocks to full nodes 2019-08-27 19:27:39 +02:00
ghubstan
39d823a6fb
Validate phone numbers
Created new PhoneNumberValidator + Test. Validator hides
no arg constructor; public constructor requires two letter
ISO country code for validating inputs.

After successful validation, inputs are transformed into E.164
format and cached in a field, accessible via a getter method.
However, area and region codes are not checked for correctness.
End users are responsible for correctness of area/region codes.

Four i18n properties (validation.phone.*) were added to
displayStrings.properties

This is a partial fix for Issue #3042. The validator
will be integrated into the GUI if PR is approved & patch is
merged.

Question for Bisq devs:
Another new pkg protected class, CountryCallingCodes, contains
an immutable map of ISO country codes -> country calling codes;
it is the only non-validator class in its package. The map
declaration is too large to live in the PhoneNumberValidator class,
even after tweaking idea.properties in an attempt to prevent
the IDE from freezing. Is it OK to leave CountryCallingCodes
where it is, or is there a more appropriate home for it?
2019-08-27 12:19:52 -03:00
wiz
f5d75c4f60
Improve TempProposal processing (fixes #3143) 2019-08-27 22:36:37 +09:00
Christoph Atteneder
66e963aaa7
Merge pull request #3059 from camthegeek/list-masari
List Masari (MSR)
2019-08-27 14:19:11 +02:00
sqrrm
e3bd3a99e3
Merge remote-tracking branch 'origin/master' into arbitrator-to-sign 2019-08-27 11:27:33 +02:00
Christoph Atteneder
e93370ccd5
Merge pull request #3122 from christophsturm/fix-defaultseednoderepository
fix random test failure.
2019-08-27 10:01:16 +02:00
Christoph Atteneder
db823dda60
Merge pull request #3131 from christophsturm/improve-logging
fix logging of peer address
2019-08-27 09:43:23 +02:00
Christoph Atteneder
70e304e828
Merge pull request #3135 from TyphooN-/list-solo
List Solo (XSL)
2019-08-27 09:35:53 +02:00
sqrrm
74244c4ad9
Add non static ChargeBackRisk wrapper 2019-08-26 14:33:50 +02:00
sqrrm
972dda655b
Test BuyerDataItem, use lombok generated equals and hash 2019-08-26 11:33:42 +02:00
TyphooN
8e237b23ef
List Solo (XSL) 2019-08-23 17:11:51 -04:00
Christoph Sturm
31285b4419 Fix logging
don't log peer as optional [....onion]
2019-08-23 17:16:58 +02:00
Devin Bileck
7da3bab9ca
Suppress RPC service log entries when running as DAO lite node
When running as DAO lite node, the following would get logged:

> INFO  b.c.dao.node.full.RpcService: The value of rpchost is
> INFO b.c.dao.node.full.RpcService: Starting RPCService with btcd-cli4j
version 0.5.8.4 on 127.0.0.1:8332 with user null

So instead of logging it when instantiating the RPCService, log it when
setting up the service.
2019-08-23 01:38:08 -07:00
Christoph Sturm
5a67d9f092 fix random test failure. 2019-08-21 19:04:43 +02:00
sqrrm
61895102fd
Arbitrator sign accountAgeWitnesses
Automatically filter to only sign accounts that
- have chargeback risk
- bought BTC
- was winner in dispute
2019-08-21 17:43:29 +02:00
sqrrm
aed1e8027e
Publish signed witness 2019-08-21 17:35:43 +02:00
sqrrm
ad9715a2cd
Merge pull request #3108 from christophsturm/test-signed-witness
make sure that signed witness is immutable.
2019-08-21 16:31:37 +02:00
wiz
4d2a819a65
Add wiz's 2nd Bitcoin node 2019-08-21 18:17:18 +09:00
sqrrm
f2f62c7033
Merge pull request #3112 from freimair/optimizations
Various optimizations
2019-08-20 22:08:19 +02:00
Christoph Sturm
856630d1f0 Improve naming 2019-08-20 12:49:42 +02:00
Florian Reimair
ecd01fd91d
Adjust log levels of price feed service 2019-08-20 12:08:02 +02:00
Florian Reimair
5ff4bc2201
Adjust log level for DAO logging statements 2019-08-20 12:08:02 +02:00
Florian Reimair
bd3f999e5c
Only validate param change after parsing is done 2019-08-20 12:06:22 +02:00
Florian Reimair
0501412d8e
Fix performance issue with DaoResultView 2019-08-20 11:18:17 +02:00
Christoph Sturm
f3b3ca9fc4 make sure that signed witness is immutable.
btw I do hate byte arrays
2019-08-19 20:14:21 +02:00
Christoph Sturm
2ccecd2738 fix formatting 2019-08-19 18:26:39 +02:00
Christoph Sturm
aae430887e fix formatting, set method parameter wrapping to "chop if long" 2019-08-19 18:13:05 +02:00
Christoph Sturm
79b3e5baf3 inject storage where possible 2019-08-19 17:21:35 +02:00
Christoph Sturm
7694d4e7d1 change some storage creations to injection. ensure its not a singleton 2019-08-19 17:19:45 +02:00
Christoph Sturm
b77cff9e26 inject CorruptedDataFilesHandler instead of making it static 2019-08-19 16:54:46 +02:00
sqrrm
4381eea242
Merge pull request #3086 from christophsturm/p2ptest
inject publickeyring
2019-08-16 18:22:38 +02:00
battleofwizards
7ea3ce0443
Replace "P2P network" with "Bisq network" in GUI
Rationale: it is not obvious whether "P2P network" in GUI
refers to Bitcoin network, Tor network, traded altcoin network,
or Bisq.
2019-08-16 13:56:26 +02:00
sqrrm
b1e293efb3
Merge pull request #3093 from wiz/jhgcy2won7xnslrb-transfer
Takeover jhgcy2won7xnslrb.onion from @devinbileck
2019-08-15 09:20:08 +02:00
wiz
d39f9f7499
Takeover jhgcy2won7xnslrb.onion from @devinbileck 2019-08-15 16:07:12 +09:00
Florian Reimair
963d569382
Merge pull request #3088 from wiz/wiz-bitcoin-node
Add wiz bitcoin node to BtcNodes list
2019-08-14 18:51:30 +02:00
Christoph Sturm
9b41cb8f90 fix seednode guice config 2019-08-14 17:58:04 +02:00