Commit Graph

5969 Commits

Author SHA1 Message Date
jmacxx
e4f88bef15
ChatMessage show error if no ACK received 2021-06-01 12:49:32 -05:00
Christoph Atteneder
7883df2977
Merge pull request #5500 from BtcContributor/fix_uphold
Add Account owner full name field to Uphold payment method
2021-06-01 12:52:13 +02:00
BtcContributor
6de7a0d861
Improve code readability 2021-06-01 09:57:41 +02:00
Bisq GitHub Admin
806253b1bd
Merge pull request #5541 from bisq-network/release/v1.6.5
Release/v1.6.5
2021-05-31 15:34:27 +02:00
Christoph Atteneder
4f75d83bc3
Remove offer duplication new feature info 2021-05-31 11:04:11 +02:00
Christoph Atteneder
a3e7d539b9
Remove XMR auto confirm feature hint 2021-05-31 11:03:33 +02:00
Christoph Atteneder
670ba8720b
Merge pull request #5534 from sqrrm/fix-send-bsq-change
Manually create BSQ outputs
2021-05-27 15:38:15 +02:00
sqrrm
9b023a371f
Manually create BSQ outputs
Avoid relying on bitcoinj completeTx for creation of BSQ change
outputs as dust BSQ would be used for mining fee, thus burning
the BSQ.
2021-05-27 11:23:32 +02:00
sqrrm
e9d61dd3d3
Manually create BSQ outputs
Avoid relying on bitcoinj completeTx for creation of BSQ change
outputs as dust BSQ would be used for mining fee, thus burning
the BSQ.
2021-05-26 15:32:32 +02:00
sqrrm
262b768d98
Add pending callbacks to FeeService
This fix guarantees a callback if there is a pending request rather than just
dropping the fee request.

