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"
|
import Parameter from "./Parameter"
|
||||||
|
|
||||||
export default class Condition {
|
export default class Condition {
|
||||||
public name: string = "lockPayment"
|
public contractName: string = "AccessCondition"
|
||||||
|
public methodName: string = "lockPayment"
|
||||||
public timeout: number = 0
|
public timeout: number = 0
|
||||||
public conditionKey: string
|
public conditionKey: string
|
||||||
public parameters: Parameter[]
|
public parameters: Parameter[]
|
||||||
|
@ -72,17 +72,15 @@ export default class Ocean {
|
|||||||
// create ddo conditions out of the keys
|
// create ddo conditions out of the keys
|
||||||
const ddoConditions: DDOCondition[] = conditions.map((condition: Condition): DDOCondition => {
|
const ddoConditions: DDOCondition[] = conditions.map((condition: Condition): DDOCondition => {
|
||||||
return {
|
return {
|
||||||
name: condition.methodReflection.methodName,
|
contractName: condition.methodReflection.contractName,
|
||||||
|
methodName: condition.methodReflection.methodName,
|
||||||
timeout: condition.timeout,
|
timeout: condition.timeout,
|
||||||
conditionKey: condition.condtionKey,
|
conditionKey: condition.condtionKey,
|
||||||
parameters: condition.methodReflection.inputs.map((input: ValuePair) => {
|
parameters: condition.methodReflection.inputs.map((input: ValuePair) => {
|
||||||
return {
|
return {
|
||||||
...input,
|
...input,
|
||||||
// todo: change remove, move to execute
|
|
||||||
value: "xxx",
|
|
||||||
} as Parameter
|
} as Parameter
|
||||||
}),
|
}),
|
||||||
|
|
||||||
} as DDOCondition
|
} as DDOCondition
|
||||||
})
|
})
|
||||||
const serviceEndpoint = aquarius.getServiceEndpoint(did)
|
const serviceEndpoint = aquarius.getServiceEndpoint(did)
|
||||||
|
Loading…
Reference in New Issue
Block a user