1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

Updating assets and asset credentials

This commit is contained in:
Jamie Hewitt 2021-08-03 14:12:50 +02:00
parent 1b58fdfb9d
commit cf16ff8966
2 changed files with 5 additions and 5 deletions

View File

@ -340,7 +340,7 @@ export class Assets extends Instantiable {
const allowList = ddo.credentials.allow.find(
(credentail) => credentail.type === credentialType
)
if (allowList && !allowList.value.includes(value)) {
if (allowList && !allowList.values.includes(value)) {
status = 2
message = 'Access is denied, your wallet address is not found on allow list'
result = false
@ -350,7 +350,7 @@ export class Assets extends Instantiable {
const denyList = ddo.credentials.deny.find(
(credentail) => credentail.type === credentialType
)
if (denyList && denyList.value.includes(value)) {
if (denyList && denyList.values.includes(value)) {
status = 3
message = 'Access is denied, your wallet address is found on deny list'
result = false

View File

@ -24,7 +24,7 @@ export function checkCredentialExist(
const allowList = credentials.allow.find(
(credential) => credential.type === credentialType
)
isExist = allowList && allowList.value.length > 0
isExist = allowList && allowList.values.length > 0
}
return isExist
} else {
@ -32,7 +32,7 @@ export function checkCredentialExist(
const dennyList = credentials.deny.find(
(credential) => credential.type === credentialType
)
isExist = dennyList && dennyList.value.length > 0
isExist = dennyList && dennyList.values.length > 0
}
return isExist
}
@ -134,7 +134,7 @@ export function addCredentialDetail(
) {
const newCredentialDetail: Credential = {
type: credentialType,
value: list
values: list
}
if (credentialAction === 'allow') {
if (ddo.credentials && ddo.credentials.allow) {