When requestFee() is called the callbacks are added to a list of callBacks.
Once the next fee request completes all callbacks in the list are called
and the list cleared.
2021-05-25 12:49:49 +02:00
Christoph Atteneder
3a31ed7867
Update bitcoinj checkpoints for v1.6.5 2021-05-25 10:39:36 +02:00
Christoph Atteneder
7233979d94
Merge pull request #5521 from m52go/wait-wording
Address #5513 and add minor improvements
2021-05-22 22:10:39 +02:00
Christoph Atteneder
d66a858d51
Update translations for v1.6.5 2021-05-21 19:59:42 +02:00
Christoph Atteneder
1fa5724b7b
Remove unused imports 2021-05-21 19:58:27 +02:00
Christoph Atteneder
2fd5f40239
Reduce the number of connected BTC nodes from 9 to 7 2021-05-21 19:58:09 +02:00
m52go
8b9046525a
Address #5513 and add minor improvements 2021-05-21 13:49:38 -04:00
Christoph Atteneder
f7e27a907e
Remove unused imports 2021-05-21 19:09:33 +02:00
Christoph Atteneder
a046db528a
Reduce the number of connected BTC nodes from 9 to 7 2021-05-21 17:19:38 +02:00
BtcContributor
ed6c046ff5
Add account owner on display account + fix a couple of minor issues 2021-05-21 11:53:06 +02:00
BtcContributor
f835389993
Fix codacy issue 2021-05-18 18:20:53 +02:00
BtcContributor
8dfe2601df
Restore proto order and add backward compatibility 2021-05-18 18:10:20 +02:00
Christoph Atteneder
08320d862f
Merge pull request #5484 from cd2357/faster-sync-dao
Speed up "Synchronizing DAO" by ~30%
2021-05-17 20:35:15 +02:00
BtcContributor
2809e8d768
Add Account owner full name field to Uphold payment method 2021-05-17 11:24:07 +02:00
Christoph Atteneder
ee6ccc4869
Merge pull request #5450 from jmacxx/bsq_fee_estimation
reduce BSQ fee estimation constant for segwit
2021-05-17 10:36:19 +02:00
cd2357
dd803b0ef6
Rename variable for clarity
Rename blocksByHash because it is not actually indexing blocks by hashes, instead it's a cache of known hashes.
2021-05-17 08:38:26 +02:00
cd2357
b6dbe85313
Strengthen index integrity
Update the two new indices on every known write to the list, namely addBlock() and addBlocks(). Restrict ability to modify the blocks list outside of these methods by overwriting the getBlocks() getter such that it returns an unmodifiable list.
2021-05-15 22:34:27 +02:00
BtcContributor
0940312d8b
Fix text overlapping in Wallet Info menu 2021-05-13 15:17:15 +02:00
Christoph Atteneder
e375e9aadb
Merge pull request #5416 from xrhodium/fixed-xrc-title
Fixed XRC coin title to correct one
2021-05-12 21:29:05 +02:00
cd2357
9977920e4c
Address Codacy complaint / newline 2021-05-11 12:20:51 +02:00
cd2357
fea717eeab
Add blockHeight cache in DaoState
Improve block lookup by height by introducing an index, instead of iterating through all blocks and comparing the height.
2021-05-11 12:03:46 +02:00
cd2357
792d135693
Remove duplicate lookup method
Method is duplicate of isBlockHashKnown().
2021-05-11 11:49:30 +02:00
cd2357
ede38c13a3
Cache block hashes in DaoState
Improve isBlockHashKnown() by about 100ms per call by caching the hashes of the known blocks.
2021-05-11 11:03:57 +02:00
cd2357
a6897e5eb6
Improve timer accuracy in BlockParser
Measure the entire parseBlock() duration, not just the substep of parsing transactions.
2021-05-11 10:29:32 +02:00
BtcContributor
7ee9eae4ae
Restore missing displayStrings strings in Settings 2021-05-09 20:56:51 +02:00
sqrrm
993f9b4e29
Merge pull request #5475 from BtcContributor/bsq_dust
Fix the formula used to calculate BSQ amount needed to avoid dust
2021-05-07 12:52:43 +02:00
Christoph Atteneder
eb9bce3033
Merge pull request #5451 from BtcContributor/fixstringmakingoffer
Fix string when creating a new offer
2021-05-07 11:52:17 +02:00
Christoph Atteneder
89729c41c9
Merge branch 'master' of github.com:bisq-network/bisq into release/v1.6.3
# Conflicts:
#	scripts/install_java.sh
2021-05-07 10:33:45 +02:00
BtcContributor
ff18e8afbe
Fix the amount required to avoid BSQ dust as the formula used was incorrect. 2021-05-07 10:21:44 +02:00
Marcus0x
1e8db48a7b
Fixed XRC Coin Title 2021-05-06 16:51:22 +02:00
BtcContributor
270f7ba3cb
Fix string also for takers 2021-05-06 15:45:05 +02:00
BtcContributor
1f7c4fce05
Apply m52go suggestion
Co-authored-by: m52go <735155+m52go@users.noreply.github.com>
2021-05-06 13:55:57 +02:00
Christoph Atteneder
83d9fa0ee8
Merge pull request #5453 from devinbileck/change-mempool.bisq.services-onion
Change mempool.bisq.services onion address
2021-05-05 14:27:06 +02:00
Christoph Atteneder
35ede06037
Filter banned seednodes with wrong format 2021-05-05 11:21:53 +02:00
Devin Bileck
f5fd99f9ad
Change mempool.bisq.services onion address
In the process of migrating the server to a new instance, my secret key
for the onion address seems to have become corrupted. Therefore, I
needed to generate a new onion address.
2021-04-30 14:43:56 -07:00
jmacxx
b68d7f31ec
per code-review, change BSQ segwit estimate to 70 2021-04-30 07:25:01 -05:00
BtcContributor
3047cd48d4
Fix missing verb in string when creating a new offer (again) 2021-04-30 11:24:21 +02:00
BtcContributor
943632fd7c
Fix missing verb in string when creating a new offer 2021-04-30 11:21:50 +02:00
jmacxx
5bfbac7191
reduce BSQ fee estimation constant for segwit 2021-04-29 14:20:28 -05:00
Christoph Atteneder
3520d9b16d
Remove key logger warning because of new notarization support and specific entitlements 2021-04-28 16:21:38 +02:00
Christoph Atteneder
12f4e0fc13
Remove key logger warning because of new notarization support and specific entitlements 2021-04-28 16:15:55 +02:00
Christoph Atteneder
ed21e1ac36
Merge pull request #5442 from m52go/remove-docs-links
Switch docs links to wiki links in strings file
2021-04-28 15:59:52 +02:00
Christoph Atteneder
81b3c0ac6a
Merge pull request #5443 from m52go/other-docs-links
Switch remaining docs links in repository
2021-04-28 15:59:13 +02:00
chimp1984
e46669d9b1
Move null check up 2021-04-28 07:35:52 -05:00
chimp1984
68af436ef4
Add missing check if tx was in correct phase
There have been 1 tx in cycle 17 and 2 txs in cycle 23 which have been confirmed outside of the phase.
The vote result had excluded it correctly but for the hash calculation for the blind vote monitor the
phase check was missing which results in an incorrect hash.
By fixing that the past hashes back to cycle 17 are all invalid. Once all seed nodes are running that
patch nodes should be in sync again. As it did not affect consensus but only the monitoring it is not
critical.
2021-04-27 22:49:59 -05:00
m52go
6d9c53ed0c
Switch old docs links to wiki links 2021-04-27 16:29:14 -04:00
m52go
1550597f63
Switch remaining docs links to wiki links 2021-04-27 16:07:39 -04:00
Christoph Atteneder
c615d5dbf9
Merge pull request #5109 from stejbac/implement-segwit-for-bsq-wallet
Wallet changes for Segwit BSQ implementation
2021-04-27 20:58:51 +02:00
Steven Barclay
9760526aaa
Factor out shared segwit keychain setup to WalletsManager
Move consecutive maybeAddSegwitKeychain(..) calls for the BTC & BSQ
wallets from BisqSetup to WalletsManager, as the latter class is used
for operations which should be applied to both wallets and this moves
the logic closer to the wallet domain.

