Skip to content

Commit

Permalink
Remove unneeded Buffer.from call
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed May 21, 2021
1 parent 63bdbcc commit 409f287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipfs/encoded.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const add = async (content: FileContent, key: Maybe<string>): Promise<Add
const normalized = isBlob(content) ? await blob.toBuffer(content) : content
const encoded = cbor.encode(normalized)
const toAdd = isJust(key) ? await crypto.aes.encrypt(encoded, key) : encoded
return basic.add(Buffer.from(toAdd))
return basic.add(toAdd)
}

export const catAndDecode = async (cid: CID, key: Maybe<string>): Promise<unknown> => {
Expand Down

0 comments on commit 409f287

Please sign in to comment.