Skip to content

Commit

Permalink
fix(polyfill): revert crypto polyfill attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
donatandelic committed Mar 4, 2024
1 parent 64b1cdf commit 9a71044
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@useorbis/db-sdk",
"version": "0.0.23-alpha",
"version": "0.0.24-alpha",
"description": "Orbis' Typescript SDK for building open-data experiences.",
"keywords": [
"web3",
Expand Down
4 changes: 1 addition & 3 deletions src/auth/keyDid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export class OrbisKeyDidAuth implements IKeyDidAuth {

static async generateSeed(format: "hex" | "uint8" = "uint8") {
const buffer = new Uint8Array(32);
let _crypto =
typeof crypto === "undefined" ? await import("node:crypto") : crypto;
const seed = (_crypto as any).getRandomValues(buffer);
const seed = crypto.getRandomValues(buffer);

if (format === "uint8") {
return seed;
Expand Down

0 comments on commit 9a71044

Please sign in to comment.