mirror of
https://github.com/oceanprotocol/react.git
synced 2024-11-23 02:00:27 +01:00
test fix
This commit is contained in:
parent
4d932e7a58
commit
78c271f95c
@ -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
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user