26 Commits

Author SHA1 Message Date
Kyle Fang
5407f595cc fix: unit test 2025-03-18 14:34:43 +00:00
Kyle Fang
885a8f433c feat: add pool id to PoolData 2025-02-24 10:09:46 +00:00
Kyle Fang
57d5b59b54 fix: build 2024-12-22 04:19:39 +00:00
Kyle Fang
5d3dea011d Fix ES linter warnings. 2024-11-28 05:38:26 +00:00
Kyle Fang
cb0d0681e1 feat: update the codebase to latest stacks.js SDK 2024-11-28 04:55:52 +00:00
david weil
a1f6259e29 fix overflow test 2024-09-11 07:24:06 +08:00
ignaciopenia
f673f2d280 Fix/handle other errors (#13)
* add tests to mock-externals suite

* tests: complete custom and alternative routes coverage

* handle STACKS_API_HOST error

* tests: lint fix

* tests: empty route coverage

* refactor mock-externals suite

* tests: coverage on fungible token balances and null token cases

* refactor mock-externals suite

* tests: remove unused structure

* temp commit

* remove redundant describe

* lint fix

---------

Co-authored-by: simsbluebox <simsbluebox@gmail.com>
Co-authored-by: david weil <david.weil@coinfabrik.com>
2024-07-24 11:50:15 +08:00
ignaciopenia
9c5de7dec5 Backlog tests and coverage (#12)
* add tests to mock-externals suite

* tests: complete custom and alternative routes coverage

* tests: lint fix

* tests: empty route coverage

* refactor mock-externals suite

* tests: coverage on fungible token balances and null token cases

* refactor mock-externals suite

* tests: remove unused structure

* remove redundant describe

* lint fix

---------

Co-authored-by: simsbluebox <simsbluebox@gmail.com>
2024-07-23 15:32:09 +08:00
david weil
fc23587ce3 Tests/sdk features stage 2 (#11)
* tests: enhance tests for existing functions

* tests: add test cases for existing functions

* tests: add test cases for three new functions

* tests: Introduce mock for getFeeRate function

* tests: implement workaround for Jest BigInt assertion issue

* tests: wip test cases getRoute, getAmountTo, runSwap

* tests: mocked functions runSwap, getLatestPrices

* temp commit

* tests: mocked functions getBalances, fetchSwappableCurrency

* tests: add additional tests for error scenarios

* tests: add more coverage to runSwap SDK method

* temp commit

* temp commit

* sync merge

* code linted + documentation update

* tests: SDK getWayPoints method

* tests: add lint fix command

* tests: add getFeeRate with custom route

* test: add external error tests

* fix: minor changes

* conflicts resolved

---------

Co-authored-by: ignacio.pena@coinfabrik.com <ignacio.pena@coinfabrik.com>
Co-authored-by: simsbluebox <simsbluebox@gmail.com>
Co-authored-by: david weil <david.weil@endlesstruction.com.ar>
2024-07-15 21:25:14 +08:00
Kyle Fang
da4091e7e0 feat: add routing related tests 2024-07-12 09:30:38 +08:00
Kyle Fang
28461a41fa tests: add ajv to automatically validate external responses in runtime 2024-07-12 09:30:38 +08:00
david weil
de391d1ddd Tests/sdk features: coverage. Stage 1 (#9)
* tests: enhance tests for existing functions

* tests: add test cases for existing functions

* tests: add test cases for three new functions

* merge from alex changes

* fix: error with variable name

* fix: removed unused variable

* fix: testing of getRoute updated to its signature

---------

Co-authored-by: ignacio.pena@coinfabrik.com <ignacio.pena@coinfabrik.com>
Co-authored-by: simsbluebox <simsbluebox@gmail.com>
Co-authored-by: david weil <david.weil@endlesstruction.com.ar>
2024-07-11 17:56:32 +08:00
Kyle Fang
8489554ffc feat: add support for custom route
Also fix typo of router -> route
2024-07-04 15:24:06 +08:00
Kyle Fang
89e7bff91e fix: balance fetching 2024-06-18 10:10:55 +00:00
Kyle Fang
18bce82f38 feat: update to new alex-sdk-api 2024-06-18 02:45:19 +00:00
Kyle Fang
716516508e feat: upgrade to alex amm pool v2-1 2024-06-16 15:39:27 +00:00
Kyle Fang
864f3a9fa3 feat: add static function to configure AlexSDK 2023-04-24 14:47:11 +08:00
Kyle Fang
09fc7a7305 fix: rename to get fee rate 2023-03-15 14:24:15 +08:00
Kyle Fang
dfa343268c feat: use separate file to avoid cycle reference 2023-03-15 14:04:29 +08:00
Kyle Fang
575f5f734f fix: inline Currency to index.ts 2023-03-15 13:27:38 +08:00
Kyle Fang
4ce2500fec refactor: rename to getAmountTo 2023-03-09 15:05:57 +08:00
Kyle Fang
6c64115ccb chore: lower case 2023-03-09 14:15:19 +08:00
Kyle Fang
9642439738 feat: separate currency 2023-03-09 14:13:37 +08:00
Kyle Fang
5b9eb2d830 feat: add test case 2023-03-09 14:10:14 +08:00
Kyle Fang
ba105c6422 feat: add run swap 2023-03-09 13:54:08 +08:00
Kyle Fang
f657c2ad53 chore: init 2023-03-09 09:12:54 +08:00