Socket
Socket
Sign inDemoInstall

bitcore-lib-cash

Package Overview
Dependencies
Maintainers
3
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcore-lib-cash - npm Package Compare versions

Comparing version 8.25.28 to 8.25.30

25

lib/networks.js

@@ -136,10 +136,2 @@ 'use strict';

function unindexNetworkBy(network, values) {
for(var index = 0; index < values.length; index++){
var value = values[index];
if(networkMaps[value] === network) {
delete networkMaps[value];
}
}
}

@@ -153,2 +145,5 @@ /**

function removeNetwork(network) {
if (typeof network !== 'object') {
network = get(network);
}
for (var i = 0; i < networks.length; i++) {

@@ -159,3 +154,15 @@ if (networks[i] === network) {

}
unindexNetworkBy(network, Object.keys(networkMaps));
for (var key in networkMaps) {
if (networkMaps[key].length) {
const index = networkMaps[key].indexOf(network);
if (index >= 0) {
networkMaps[key].splice(index, 1);
}
if (networkMaps[key].length === 0) {
delete networkMaps[key];
}
} else if (networkMaps[key] === network) {
delete networkMaps[key];
}
}
}

@@ -162,0 +169,0 @@

{
"name": "bitcore-lib-cash",
"version": "8.25.28",
"version": "8.25.30",
"description": "A pure and powerful JavaScript Bitcoin Cash library.",

@@ -38,3 +38,3 @@ "author": "BitPay <dev@bitpay.com>",

"dependencies": {
"bitcore-lib": "^8.25.28",
"bitcore-lib": "^8.25.30",
"bn.js": "=4.11.8",

@@ -56,3 +56,3 @@ "bs58": "^4.0.1",

"license": "MIT",
"gitHead": "713d540373cd442327f7fed479c2b69dfd239ab7"
"gitHead": "b1848c67d201a06bb9f306040b2520dc8b35356b"
}

@@ -78,5 +78,12 @@ 'use strict';

somenet.name.should.equal('somenet');
networks.remove(somenet);
});
it('can remove a custom network by name', function() {
var net = networks.get('somenet');
should.exist(net);
networks.remove('somenet');
var net = networks.get('somenet');
should.equal(net, undefined);
});
var constants = ['name', 'alias', 'pubkeyhash', 'scripthash', 'xpubkey', 'xprivkey'];

@@ -83,0 +90,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc