Commit Graph

29 Commits

Author SHA1 Message Date
Stefan Thomas
22a954deed Changed directory structure to be more like server's. src/js/*.js -> src/js/ripple/ 2013-05-06 21:32:25 +02:00
Arthur Britto
d37f0b9082 Fix currency from integer. 2013-04-26 15:38:04 -07:00
Arthur Britto
1ed5d6b3e5 JS: Fixes and improvements for Amount.
- Add from_quality()
- Add parse_quality()
- Improve add.
- Better peformance for copyTo().
- Fix parse_issuer(), set_issuer(), & set_currency() not to modify sub
  object.
- Correctly set currency and issuer of XRP in parse_json().
- Make not_equals_why more explicit.
2013-04-26 09:01:44 +02:00
Arthur Britto
f5047521ce JS: Rename ADDRESS_ to ACCOUNT_ to be consistent with C++. 2013-04-26 09:00:22 +02:00
Stefan Thomas
4eb29890c0 JS: More tests for equals. 2013-04-26 09:00:21 +02:00
Stefan Thomas
0a13875c53 JS: More tests for Amount#equals and Amount#not_equals_why. 2013-04-26 09:00:21 +02:00
Stefan Thomas
d394b074db JS: Failing test. Amount#equals does not compare exponent. 2013-04-26 09:00:21 +02:00
Stefan Thomas
49af9f20d9 JS: Added ripple.config.load convenience function. 2013-04-26 08:59:49 +02:00
Stefan Thomas
6f34cfa369 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-04-26 08:59:48 +02:00
Arthur Britto
e5c6acde7d JS: Restrict UInt160 parse_json to wire format. 2013-04-26 08:59:47 +02:00
Stefan Thomas
aff2b5583e Fix infinite loop when using a zero amount in a multiplication. 2013-04-26 08:59:47 +02:00
Stefan Thomas
ef23babf8b Add tests for Amount#multiply. 2013-04-26 08:59:47 +02:00
Stefan Thomas
eefaea7a74 Added some test cases for Amount.add(). 2013-04-26 08:59:46 +02:00
Stefan Thomas
d8076d5f9b Add support for mixed operands to divide(). 2013-04-26 08:59:46 +02:00
Arthur Britto
184c059354 JS & UT: add et to vim setting. 2013-04-26 08:59:45 +02:00
Arthur Britto
e40d8b7b6f JS: Fix and another unit-test. 2013-04-26 08:59:44 +02:00
Arthur Britto
135fe39db4 Add UInt160.is_valid(), Amount.is_valid(), Currency.is_valid(), & Currency.is_valid_full(). 2013-04-26 08:59:44 +02:00
Arthur Britto
19ec41e7bd JS and UT: XNS -> XRP 2013-04-26 08:59:00 +02:00
Arthur Britto
9b01b0a60a Rework config.js to not be add to web pack. 2013-04-26 08:59:00 +02:00
Stefan Thomas
bd781bcf3f Moved cpp code to src/cpp and js code to src/js. 2013-04-26 08:59:00 +02:00
Arthur Britto
209b70db77 JS: Hide some variables. 2013-04-26 08:59:00 +02:00
Arthur Britto
4917a01c69 UT: Add another Amount test. 2013-04-26 08:58:59 +02:00
Arthur Britto
45c54b6484 JS: Fix UInt160 comparison. 2013-04-26 08:58:59 +02:00
Arthur Britto
c0eec780de JS: Add support for parsing and encoding base58. 2013-04-26 08:58:59 +02:00
Arthur Britto
02805651cf JS: More fixes and tests for Amount.negate(). 2013-04-26 08:58:58 +02:00
Arthur Britto
1aac962116 UT: Lots of improvements and fixes.
- Parse negative amounts.
- Make Amount.negate() return a new value.
- Add Amount.equals().
- Rename Remote.trace() to set_trace().
- Fix request_ripple_balnce.
- Add more tests to send-test.js.
- Add more tests to amount-test.js.
- Add helper functions create_accounts and credit_limits to
  testutils.js.
2013-04-26 08:58:58 +02:00
Arthur Britto
15f3c5d311 UT: Adjust to new address encoding. 2013-04-26 08:58:58 +02:00
Arthur Britto
38ee4bf3c4 JS: fixes and tests from amounts. 2013-04-26 08:58:57 +02:00
Arthur Britto
566833f702 UT: Initial check in unit tests for amount.js. 2013-04-26 08:58:57 +02:00