Mayukha Vadari
09ef8595e7
refactor: move fixtures closer to tests (part 2) ( #1561 )
...
* move echo
* move fee
* move subscribe/unsubscribe
* move ledger_current
* move ledger_data
* move submit/submit_multisigned
* remove account_tx/account_offers/gateway_balances
* move account_info
* remove ledger_entry
* remove tx
* remove account_lines
* remove ripple_path_find
* remove ledger
* remove book_offers
* move ping
* remove global_config
* move test_command
* additional mock-rippled cleanup
* add explanatory comment to mock.addResponse
2021-10-04 14:10:10 -04:00
Mayukha Vadari
f9fe5936b1
refactor: rename all test files to camelCase ( #1562 )
...
* rename files to camelCase
* fix imports
* more renames
* pull all client tests out of individual folders
* fix imports
* fix tests
2021-10-04 14:10:10 -04:00
Mayukha Vadari
5120b0fc83
refactor: moves fixtures closer to tests ( #1551 )
...
* modify account_info mocks
* move account_objects
* move server_info
* remove config (no longer needed)
* switch to simple dictionary instead of handlers
* fix rebase issues
* refactor: addResponse method on mock server object (#1555 )
Co-authored-by: Elliot Lee <github.public@intelliot.com >
2021-10-04 14:10:09 -04:00
Mayukha Vadari
52f1789ecd
Remove ledger methods from Connection ( #1543 )
...
* remove ledger subscription from connection
* remove more client ledger stuff
* resolve TS concerns
* fix all tests except broadcast tests
* fix broadcast tests
* clean up more ledger stuff in testing
* respond to comments
2021-10-04 14:10:09 -04:00
Elliot Lee
c8b0035897
fix: prevent getFee from returning NaN from Reporting Mode ( #1401 )
...
When using a rippled server in Reporting Mode, the server_info response does not have a load_factor property.
https://xrpl.org/rippled-server-modes.html#reporting-mode
https://github.com/ripple/rippled/issues/3812
Now, when load_factor is missing, we default to a load_factor of 1.
Fix #1398
2021-05-10 13:56:31 -07:00
elmurci
650d722609
Fix #1353 : add memos support for multiple transaction types in getTransactions ( #1397 )
...
* fix(#1353 ): adds memos support for the following transaction types in `getTransactions`:
- AccountDelete
- OfferCreate
- OfferCancel
- CheckCancel
- CheckCash
- CheckCreate
- DepositPreauth
- SetFee
- PaymentChannelFund
- PaymentChannelClaim
- PaymentChannelCreate
- TicketCreate
2021-04-08 11:46:54 +02:00
Elliot Lee
138e7942da
Add support for AccountDelete ( #1120 )
...
https://xrpl.org/accountdelete.html
2020-01-06 04:01:10 -08:00
Alexandru Chiriac
5419e67dbc
GetLedger by hash option ( #980 )
...
* update ledger input schema
* include ledgerHash option
2018-12-12 11:02:50 -08:00
wudanjs
4c23bd5ad3
Include memos when parsing trustlines ( #949 )
2018-09-19 14:17:38 -07:00
Elliot Lee
54f12862dc
Improve errors ( #893 )
...
- `RippledError`: Include the full response from the `rippled` server.
- A new test ensures correct behavior when `streams` is not an array.
- `NotConnectedError` may be thrown with a different message than before.
2018-05-12 09:38:49 -07:00
Elliot Lee
b2b6715ac0
Add request(), hasNextPage(), and requestNextPage() ( #887 )
...
* Add support for all rippled APIs, including subscriptions.
* Add support for arbitrary stream message types.
* Note that rippled APIs take amounts in drops.
* request() will be available in ripple-lib version 1.0.0+
2018-05-10 15:43:56 -07:00
Elliot Lee
e978ef1888
Add getAccountObjects ( #881 )
...
Squashed commit of the following:
commit 361ead8cbbbe4fa25ecba614f8f11930ff679996
commit 5ff26d7d2defbbaaa7c50d6b3b5b74bf30be19ef
commit 97f5dfc86d4730082fd016197b0c025e499912e3
commit d48654098601f2a19484d9bbae7c65786e3c5dd4
commit 4790401123e7836f6bea8d03111bce60dcf95114
commit 57512f7fc000689bb8224f33173ba91221f27281
commit e75a7e95b11368b26c40e8e6e7b583d978475e95
2018-04-11 14:37:37 -07:00
Elliot Lee
facc513a52
Add support for Checks ( #853 )
...
- See https://github.com/ripple/rippled/pull/2245
* Add support for depositAuth flag
* Upgrade ripple-binary-codec to 0.1.13
2018-03-01 21:42:46 -08:00
wilsonianb
19eb88a00e
Add getPaymentChannel
2017-04-07 13:04:21 -07:00
Ben Sharafian
a574e1158a
Add transactions for payment channels
2017-03-30 21:19:31 -07:00
wilsonianb
9393adf66f
Disallow escrow of IOU
2017-03-30 10:10:00 -07:00
wilsonianb
15a0ededc8
Replace suspended payments with escrow
2017-03-24 12:35:22 -07:00
Matthew Fettig
a96f71b7fd
fix missing deliveredAmount data from getLedger requests
2016-07-19 21:29:50 -07:00
Chris Clark
f74e11bce0
Add support for parsing SetFee and EnableAmendment pseudo-transactions
2016-05-05 15:37:23 -07:00
Ivan Tivonenko
5da78ce583
[FIX] handle websocket errors in browsers
...
emit not RippledNotInitializedError if server doesn't have any
completed ledgers on connect
2016-03-31 00:46:00 +03:00
Ivan Tivonenko
e17b6f172d
[FIX] on connect return error if server doesn't have validated ledgers
2016-03-24 22:26:33 +02:00
Alan Cohen
6b8cd6151d
Filter insufficient source funds paths from pathfind results
...
When pathfinding with source amount, we need to filter out paths where source
amount is not equal to the specified source amount. This is due to the behavior
of rippled when specifying a source amount during pathfinding.
Example:
{
"command": "ripple_path_find",
"source_account": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"destination_account": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": -1
},
"send_max": {
"currency": "USD",
"issuer": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"value": "1234567891"
},
"id": 2
}
{
"id": 2,
"result": {
"alternatives": [
{
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": "3999889.62127857"
},
"paths_canonical": [],
"paths_computed": [
[
{
"account": "rcsxQxEqU2qquAKp3tBUJy8Z2t19ioQPJ",
"type": 1,
"type_hex": "0000000000000001"
},
{
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"type": 48,
"type_hex": "0000000000000030"
}
]
],
"source_amount": {
"currency": "USD",
"issuer": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"value": "4170759.906037564"
}
}
],
"destination_account": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"destination_amount": {
"currency": "EUR",
"issuer": "rp91GUd5R3Rk3ipqW7XBdtrUJcX8epzGyb",
"value": "-1"
},
"destination_currencies": [
"EUR",
"XRP"
],
"full_reply": true,
"id": 2,
"source_account": "rhFQQ4ATC6MDF9ghTq3qAoCsGbGtjnhcXF",
"status": "success"
},
"status": "success",
"type": "response"
}
2016-01-15 13:38:57 -08:00
Ivan Tivonenko
c9704137b7
fix handling memos in prepareSettings
...
boost coverage back to 99.88%
move connection tests to separate file
group test fixtures into namespaces
2015-11-25 02:10:54 +02:00
Ivan Tivonenko
995606b1e6
boost coverage to almost 100%
2015-11-23 17:06:55 -08:00
Ivan Tivonenko
f146ea05c7
add test case for get transaction of types
...
suspendedPaymentExecution, suspendedPaymentCancellation, suspendedPaymentCreation
2015-11-17 23:43:01 +02:00
Chris Clark
2aa1695b74
Delete obsolete files and update LICENSE file
2015-10-30 14:25:33 -07:00