Skip to content

Commit da95a19

Browse files
committed
hack - add btoa
1 parent 083d3cc commit da95a19

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
},
3333
"homepage": "https://github.com/iden3/ffjs#readme",
3434
"dependencies": {
35+
"abab": "^2.0.5",
3536
"big-integer": "^1.6.48",
3637
"wasmbuilder": "^0.0.12",
3738
"wasmcurves": "0.1.0",

src/threadman.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const MEM_SIZE = 25; // Memory size in 64K Pakes (1600Kb)
2424

2525
import thread from "./threadman_thread.js";
2626
import os from "os";
27+
import abab from "abab";
2728

2829
/*#if _SES
2930
//#else */
@@ -45,7 +46,7 @@ function sleep(ms) {
4546

4647
function stringToBase64(str) {
4748
if (process.browser) {
48-
return globalThis.btoa(str);
49+
return abab.btoa(str);
4950
} else {
5051
return Buffer.from(str).toString("base64");
5152
}

0 commit comments

Comments
 (0)