Commit Graph

7265 Commits

Author SHA1 Message Date
Alejandro García
c5a73c0c86
Merge pull request #7007 from jmacxx/bsq_market_cap_chart
Add BSQ market cap chart
2024-02-11 10:05:48 +00:00
Alejandro García
4c1b1cd161
Merge pull request #6986 from yonson2023/fix_transferwise
Wise: fix account summary and add copy icon to form.
2024-02-11 10:04:38 +00:00
yonson2023
25a6e08c09
Wise: fix account summary and add copy icon to form.
Add copy icon to Pix form holder name field.
Prompt for holder name if empty.
Optimize form layout.
2024-02-07 20:44:41 -06:00
Steven Barclay
99f639a589
Replace MockitoSession with the Mockito test extension
Now that 'mockito-junit-jupiter' has been added to the build test
dependencies, we may replace the manual setup & tear down of a Mockito
session with the 'MockitoExtension' JUnit 5 test extension, as the old
Mockito JUnit 4 test runner was no longer available upon upgrading to
Jupiter. This slightly simplifies the tests which use '@Mock', '@Spy',
etc.
2024-02-03 02:36:31 +08:00
Steven Barclay
c41903f7ab
Clean up TxValidatorTest & resource loading in other tests
Fix inspection warnings and other minor defects (unchecked casts, bad
'assert*' usage, unused assignments/declarations, missing null checks,
object equality on enum instances, needless statement lambdas, missing
final, redundant 'toString', needless visibility) in 'TxValidatorTest'.

Also, uniformise and slightly tidy resource loading in other test
classes, replacing 'Files.readAllBytes' with Java 11 'Files.readString'
(which assumes UTF-8 as desired, instead of the default charset).
2024-02-03 01:44:25 +08:00
Steven Barclay
1e3320917c
Use Paths.get(URI) instead of Path.of(String) to fetch test resource
Fix resource loading in 'MakerTxValidatorSanityCheckTests', which breaks
when the working directory has spaces in its absolute path, due to the
fact that the test resource paths are URL encoded.

