xchainjs-lib icon indicating copy to clipboard operation
xchainjs-lib copied to clipboard

ADD: use crypto-js instead of node's crypto to support mobile development such as react-native

Open severinwullschleger opened this issue 3 years ago • 2 comments

xchain-crypto and some other packages are using the crypto package from node. To make xchainjs also usable for react native I suggest using crypto-js instead of crypto.

severinwullschleger avatar May 28 '21 08:05 severinwullschleger

@severinwullschleger any chance you can point to a public repo that demonstrates the error? we just refactored a few things to better support running in nodejs, would like to include react-natove but want to better understand the issue

mikewyszinski avatar Jun 19 '21 20:06 mikewyszinski

Hi @mikewyszinski

For react-native it is suboptimal when node packages like "crypto" are used. If xchainjs should be cross platform one should focus on not using the sub-packages of node. instead we should use packages like crypto-js which do not require node. I realized that it is a relativally big task to do so. Therefore not sure if it makes sense to do that now.

@JonnyBurger do you have something to add here?

we were now able to use xchainjs on react native with a few patches and resolver adjustments. See here https://github.com/THORWallet/thorwallet-react-native/blob/master/metro.config.js

severinwullschleger avatar Jun 24 '21 11:06 severinwullschleger

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Sep 29 '23 02:09 github-actions[bot]