Commit Graph

247 Commits

Author SHA1 Message Date
woodser
86b41b87e9 fix trade context overrides in executeTrades() 2023-03-10 05:47:59 -05:00
woodser
2c07e82668 remove *AsLong() postfix after model refactor 2023-03-08 15:22:57 -05:00
woodser
04723a7960 test all asset codes in "Can complete trades" 2023-03-07 08:35:19 -05:00
woodser
48affa0014 increase minimum trade amount to 0.1 XMR 2023-03-06 08:53:12 -05:00
woodser
c376be67e2 switch to atomic units as native units 2023-03-06 08:53:12 -05:00
woodser
83958b57cd increase max test timeout to 40 minutes 2023-02-27 17:40:29 -05:00
woodser
b9a0373c87 stop monerod2 with kill signal 2023-02-27 17:40:29 -05:00
woodser
9f3ff5c2ce catch errors starting havenods and shut down gracefully 2023-02-27 09:27:56 -05:00
woodser
490f1e8c22 test that password is at least 8 characters 2023-02-26 11:01:24 -05:00
woodser
60fcda322e remove offers before tests complete 2023-02-25 08:17:51 -05:00
woodser
291e18f709 fix error sending keep alive request by resetting maker after restart 2023-02-25 08:17:51 -05:00
woodser
30dd997810 getMyOffers() does not require asset code 2023-02-25 08:17:51 -05:00
woodser
5a7ec350ca accountService.changePassword() requires old and new password 2023-02-22 08:56:11 -05:00
woodser
6719324d9e switch client to use await syntax instead of promise 2023-02-21 11:13:11 -05:00
woodser
3ddde6e671 test trades simultaneously using a thread pool instead of batches 2023-02-15 12:38:33 -05:00
woodser
1f126bfa30 expect arbitrator to update payout tx on confirm and unlock
default wallet refresh rate of 5000 ms, wait less time after make offer
2023-02-15 12:38:33 -05:00
napoly
e3f114eb66 fix payment account unique name test 2023-02-13 16:36:13 -05:00
napoly
3e637aa8c1 reject payment accounts with duplicate names 2023-02-13 10:13:19 -05:00
woodser
6c8c494f9f default wallet refresh rate of 5000 ms, wait less time after make offer 2023-02-11 16:47:02 -05:00
woodser
0862caae47 test completing trade from scheduled offer with and without dispute 2023-02-07 14:33:09 -05:00
woodser
9c075ba957 rename "payment started" to "payment sent" for consistency 2023-02-07 14:33:09 -05:00
woodser
39f510a7b3 update TradeInfo isDepositsConfirmed, isDepositsUnlocked() 2023-02-03 08:29:17 -05:00
woodser
2cfee9d1b1 add offline dispute resolution to CI tests 2023-01-26 08:30:06 -05:00
woodser
83d2a9123d test resolving dispute while traders go offline
remove duplicate state from TradeContext
2023-01-24 14:02:55 -05:00
duriancrepe
3465eb5ce6 removed restart of havenod on account delete or restore 2023-01-24 08:26:18 -05:00
woodser
173bb4a807 configure havenod log level in tests 2023-01-19 19:33:56 -05:00
woodser
6f179b3f79 award dispute payout based on actual security deposits
stopOnFailure=true by default
2023-01-19 19:33:56 -05:00
woodser
fb20c4b736 support stopOnFailure for batch trades 2023-01-18 06:56:40 -05:00
woodser
aa0f2c69bf use usd as default trade asset
wait to process network notifications after opening haveno app
2023-01-11 08:55:08 -05:00
woodser
54c6ce9575 fix ci test by waiting longer after deleting account 2023-01-11 08:54:53 -05:00
woodser
5ec93f53a1 update test name 2023-01-02 17:05:16 +00:00
woodser
7e76e83884 start seednode with monerod address 2022-12-24 18:32:10 +00:00
woodser
b2e315963f grpc offer info returns atomic units
add sanity checks tags
2022-12-24 18:32:10 +00:00
woodser
b9250210ce walletSyncPeriodMs and maxTimePeerNoticeMs are customizable per trade 2022-12-23 09:33:18 +00:00
woodser
e01eee18b6 fix resolve disputes test so it completes
increase CI timeout to 60 minutes
2022-12-21 08:37:06 +00:00
woodser
5fbeae0a07 expect key image polling within 20s on local
only test 4 trades at a time
2022-12-19 11:31:24 +00:00
woodser
5b7a7beafd only run CI tests, set fixed difficulty to 150 2022-12-16 19:15:26 +00:00
woodser
28d119c681 test enforcing trade limit over grpc 2022-12-16 09:25:18 +00:00
woodser
5d21478642 initialize blockchain to latest block type
remove whitespace
add tags for CI
add logging
2022-12-13 08:45:12 +00:00
woodser
b7c20e0d27 don't re-use ports after going offline 2022-12-04 14:38:35 +00:00
woodser
cbd3f614c0 executeTrades() runs in batches 2022-11-28 15:29:50 +00:00
woodser
619c2f5ead test payout tx state 2022-11-28 15:29:50 +00:00
woodser
428e22f7b1 must provide fixed price unless using market price 2022-11-26 22:28:51 +00:00
woodser
ae8d9a1839 use CashAddr format for Bitcoin Cash 2022-11-24 12:37:44 +00:00
woodser
ef2264c4fa test going offline while mining 2022-11-24 12:33:11 +00:00
napoly
891d6cce3f reject creating crypto payment account with invalid currency code or address 2022-11-24 11:34:49 +00:00
woodser
768c2158b3 test trade account payloads over grpc, support crypto account forms 2022-11-23 09:42:53 +00:00
woodser
b8d494da81 mark private members with @private to exclude from documentation 2022-11-07 08:26:57 -05:00
woodser
7b447022e6 test arbitration protocol refactor
test all (online) trade combinations with disputes
test added dispute states
print trade context and index on failure
improve caching to reduce calls to getBalances()
local test network uses daemon at 48081 by default
various cleanup
2022-11-07 08:26:57 -05:00
woodser
796f14c9ef test completed payout state 2022-10-27 08:06:39 -04:00
woodser
a382b18a6d support strict null checks and ignore .vscode 2022-10-27 08:06:39 -04:00
woodser
8fb88e8703
expect payout published at end of test (#143) 2022-10-02 14:41:54 -04:00
woodser
4b5f412fe1
refactor tests with unified trade configuration (#140) 2022-10-01 07:47:46 -04:00
woodser
161af65687 add time for schedule test 2022-09-24 08:48:37 -04:00
woodser
09200036b5 bump haveno version to v0.0.2 2022-09-21 10:33:29 -04:00
woodser
7438c4dbda test decrypted payment account info 2022-09-20 13:42:39 -04:00
woodser
1e9ba7fa6e test arbitrator closed trade 2022-09-20 13:42:39 -04:00
woodser
2f708ee60c test that trade completes after payment received 2022-09-18 10:52:34 -04:00
woodser
6f5d1a137b fix call to get available balance 2022-08-29 09:29:39 -04:00
woodser
05f08c25e9 remove zec from main currency list 2022-08-17 14:55:21 -04:00
woodser
946af36c46 update locked -> pending balance 2022-08-17 14:55:21 -04:00
woodser
0808e7ccd5 remove data callback listener 2022-08-15 12:03:20 -04:00
woodser
98a9e688e0 test going offline while completing trades 2022-08-15 12:03:20 -04:00
woodser
79a0dfc751 test select arbitrators which are online, registered, and least used 2022-08-13 10:16:42 -04:00
woodser
711b4c003e update to monero-javascript v0.7.2
add funding wallet mnemonic to config
2022-08-08 14:05:51 -04:00
woodser
c86b734ee9 add test: Can complete trades 2022-07-31 14:54:02 -04:00
woodser
f02e18299d set version to 0.0.1 2022-07-17 07:58:21 -04:00
woodser
33eda9f8dc rename isMoneroNodeRunning() to isMoneroNodeOnline() 2022-07-17 07:58:21 -04:00
woodser
a469fdcb07
rename alice, bob, charlie to user1, user2, user3 (#123) 2022-07-15 10:09:56 -04:00
woodser
7871a303eb
support local, stagenet, and mainnet xmr network configurations (#122) 2022-07-07 09:11:50 -04:00
woodser
82e43d5940 support paxum 2022-06-24 15:47:07 -04:00
woodser
22d9ed7ac6 support uphold 2022-06-24 15:47:07 -04:00
woodser
65135f46a9 support faster payments 2022-06-24 15:47:07 -04:00
woodser
b46ac11453 support sepa instant 2022-06-24 15:47:07 -04:00
woodser
e70a928d2d support MoneyGram form api 2022-06-23 11:24:40 -04:00
woodser
b5d4de3528 refactor payment account form api to support structured, dynamic forms 2022-06-23 11:24:40 -04:00
woodser
f9bbee8726 preserve stacktrace on error, throw HavenoError 2022-06-01 15:56:56 -04:00
woodser
7c630b82cd fix unintended mining when funding outputs 2022-06-01 15:56:56 -04:00
woodser
1f5ee145ad update payment methods 2022-05-28 13:56:41 -04:00
woodser
6fa1db708f fix offer state after restarting 2022-05-26 11:03:58 -04:00
woodser
e9995566cd support getXmrPrimaryAddress(), getXmrNewSubaddress() 2022-05-16 13:33:21 -04:00
woodser
34d195c307 test scheduling offers with locked funds 2022-05-16 13:33:21 -04:00
woodser
f2aca97e5c test posting crypto and fiat offers with base and price inversion 2022-05-12 17:16:29 -04:00
woodser
7a4d3a375d test getting supported assets and their payment methods 2022-05-12 17:16:29 -04:00
woodser
8113c6bd1c support getXmrSeed() 2022-05-11 17:04:18 -04:00
woodser
befdf7b33e
Export protobuf types (#100)
* update to monero-javascript v0.7.0
* bump to version v0.0.2
* terminate monero-javascript worker at end of tests
2022-05-10 09:55:41 -04:00
woodser
7ee0d34f1a convert to typescript library
remove create-react-app
2022-05-05 22:25:08 -04:00
woodser
449d0dc750 add typedocs 2022-05-02 15:21:48 -04:00
woodser
2e9a350e53 enable and apply eslint rules 2022-05-02 15:21:48 -04:00
woodser
7e35c1f8f1 delete Haveno app folders at end of tests 2022-04-29 13:55:04 -04:00
woodser
df270eab83 register arbitrator dispute agent 2022-04-28 11:46:49 -04:00
woodser
e18d0ea2c2 offer min amount defaults to fixed amount 2022-04-28 11:46:49 -04:00
woodser
0e612aec74 clean up postOffer() params and use typed test config 2022-04-16 13:12:16 -04:00
woodser
9a63afa5f8 test crypto account persistence 2022-04-12 07:50:09 -04:00
woodser
b5e0849ea3 add test "Can prepare for trading" 2022-04-12 07:50:09 -04:00
woodser
c5e74947d5 test currency code & address validation on create crypto acct (disabled) 2022-04-11 17:54:04 -04:00
woodser
8f295421c3 rename haveno class to HavenoClient 2022-04-08 16:41:45 -04:00
woodser
1065e1b325 seller state is PAYMENT_RECEIVED or PAYOUT_PUBLISHED after confirming 2022-04-07 14:12:19 -04:00
woodser
9d84779a05 rename trade phase DEPOSIT_CONFIRMED to DEPOSIT_UNLOCKED 2022-04-07 10:51:36 -04:00
woodser
8594483c27 rename to getNewDepositAddress() 2022-04-07 10:51:36 -04:00
woodser
1a08f3d15f rename to haveno.ts, haveno.test.ts 2022-04-06 11:37:11 -04:00
woodser
91710b2bcf
test posting offers, taking trades, and opening disputes in parallel (#78)
tests can run repeatedly since backend closes wallets when unused
support funding a wallet with X outputs of amount
support checking if wallet funded with X outputs of amount
2022-04-06 11:28:56 -04:00
duriancrepe
ad26aae4e6
Add API functions to start and stop local Monero node (#76) 2022-04-04 15:29:35 -04:00
duriancrepe
3024c5b2fc
Add API functions to support trade chat (#75) 2022-03-09 07:43:30 -05:00
duriancrepe
7ddf429fc7
Add API functions to open and resolve disputes (#68) 2022-03-07 12:57:00 -05:00
woodser
c914f8771d
support BCH 2022-03-06 10:49:26 -05:00
woodser
95b2b1cab1
support LTC and ZEC (#71) 2022-02-16 11:59:31 -05:00
woodser
3708880ddd
support fiat currencies (#69) 2022-02-16 10:09:59 -05:00
Randall B
f89ed9d3bb
Add market depth API call (#47) 2022-02-11 18:13:56 -05:00
duriancrepe
0df355faa7
Add API functions to initialize Haveno account (#64)
Co-authored-by: woodser@protonmail.com
2022-02-09 04:41:00 -05:00
woodser
f53b9c3437 update to monero-javascript v0.6.4 2022-02-08 14:33:52 -05:00
duriancrepe
6cc5228d7b Fix typescript compile due to missing ignore null operator 2022-02-07 18:37:03 -05:00
Fritz Lumnitz
a27fa770ec Add monero connections manager 2022-01-28 17:02:06 -05:00
woodser
be86aafeff client periodically sends keep alive notification 2022-01-17 08:40:05 -05:00
Fritz Lumnitz
7cdcdffb72 Add notifications listener 2022-01-13 07:57:21 -05:00
duriancrepe
640c89aa87
Add API functions to register arbitrator and mediator keys (#58)
* Add API functions to register arbitrator and mediator keys
2022-01-08 08:21:32 -05:00
l0nelyc0w
f82baecfbf Add API functions to get wallet transfers 2021-12-31 14:34:58 -05:00
woodser
9d2ec873c5 support auto starting and stopping arbitrator, alice, and bob 2021-12-19 11:49:43 -05:00
woodser
1220a86202 update name to HavenoHeadlessAppMain 2021-12-16 13:33:38 -05:00
woodser
0d179da988 test unexpected errors and timeouts during trade initialization
improve logging
2021-12-15 13:19:23 -05:00
woodser
fe2c715d80 add ability to start haveno processes from tests
test making or taking offer with insufficient unlocked balance
2021-12-08 06:25:35 -05:00
premek
db509778a8 do not commit generated protobuf code and .proto files
generate the code on npm install and npm test from .proto files from haveno repository
2021-11-21 14:05:53 -05:00
premek
ee9cbda667 add getMarketPrices call and tests 2021-11-20 19:41:52 -05:00
woodser
d33c3227e0 test trade states throughout trade 2021-11-20 16:25:15 -05:00
woodser
6d80715631 update protobuf definition 2021-11-19 17:14:49 -05:00
woodser
f9559f2a13 tests wait for less mining 2021-11-17 04:56:20 -05:00
premek
e0e800a472 update test instructions to use configured wallet RPC port 2021-11-17 04:56:10 -05:00
woodser
edc0f04498 only test crypto payment accounts 2021-11-17 04:47:48 -05:00
woodser
e66f6b4854 automatically create and fund funding wallet 2021-11-13 08:33:07 -05:00
woodser
36a007a667 rename to HavenoDaemon.ts and HavenoDaemon.test.ts 2021-11-11 16:20:27 -05:00
woodser
94b99c8c09
fix typo (#26) 2021-11-10 17:47:30 -05:00
woodser
93fa4cd7b7
add documentation to add new grpc api functions (#21) 2021-10-27 14:18:07 -04:00
woodser
967d036216 havenod supports crypto account creation and getPrice(currencyCode)
disable account creation with instant trades
2021-10-24 09:23:58 -04:00
woodser
50d8c3b119 update after removing dao, tests passing 2021-10-22 07:45:14 -04:00
woodser
43edb4d3fa update to monero-javascript 0.5.6 for TaskLooper util & jest worker fix 2021-09-21 10:01:44 -04:00
woodser
a268b26784 test basic end-to-end trade completion
add methods to take offer and indicate payment to haveno daemon
add getNewDepositSubaddress() to haveno daemon
automatically fund haveno wallets and await unlocked funds
run tests sequentially
update protobuf definition
2021-09-21 10:01:44 -04:00
woodser
e35f8c5e95 test that offers filtered when reserved funds spent or duplicated
introduce envoy config for running tests with alice and bob
test offer removal when reserved output spent using monero-javascript
add instructions to run tests in readme
update protobuf definitions
2021-09-18 15:04:08 -04:00
woodser
3d8e37e646 use underscores in grpc.proto for correct camelcase in grpc-web
fix possibly undefined typescript checks
rebuild protobuf TS definitions
2021-09-16 09:32:17 -04:00
woodser
febe4d7526 can post and remove an offer
implement createCryptoPaymentAccount() (unsupported on server)
2021-09-15 06:45:23 -04:00
woodser
f83fcb0d84
switch api to use typescript auto-generated from protobuf using grpc-web (#11)
haveno daemon can get payment accounts and the user's created offers
2021-09-14 08:27:45 -04:00
woodser
bea11ab1f4
add HavenoDaemon api class and jest tests supporting version and balances (#8) 2021-09-12 09:39:21 -04:00
woodser
56975a6022
update poc image and test (#7) 2021-09-10 06:43:16 -04:00
woodser
b8bff60307
update logo (#5) 2021-09-09 04:54:14 -04:00
woodser
b73b84f864
update protobuf definitions (#2) 2021-05-09 08:14:25 -04:00
woodser
4dd6fab818
update to haveno 1.6.2 (#1)
add ui poc screenshot
separate instructions to update protobuf client
2021-05-05 14:03:43 -04:00
woodser
c3c86cc643 fetch and display haveno daemon version in react
enable typescript
add haveno protobuf definitions to ./config
add envoy.yaml to ./config for envoy proxy config
add ./bin/build_protobuf.sh to generate and place grpc client
update readme
2021-04-25 19:58:26 -04:00
woodser
bfc22120cd Initialize project using Create React App 2021-04-21 15:52:40 -04:00