mirror of
https://github.com/oceanprotocol/react.git
synced 2025-01-03 18:35:18 +01:00
up
This commit is contained in:
parent
6c2353fb17
commit
54e922814d
@ -9,14 +9,20 @@ import { MetadataExample } from './MetadataExample'
|
|||||||
export function AllDdos() {
|
export function AllDdos() {
|
||||||
const { chainId, account, accountId, ocean } = useOcean()
|
const { chainId, account, accountId, ocean } = useOcean()
|
||||||
|
|
||||||
const [ddos, setDdos] = useState<DDO[] | undefined>()
|
const [ddos, setDdos] = useState<DDO[]>()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function init() {
|
async function init() {
|
||||||
if (!ocean || !account || !accountId) return
|
if (!ocean || !accountId || !accountId) return
|
||||||
|
|
||||||
const assets = await ocean.assets.ownerAssets(accountId)
|
const assets = await ocean.assets.ownerAssets(accountId)
|
||||||
|
// const assets = await ocean.assets.query({
|
||||||
|
// page: 1,
|
||||||
|
// offset: 10,
|
||||||
|
// query: {},
|
||||||
|
// sort: { created: -1 }
|
||||||
|
// })
|
||||||
|
console.log('assets', assets.results)
|
||||||
setDdos(assets.results.slice(0, 4))
|
setDdos(assets.results.slice(0, 4))
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@ -1521,12 +1521,12 @@
|
|||||||
"integrity": "sha512-bt5uwh79D759H6O4bAv+ycGdZQISFAxi65cqIygzA9hwsu29+GuOLwu1mxrzl2lVNLs6Emxo7TaDv0jAoyqnCg=="
|
"integrity": "sha512-bt5uwh79D759H6O4bAv+ycGdZQISFAxi65cqIygzA9hwsu29+GuOLwu1mxrzl2lVNLs6Emxo7TaDv0jAoyqnCg=="
|
||||||
},
|
},
|
||||||
"@oceanprotocol/lib": {
|
"@oceanprotocol/lib": {
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@oceanprotocol/lib/-/lib-0.5.1.tgz",
|
||||||
"integrity": "sha512-zyhJ+I6l1095uWlYhm48tSC0+SjheZADH+dwDehlrjAl6ipzW4dLgPemSqwueEmNWuGj0hioy+DyqFn0HN8Jfg==",
|
"integrity": "sha512-OaQTpIqi0KXfptVhrHf1adchE99olSayDjiUrP2/LXuBaAxuOlA3MbCIQ7ecsNLlY9He06h9dtypSx/x2FcdGQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ethereum-navigator/navigator": "^0.5.0",
|
"@ethereum-navigator/navigator": "^0.5.0",
|
||||||
"@oceanprotocol/contracts": "^0.5.0",
|
"@oceanprotocol/contracts": "^0.5.1",
|
||||||
"decimal.js": "^10.2.0",
|
"decimal.js": "^10.2.0",
|
||||||
"fs": "0.0.1-security",
|
"fs": "0.0.1-security",
|
||||||
"lzma": "^2.3.2",
|
"lzma": "^2.3.2",
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
"dist/"
|
"dist/"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@oceanprotocol/lib": "^0.5.0",
|
"@oceanprotocol/lib": "^0.5.1",
|
||||||
"axios": "^0.20.0",
|
"axios": "^0.20.0",
|
||||||
"decimal.js": "^10.2.1",
|
"decimal.js": "^10.2.1",
|
||||||
"web3": "^1.3.0",
|
"web3": "^1.3.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user