MetaMask / eth-simple-keyring

A simple standard interface for a series of Ethereum private keys
ISC License
123 stars 48 forks source link

problem using in react native, regarding dependencies #100

Closed ahmeddrawy closed 2 years ago

ahmeddrawy commented 2 years ago

I have a problem using this package in react native env, with this error message

Unable to resolve module crypto

  71 | Object.defineProperty(exports, "__esModule", { value: true });
  72 | exports.thirdparty = exports.hdkey = void 0;
> 73 | var crypto = __importStar(require("crypto"));
     |                                    ^
  74 | var ethereumjs_util_1 = require("ethereumjs-util");
  75 | var scrypt_js_1 = require("scrypt-js");
  76 | var hdkey_1 = require("./hdkey");
Gudahtt commented 2 years ago

Thanks for the report! You will need a polyfill for the Node.js crypto API

ahmeddrawy commented 2 years ago

@Gudahtt thanks, I figured this out

mahbubmunna commented 2 years ago

@Gudahtt thanks, I figured this out

What did you find, I am facing the same issue