{"action":"created","issue":{"url":"https://api.github.com/repos/ripple/ripple-lib/issues/255","labels_url":"https://api.github.com/repos/ripple/ripple-lib/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/ripple/ripple-lib/issues/255/comments","events_url":"https://api.github.com/repos/ripple/ripple-lib/issues/255/events","html_url":"https://github.com/ripple/ripple-lib/pull/255","id":54396186,"number":255,"title":"[TASK] Refactor to use bignumber.js","user":{"login":"clark800","id":1238722,"avatar_url":"https://avatars.githubusercontent.com/u/1238722?v=3","gravatar_id":"","url":"https://api.github.com/users/clark800","html_url":"https://github.com/clark800","followers_url":"https://api.github.com/users/clark800/followers","following_url":"https://api.github.com/users/clark800/following{/other_user}","gists_url":"https://api.github.com/users/clark800/gists{/gist_id}","starred_url":"https://api.github.com/users/clark800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clark800/subscriptions","organizations_url":"https://api.github.com/users/clark800/orgs","repos_url":"https://api.github.com/users/clark800/repos","events_url":"https://api.github.com/users/clark800/events{/privacy}","received_events_url":"https://api.github.com/users/clark800/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-01-15T00:13:57Z","updated_at":"2015-01-24T07:31:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ripple/ripple-lib/pulls/255","html_url":"https://github.com/ripple/ripple-lib/pull/255","diff_url":"https://github.com/ripple/ripple-lib/pull/255.diff","patch_url":"https://github.com/ripple/ripple-lib/pull/255.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/ripple/ripple-lib/issues/comments/71303958","html_url":"https://github.com/ripple/ripple-lib/pull/255#issuecomment-71303958","issue_url":"https://api.github.com/repos/ripple/ripple-lib/issues/255","id":71303958,"user":{"login":"sublimator","id":525211,"avatar_url":"https://avatars.githubusercontent.com/u/525211?v=3","gravatar_id":"","url":"https://api.github.com/users/sublimator","html_url":"https://github.com/sublimator","followers_url":"https://api.github.com/users/sublimator/followers","following_url":"https://api.github.com/users/sublimator/following{/other_user}","gists_url":"https://api.github.com/users/sublimator/gists{/gist_id}","starred_url":"https://api.github.com/users/sublimator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sublimator/subscriptions","organizations_url":"https://api.github.com/users/sublimator/orgs","repos_url":"https://api.github.com/users/sublimator/repos","events_url":"https://api.github.com/users/sublimator/events{/privacy}","received_events_url":"https://api.github.com/users/sublimator/received_events","type":"User","site_admin":false},"created_at":"2015-01-24T07:31:35Z","updated_at":"2015-01-24T07:31:35Z","body":">>> I thought you meant for all overflows.\r\n\r\nHrmm, yeah, the context was lost somewhere, and I was vague, but concerns should not be so readily dismissed. It's a problem with native amounts only right? It seems that _check_limits will throw when an IOU value is out of bounds.\r\n\r\n>>> I thought it was ready to be merged\r\n\r\nMight be worth taking stock and going back and making the tests more detailed.\r\n\r\nI just looked at the existing limit tests and was sad to see this test (existing prior to this patch):\r\n```\r\n   it ('from_json less than minimum XRP', function() {\r\n      var amt = Amount.from_json('-9000000000000000001');\r\n      assert.strictEqual(amt.to_json(), '0');\r\n    });\r\n```\r\n(This was added in the same commit that introduced errors thrown for IOUs exceeding limits it seems)\r\n\r\nYou can add `assert(isNaN(amt._value));` and see for yourself what happens here. (to_json() must call to_text() which has an `allow_nan` argument)\r\n\r\nWhat a can of worms huh?\r\n"}}