Skip to content

Commit

Permalink
feat: remove unnecessary direct dependency (#92)
Browse files Browse the repository at this point in the history
Remove `iso-random-stream` direct dependency, use `randomBytes` API from
`@libp2p/crypto` instead.

`iso-random-stream` brings in `buffer` dependency which then needs to be
polyfilled when targeting the browser.
  • Loading branch information
fryorcraken authored Aug 3, 2022
1 parent 7a68b4b commit 6d51017
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
"@multiformats/multiaddr": "^10.2.0",
"abortable-iterator": "^4.0.2",
"err-code": "^3.0.1",
"iso-random-stream": "^2.0.0",
"it-length-prefixed": "^8.0.2",
"it-pipe": "^2.0.3",
"it-pushable": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { randomBytes } from 'iso-random-stream'
import { randomBytes } from '@libp2p/crypto'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import { sha256 } from 'multiformats/hashes/sha2'
Expand Down

0 comments on commit 6d51017

Please sign in to comment.