Commit Graph

12710 Commits

Author SHA1 Message Date
ghubstan
95bcb1ef9c
Refactor PendingTradesDataModel methods -> TradeUtil
Scope of this refactoring is small;  more can be done, but the short
term goal is to share trade util logic with core api.

- Removed unused method getCurrencyCode()
- Made minor style changes
- Removed duplicated code block
2020-10-25 11:27:30 -03:00
ghubstan
36ad137949
Remove trailing spaces for codacy 2020-10-25 10:54:40 -03:00
ghubstan
24ba9215cd
Refactor PendingTradesViewModel methods -> TradeUtil & OfferUtil 2020-10-25 10:41:19 -03:00
ghubstan
ccd3c99f2e
Fix comment typos 2020-10-24 17:45:01 -03:00
ghubstan
296e4f98cb
Replace static TradeUtil with singleton TradeUtil
The API is going to need some desktop trade utilities, which should be
shared between :desktop and :core.api.
2020-10-24 17:26:10 -03:00
ghubstan
63cf436990
Add fields to grpc TradeInfo proto & wrapper 2020-10-24 16:27:03 -03:00
ghubstan
ab20225cd2
Add compiler warning suppression, remove comment 2020-10-24 16:25:20 -03:00
ghubstan
cb65de6d2e
Block on tx-fee-request in core TakeOfferModel init
Added license comment too.
2020-10-23 12:47:06 -03:00
sqrrm
9e76f5fdc3
Merge pull request #4606 from ghubstan/remove-dup-statuscheck
Delete redundant core.api.StatusCheck
2020-10-23 15:42:34 +02:00
sqrrm
380a57a37a
Merge pull request #4685 from chimp1984/update-monitor-with-last-version-from-freimairs-repo
Update monitor with last version from freimairs repo
2020-10-22 23:38:56 +02:00
chimp1984
9a018ccd47
Adopt to new PersistenceManager 2020-10-22 14:49:16 -05:00
chimp1984
57064a091b
Remove change in Connection (issue with config when not using guice is
solved in another PR which we will add to that PR in next commits)
2020-10-22 11:40:08 -05:00
chimp1984
f3e0696078
Reorg imports, reformat code according to your style guide 2020-10-22 11:38:34 -05:00
Florian Reimair
6c1d7509a1
Cleanup and refactoring 2020-10-22 11:36:26 -05:00
Florian Reimair
292f057f22
Added volume-per-trader metric 2020-10-22 11:36:26 -05:00
Florian Reimair
1f1b7390f0
Added offers-per-trader metric 2020-10-22 11:36:26 -05:00
Florian Reimair
3674d36a91
Added offer-volume-distribution 2020-10-22 11:36:26 -05:00
Florian Reimair
ac27ea69ec
Added offer volume feed metric 2020-10-22 11:36:26 -05:00
Florian Reimair
7c5043063a
Code cleanup 2020-10-22 11:36:25 -05:00
Florian Reimair
70347ed989
Fix connection config for monitor
The monitor does not use the common bisq app base featuring guice.
Hence, the `config` in the `Connection` class is never injected
and leads to NullPointerExceptions and ultimately breaks the monitor.

This workaround initilizes default values in case guice isn't there.
2020-10-22 11:36:17 -05:00
sqrrm
0e7070a5fa
Merge pull request #4679 from ghubstan/5-suggested-changes
Changes suggested in PRs 4672,4673,4674,4675
2020-10-22 16:33:52 +02:00
ghubstan
1f3554ef65
Remove redundant calculateTotalToPay() call
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510111662
2020-10-22 10:55:53 -03:00
ghubstan
d463dd14a0
Remove useless default tx fee calculations
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510110682

Also shortened comment lines to < 90 chars.
2020-10-22 10:41:04 -03:00
ghubstan
31a311903a
Simplify result handler argument
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and suggested in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510089605
2020-10-22 10:17:12 -03:00
ghubstan
fa0e05a336
Remove redundant getTrade(id) method
Resolves issue found during https://github.com/bisq-network/bisq/pull/4673
review, and mentioned in comment
https://github.com/bisq-network/bisq/pull/4673#discussion_r510090257
2020-10-22 10:09:35 -03:00
sqrrm
01d434170f
Merge pull request #4682 from bisq-network/release/v1.4.2
Release/v1.4.2
2020-10-22 10:57:26 +02:00
Christoph Atteneder
177c9c8af3
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.4.2
# 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
2020-10-22 09:40:17 +02:00
Christoph Atteneder
f6d8cadee8
Revert to SNAPSHOT version 2020-10-22 09:36:50 +02:00
sqrrm
b9e1398e29
Merge pull request #4672 from ghubstan/1-convert-offerutil-to-injected-singleton
Refactor offer/trade related classes in core and desktop
2020-10-21 20:06:47 +02:00
ghubstan
2ae6bfaf51
Change predicate names isPositiveXYZ -> isNonZeroXYZ
Resolves issue found during https://github.com/bisq-network/bisq/pull/4672
review, and mentioned in comment
https://github.com/bisq-network/bisq/pull/4672#discussion_r509318045
2020-10-21 12:54:28 -03:00
Christoph Atteneder
062b58b65d
Bump version number for v1.4.2 2020-10-21 09:23:51 +02:00
chimp1984
108ca75097
Rename HISTORY to HISTORICAL_RESOURCE_FILE_VERSION_TAGS to make its usage more clear 2020-10-21 09:21:53 +02:00
chimp1984
8bb1c61c76
Fix wrong HISTORY version entry.
This fields contains the versions where we have tagged a resource file.
It does not need to be the latest version in case we have not added a new resource file.
2020-10-21 09:21:46 +02:00
Christoph Atteneder
bbe71fe78d
Merge pull request #4678 from chimp1984/rename-history-field-in-version
Rename history field in version
2020-10-21 09:19:43 +02:00
chimp1984
927004b4be
Rename HISTORY to HISTORICAL_RESOURCE_FILE_VERSION_TAGS to make its usage more clear 2020-10-20 22:08:18 -05:00
chimp1984
fd00048b47
Fix wrong HISTORY version entry.
This fields contains the versions where we have tagged a resource file.
It does not need to be the latest version in case we have not added a new resource file.
2020-10-20 22:06:30 -05:00
ghubstan
ac8ed8dd06
Add 'confirmpaymentreceived' api method
- Implement confirmpaymentsent on server and cli side

