-
Notifications
You must be signed in to change notification settings - Fork 686
Open
Description
- AcceptOffer does not satisfy its specifications.
Lines 65 to 73 in 1b712d6
function AcceptOffer() public { if ( msg.sender != InstanceOwner ) { revert(); } State = StateType.Accepted; }
As documented by its following specification, AcceptOffer is only available when at OfferPlaced state.
Lines 139 to 163 in 1b712d6
| { | |
| "Name": "OfferPlaced", | |
| "DisplayName": "Offer Placed", | |
| "Description": "Offer has been placed for the item", | |
| "PercentComplete": 60, | |
| "Style": "Success", | |
| "Transitions": [ | |
| { | |
| "AllowedRoles": [ ], | |
| "AllowedInstanceRoles": [ "InstanceOwner" ], | |
| "Description": "Accept the proposed offer for the item", | |
| "Function": "AcceptOffer", | |
| "NextStates": [ "Accepted" ], | |
| "DisplayName": "Accept Offer" | |
| }, | |
| { | |
| "AllowedRoles": [ ], | |
| "AllowedInstanceRoles": [ "InstanceOwner" ], | |
| "Description": "Reject the proposed offer for the item", | |
| "Function": "Reject", | |
| "NextStates": [ "ItemAvailable" ], | |
| "DisplayName": "Reject" | |
| } | |
| ] | |
| }, |
- Bug repair.
We can fix such bug by adding statements:
function AcceptOffer() public
{
// Fix
if ( State != StateType.OfferPlaced ){
revert();
}
...Metadata
Metadata
Assignees
Labels
No labels