Open Kamahl19 opened 6 years ago
When I change Script function and require address there, it resolves properly
Original code:
var Address = require('../address');
My code:
var Address;
var Script = function Script(from) {
Address = require('../address');
// Rest of the code..
};
This is definitely not a solution, there is a circular issue somewhere but its quite difficult for me as an outsider to find it.
@Kamahl19 Man you're awesome!
Hi,
I am using bitcore-wallet-client on react native, polyfilling all nodejs dependencies with
node-libs-browser
. Creating a wallet and generating an address works fine, however I am unable to publish a transaction proposal.This is an error I am getting.
On this line https://github.com/bitpay/bitcore-lib/blob/master/lib/script/script.js#L35
else if (from instanceof Address)
Address is just an empty object so instanceof fails. It seems to me like a circular dependency, or am I wrong?It would be awesome if bitcore could run on RN. Bitcoinjs-lib already works there but I would like to stick with bitcore. Thanks!