{"action":"created","comment":{"url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/comments/52082844","id":52082844,"diff_hunk":"@@ -231,24 +233,26 @@ function * fulfillTransfer (transferId, fulfillment) {\n \n     // We don't know if notary is executing or rejecting transfer\n     const isValidExecution = Boolean(transfer.execution_condition &&\n-      Condition.testFulfillment(transfer.execution_condition, fulfillment))\n+      transfer.execution_condition.type === fulfillment.getData().condition_fulfillment.type &&\n+      Condition.testFulfillment(transfer.execution_condition, fulfillment.getData().condition_fulfillment))\n     const isValidCancellation = Boolean(transfer.cancellation_condition &&\n-      Condition.testFulfillment(transfer.cancellation_condition, fulfillment))\n+      transfer.cancellation_condition.type === fulfillment.getData().condition_fulfillment.type &&\n+      Condition.testFulfillment(transfer.cancellation_condition, fulfillment.getData().condition_fulfillment))\n \n     if (isValidCancellation === isValidExecution) {\n       throw new UnmetConditionError('ConditionFulfillment failed')\n     }\n \n-    const canExecute = transfer.state === 'prepared'\n-    const canCancel = transfer.state === 'proposed' || transfer.state === 'prepared'\n+    const canExecute = transfer.state === 'prepared' || transfer.state === 'executed'","path":"src/models/transfers.js","position":34,"original_position":34,"commit_id":"b9c497441ab0beb6e7b2d549dfb31079cef896aa","original_commit_id":"b9c497441ab0beb6e7b2d549dfb31079cef896aa","user":{"login":"MatthewPhinney","id":4961057,"avatar_url":"https://avatars.githubusercontent.com/u/4961057?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewPhinney","html_url":"https://github.com/MatthewPhinney","followers_url":"https://api.github.com/users/MatthewPhinney/followers","following_url":"https://api.github.com/users/MatthewPhinney/following{/other_user}","gists_url":"https://api.github.com/users/MatthewPhinney/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewPhinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewPhinney/subscriptions","organizations_url":"https://api.github.com/users/MatthewPhinney/orgs","repos_url":"https://api.github.com/users/MatthewPhinney/repos","events_url":"https://api.github.com/users/MatthewPhinney/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewPhinney/received_events","type":"User","site_admin":false},"body":"@sentientwaffle I thought this case had been tested, but doesn't look like it was. Nice catch, thanks. Do we want to throw an error, or allow the user to put the fulfillment many times? If I am `PUT`ting an object, I would expect to be able to be able to do so many times over without receiving an error.","created_at":"2016-02-05T22:41:25Z","updated_at":"2016-02-05T22:41:25Z","html_url":"https://github.com/interledger/five-bells-ledger/pull/133#discussion_r52082844","pull_request_url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/comments/52082844"},"html":{"href":"https://github.com/interledger/five-bells-ledger/pull/133#discussion_r52082844"},"pull_request":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133","id":58193116,"html_url":"https://github.com/interledger/five-bells-ledger/pull/133","diff_url":"https://github.com/interledger/five-bells-ledger/pull/133.diff","patch_url":"https://github.com/interledger/five-bells-ledger/pull/133.patch","issue_url":"https://api.github.com/repos/interledger/five-bells-ledger/issues/133","number":133,"state":"open","locked":false,"title":"Separate fulfillment logic from transfers (RILP-178)","user":{"login":"MatthewPhinney","id":4961057,"avatar_url":"https://avatars.githubusercontent.com/u/4961057?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewPhinney","html_url":"https://github.com/MatthewPhinney","followers_url":"https://api.github.com/users/MatthewPhinney/followers","following_url":"https://api.github.com/users/MatthewPhinney/following{/other_user}","gists_url":"https://api.github.com/users/MatthewPhinney/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewPhinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewPhinney/subscriptions","organizations_url":"https://api.github.com/users/MatthewPhinney/orgs","repos_url":"https://api.github.com/users/MatthewPhinney/repos","events_url":"https://api.github.com/users/MatthewPhinney/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewPhinney/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-03T20:09:28Z","updated_at":"2016-02-05T22:41:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc74036546e4dcf2b50cf5fad246b92e23517a9c","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133/commits","review_comments_url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133/comments","review_comment_url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interledger/five-bells-ledger/issues/133/comments","statuses_url":"https://api.github.com/repos/interledger/five-bells-ledger/statuses/b9c497441ab0beb6e7b2d549dfb31079cef896aa","head":{"label":"MatthewPhinney:pr/160203120325","ref":"pr/160203120325","sha":"b9c497441ab0beb6e7b2d549dfb31079cef896aa","user":{"login":"MatthewPhinney","id":4961057,"avatar_url":"https://avatars.githubusercontent.com/u/4961057?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewPhinney","html_url":"https://github.com/MatthewPhinney","followers_url":"https://api.github.com/users/MatthewPhinney/followers","following_url":"https://api.github.com/users/MatthewPhinney/following{/other_user}","gists_url":"https://api.github.com/users/MatthewPhinney/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewPhinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewPhinney/subscriptions","organizations_url":"https://api.github.com/users/MatthewPhinney/orgs","repos_url":"https://api.github.com/users/MatthewPhinney/repos","events_url":"https://api.github.com/users/MatthewPhinney/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewPhinney/received_events","type":"User","site_admin":false},"repo":{"id":46824690,"name":"five-bells-ledger","full_name":"MatthewPhinney/five-bells-ledger","owner":{"login":"MatthewPhinney","id":4961057,"avatar_url":"https://avatars.githubusercontent.com/u/4961057?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewPhinney","html_url":"https://github.com/MatthewPhinney","followers_url":"https://api.github.com/users/MatthewPhinney/followers","following_url":"https://api.github.com/users/MatthewPhinney/following{/other_user}","gists_url":"https://api.github.com/users/MatthewPhinney/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewPhinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewPhinney/subscriptions","organizations_url":"https://api.github.com/users/MatthewPhinney/orgs","repos_url":"https://api.github.com/users/MatthewPhinney/repos","events_url":"https://api.github.com/users/MatthewPhinney/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewPhinney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthewPhinney/five-bells-ledger","description":"An implementation of the Five Bells ledger interface.","fork":true,"url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger","forks_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/forks","keys_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/teams","hooks_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/hooks","issue_events_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/issues/events{/number}","events_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/events","assignees_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/assignees{/user}","branches_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/branches{/branch}","tags_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/tags","blobs_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/languages","stargazers_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/stargazers","contributors_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/contributors","subscribers_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/subscribers","subscription_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/subscription","commits_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/contents/{+path}","compare_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/merges","archive_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/downloads","issues_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/issues{/number}","pulls_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/labels{/name}","releases_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/releases{/id}","deployments_url":"https://api.github.com/repos/MatthewPhinney/five-bells-ledger/deployments","created_at":"2015-11-24T23:17:15Z","updated_at":"2016-01-13T00:28:16Z","pushed_at":"2016-02-05T22:10:58Z","git_url":"git://github.com/MatthewPhinney/five-bells-ledger.git","ssh_url":"git@github.com:MatthewPhinney/five-bells-ledger.git","clone_url":"https://github.com/MatthewPhinney/five-bells-ledger.git","svn_url":"https://github.com/MatthewPhinney/five-bells-ledger","homepage":null,"size":688,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"interledger:master","ref":"master","sha":"9d5c777f517e95576f187e6fc41a856d43dca028","user":{"login":"interledger","id":14062960,"avatar_url":"https://avatars.githubusercontent.com/u/14062960?v=3","gravatar_id":"","url":"https://api.github.com/users/interledger","html_url":"https://github.com/interledger","followers_url":"https://api.github.com/users/interledger/followers","following_url":"https://api.github.com/users/interledger/following{/other_user}","gists_url":"https://api.github.com/users/interledger/gists{/gist_id}","starred_url":"https://api.github.com/users/interledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledger/subscriptions","organizations_url":"https://api.github.com/users/interledger/orgs","repos_url":"https://api.github.com/users/interledger/repos","events_url":"https://api.github.com/users/interledger/events{/privacy}","received_events_url":"https://api.github.com/users/interledger/received_events","type":"Organization","site_admin":false},"repo":{"id":30608771,"name":"five-bells-ledger","full_name":"interledger/five-bells-ledger","owner":{"login":"interledger","id":14062960,"avatar_url":"https://avatars.githubusercontent.com/u/14062960?v=3","gravatar_id":"","url":"https://api.github.com/users/interledger","html_url":"https://github.com/interledger","followers_url":"https://api.github.com/users/interledger/followers","following_url":"https://api.github.com/users/interledger/following{/other_user}","gists_url":"https://api.github.com/users/interledger/gists{/gist_id}","starred_url":"https://api.github.com/users/interledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interledger/subscriptions","organizations_url":"https://api.github.com/users/interledger/orgs","repos_url":"https://api.github.com/users/interledger/repos","events_url":"https://api.github.com/users/interledger/events{/privacy}","received_events_url":"https://api.github.com/users/interledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interledger/five-bells-ledger","description":"An implementation of the Five Bells ledger interface.","fork":false,"url":"https://api.github.com/repos/interledger/five-bells-ledger","forks_url":"https://api.github.com/repos/interledger/five-bells-ledger/forks","keys_url":"https://api.github.com/repos/interledger/five-bells-ledger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interledger/five-bells-ledger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interledger/five-bells-ledger/teams","hooks_url":"https://api.github.com/repos/interledger/five-bells-ledger/hooks","issue_events_url":"https://api.github.com/repos/interledger/five-bells-ledger/issues/events{/number}","events_url":"https://api.github.com/repos/interledger/five-bells-ledger/events","assignees_url":"https://api.github.com/repos/interledger/five-bells-ledger/assignees{/user}","branches_url":"https://api.github.com/repos/interledger/five-bells-ledger/branches{/branch}","tags_url":"https://api.github.com/repos/interledger/five-bells-ledger/tags","blobs_url":"https://api.github.com/repos/interledger/five-bells-ledger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interledger/five-bells-ledger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interledger/five-bells-ledger/git/refs{/sha}","trees_url":"https://api.github.com/repos/interledger/five-bells-ledger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interledger/five-bells-ledger/statuses/{sha}","languages_url":"https://api.github.com/repos/interledger/five-bells-ledger/languages","stargazers_url":"https://api.github.com/repos/interledger/five-bells-ledger/stargazers","contributors_url":"https://api.github.com/repos/interledger/five-bells-ledger/contributors","subscribers_url":"https://api.github.com/repos/interledger/five-bells-ledger/subscribers","subscription_url":"https://api.github.com/repos/interledger/five-bells-ledger/subscription","commits_url":"https://api.github.com/repos/interledger/five-bells-ledger/commits{/sha}","git_commits_url":"https://api.github.com/repos/interledger/five-bells-ledger/git/commits{/sha}","comments_url":"https://api.github.com/repos/interledger/five-bells-ledger/comments{/number}","issue_comment_url":"https://api.github.com/repos/interledger/five-bells-ledger/issues/comments{/number}","contents_url":"https://api.github.com/repos/interledger/five-bells-ledger/contents/{+path}","compare_url":"https://api.github.com/repos/interledger/five-bells-ledger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interledger/five-bells-ledger/merges","archive_url":"https://api.github.com/repos/interledger/five-bells-ledger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interledger/five-bells-ledger/downloads","issues_url":"https://api.github.com/repos/interledger/five-bells-ledger/issues{/number}","pulls_url":"https://api.github.com/repos/interledger/five-bells-ledger/pulls{/number}","milestones_url":"https://api.github.com/repos/interledger/five-bells-ledger/milestones{/number}","notifications_url":"https://api.github.com/repos/interledger/five-bells-ledger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interledger/five-bells-ledger/labels{/name}","releases_url":"https://api.github.com/repos/interledger/five-bells-ledger/releases{/id}","deployments_url":"https://api.github.com/repos/interledger/five-bells-ledger/deployments","created_at":"2015-02-10T18:59:20Z","updated_at":"2016-01-25T22:20:18Z","pushed_at":"2016-02-05T21:27:38Z","git_url":"git://github.com/interledger/five-bells-ledger.git","ssh_url":"git@github.com:interledger/five-bells-ledger.git","clone_url":"https://github.com/interledger/five-bells-ledger.git","svn_url":"https://github.com/interledger/five-bells-ledger","homepage":null,"size":737,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":15,"forks":6,"open_issues":15,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133"},"html":{"href":"https://github.com/interledger/five-bells-ledger/pull/133"},"issue":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/issues/133"},"comments":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/interledger/five-bells-ledger/statuses/b9c497441ab0beb6e7b2d549dfb31079cef896aa"}}}}