update specs

This commit is contained in:
Matthias Kretschmann 2020-04-25 15:38:21 +02:00
parent 74b39256d6
commit 70d394d470
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 5 additions and 6 deletions

View File

@ -53,18 +53,18 @@ Then within your component use the provided hooks to interact with Ocean's funct
```tsx
import React from 'react'
import { useOcean, OceanConfig, useConsume } from '@oceanprotocol/react'
import { useOcean, useConsume } from '@oceanprotocol/react'
export default function MyComponent() {
// Initialize, get existing, or reinitialize Ocean
const { ocean, account } = useOcean(oceanConfig)
const { ocean, account } = useOcean()
// consume asset
const { consumeAsset, isLoading, step } = useConsume(ocean)
const { consume, isLoading, step } = useConsume()
async function handleClick() {
const ddo = 'did:op:0x000000000'
await consumeAsset(ddo, account)
await consume(ddo)
}
return (

View File

@ -3,8 +3,7 @@ import React, {
useContext,
useState,
useEffect,
createContext,
FunctionComponent
createContext
} from 'react'
import { Ocean, Config } from '@oceanprotocol/squid'
import Balance from '@oceanprotocol/squid/dist/node/models/Balance'