Also migrate a BSQ address validator in one of the test mock classes
from Base58AddressValidator to BitcoinAddressValidator (missed earlier).
2021-04-27 11:45:00 +01:00
Steven Barclay
5f1e32a226
Perform segwit BSQ wallet migration upon startup
Uncomment & enable the m/44'/142'/1' native segwit BSQ account path and
add code to migrate the user's BSQ wallet to segwit upon startup, along
the same lines as the existing BTC wallet segwit migration logic. That
is, set P2WPKH as the default output type, add a native segwit key chain
(set to active) to the BSQ wallet and back up the old 'bisq_BSQ.wallet'
file to 'pre_segwit_bisq_BSQ.wallet.backup'.

Also filter out legacy addresses coming from the original keychain from
BsqWalletService.get(Unused|Change)Address.
2021-04-27 11:26:13 +01:00
sqrrm
036d5fa977
Merge pull request #5439 from ripcurlx/release/v1.6.3
Update data stores for v1.6.3
2021-04-27 12:21:17 +02:00
Steven Barclay
3470429746
Allow use of bech32 BSQ addresses
Remove the restriction to base58 (P2SH & P2PKH) addresses when parsing,
formatting & validating BSQ addresses, by replacing o.b.c.LegacyAddress
with its superclass o.b.c.Address throughout. Also remove restriction to
LegacyAddress in BsqTxListItem and BsqTransfer(Service|Model).

The bech32 BSQ addresses follow the same format as the old base58 BSQ
addresses, namely 'B' + <btc-address>.
2021-04-27 11:08:10 +01:00
Steven Barclay
ce73fb85f3
Code cleanup: Simplify Optional stream processing
Use flatMap(Optional::stream) instead of filter(..isPresent).map(..get)
and avoid a redundantly nested Optional in OpReturnType.

