Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/agent

Package Overview
Dependencies
Maintainers
12
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/agent - npm Package Compare versions

Comparing version 0.19.1 to 0.19.2

9

lib/cjs/agent/http/index.js

@@ -159,5 +159,10 @@ "use strict";

const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
if (location && knownHosts.includes(location.hostname)) {
const hostname = location === null || location === void 0 ? void 0 : location.hostname;
let knownHost;
if (hostname && typeof hostname === 'string') {
knownHost = knownHosts.find(host => hostname.endsWith(host));
}
if (location && knownHost) {
// If the user is on a boundary-node provided host, we can use the same host for the agent
this._host = new URL(location + '');
this._host = new URL(`${location.protocol}//${knownHost}${location.port ? ':' + location.port : ''}`);
}

@@ -164,0 +169,0 @@ else {

@@ -128,5 +128,10 @@ import { Principal } from '@dfinity/principal';

const knownHosts = ['ic0.app', 'icp0.io', 'localhost', '127.0.0.1'];
if (location && knownHosts.includes(location.hostname)) {
const hostname = location === null || location === void 0 ? void 0 : location.hostname;
let knownHost;
if (hostname && typeof hostname === 'string') {
knownHost = knownHosts.find(host => hostname.endsWith(host));
}
if (location && knownHost) {
// If the user is on a boundary-node provided host, we can use the same host for the agent
this._host = new URL(location + '');
this._host = new URL(`${location.protocol}//${knownHost}${location.port ? ':' + location.port : ''}`);
}

@@ -133,0 +138,0 @@ else {

{
"name": "@dfinity/agent",
"version": "0.19.1",
"version": "0.19.2",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -53,4 +53,4 @@ "license": "Apache-2.0",

"peerDependencies": {
"@dfinity/candid": "^0.19.1",
"@dfinity/principal": "^0.19.1"
"@dfinity/candid": "^0.19.2",
"@dfinity/principal": "^0.19.2"
},

@@ -57,0 +57,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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