Search code examples
react-nativepolkadot-js

Cannot create polkadot keyring with react native


I created a new react native project with this command:

npx react-native init AwesomeProject

installed package @polkadot/keyring, and created a default keyring:

const keyring = new Keyring();

After launching the project I get an error:

TypeError: Conversion from 'BigInt' to 'number' is not allowed.

Solution

  • Some libraries are just not ment to work with react native, only with node js or web client. This is one of those cases