(ctx contractapi.TransactionContextInterface, address string, signature string, status string)
| 133 | } |
| 134 | |
| 135 | func (s *SmartContract) ChangeStatus(ctx contractapi.TransactionContextInterface, address string, signature string, status string) (*Home, error) { |
| 136 | if !validSignature(address, signature) { |
| 137 | return nil, fmt.Errorf("invalid owner signature") |
| 138 | } |
| 139 | statusValue, err := parseNonNegativeAmount(status) |
| 140 | if err != nil { |
| 141 | return nil, err |
| 142 | } |
| 143 | home, err := readHome(ctx, address) |
| 144 | if err != nil { |
| 145 | return nil, err |
| 146 | } |
| 147 | home.Status = statusValue |
| 148 | if err := putHome(ctx, home); err != nil { |
| 149 | return nil, err |
| 150 | } |
| 151 | return home, nil |
| 152 | } |
| 153 | |
| 154 | func (s *SmartContract) GetHomeByAddress(ctx contractapi.TransactionContextInterface, address string) (*Home, error) { |
| 155 | return readHome(ctx, address) |
nothing calls this directly
no test coverage detected