1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

adapt changes to ddo condition structure

This commit is contained in:
Sebastian Gerske 2018-11-16 15:15:45 +01:00
parent b3ede0a09e
commit 58cd2810ed
2 changed files with 4 additions and 5 deletions

View File

@ -1,7 +1,8 @@
import Parameter from "./Parameter"
export default class Condition {
public name: string = "lockPayment"
public contractName: string = "AccessCondition"
public methodName: string = "lockPayment"
public timeout: number = 0
public conditionKey: string
public parameters: Parameter[]

View File

@ -72,17 +72,15 @@ export default class Ocean {
// create ddo conditions out of the keys
const ddoConditions: DDOCondition[] = conditions.map((condition: Condition): DDOCondition => {
return {
name: condition.methodReflection.methodName,
contractName: condition.methodReflection.contractName,
methodName: condition.methodReflection.methodName,
timeout: condition.timeout,
conditionKey: condition.condtionKey,
parameters: condition.methodReflection.inputs.map((input: ValuePair) => {
return {
...input,
// todo: change remove, move to execute
value: "xxx",
} as Parameter
}),
} as DDOCondition
})
const serviceEndpoint = aquarius.getServiceEndpoint(did)