Elliot Lee
b648387a57
Revert "Merge pull request #1052 from FredKSchott/tests-to-ts-03"
...
This reverts commit e08367365f , reversing
changes made to 36a9e7a7cf .
2019-11-06 10:34:05 -08:00
Fred K. Schott
39f6a51794
convert the rest of the helper files to ts
2019-11-02 07:40:52 -07:00
Elliot Lee
d82703f41b
prepareTransaction should not overwrite Sequence ( #990 )
...
* Cleans up some code and fixes some type errors
* Clarify how null settings work
* Document updated RippledError
* Updates per review by @mDuo13
2019-03-18 15:55:42 -07:00
Alexandru Chiriac
5419e67dbc
GetLedger by hash option ( #980 )
...
* update ledger input schema
* include ledgerHash option
2018-12-12 11:02:50 -08:00
Elliot Lee
0f5056221f
Fix getOrderbook ( #970 )
...
* Fix `getOrderbook` (Fix #766 )
* Add `formatBidsAndAsks` as a recommended alternative to `getOrderbook`
* Add `renameCounterpartyToIssuer`
2018-11-26 15:25:15 -08:00
wudanjs
4c23bd5ad3
Include memos when parsing trustlines ( #949 )
2018-09-19 14:17:38 -07:00
Elliot Lee
b9c953fce6
Fix getPaths ( #930 )
...
* getPaths:
* Filter paths correctly
* Use correct value when XRP is the destination currency
2018-08-23 17:37:02 -07:00
Elliot Lee
181cfd69de
Prevent 'amount' from being misinterpreted ( #924 )
...
The 'amount' field should almost never be used.
With partial payments, the field can show an amount that is
significantly less than the amount that the transaction actually
delivered. This change sets amount to 0 XRP when it may be misleading.
This change omits the `amount` when parsing payment transactions.
See `HISTORY.md` for recommended alternatives.
2018-08-23 16:17:23 -07:00
Elliot Lee
2112d4c0b3
Round XRP fee to 6 decimal places ( #912 )
...
* Round XRP fee to 6 decimal places
Fix #911
2018-06-28 17:59:00 -07:00
Elliot Lee
e07fa11923
Maximum fee values ( #902 )
...
* Add maxFeeXRP (default 2 XRP) as an optional RippleAPI constructor parameter
- No calculated or specified fee can exceed this value
- If the fee exceeds 2 XRP, throw a ValidationError
* sign() - throw ValidationError when Fee exceeds maxFeeXRP
* Document getFee parameters
* Explain new fee limits in HISTORY.md
* Deprecate `maxFee`
2018-06-07 23:29:24 -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
Elliot Lee
ca74cf1028
Apply automatic formatting
2018-02-23 16:50:40 -08:00
Elliot Lee
b89eae5cb1
Add test of getTrustlines with multiple pages of results ( #850 )
2018-02-14 15:57:35 -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
Ivan Tivonenko
4f3635eef0
add SauceLabs testing
2016-02-05 07:59:34 +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
dc03c6e0ac
fix to work in browser
...
run unit tests and integration tests in PhantomJS
add JUnit reporter to unit test so CircleCI can show results
2016-01-13 07:11:39 +02:00
Chris Clark
ebfe20defb
Add multisignature support
2015-12-17 11:45:08 -08:00
Ivan Tivonenko
ddf8fe5b1a
add unit tests for RippleAPIBroadcast
2015-11-25 05:58:48 +02: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
8074baa3b5
Better error message when using methods that require a connection when servers are not provided
2015-11-02 14:50:38 -08:00
Chris Clark
2aa1695b74
Delete obsolete files and update LICENSE file
2015-10-30 14:25:33 -07:00
Chris Clark
665f5f9664
Add support for order expiration
2015-10-29 17:25:52 -07:00
Chris Clark
1a99a2fddb
BREAKING CHANGE: Remove dependency of src/api on src/core, removes multiserver support
2015-10-26 16:28:43 -07:00
Chris Clark
391a9fd260
Switch back to ripple_path_find
2015-10-22 17:51:16 -07:00
Matthew Fettig
aeb56dee17
rename metaData to meta on getLedger
2015-10-21 10:00:07 -07:00
wltsmrz
78eeb40322
Change rippled test fixture name
2015-10-05 12:23:22 -07:00
wltsmrz
806a4e823f
Add getBalanceSheet() to RippleAPI
2015-10-02 17:30:13 -07:00
Chris Clark
35acbb62c3
Support source.amount in getPaths and destination.minAmount in preparePayment
2015-10-01 14:55:11 -07:00
Chris Clark
5217b66396
Fix pathfind queuing and add unit test
2015-09-29 12:54:23 -07:00
Chris Clark
80494ad813
Return promise error if submit result is an immediate failure
2015-09-16 15:56:24 -07:00
Alan Cohen
1ccbaf6776
Fix: Emit error events and return error on pathfind
2015-08-21 14:24:13 -07:00
Ivan Tivonenko
a55d26a726
fix parseTrustline for case when no QualityIn or QualityOut are set in transaction
2015-08-19 21:17:50 +03:00
Chris Clark
2f8655dc23
Add getLedger method, remove getLedgerHeader method
2015-08-17 18:39:34 -07:00
Chris Clark
dda9994869
Use streaming pathfinding: rippled path_find instead of ripple_path_find
2015-08-12 12:34:08 -07:00
Ivan Tivonenko
63e3b71eb5
cover api/common/errors.js with tests
2015-07-29 21:15:28 +03:00
Ivan Tivonenko
cecf3f3d22
cover api/ledger/parse/utils.js with tests
2015-07-29 16:42:23 +03:00
Ivan Tivonenko
472fbce23a
cover api/ledger/parse/trustline.js with tests
2015-07-29 15:46:15 +03:00