import React, { createContext } from "react"; import type { FC, PropsWithChildren } from "react"; import { createCertificatesDb } from "../../sdk/goodid"; type IGoodIdContext = { db: any; }; export const GoodIdContext = createContext({ db: undefined }); interface IGoodIdContextProviderProps { localDb?: any; //todo: define db interface for wallet } export const GoodIdContextProvider: FC> = ({ children, localDb }) => { const db = localDb ? new localDb() : createCertificatesDb(); return ( {children} ); };