{"action":"created","comment":{"url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/comments/239985326","pull_request_review_id":182922901,"id":239985326,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTk4NTMyNg==","diff_hunk":"@@ -180,31 +180,28 @@ export default class EthereumPlugin extends EventEmitter2 implements PluginInsta\n         .dp(0, BigNumber.ROUND_FLOOR),\n       settleTo: new BigNumber(settleTo)\n         .dp(0, BigNumber.ROUND_FLOOR),\n-      settleThreshold: settleThreshold\n-        ? new BigNumber(settleThreshold)\n-          .dp(0, BigNumber.ROUND_FLOOR)\n-        : undefined,\n+      settleThreshold: new BigNumber(settleThreshold)\n+        .dp(0, BigNumber.ROUND_FLOOR),\n       minimum: new BigNumber(minimum)\n         .dp(0, BigNumber.ROUND_CEIL)\n     }\n \n-    // Validate balance configuration: max >= settleTo >= settleThreshold >= min\n-    if (this._balance.settleThreshold) {\n-      if (!this._balance.maximum.gte(this._balance.settleTo)) {\n-        throw new Error('Invalid balance configuration: maximum balance must be greater than or equal to settleTo')\n-      }\n-      if (!this._balance.settleTo.gte(this._balance.settleThreshold)) {\n-        throw new Error('Invalid balance configuration: settleTo must be greater than or equal to settleThreshold')\n-      }\n-      if (!this._balance.settleThreshold.gte(this._balance.minimum)) {\n-        throw new Error('Invalid balance configuration: settleThreshold must be greater than or equal to minimum balance')\n-      }\n-    } else {\n-      if (!this._balance.maximum.gt(this._balance.minimum)) {\n-        throw new Error('Invalid balance configuration: maximum balance must be greater than minimum balance')\n-      }\n+    if (this._balance.settleThreshold.eq(this._balance.minimum)) {\n+      this._log.trace(`Auto-settlement disabled: plugin is in receive-only mode`)\n+    }\n \n-      this._log.trace(`Auto-settlement disabled: plugin is in receive-only mode since no settleThreshold was configured`)\n+    // Validate balance configuration: max >= settleTo >= settleThreshold >= min\n+    if (!this._balance.maximum.gte(this._balance.settleTo)) {\n+      throw new Error('Invalid balance configuration: maximum balance must be greater than or equal to settleTo')\n+    }\n+    if (!this._balance.settleTo.gte(this._balance.settleThreshold)) {\n+      throw new Error('Invalid balance configuration: settleTo must be greater than or equal to settleThreshold')\n+    }\n+    if (!this._balance.settleThreshold.gte(this._balance.minimum)) {\n+      throw new Error('Invalid balance configuration: settleThreshold must be greater than or equal to minimum')","path":"src/index.ts","position":107,"original_position":107,"commit_id":"5a614cf4c8c59d745f9e8a4bda24f168490b43ab","original_commit_id":"5a614cf4c8c59d745f9e8a4bda24f168490b43ab","user":{"login":"karzak","id":10601061,"node_id":"MDQ6VXNlcjEwNjAxMDYx","avatar_url":"https://avatars3.githubusercontent.com/u/10601061?v=4","gravatar_id":"","url":"https://api.github.com/users/karzak","html_url":"https://github.com/karzak","followers_url":"https://api.github.com/users/karzak/followers","following_url":"https://api.github.com/users/karzak/following{/other_user}","gists_url":"https://api.github.com/users/karzak/gists{/gist_id}","starred_url":"https://api.github.com/users/karzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karzak/subscriptions","organizations_url":"https://api.github.com/users/karzak/orgs","repos_url":"https://api.github.com/users/karzak/repos","events_url":"https://api.github.com/users/karzak/events{/privacy}","received_events_url":"https://api.github.com/users/karzak/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n      throw new Error('Invalid balance configuration: settleThreshold must be greater than or equal to the minimum balance')\r\n```\r\nnit for clarity","created_at":"2018-12-08T01:00:21Z","updated_at":"2018-12-08T01:03:42Z","html_url":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24#discussion_r239985326","pull_request_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/comments/239985326"},"html":{"href":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24#discussion_r239985326"},"pull_request":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24","id":237030817,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MDMwODE3","html_url":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24","diff_url":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24.diff","patch_url":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24.patch","issue_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/24","number":24,"state":"open","locked":false,"title":"perf: update deps, miscellaneous fixes","user":{"login":"kincaidoneil","id":6435238,"node_id":"MDQ6VXNlcjY0MzUyMzg=","avatar_url":"https://avatars1.githubusercontent.com/u/6435238?v=4","gravatar_id":"","url":"https://api.github.com/users/kincaidoneil","html_url":"https://github.com/kincaidoneil","followers_url":"https://api.github.com/users/kincaidoneil/followers","following_url":"https://api.github.com/users/kincaidoneil/following{/other_user}","gists_url":"https://api.github.com/users/kincaidoneil/gists{/gist_id}","starred_url":"https://api.github.com/users/kincaidoneil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kincaidoneil/subscriptions","organizations_url":"https://api.github.com/users/kincaidoneil/orgs","repos_url":"https://api.github.com/users/kincaidoneil/repos","events_url":"https://api.github.com/users/kincaidoneil/events{/privacy}","received_events_url":"https://api.github.com/users/kincaidoneil/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-08T00:43:37Z","updated_at":"2018-12-08T01:03:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2565fdcc7bbee1d0fede0ac0e40e667f10f85a22","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24/commits","review_comments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24/comments","review_comment_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/24/comments","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/statuses/5a614cf4c8c59d745f9e8a4bda24f168490b43ab","head":{"label":"interledgerjs:ko-update-deps","ref":"ko-update-deps","sha":"5a614cf4c8c59d745f9e8a4bda24f168490b43ab","user":{"login":"interledgerjs","id":22465593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDY1NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"repo":{"id":119129751,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkxMjk3NTE=","name":"ilp-plugin-ethereum","full_name":"interledgerjs/ilp-plugin-ethereum","private":false,"owner":{"login":"interledgerjs","id":22465593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDY1NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/interledgerjs/ilp-plugin-ethereum","description":"Settle Interledger payments with ether and (soon!) ERC-20 tokens","fork":false,"url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum","forks_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/forks","keys_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/teams","hooks_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/hooks","issue_events_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/events","assignees_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/tags","blobs_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/languages","stargazers_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/stargazers","contributors_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/contributors","subscribers_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/subscribers","subscription_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/subscription","commits_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/merges","archive_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/downloads","issues_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/deployments","created_at":"2018-01-27T03:44:05Z","updated_at":"2018-12-07T23:39:57Z","pushed_at":"2018-12-08T00:47:50Z","git_url":"git://github.com/interledgerjs/ilp-plugin-ethereum.git","ssh_url":"git@github.com:interledgerjs/ilp-plugin-ethereum.git","clone_url":"https://github.com/interledgerjs/ilp-plugin-ethereum.git","svn_url":"https://github.com/interledgerjs/ilp-plugin-ethereum","homepage":"","size":1224,"stargazers_count":18,"watchers_count":18,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":3,"watchers":18,"default_branch":"master"}},"base":{"label":"interledgerjs:master","ref":"master","sha":"2f37a54a9a420f61d311bb12f6744c3248365cc5","user":{"login":"interledgerjs","id":22465593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDY1NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"repo":{"id":119129751,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkxMjk3NTE=","name":"ilp-plugin-ethereum","full_name":"interledgerjs/ilp-plugin-ethereum","private":false,"owner":{"login":"interledgerjs","id":22465593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNDY1NTkz","avatar_url":"https://avatars1.githubusercontent.com/u/22465593?v=4","gravatar_id":"","url":"https://api.github.com/users/interledgerjs","html_url":"https://github.com/interledgerjs","followers_url":"https://api.github.com/users/interledgerjs/followers","following_url":"https://api.github.com/users/interledgerjs/following{/other_user}","gists_url":"https://api.github.com/users/interledgerjs/gists{/gist_id}","starred_url":"https://api.github.com/users/interledgerjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledgerjs/subscriptions","organizations_url":"https://api.github.com/users/interledgerjs/orgs","repos_url":"https://api.github.com/users/interledgerjs/repos","events_url":"https://api.github.com/users/interledgerjs/events{/privacy}","received_events_url":"https://api.github.com/users/interledgerjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/interledgerjs/ilp-plugin-ethereum","description":"Settle Interledger payments with ether and (soon!) ERC-20 tokens","fork":false,"url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum","forks_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/forks","keys_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/teams","hooks_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/hooks","issue_events_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/events{/number}","events_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/events","assignees_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/assignees{/user}","branches_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/branches{/branch}","tags_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/tags","blobs_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/refs{/sha}","trees_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/statuses/{sha}","languages_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/languages","stargazers_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/stargazers","contributors_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/contributors","subscribers_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/subscribers","subscription_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/subscription","commits_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/commits{/sha}","git_commits_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/git/commits{/sha}","comments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/comments{/number}","issue_comment_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/comments{/number}","contents_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/contents/{+path}","compare_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/merges","archive_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/downloads","issues_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues{/number}","pulls_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls{/number}","milestones_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/milestones{/number}","notifications_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/labels{/name}","releases_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/releases{/id}","deployments_url":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/deployments","created_at":"2018-01-27T03:44:05Z","updated_at":"2018-12-07T23:39:57Z","pushed_at":"2018-12-08T00:47:50Z","git_url":"git://github.com/interledgerjs/ilp-plugin-ethereum.git","ssh_url":"git@github.com:interledgerjs/ilp-plugin-ethereum.git","clone_url":"https://github.com/interledgerjs/ilp-plugin-ethereum.git","svn_url":"https://github.com/interledgerjs/ilp-plugin-ethereum","homepage":"","size":1224,"stargazers_count":18,"watchers_count":18,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5,"open_issues":3,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24"},"html":{"href":"https://github.com/interledgerjs/ilp-plugin-ethereum/pull/24"},"issue":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/24"},"comments":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/interledgerjs/ilp-plugin-ethereum/statuses/5a614cf4c8c59d745f9e8a4bda24f168490b43ab"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"karzak"}}