Also replace some unnecessary stream().forEach(..) invocations on lists
in BtcWalletService, as forEach is already part of the List interface.
2021-04-27 10:39:30 +01:00
jmacxx
889ac863f6
v1.6.3 wording changes recommended by btc_contributor and pazza 2021-04-26 11:24:02 +02:00
Christoph Atteneder
69c7817340
Merge pull request #5438 from jmacxx/wording_changes_v163
v1.6.3 wording changes / clarification
2021-04-26 10:20:13 +02:00
jmacxx
94ebbc4ff3
v1.6.3 wording changes recommended by btc_contributor and pazza 2021-04-25 23:05:32 -05:00
Christoph Atteneder
0f9f43c9ba
Update bitcoinj checkpoints for v1.6.3 2021-04-22 11:38:11 +02:00
Christoph Atteneder
f6b244ec78
Update translations for v1.6.3 2021-04-22 10:42:58 +02:00
sqrrm
469448a218
Merge pull request #5431 from ripcurlx/upgrade-javafax-14
Upgrade Java to v11 and JavaFX to v15
2021-04-22 10:18:42 +02:00
Christoph Atteneder
de76bd051b
Merge pull request #5427 from jmacxx/fix_issue_5334
Show a SPV resync suggestion if trade remains unconfirmed for 3 hours or more
2021-04-22 09:21:21 +02:00
jmacxx
3c3dca0053
show a SPV msg if trade deposit remains unconfirmed for 3 hours or more 2021-04-21 20:00:01 -05:00
jmacxx
a5d5eafddf
@m52go edits and popup informing new feature 2021-04-21 15:54:16 -05:00
jmacxx
7f73df5dfd
Functionality to duplicate an offer 2021-04-20 16:22:49 -05:00
sqrrm
12a9fcc1e0
Merge pull request #5420 from ghubstan/01-update-txfee
Adjust to changing minimum tx fee rates
2021-04-20 11:51:09 +02:00
sqrrm
de8213a95d
Merge pull request #5412 from ghubstan/complete-api-bsqbtc-trade-support
Complete API support for BSQ/BTC trade pair
2021-04-20 11:47:13 +02:00
Christoph Atteneder
fbd7c9fbee
Merge pull request #5312 from BtcContributor/sendcustomfee
Add custom withdrawal transaction fee options on Send funds (BTC)
2021-04-20 09:26:30 +02:00
ghubstan
2308afb41b
Adjust to changing minimum tx fee rates
- Append minFeeServiceRate to TxFeeRateInfo proto.
- Display min rate in CLI console.
- Fix broken test due to changing min fee rate.
2021-04-19 12:08:52 -03:00
BtcContributor
d235316528
Restore manual fees for BSQ transactions in Settings 2021-04-19 16:58:00 +02:00
ghubstan
e96da16df8
Complete API support for BSQ/BTC trade pair
- Finished API server's verify bsq payment impl.
- Added verifybsqsenttoaddress method to CLI.
- Added verifybsqsenttoaddress-help.txt to server.
- Fixed client getoffers, getmyoffers to work with BSQ offers.
2021-04-15 14:21:25 -03:00
ghubstan
8ac30262c0
Add verifyBsqSentToAddress to GrpcWalletsService, CoreApi
The implemenation is already present in CoreWalletsService
2021-04-15 11:40:19 -03:00
Christoph Atteneder
64fe6c18a4
Merge pull request #5370 from jmacxx/mediation_follow_up_issues2
Disputes UI improvements
2021-04-13 11:16:38 +02:00
Christoph Atteneder
c951dc2288
Merge pull request #5234 from BtcContributor/hidebankid
Fix BankId leak
2021-04-13 10:57:51 +02:00
Christoph Atteneder
ca2731e779
Merge pull request #5388 from jmacxx/fix_seednode_persist
Fix shutdown persistence issue in Seednode
2021-04-13 09:33:36 +02:00
Devin Bileck
88299236f9
Merge branch 'master' of https://github.com/bisq-network/bisq into add-btc-node-wubwzaadboxwiffa 2021-04-12 17:42:35 -07:00
Christoph Atteneder
92a9cb654b
Merge pull request #5402 from maxim-belkin/wording-tweak
Tweak wording for takeOffer.fundsBox.isOfferAvailable
2021-04-12 16:29:10 +02:00
Christoph Atteneder
d8b42d7aac
Merge pull request #5399 from jmacxx/cashbymail_enhance_terms
CashByMail show terms and conditions upon taking an offer
2021-04-12 16:05:06 +02:00
cd2357
e04537aca6
Merge remote-tracking branch 'bisq-network/hotfix/v1.6.2' into upgrade-javafax-14 2021-04-10 10:31:04 +02:00
Maxim Belkin
bf3714a604
Tweak wording for takeOffer.fundsBox.isOfferAvailable 2021-04-09 14:21:40 -05:00
jmacxx
e5399f189c
Wait for AckMessage before completing task 2021-04-09 09:41:41 -05:00
jmacxx
42428b79b9
CashByMail show terms and conditions upon taking an offer 2021-04-06 22:03:52 -05:00
Devin Bileck
b85b0862cb
Add BTC node wubwzaadboxwiffa.onion
Adding this node to help alleviate the increased network load.
2021-04-05 11:53:44 -07:00
jmacxx
62021e4223
Fix shutdown persistence issue in Seednode 2021-04-02 23:26:35 -05:00
ghubstan
6bde12ba40
Improve takeoffer output and failure reason messaging
- Added AvailabilityResultWithDescription proto for better takeoffer failure msgs.
- Added VerifyBsqSentToAddress impl to api, but don't expose to CLI yet.
- Show BSQ Buyer Address in gettrade output (changed cli output formatting classes).
- Fixed api.model.PaymentAccountPayloadInfo altcoin instant acct support bug
2021-04-01 16:40:08 -03:00
ghubstan
6299dc33d9
Merge branch '01-api-add-createcryptopaymentacct' into 02-api-trade-contract-details 2021-04-01 15:58:59 -03:00
ghubstan
58c885efc1
Add support for creating instant altcoin payment accounts in api
- Added bool tradeInstant field to proto message def.
- Adjusted core createcryptopaymentacct impl to new tradeInstant request param.
- Adjusted cli side createcryptopaymentacct impl to new tradeInstant request param.
- Fixed CliMain's takeoffer help text (was missing the --payment-account opt).
2021-04-01 15:43:48 -03:00
ghubstan
2d66a5996d
Merge branch 'master' into 01-api-add-createcryptopaymentacct 2021-04-01 14:54:05 -03:00
jmacxx
089e476901
fix NPE in portfolio view when market price n/a 2021-04-01 09:47:12 +02:00
jmacxx
d567170bdb
use semaphore for SPV resync 2021-04-01 09:47:02 +02:00
Christoph Atteneder
dca0d5b5c2
Merge pull request #5385 from jmacxx/fix_npe_portfolio_view
Fix NPE in Portfolio View when market price n/a
2021-04-01 09:43:37 +02:00
sqrrm
308d8dec52
Merge pull request #5380 from jmacxx/spv_resync_use_semaphore
Use semaphore for SPV resync
2021-03-31 23:00:25 +02:00
jmacxx
e00532a040
fix NPE in portfolio view when market price n/a 2021-03-31 15:13:10 -05:00
jmacxx
26da6cbbe3
use semaphore for SPV resync 2021-03-30 22:42:48 -05:00
cd2357
ca5f41a9d9
Merge remote-tracking branch 'bisq-network/hotfix/v1.6.1' into upgrade-javafax-14
# Conflicts:
#	build.gradle
2021-03-29 18:37:14 +02:00
jmacxx
bf81c03708
Add a visual border indication for dispute chat window 2021-03-28 15:53:01 -05:00
jmacxx
094da74433
allow default fee values in leniency check 2021-03-28 20:14:59 +02:00
Christoph Atteneder
0815a99930
Update translations for v1.6.1 2021-03-28 20:13:34 +02:00
Christoph Atteneder
fd17c5790e
Merge pull request #5365 from jmacxx/fee_validation_default_rate
Allow default fee values in leniency check
2021-03-28 20:04:52 +02:00
jmacxx
93da6815b3
allow default fee values in leniency check 2021-03-27 15:50:58 -05:00
ghubstan
9e035e5542
Provide more offer & contract detail available to CLI.
This change adds offer and trade contract detail to the API's Offer
and Trade protos, and improves CLI output formatting.

