1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-11-23 02:00:27 +01:00
This commit is contained in:
mihaisc 2020-05-11 18:43:02 +03:00
parent 4d932e7a58
commit 78c271f95c
2 changed files with 6 additions and 8 deletions

View File

@ -21,7 +21,7 @@ function useMetadata(did?: DID | string): UseMetadata {
const [title, setTitle] = useState<string | undefined>()
async function getDDO(did: DID | string): Promise<DDO> {
if(status!=OceanConnectionStatus.CONNECTED) return
if (status !== OceanConnectionStatus.CONNECTED) return
const ddo = await aquarius.retrieveDDO(did)
return ddo
@ -41,7 +41,6 @@ function useMetadata(did?: DID | string): UseMetadata {
async function getTitle(did: DID | string): Promise<string> {
const metadata = await getMetadata(did)
console.log(metadata)
return metadata.main.name
}

View File

@ -54,8 +54,7 @@ function OceanProvider({
// 2. Once `web3` becomes available, connect to the whole network
// -------------------------------------------------------------
useEffect(() => {
if (!web3 || ethProviderStatus!= InjectedProviderStatus.CONNECTED ) return
console.log(ethProviderStatus)
if (!web3 || ethProviderStatus !== InjectedProviderStatus.CONNECTED) return
async function init(): Promise<void> {
const { ocean, account, accountId, balance } = await connectOcean(
web3,