Commit Graph

82 Commits

Author SHA1 Message Date
Stefan Thomas
7a65dbdcf4 JS: Emit orderbook events when trades happen. 2013-03-12 13:59:21 +01:00
Stefan Thomas
c0dec2f86f JS: Reapply parsing change for json format with optional issuer. 2013-03-05 13:44:52 +01:00
Arthur Britto
3a3f38927f JS: Backout some of latest amount parsing changes. 2013-03-04 13:50:20 -08:00
Stefan Thomas
efdda7c119 JS: Allow Ripple URI format (25/USD) in parse_json. 2013-03-04 14:44:45 +01:00
Arthur Britto
10c759510a JS: Fix Amount.divide() and remove extra clone()s. 2013-02-26 21:32:44 -08:00
Stefan Thomas
544105e23d JS: Prevent Amount#negate from creating amounts that are negative zero. 2013-02-22 13:47:26 +01:00
Stefan Thomas
50b5644334 JS: Add a way for the test suite to change Amount#equals, so it ignores issuers. 2013-02-22 13:46:50 +01:00
Stefan Thomas
47791fa851 JS: Fix Amount#equals and Amount#not_equals_why to pass all tests. 2013-02-22 12:48:05 +01:00
Stefan Thomas
8cb8b353c3 JS: Amount - handle plain numbers as arguments to ratio_human and product_human. 2013-02-22 12:48:04 +01:00
Arthur Britto
68403ae1a2 JS: Fix Add for Amount. 2013-02-18 00:41:57 -08:00
Arthur Britto
4c8d405cc1 JS: Fix add of zero for non-XRP. 2013-02-17 23:19:31 -08:00
Arthur Britto
2ad9ccdc10 JS: Amount set_currency() nows sets _is_native. 2013-02-17 22:57:12 -08:00
Arthur Britto
0d18274a69 JS: Add is_positive() to Amount. 2013-02-17 22:04:44 -08:00
Stefan Thomas
0c3c79211e JS: Allow an integer factor in Amount#product_human. 2013-02-13 18:45:14 +01:00
Arthur Britto
4e526c78e6 JS: Pass opts in to_human_full(). 2013-02-02 02:46:42 -08:00
Arthur Britto
cec8b12a49 JS: Add to_human_full and support for gateways to addresses. 2013-02-02 01:32:00 -08:00
Stefan Thomas
24dac24d29 Refactor JavaScript library.
- Separate classes in separate modules (files)
- Constants should be associated with a class
- Replace exports.config scheme with a config singleton
- Refactor base58 functions as a static class
2013-02-01 22:44:04 +01:00
Arthur Britto
d31d83c125 JS: Don't require leading zeros on float styles. 2013-01-28 11:49:26 -08:00
Stefan Thomas
39c857f4d8 Fix logic error in Amount.add which caused results to always be positive. 2013-01-23 00:50:27 +01:00
Stefan Thomas
c0e728c310 Amount.product_human and Amount.ratio_human need to canonicalize. 2013-01-16 19:17:35 +01:00
Stefan Thomas
07bb2a82dd Fix typo. Uint vs UInt always trips me up. :/ 2013-01-04 19:21:04 +01:00
Stefan Thomas
d78b746889 More robust input type handling for Uint160.from_json(). 2013-01-04 09:47:03 +01:00
Arthur Britto
01764aa090 JS: Restrict UInt160 parse_json to wire format. 2013-01-03 00:54:20 -08:00
Stefan Thomas
f0ee9e6cbf New build system for SJCL. 2012-12-23 00:48:55 +01:00
Arthur Britto
979bace800 JS: Add tipple alphabet. 2012-12-20 12:47:57 -08:00
Arthur Britto
2997bde362 JS: Fix amount parsing to accept negative exponents. 2012-12-17 17:33:02 -08:00
Stefan Thomas
4032f9351a Add more precision options to to_human(). 2012-12-16 11:55:04 -08:00
JoelKatz
e65c390423 Allow larger amounts in normal notation. 2012-12-13 15:56:39 -08:00
JoelKatz
7810cffd18 Sync to C++ code logic. One test fails, I'm tracking it down now. 2012-12-13 15:42:41 -08:00
Stefan Thomas
269abd0131 Fix infinite loop when using a zero amount in a multiplication. 2012-12-13 11:28:45 -08:00
Stefan Thomas
55a595a880 "Fix" multiply by disabling rounding - doesn't seem to produce correct results. 2012-12-12 20:56:55 -08:00
Stefan Thomas
9e8a25ddb2 Fix semantic errors in Amount#multiply. 2012-12-12 20:52:45 -08:00
Stefan Thomas
038b9f3e2a Add product_human, fix ratio_human. 2012-12-12 19:37:23 -08:00
Stefan Thomas
0d5f2d0012 Add ratio_human. 2012-12-12 17:39:25 -08:00
JoelKatz
dd95a4b25e Fix this to match. 2012-12-11 22:57:19 -08:00
JoelKatz
44b3c6eda7 Restore [(10X+3)(10Y+3)]/100 rounding. 2012-12-11 16:10:13 -08:00
JoelKatz
7652a75edb Start of fix. 2012-12-11 16:02:35 -08:00
JoelKatz
f2ff4b3773 Simplify multiplication. 2012-12-11 00:15:06 -08:00
JoelKatz
1bb3db9a7d Don't set offsets to 'undefined' anymore. 2012-12-11 00:08:52 -08:00
Arthur Britto
0ebdac4f91 JS: Fix non-XRP add and canonicalize. 2012-12-10 23:47:14 -08:00
Arthur Britto
fe9610af70 JS: Better but still broken divide and friends again. 2012-12-10 23:16:07 -08:00
Arthur Britto
2537e47fc0 JS: Better but still broken divide and friends. 2012-12-10 22:33:33 -08:00
Stefan Thomas
10935c1773 Fix is_negative for new unified neg. number handling. 2012-12-10 17:02:01 -08:00
Stefan Thomas
2ce23c45b2 Add support for mixed operands to divide(). 2012-12-10 16:44:34 -08:00
Arthur Britto
e6e2ecd80c JS: Export Seed. 2012-12-10 14:47:54 -08:00
Arthur Britto
9fc885e1ea JS: Add Seed support and big fix for Amount. 2012-12-10 14:42:32 -08:00
Arthur Britto
6e6cbe19af JS: Fix for divide. 2012-12-09 00:15:31 -08:00
Arthur Britto
ea42fbce26 JS: Amount add multiply and divide. 2012-12-09 00:10:21 -08:00
Arthur Britto
afabfc8eac JS: Reorder Amount functions alphabetically. 2012-12-08 23:27:46 -08:00
Arthur Britto
e955bc5bb9 JS: Fixes for add and subtract. 2012-12-08 18:15:37 -08:00