Skip to content

Commit

Permalink
Remove calculateCID.
Browse files Browse the repository at this point in the history
See #83
  • Loading branch information
jasny committed Jun 19, 2023
1 parent 0b2abc6 commit 502db9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 293 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@types/jest": "^29.5.1",
"@types/styled-components-react-native": "^5.1.3",
"axios": "^1.4.0",
"blockstore-core": "^4.2.0",
"boolean": "^3.2.0",
"browserify": "^17.0.0",
"browserify-global": "^1.1.2",
Expand All @@ -51,7 +50,6 @@
"expo-system-ui": "~1.2.0",
"expo-web-browser": "~10.2.1",
"https-browserify": "^0.0.1",
"ipfs-unixfs-importer": "^15.1.5",
"path-browserify": "^0.0.0",
"punycode": "^1.4.1",
"react": "17.0.2",
Expand All @@ -63,7 +61,7 @@
"react-native-document-picker": "^8.1.2",
"react-native-dotenv": "^3.3.1",
"react-native-fs": "^2.20.0",
"react-native-get-random-values": "^1.8.0",
"react-native-get-random-values": "^1.9.0",
"react-native-level-fs": "^3.0.1",
"react-native-pager-view": "^5.4.25",
"react-native-paper": "^4.12.1",
Expand Down
3 changes: 1 addition & 2 deletions src/services/Ownables/Ownable.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { unzip } from 'react-native-zip-archive'
import RNFS from 'react-native-fs'
import {DocumentPickerResponse} from "react-native-document-picker"
import {Binary, EventChain} from "@ltonetwork/lto"
import calculateCid from "../../utils/calculateCid"
import PackageService from "../Ownables/Package.service"
import EventChainService from "../Ownables/EventChain.service"
import {TypedPackage} from "../../interfaces/TypedPackage"
Expand Down Expand Up @@ -47,7 +46,7 @@ export default class OwnableService {
const chain = await this.extractChain(path)

const files = await this.listFiles(path)
const cid = await calculateCid(files);
const cid: string = Math.random().toString(36).slice(2, 7); // TODO: generate CID

await PackageService.store(cid, `${TEMP_PATH}/${id}`)
await EventChainService.init(chain, cid);
Expand Down
24 changes: 0 additions & 24 deletions src/utils/calculateCid.ts

This file was deleted.

Loading

0 comments on commit 502db9f

Please sign in to comment.