Skip to content

Commit

Permalink
final commit v2
Browse files Browse the repository at this point in the history
  • Loading branch information
irshit mukherjee committed Sep 18, 2022
1 parent ab5ed70 commit 132577c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/context/ArcanaContextProvider.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import { createContext, useEffect, useState } from "react";
import { AuthProvider } from "@arcana/auth";
import { getWalletInstance } from "./util/storageProvider";

import { StorageProvider } from '@arcana/storage/dist/standalone/storage.umd';
export const ArcanaContext = createContext();

const ArcanaContextProvider = ({ children }) => {
const MakeNftPrivate=async()=>{
const dAppStorageProvider = new StorageProvider({
appId: ARCANA_APP_ID,
provider: window.ethereum,
email: user_email_string,
});

const uploader = await dAppStorageProvider.getUploader();


//save DID
const did = await uploader.upload(file)
//save metadataURL
const metadataURL = await storage.makeMetadataURL(title, description, did, preview)
}
const [loggedIn_Arcana, setLoggedInArcana] = useState(false);
const [provider, setProvider] = useState();
const CheckLoggedInArcana = async () => {
Expand Down

0 comments on commit 132577c

Please sign in to comment.