bitcore-lib-cash icon indicating copy to clipboard operation
bitcore-lib-cash copied to clipboard

Issue with bitcore.Address and legacy livenet address

Open kdar opened this issue 7 years ago • 0 comments

I get the error Address has mismatched network type. Here is the sample code:

var bitcore = require('bitcore-lib-cash');

// This will fail. Livenet legacy address:
new bitcore.Address("161p4i14KBcTB8q368q4NeUr61nFJcWUDo");
// This will succeed. Same livenet new address:
new bitcore.Address("bitcoincash:qqm0l6ncpckl6ksrt4gja6rngp2x5kmcavkkwzfpfs");
// This will succeed. A testnet legacy address:
new bitcore.Address("mxQLmrBQsj9trMGg5kTwVbmeGetMA6gzhb");

kdar avatar May 17 '18 17:05 kdar