Skip to content

Commit

Permalink
update restore
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtzman committed Jan 15, 2025
1 parent 9a3c58a commit de27de4
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 405 deletions.
6 changes: 3 additions & 3 deletions main/dapps/verify/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { app } from 'electron'
import { globSource } from 'ipfs-http-client'
import { importer } from 'ipfs-unixfs-importer'

import type { ImporterOptions } from 'ipfs-unixfs-importer'
import type { UserImporterOptions } from 'ipfs-unixfs-importer/types'

const blockstore = {
get: async (cid: string) => {
Expand All @@ -17,7 +17,7 @@ const blockstore = {
}
}

const hash = async (content: any, opts: ImporterOptions = {}) => {
const hash = async (content: any, opts: UserImporterOptions = {}) => {
const options = {
...opts,
onlyHash: true,
Expand All @@ -34,7 +34,7 @@ const hash = async (content: any, opts: ImporterOptions = {}) => {
return lastCID
}

const hashFiles = async (path: string, options: ImporterOptions) => hash(globSource(path, '**'), options)
const hashFiles = async (path: string, options: UserImporterOptions) => hash(globSource(path, '**'), options)
const getCID = async (path: string, isDirectory = true) => hashFiles(path, { wrapWithDirectory: isDirectory })

export function getDappCacheDir() {
Expand Down
Loading

0 comments on commit de27de4

Please sign in to comment.