Skip to content

Commit

Permalink
differentiate bch regtest and testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed May 29, 2024
1 parent 897feb1 commit db75179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bitcore-lib-cash/lib/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Address._transformString = function(data, network, type) {

if (data.length > 35){
var info = decodeCashAddress(data);
if (!info.network || (networkObj && networkObj.xpubkey !== info.network.xpubkey)) {
if (!info.network || (networkObj && networkObj.prefix !== info.network.prefix)) {
throw new TypeError('Address has mismatched network type.');
}
if (!info.type || (type && type !== info.type)) {
Expand Down

0 comments on commit db75179

Please sign in to comment.