- Appended missing fields to OfferInfo proto message:
	uint64 sellerSecurityDeposit = 20;
	string offerFeePaymentTxId = 21;
	uint64 txFee = 22;
	uint64 makerFee = 23;

- Added new api proto messages ContractInfo and PaymentAccountPayloadInfo.
  Lighterweight protos are needed because core Trade/Contract classes are
  not visible to CLI.

- Appended ContractInfo field to api proto message TradeInfo.

- Added proto / model converters for ContractInfo and PaymentAccountPayloadInfo,
  and adjusted OfferInfo & TradeInfo.

- Improved CLI output formatting.  Added more trade detail to CLI's gettrade output,
  and prepared to support BTC/BSQ trading pair.  Note a reviewer is advised to
  look at the CLI outout formatting class files instead getting bogged down in the
  many commit changes.
2021-03-25 19:23:06 -03:00
ghubstan
c3f5669cf8
Add api method createcryptopaymentacct
This change supports creation of BSQ BLOCKCHAIN payment method accounts.

- Added proto message defs to grpc.proto.
- Added grpc server boilerplate to GrpcPaymentAccountsService.
- Added server impl to CoreApi, CorePaymentAccountsService.
- Added createcryptopaymentacct-help.txt.
- Added CLI side support for new api method.
- Added opt parsing unit tests to OptionParsersTest.

