New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zerochain/0chain

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zerochain/0chain - npm Package Compare versions

Comparing version 1.3.55 to 1.3.56

.prettierignore

14

index.js

@@ -683,2 +683,16 @@ /*

},
getAllBlobbersDetails: async function getAllBlobbersDetails() {
const currentBlobbers = await this.getAllBlobbers();
const detailedBlobbers = currentBlobbers.map((blobber)=>{
const blobberUrl = new URL(blobber.url)
blobber.convertedUrl = blobberUrl.protocol+'//'+blobberUrl.hostname +'/blobber'+ blobberUrl.port.slice(-2)+'/_statsJSON'
return blobber;
})
const detailedBlobbersCallingEachApi = await Promise.all(detailedBlobbers.map(async (dBl)=>{
const blobData = await fetch(dBl.convertedUrl)
const blobJson = await blobData.json()
return {...blobJson,...dBl};
}))
return detailedBlobbersCallingEachApi ;
},

@@ -685,0 +699,0 @@ getAllocationSharedFilesFromPath: async function (allocation_id, lookup_hash, client_id, auth_token = "") {

2

package.json
{
"name": "@zerochain/0chain",
"version": "1.3.55",
"version": "1.3.56",
"description": "js client library to interact with 0chain Blockchain",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -334,3 +334,5 @@ /*

// Added patch for converting http to https
if (window.location.protocol === 'https:' && consensusResponse.data && consensusResponse.data.blobbers && Array.isArray(consensusResponse.data.blobbers)) {
const isHttpsOrLocal = window.location.protocol === "https" || window.location.hostname === "localhost"
if (isHttpsOrLocal && consensusResponse.data && consensusResponse.data.blobbers && Array.isArray(consensusResponse.data.blobbers)) {
consensusResponse.data.blobbers.forEach((blobber) => {

@@ -341,3 +343,3 @@ let currentURL = new URL(blobber.url);

});
} else if (window.location.protocol === 'https:' && consensusResponse && consensusResponse.Nodes) {
} else if (isHttpsOrLocal && consensusResponse && consensusResponse.Nodes) {
consensusResponse.Nodes.forEach((blobber) => {

@@ -344,0 +346,0 @@ let currentURL = new URL(blobber.url);

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