Skip to content

Commit

Permalink
Replace require with import for crypto provider (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb authored May 28, 2024
1 parent 6dbda5a commit 0170fe6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/worker-api/src/webCryptoRSA.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import BN from "bn.js";
import { Crypto } from "@peculiar/webcrypto";

/**
* Provides crypto the browser via the native crypto, and in the node-js environment (like our tests)
Expand All @@ -9,7 +10,6 @@ let cryptoProvider: any;
if (typeof window !== "undefined" && typeof window.crypto !== "undefined") {
cryptoProvider = window.crypto;
} else {
const { Crypto } = require("@peculiar/webcrypto");
cryptoProvider = new Crypto();
}

Expand Down

0 comments on commit 0170fe6

Please sign in to comment.