This is the 1st PR in a series, with the goal of supporting the BTC/BSQ trading
pair.  Support for other crypto currency payment accounts will be added later.
2021-03-25 18:36:26 -03:00
Christoph Atteneder
306f0f0126
Update bitcoinj checkpoints for v1.6.0 2021-03-24 10:55:02 +01:00
jmacxx
39d86b4f80
Fee validation leniency using old DAO param values 2021-03-24 09:58:24 +01:00
Christoph Atteneder
4290613973
Merge pull request #5347 from jmacxx/fee_validation_allow_old_param
Fee validation leniency using old DAO param values
2021-03-24 09:58:02 +01:00
jmacxx
508b523186
Review changes for Disputes GUI
highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
2021-03-24 09:46:25 +01:00
jmacxx
e9b3b9ac1f
Review changes for Disputes GUI
highlight trade period end using an appropriate CSS alert style
system messages to show in chat unread message count
2021-03-23 23:02:21 -05:00
jmacxx
f85667b55a
Fee validation leniency using old DAO param values 2021-03-23 15:32:01 -05:00
jmacxx
8a9843bc15
Pop-up warning for trading with risky payment methods 2021-03-23 15:11:57 +01:00
jmacxx
fb1f5855bd
Pop-up warning for trading with risky payment methods 2021-03-22 14:45:53 -05:00
ghubstan
306dc05a65
Fix method name and error msg 2021-03-22 14:48:34 +01:00
ghubstan
1635ede936
Remove log statement, add comment 2021-03-22 14:48:20 +01:00
ghubstan
d21e462d27
Fix typo 2021-03-22 14:48:14 +01:00
ghubstan
d0338d729b
Set WalletsManager key if missing
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda229.
2021-03-22 14:48:04 +01:00
ghubstan
dd2b17fde7
Block UI popups in api startup's encrypted wallet init
Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
2021-03-22 14:47:42 +01:00
sqrrm
9c40a641f3
Merge pull request #5337 from ghubstan/01-fix-api-encrypted-walletappsetup
Fix API startup's wallet.init failure when wallet is encrypted
2021-03-22 12:36:13 +01:00
Christoph Atteneder
0fd7efd80f
Merge pull request #5000 from stejbac/implement-segwit-for-bsq
Implement Segwit for BSQ
2021-03-22 12:01:15 +01:00
sqrrm
94995da39a
Revert "Lower tolerated small amount"
This reverts commit 99123b7297.
2021-03-22 11:37:49 +01:00
sqrrm
520b6481f4
Revert "Lower tolerated small amount"
This reverts commit 99123b7297.
2021-03-22 11:12:10 +01:00
Steven Barclay
f21379160b
Merge branch 'release/v1.6.0' into implement-segwit-for-bsq 2021-03-20 23:18:49 +00:00
ghubstan
d819e91b0c
Fix method name and error msg 2021-03-20 19:18:40 -03:00
ghubstan
cfd52cdb8c
Remove log statement, add comment 2021-03-20 18:48:01 -03:00
ghubstan
6913e82f74
Fix typo 2021-03-20 18:47:21 -03:00
Steven Barclay
05ea293595
Activate Segwit DAO hard fork 4 weeks after v1.6.0 release
Push back the (2nd) DAO hard fork activation block height to 680300,
which is 4 weeks after the planned 1.6.0 release around 2021/03/25.
(Also push back the testnet block activation height to 1943000 - 2 weeks
from now assuming an average block time of 10 minutes.)
2021-03-20 21:39:26 +00:00
ghubstan
838595cb03
Set WalletsManager key if missing
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda229.
2021-03-20 18:38:33 -03:00
ghubstan
eb15fda229
Block UI popups in api startup's encrypted wallet init
Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
2021-03-20 18:22:52 -03:00
ghubstan
1bf2fd7642
Validate paymentAccountId in createAndPlaceOffer 2021-03-19 21:24:32 +01:00
ghubstan
344f1613d1
Fix api getfundingaddresses bug
This change uses recently added walletService.isAddressUnused to ensure
the api's CoreWalletsService creates an unused address if none exists.

- grpc.proto:  Add bool isAddressUnused field to message AddressBalanceInfo.
- AddressBalanceInfo:  Adjust AddressBalanceInfo proto wrapper.
- CoreWalletsService:  Use walletService.isAddressUnused in getFundingAddresses.
- GrpcClient:  Adjust to modified AddressBalanceInfo.
- TableFormat, ColumnHeaderConstants:  Add 'Is Used' column to getfundingaddresses output.

