Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaisc committed Oct 1, 2020
1 parent 6c2353f commit 54e9228
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 9 additions & 3 deletions example/src/AllDdos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,20 @@ import { MetadataExample } from './MetadataExample'
export function AllDdos() {
const { chainId, account, accountId, ocean } = useOcean()

const [ddos, setDdos] = useState<DDO[] | undefined>()
const [ddos, setDdos] = useState<DDO[]>()

useEffect(() => {
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.query({
// page: 1,
// offset: 10,
// query: {},
// sort: { created: -1 }
// })
console.log('assets', assets.results)
setDdos(assets.results.slice(0, 4))
}
init()
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@oceanprotocol/lib": "^0.5.0",
"@oceanprotocol/lib": "^0.5.1",
"axios": "^0.20.0",
"decimal.js": "^10.2.1",
"web3": "^1.3.0",
Expand Down

0 comments on commit 54e9228

Please sign in to comment.