diff --git a/README.md b/README.md
index b1d8baf..239f18c 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
react
-> 🎣 React hooks & components on top of @oceanprotocol/lib
+> 🎣 React hooks & components on top of ocean.js
[![npm](https://img.shields.io/npm/v/@oceanprotocol/react.svg)](https://www.npmjs.com/package/@oceanprotocol/react)
[![Build Status](https://travis-ci.com/oceanprotocol/react.svg?token=3psqw6c8KMDqfdGQ2x6d&branch=main)](https://travis-ci.com/oceanprotocol/react)
@@ -56,7 +56,12 @@ Then within your component use the included hooks to interact with Ocean's funct
```tsx
import React from 'react'
-import { useOcean, useMetadata, useConsume, usePublish } from '@oceanprotocol/react'
+import {
+ useOcean,
+ useMetadata,
+ useConsume,
+ usePublish
+} from '@oceanprotocol/react'
const did = 'did:op:0x000000000'
diff --git a/package-lock.json b/package-lock.json
index 05d8b93..bf3fc69 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1516,17 +1516,17 @@
}
},
"@oceanprotocol/contracts": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.3.tgz",
- "integrity": "sha512-gJ8qQACJgxOPIrPE0OFQ09iYXBAisOGg56EmelQlsMUgp0yY0DKgBntDP83S/Ho1yBjGygqfxCjQrPH63hh/PA=="
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/contracts/-/contracts-0.5.5.tgz",
+ "integrity": "sha512-Omwlh3KxPm2JOuLd6DW4teAQhGaIv0fRTopCvctey0XGsf3DcbJpwS0A0YfgLQnvCyyVMKsiq90YCqpJ3SO/cw=="
},
"@oceanprotocol/lib": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.5.6.tgz",
- "integrity": "sha512-S8OU/FYjDJCKkx098GDT9LfxmTTe/gA8zv5fVMy7lRG1k5WFDsHHMplqZkU9mUGXg1aDDtt7KbctwxNdt7ZGFg==",
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.6.0.tgz",
+ "integrity": "sha512-5Kv6oVV7nneeVoT79fAQh93Ksb4Zg0TjjbVutMIYDt9kB8/Iwc/5NYU88unaz4XHX5zBl5rqnwfWoZMRDaI7hA==",
"requires": {
"@ethereum-navigator/navigator": "^0.5.0",
- "@oceanprotocol/contracts": "^0.5.3",
+ "@oceanprotocol/contracts": "^0.5.5",
"decimal.js": "^10.2.0",
"fs": "0.0.1-security",
"lzma": "^2.3.2",
@@ -10378,9 +10378,9 @@
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"uuid": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
- "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
+ "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg=="
},
"v8-compile-cache": {
"version": "2.1.1",
diff --git a/package.json b/package.json
index 991937b..b4521ed 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
- "@oceanprotocol/lib": "^0.5.6",
+ "@oceanprotocol/lib": "^0.6.0",
"axios": "^0.20.0",
"decimal.js": "^10.2.1",
"web3": "^1.3.0",
diff --git a/src/hooks/useMetadata/useMetadata.ts b/src/hooks/useMetadata/useMetadata.ts
index cab4369..f6eaa36 100644
--- a/src/hooks/useMetadata/useMetadata.ts
+++ b/src/hooks/useMetadata/useMetadata.ts
@@ -5,7 +5,7 @@ import {
Metadata,
Logger,
BestPrice,
- MetadataStore
+ MetadataCache
} from '@oceanprotocol/lib'
import { useOcean } from 'providers'
import { getBestDataTokenPrice } from 'utils/dtUtils'
@@ -33,13 +33,13 @@ function useMetadata(asset?: DID | string | DDO): UseMetadata {
const getDDO = useCallback(
async (did: DID | string): Promise => {
- if (!config.metadataStoreUri) return
+ if (!config.metadataCacheUri) return
- const metadataStore = new MetadataStore(config.metadataStoreUri, Logger)
- const ddo = await metadataStore.retrieveDDO(did)
+ const metadataCache = new MetadataCache(config.metadataCacheUri, Logger)
+ const ddo = await metadataCache.retrieveDDO(did)
return ddo
},
- [config.metadataStoreUri]
+ [config.metadataCacheUri]
)
const getPrice = useCallback(
diff --git a/src/providers/OceanProvider/README.md b/src/providers/OceanProvider/README.md
index 9d1fd8c..dc09dd1 100644
--- a/src/providers/OceanProvider/README.md
+++ b/src/providers/OceanProvider/README.md
@@ -30,7 +30,7 @@ const oceanDefaultConfig = new ConfigHelper().getConfig(
const config = {
...oceanDefaultConfig,
- metadataStoreUri: 'https://your-metadata-store.com',
+ metadataCacheUri: 'https://your-metadata-cache.com',
providerUri: 'https://your-provider.com'
}