Note: bugfix is out of scope for this PR, but the test case helped expose this bug.
2021-03-19 21:24:26 +01:00
ghubstan
2bd6d72c40
Avoid NPE due to null fee while wrapping tx in TxInfo
Add debugging convenience to core.api.model.TxInfo.
2021-03-19 21:19:42 +01:00
ghubstan
9b62a005df
Refactor takeoffer reply proto & ErrorMessageHandler
- Add description msg TakeOfferReply proto, and fromProto method
  to core.offer.enum AvailabilityResult.  The description field
  maps a client usable error message to the enum.

- Adjust GrpcErrorMessageHandler to add AvailabilityResult.description()
  to takeoffer reply.

- Refactor (split up) GrpcClient's takeOffer.  Add getTakeOfferReply()
  to give clients a chance to make choices based on the reply's
  AvailabilityResult when the takeoffer command did not result in a
  trade. (Some errors are fatal, some not.)
2021-03-19 19:38:03 +01:00
ghubstan
14215a1fbd
Adjust grpc & core services to new takeoffer error handling
- GrpcErrorMessageHandler  A new ErrorMessageHandler implementation
  to get around the api specific problem of having to use Task
  ErrorMessageHandlers that build task error messages for the UI.

- GrpcExceptionHandler  A new method for working with the
  ErrorMessageHandler interface.

- GrpcTradesService, CoreApi, CoreTradesService:  Ajdusted takeoffer
  error handling to give a failure reason provided by the new
  GrpcErrorMessageHandler.
2021-03-19 19:37:10 +01:00
ghubstan
7683569abf
Inject CoreContext into OpenOfferManager, adjust test 2021-03-19 19:37:00 +01:00
ghubstan
d747acc567
Adjust protos for takeoffer error handing
- Add PRICE_CHECK_FAILED to enum AvailabilityResult.
- Add enum AvailabilityResult to TakeOfferReply message.
2021-03-19 19:36:48 +01:00
sqrrm
53f42c4885
Merge pull request #5303 from ghubstan/03-add-long-running-trade-test
Add LongRunningTradesTest to apitest
2021-03-19 12:20:00 +01:00
sqrrm
59a0cc41dc
Merge pull request #5302 from ghubstan/02-modify-txinfo
Avoid NPE due to null fee while wrapping tx in TxInfo
2021-03-19 12:05:09 +01:00
sqrrm
1c3fc41c33
Merge pull request #5294 from ghubstan/01-fix-takeoffer-err-handling
Improve takeoffer error handing
2021-03-19 11:55:18 +01:00
ghubstan
0b22c98802
Disambiguate payment acct json form's "country" field
Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
2021-03-18 20:34:10 +01:00
ghubstan
67252642c7
Disambiguate payment acct json form's "country" field
Make it clear the user needs to enter a two letter country code
in json form's "country" field, not a country name.

The json form's field name was not changed to "countryCode" in
this change for the following reason:

The API's payment account forms are dynamically generated using
reflection, and PaymentAccount class hierarchy @Setter methods
determine which form fields are included or excluded.  Reflection
and @Setter methods are also used when reading completed json
forms, to set the field values on a new PaymentAccount instance
before it is persisted.

CountryBasedPaymentAccount subclasses have a country field and a
@Setter, not a countryCode field, hence this shortcut to informing
the user the country field value is a country-code.
2021-03-18 16:14:28 -03:00
Christoph Atteneder
3cf1f53e4f
Update translations for v1.6.0 2021-03-18 19:20:53 +01:00
Christoph Atteneder
d34a73276e
Merge pull request #5326 from sqrrm/lower-deposit
Lower min deposit to 0.001 BTC
2021-03-18 19:02:24 +01:00
ghubstan
dc4f730605
Validate paymentAccountId in createAndPlaceOffer 2021-03-18 14:46:28 -03:00
sqrrm
e6b7c88bed
Lower min deposit to 0.001 BTC
Lower min refund to half of min deposit as it doesn't make sense to have
a higher min refund than the min deposit.
2021-03-18 13:44:05 +01:00
jmacxx
47ad4219e2
Merge branch 'master' into mempool_check_maker_tx 2021-03-17 16:26:38 -05:00