(This pattern is already used to load resources in a few other tests, so
there hopefully won't be a regression on Windows.)
2024-02-03 00:39:03 +08:00
Alejandro García
66483b4354
Merge pull request #7021 from alvasw/test_all_taker_bsq_cases
Test all Taker BSQ cases
2024-01-31 11:39:52 +00:00
Alejandro García
c5aa473dc3
Merge pull request #7020 from alvasw/test_all_maker_bsq_cases
Test all Maker BSQ Cases
2024-01-31 11:39:01 +00:00
Alejandro García
51e15e3e61
Merge pull request #7019 from alvasw/test_all_taker_btc_cases
Test All Taker BTC Cases
2024-01-31 11:38:03 +00:00
Alejandro García
21f97feb59
Merge pull request #7015 from alvasw/test_all_maker_btc_cases
Test All Maker BTC Cases
2024-01-31 11:36:14 +00:00
Alejandro García
98933e16e8
Merge pull request #7014 from alvasw/test_taker_tx_vouts
Refactor and Add Maker Transaction Vouts Tests
2024-01-31 11:33:50 +00:00
Alejandro García
07def78e4d
Merge pull request #7013 from alvasw/test_maker_tx_vouts
Test Maker Transaction Vouts
2024-01-31 11:32:25 +00:00
Alva Swanson
d93340abcd
Test all Taker BSQ cases
- unconfirmedTransaction
- newBsqTx
- takerExactFeeMatchBsqTest
- takerHigherBsqFeeThanExpected
- takerLowerButWithinToleranceBsqFee
- takerPassFilterFeeCheck
- takerFailFilterFeeCheck
- takerNoFilterFeeMatchesDifferentDaoParameter
- takerNoFilterFeeTooLow
2024-01-29 14:40:28 +01:00
Alva Swanson
36cc5e84df
Test all Maker BSQ cases
- unconfirmedTransaction
- newBsqTx
- makerExactFeeMatchBsqTest
- makerHigherBsqFeeThanExpected
- makerLowerButWithinToleranceBsqFee
- makerPassFilterFeeCheck
- makerFailFilterFeeCheck
- makerNoFilterFeeMatchesDifferentDaoParameter
- makerNoFilterFeeTooLow
2024-01-29 14:40:28 +01:00
Alva Swanson
a3fa6e73c0
Test all Taker BTC cases
- takerCheckFeeAddressBtcInvalidFeeAddress
- takerCheckFeeAddressBtcTooOldValidFee
- takerExactFeeMatchBtcTest
- takerHigherBtcFeeThanExpected
- takerLowerButWithinToleranceBtcFee
- takerPassFilterFeeCheck
- takerFailFilterFeeCheck
- takerNoFilterFeeMatchesDifferentDaoParameter
- takerNoFilterFeeTooLow
2024-01-27 14:17:40 +01:00
Alva Swanson
6e05fc7fbe
Add takerInvalidFeeBtcAddressTest 2024-01-27 14:17:40 +01:00
Alejandro García
e9e62b9e48
Merge pull request #7003 from alvasw/fix_crash_on_missing_vin_0_prevout
TxValidator: Fix crash on missing vin[0].prevout
2024-01-25 11:26:35 +00:00
Alejandro García
23b5424d53
Merge pull request #6974 from kiocosta/release/v1.9.14
Update 'reason for payment' warning instructions
2024-01-25 11:24:48 +00:00
Alva Swanson
000b7a78aa
Test all Maker BTC cases
- makerCheckFeeAddressBtcInvalidFeeAddress
- makerCheckFeeAddressBtcTooOldValidFee
- makerExactFeeMatchBtcTest
- makerHigherBtcFeeThanExpected
- makerLowerButWithinToleranceBtcFee
- makerPassFilterFeeCheck
- makerFailFilterFeeCheck
- makerNoFilterFeeMatchesDifferentDaoParameter
- makerNoFilterFeeTooLow
2024-01-24 15:12:55 +01:00
Alva Swanson
077c5f5e71
TakerTxSanityCheckTests: Add checkFeeAmountMissingVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
873757e865
MakerTxSanityCheckTests: Add checkFeeAmountMissingVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
9fd48c0cd0
Add getValidBtcMakerFeeMempoolJsonResponseString test asset 2024-01-24 15:12:55 +01:00
Alva Swanson
c81ba0d686
TakerTxSanityCheckTests: Add checkFeeAmountMissingVinPreVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
49725689ca
MakerTxSanityCheckTests: Add checkFeeAmountMissingVinPreVoutValue test 2024-01-24 15:12:55 +01:00
Alva Swanson
b0d5712070
Fix: Call parseJsonValidateTakerFeeTx in taker tests 2024-01-24 15:12:55 +01:00
Alva Swanson
3a7a67d7ca
MakerTxSanityCheckTests: Handle test asset IOException locally 2024-01-24 15:12:55 +01:00
Alva Swanson
8d331a6de1
Reuse makerTx in TakerTxValidatorSanityCheckTests 2024-01-24 15:12:55 +01:00
jmacxx
997bf0d6b8
Add BSQ market cap chart. 2024-01-22 14:33:11 -06:00
Alva Swanson
516d3c8d7d
TxValidator: Fix crash on missing vin[0].prevout
The `checkFeeAmountBTC` method looks up the `value` field of the
`vin[0].prevout` field without checking whether `vin[0].prevout` exists.
When the field is missing `JsonElement jsonVIn0Value =
jsonVin0.getAsJsonObject("prevout").get("value");` (line 193) throws a
NullPointerException.
2024-01-15 10:29:49 +01:00
Alva Swanson
ba09db4356
Test too few outputs in fee payment 2024-01-15 10:29:49 +01:00
Alva Swanson
05dfbca07d
Test too few inputs in fee payment 2024-01-15 10:29:48 +01:00
Caio Costa
77479fffdf
Update 'reason for payment' warning instructions 2024-01-14 23:50:34 +00:00
Alejandro García
4d4c9e3186
Merge pull request #7000 from alvasw/txvalidator_fix_crash_on_invalid_vin_vout_json_array
TxValidator: Fix crash on invalid vin or vout JSON Array
2024-01-14 11:50:17 +00:00
Alejandro García
5872e9e1d6
Merge pull request #6998 from jmacxx/allow_mediation_failed_closed_trades
Allow mediation of failed and closed trades
2024-01-14 11:48:59 +00:00
Alejandro García
501b554d78
Merge pull request #6997 from alvasw/fix_fee_check_invalid_json_crash
Fix fee check crash on invalid JSON response
2024-01-14 11:48:31 +00:00
Alejandro García
f755efa765
Merge pull request #6994 from jmacxx/resync_popup_change
Change unconfirmed popup to 24h after trade start.
2024-01-14 11:48:08 +00:00
Alva Swanson
d7cd1e2c92
TxValidator: Fix crash on invalid vin or vout JSON Array
The `TxValidator`s `getVinAndVout(...)` method assumes that
`json.get("field").getAsJsonArray()` returns null when the field is not
a JSON array. The `getAsJsonArray()` throws an `IllegalStateException`
exception, however. The `IllegalStateException` doesn't get caught by
any caller.
2024-01-13 11:06:17 +01:00
Alva Swanson
9f4a4d6913
TxValidator: Add missing vin and vout tests 2024-01-13 11:06:10 +01:00
Alva Swanson
d86583c6b7
Run TxValidatorSanityCheckTests for maker and taker 2024-01-13 11:05:48 +01:00
yonson2023
6a146cd4ac
Show prompt if holderName is blank. 2024-01-12 16:08:19 -06:00
Alva Swanson
62496b8bd5
Fix mempool test resource path on Windows 2024-01-10 15:57:25 +01:00
yonson2023
9e5fa8f1b1
Add holdername to MoneyBeam account. 2024-01-09 17:50:07 -06:00
jmacxx
ff52c43d4f
Allow mediation of failed and closed trades. 2024-01-09 12:56:30 -06:00
Alva Swanson
9f760edd25
TxValidator: Fix fee check crash on invalid JSON response
The initialSanityChecks method only checks whether the JSON response is
null (HTTP request failed) or the response is empty (HTTP 200) before
parsing the JSON response. A invalid JSON response would throw a
JsonSyntaxException exception which the callers are not catching.
2024-01-09 10:44:10 +01:00
Alva Swanson
be857cb40c
Add TxValidatorSanityCheckTests 2024-01-09 10:44:10 +01:00
Alva Swanson
d7b8587708
Add FeeValidationStatus.NOT_CHECKED_YET tests 2024-01-09 10:44:10 +01:00
Alva Swanson
ecb667c85d
Remove redundant OpenOffer intial state constructor
The inital state is always OpenOffer.State.AVAILABLE.
2024-01-09 10:44:10 +01:00
Alva Swanson
a127cde9ac
Test OpenOffer inital state 2024-01-09 10:44:10 +01:00
Alva Swanson
ab8f890a44
Test OpenOffer FeeValidation NOT_CHECKED_YET status 2024-01-09 10:43:47 +01:00
Alejandro García
566ab53c8f
Merge pull request #6995 from alvasw/on_get_blocks_request_handling_create_raw_block_list_once
Create GetBlocksRequestHandler's reply list once
2024-01-08 09:17:42 +00:00