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

trezor-link

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trezor-link - npm Package Compare versions

Comparing version 0.1.19 to 0.1.20

16

lib/parallel.js

@@ -7,2 +7,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }

@@ -143,2 +145,11 @@

_filter(name, devices) {
return devices.filter(device => this._parseName(name).name === name).map(device => {
return _extends({}, device, {
path: this._parseName(device.path).rest,
session: device.session == null ? device.session : this._parseName(device.session).rest
});
});
}
enumerate() {

@@ -170,3 +181,3 @@ return new Promise(function ($return, $error) {

return new Promise(function ($return, $error) {
var res, devices, name, $iterator_name;
var res, oldFiltered, devices, name, $iterator_name;
res = [];

@@ -180,3 +191,4 @@ $iterator_name = [Object.keys(this.transports)[Symbol.iterator]()];

if (!($iterator_name[1] = $iterator_name[0].next()).done && ((name = $iterator_name[1].value) || true)) {
return this.transports[name].listen(old).then(function ($await_11) {
oldFiltered = old == null ? null : this._filter(name, old);
return this.transports[name].listen(oldFiltered).then(function ($await_11) {
devices = $await_11;

@@ -183,0 +195,0 @@

2

package.json
{
"name": "trezor-link",
"version": "0.1.19",
"version": "0.1.20",
"description": "Trezor Link",

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

@@ -22,2 +22,12 @@ /* @flow */

_filter(name: string, devices: Array<TrezorDeviceInfoWithSession>): Array<TrezorDeviceInfoWithSession> {
return devices.filter(device => this._parseName(name).name === name).map(device => {
return {
...device,
path: this._parseName(device.path).rest,
session: device.session == null ? device.session : this._parseName(device.session).rest,
};
});
}
async enumerate(): Promise<Array<TrezorDeviceInfoWithSession>> {

@@ -37,3 +47,4 @@ const res = [];

for (let name of Object.keys(this.transports)) {
const devices = await this.transports[name].listen(old);
const oldFiltered = old == null ? null : this._filter(name, old);
const devices = await this.transports[name].listen(oldFiltered);
res.push(...(this._prepend(name, devices)));

@@ -40,0 +51,0 @@ }

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