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:
parent
b3ede0a09e
commit
58cd2810ed
@ -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[]
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user