- Enable confirmpaymentreceived method tests
2020-10-20 16:51:48 -03:00
ghubstan
3d2b90fb96
Add 'confirmpaymentsent' api method
- Implement confirmpaymentsent on server and cli side

- Enable confirmpaymentsent method tests
2020-10-20 16:20:40 -03:00
ghubstan
e809af37cc
Add 'takeoffer' API method
- Add new core.offer.takeoffer.TakeOfferModel

	Would have been nice to move more logic from
	bisq.desktop.main.offer.takeoffer.TakeOfferDataModel,
	but it has JFX dependencies that cannot be use in :core.

- Add grpc protos to support takeoffer, confirmpaymentsent, confirmpaymentreceived

	Only takeoffer is implemented in this commit.

- Refactor OfferInfo grpc proto wrapper, and add offer state field

- Add new TradeInfo grpc proto wrapper

- Implement takeoffer on server and cli side

- Refactor offer/trade tests, add test cases
2020-10-20 16:00:05 -03:00
ghubstan
ab6be23516
Refactor offer/trade related classes in core and desktop
These refactoring changes are for reducing existing and potential
duplication coming with the addition of new trading protocol support
in the gRPC API.  Some minor styling and logic simplification changes
are also include.

- Convert OfferUtil to injected singleton, and move various offer related
  utility methods into it.

- Delete both MakerFeeProvider classes, which were wrappers around the same
  static old OfferUtil method.

- Inject OfferUtil into CreateOfferDataModel, CreateOfferViewModel,
  TakeOfferDataModel, TakeOfferViewModel, MutableOfferDataModel,
  MutableOfferViewModel, OfferDataModel, EditOfferDataModel,
  EditOfferViewModel

- Refactor TakeOfferViewModel

	Use OfferUtil, remove unused fields & methods.
	Made minor logic simplification, style and formatting changes.

- MutableOfferDataModel

	Made minor logic simplification, style and formatting changes.

- MutableOfferView uses new paymentAccount.isHalCashAccount().

- MutableOfferViewModel

	Refactored to use new VolumeUtil, CoinUtil, OfferUtil.
	Removed unused fields & accessors.
	Made minor style change.

- Refactored OfferDataModel to use new OfferUtil

- Refactor CreateOfferService

	Inject and use OfferUtil
	Move some utility methods to OfferUtil
	Remove unused fields

- Offer

	Refactored to use new VolumeUtil for volume calculations.
	Made stateProperty and errorMessageProperty fields private.

- PaymentAccount

	Moved isHalCashAccount type check to this class.
	Moved getTradeCurrency logic to this class.

- Contract, radeStatistics2, TradeStatistics3

	Refactored to use new VolumeUtil for volume calculations.

- Trade

	Refactored to use new VolumeUtil for volume calculations.
	Made minor logic simplification, style and formatting changes.

- CoinUtil

	Moved some coin utility methods into this class

- CoinUtilTest

	Moved (coin related) tests from CoinCryptoUtilsTest and OfferUtilTest
	into CoinUtilTest, and deleted OfferUtilTest, CoinCryptoUtilsTest.

- Adjust create and edit offer tests to model refactoring
2020-10-20 15:06:44 -03:00
Christoph Atteneder
50e2c89c06
Merge pull request #4615 from chimp1984/fix-trade-protocol-check-at-refund-agent-close
Fix trade protocol check for refund agent ticket close
2020-10-20 09:54:32 +02:00
Christoph Atteneder
ebe4618bfe
Merge pull request #4655 from bisq-network/release/v1.4.0
Release/v1.4.0 and v1.4.1
2020-10-20 09:10:12 +02:00
chimp1984
f2b41d8b20
Fix typo 2020-10-19 18:33:08 -05:00
Christoph Atteneder
b1fb57109e
Revert to SNAPSHOT version 2020-10-19 09:41:33 +02:00
Christoph Atteneder
7ae6e84e02
Bump version number for v1.4.1 2020-10-18 19:22:53 +02:00
Christoph Atteneder
b5d16bcb67
Merge pull request #4658 from oscarguindzberg/moveSegwitCheckbox
Move segwit checkbox
2020-10-17 18:41:46 +02:00
sqrrm
0dea954bfc
Merge pull request #4662 from chimp1984/fix-republish-trade-stats
Fix republish trade stats
2020-10-17 00:29:47 +02:00
sqrrm
b92410772d
Merge pull request #4659 from chimp1984/fix-missing-capability-handling-for-encrypted-msg
Handle Capabilities for encrypted messages (offer availibility request/response)
2020-10-16 23:18:39 +02:00
chimp1984
294b45dbad
Republish trade statistics if not found in existing trade stats.
Remove republishing at SellerProtocol as we don't know the capability of the peer at that moment and as we also want to republish for completed trades.
2020-10-16 14:13:01 -05:00
chimp1984
8cb6a05334
Fix min height for trade statistics table 2020-10-16 14:02:57 -05:00