Change hw-transport-node-hid for hw-transport-node-hid-singleton

This commit is contained in:
Daniel Sanchez 2020-11-17 15:37:59 +01:00
parent 9ed9ae8e83
commit 456d28c37d
3 changed files with 90 additions and 39 deletions

View File

@ -170,7 +170,7 @@
"@gnosis.pm/safe-contracts": "1.1.1-dev.2",
"@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#8d8508e",
"@gnosis.pm/util-contracts": "2.0.6",
"@ledgerhq/hw-transport-node-hid": "5.26.0",
"@ledgerhq/hw-transport-node-hid-singleton": "5.29.0",
"@material-ui/core": "4.11.0",
"@material-ui/icons": "4.9.1",
"@material-ui/lab": "4.0.0-alpha.56",

View File

@ -1,12 +1,13 @@
// All of the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
const TransportNodeHid = require("@ledgerhq/hw-transport-node-hid").default;
const log = require('electron-log');
const isDev = require("electron-is-dev");
window.TransportNodeHid = TransportNodeHid;
const TransportNodeHid = require('@ledgerhq/hw-transport-node-hid-singleton').default
const log = require('electron-log')
const isDev = require('electron-is-dev')
window.isDesktop = true;
window.TransportNodeHid = TransportNodeHid
window.isDesktop = true
window.addEventListener('DOMContentLoaded', () => {
const origLog = console.log

116
yarn.lock
View File

@ -1758,11 +1758,25 @@
"@ledgerhq/logs" "^5.26.0"
rxjs "^6.6.3"
"@ledgerhq/devices@^5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.29.0.tgz#c808e65c9d3b96c29903980790a3cf0fb43f79ac"
integrity sha512-Ln2f2n6A/JyFLQbKRMIGCKjgJFSAVaJbwO1W+LOSiQLNL1oLXypWRxrcbeyehQjxSMT2rTkeISOK9BaweWnJFg==
dependencies:
"@ledgerhq/errors" "^5.29.0"
"@ledgerhq/logs" "^5.29.0"
rxjs "^6.6.3"
"@ledgerhq/errors@^5.26.0":
version "5.26.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.26.0.tgz#a2d3da356e8053817b6517a94eff876ca1d0c972"
integrity sha512-oMEf6ONyLqaZYkunDZWSc6Qo9uBzim5R8XDXOOyrz7zrj4hixsvxiAh8y1Jbrr1MQLG5HJ+aehee4Ot/A5iXtw==
"@ledgerhq/errors@^5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.29.0.tgz#2e2c5b953e45d9b9f90563d67218549be84eaaed"
integrity sha512-gYit3aWS8BHtE7tt4gMy2FzOl+azKDR4C6CISmeAZrT2euDHB8YOKZcqsrYqeQRUxABXXT81ZIkYx/3hSYeHfQ==
"@ledgerhq/hw-app-eth@^5.21.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-5.27.0.tgz#d272fb0b75c47e790c4c2dcccbc61f3aa624ef85"
@ -1774,30 +1788,30 @@
bignumber.js "^9.0.1"
rlp "^2.2.6"
"@ledgerhq/hw-transport-node-hid-noevents@^5.26.0":
version "5.26.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-5.26.0.tgz#84155794e5095e4db0fbc39f1442c6c2e8f482e6"
integrity sha512-XszH42vlzp+BwO7Ej2H91aCrH1TVsc5/uc/Bpciz1ac34FIp412kUMT9zAcY7H1ey2lgqTiBddSyj4uEPUB6Nw==
"@ledgerhq/hw-transport-node-hid-noevents@^5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-5.29.0.tgz#fe6d71ea5182cd5fb8efc62889e83aa823cc1d52"
integrity sha512-rBtAgLoiMvqpxCQZ6VkMCiM4TFcYlQ9o9HPY0PY4RGOFTefWMbpt67CgsIzU+1T7+gbToajlJrSFR/W7ws6Hqw==
dependencies:
"@ledgerhq/devices" "^5.26.0"
"@ledgerhq/errors" "^5.26.0"
"@ledgerhq/hw-transport" "^5.26.0"
"@ledgerhq/logs" "^5.26.0"
"@ledgerhq/devices" "^5.29.0"
"@ledgerhq/errors" "^5.29.0"
"@ledgerhq/hw-transport" "^5.29.0"
"@ledgerhq/logs" "^5.29.0"
node-hid "1.3.0"
"@ledgerhq/hw-transport-node-hid@5.26.0":
version "5.26.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-5.26.0.tgz#69bc4f8067cdd9c09ef4aed0e0b3c58328936e4b"
integrity sha512-qhaefZVZatJ6UuK8Wb6WSFNOLWc2mxcv/xgsfKi5HJCIr4bPF/ecIeN+7fRcEaycxj4XykY6Z4A7zDVulfFH4w==
"@ledgerhq/hw-transport-node-hid-singleton@5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-singleton/-/hw-transport-node-hid-singleton-5.29.0.tgz#a450bddede78982f16aa15917eb434839f27542f"
integrity sha512-gbNCi+0oaDg9P+Jk59bAl0u5BVglRrouLKpw8TOmwnV9w+WIYVn+yMguwpZ5bidTmbxoM4ypEWbIFRhk8SdZew==
dependencies:
"@ledgerhq/devices" "^5.26.0"
"@ledgerhq/errors" "^5.26.0"
"@ledgerhq/hw-transport" "^5.26.0"
"@ledgerhq/hw-transport-node-hid-noevents" "^5.26.0"
"@ledgerhq/logs" "^5.26.0"
"@ledgerhq/devices" "^5.29.0"
"@ledgerhq/errors" "^5.29.0"
"@ledgerhq/hw-transport" "^5.29.0"
"@ledgerhq/hw-transport-node-hid-noevents" "^5.29.0"
"@ledgerhq/logs" "^5.29.0"
lodash "^4.17.20"
node-hid "1.3.0"
usb "^1.6.3"
usb-detection "^4.10.0"
"@ledgerhq/hw-transport-u2f@^5.21.0":
version "5.26.0"
@ -1818,11 +1832,25 @@
"@ledgerhq/errors" "^5.26.0"
events "^3.2.0"
"@ledgerhq/hw-transport@^5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.29.0.tgz#9830f0c921cda8530169e3710273480b0c1f7532"
integrity sha512-sONhoZ6rvVnnMtwzc2u+k0uTGyr9OLjFemoQzYrXWRdm1w1D7UbKCl+13o1VYz2LBanh7JaYRUj0uWOahAGorQ==
dependencies:
"@ledgerhq/devices" "^5.29.0"
"@ledgerhq/errors" "^5.29.0"
events "^3.2.0"
"@ledgerhq/logs@^5.26.0":
version "5.26.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.26.0.tgz#171bd471265259663520abb02a0eed80e949e3a1"
integrity sha512-/3EKvS9eHzKl9Om+t//SPnzJaahIoVIUlozLMSarINyO7SSh174kxl3jTNHBl7dLxvkQyDDs5imLvP04ohlQaw==
"@ledgerhq/logs@^5.29.0":
version "5.29.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.29.0.tgz#92e0ac8856ac59f9e7e2c286cb4531b724f837bd"
integrity sha512-bYWLCO/Wnwfd47kD5JRiCdBVMAAArFEbisqnZY3J5ZyxUE0va8Ta3z8RO6ClsBEbrtEut+7Xv3R0ejxmPXXYiQ==
"@material-ui/core@4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.0.tgz#b69b26e4553c9e53f2bfaf1053e216a0af9be15a"
@ -5450,7 +5478,7 @@ bind-decorator@^1.0.11:
resolved "https://registry.yarnpkg.com/bind-decorator/-/bind-decorator-1.0.11.tgz#e41bc06a1f65dd9cec476c91c5daf3978488252f"
integrity sha1-5BvAah9l3ZzsR2yRxdrzl4SIJS8=
bindings@^1.2.1, bindings@^1.4.0, bindings@^1.5.0:
bindings@^1.2.1, bindings@^1.3.0, bindings@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df"
integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==
@ -9085,6 +9113,11 @@ ethjs-util@0.1.6, ethjs-util@^0.1.3:
is-hex-prefixed "1.0.0"
strip-hex-prefix "1.0.0"
eventemitter2@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-5.0.1.tgz#6197a095d5fb6b57e8942f6fd7eaad63a09c9452"
integrity sha1-YZegldX7a1folC9v1+qtY6CclFI=
eventemitter3@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
@ -13426,7 +13459,7 @@ mixin-object@^2.0.1:
for-in "^0.1.3"
is-extendable "^0.1.1"
mkdirp-classic@^0.5.2:
mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
version "0.5.3"
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==
@ -13576,11 +13609,6 @@ mute-stream@0.0.8:
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
nan@2.13.2:
version "2.13.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7"
integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==
nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.14.1, nan@^2.2.1:
version "2.14.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19"
@ -15444,7 +15472,7 @@ preact@^10.3.3:
resolved "https://registry.yarnpkg.com/preact/-/preact-10.5.4.tgz#1e4d148f949fa54656df6c9bc9218bd4e12016e3"
integrity sha512-u0LnVtL9WWF61RLzIbEsVFOdsahoTQkQqeRwyf4eWuLMFrxTH/C47tqcnizbUH54E4KG8UzuuZaMc9KarHmpqQ==
prebuild-install@^5.3.3, prebuild-install@^5.3.4:
prebuild-install@^5.3.4:
version "5.3.5"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.5.tgz#e7e71e425298785ea9d22d4f958dbaccf8bb0e1b"
integrity sha512-YmMO7dph9CYKi5IR/BzjOJlRzpxGGVo1EsLSUZ0mt/Mq0HWZIHOKHHcHdT69yG54C9m6i45GpItwRHpk0Py7Uw==
@ -15465,6 +15493,27 @@ prebuild-install@^5.3.3, prebuild-install@^5.3.4:
tunnel-agent "^0.6.0"
which-pm-runs "^1.0.0"
prebuild-install@^5.3.5:
version "5.3.6"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291"
integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg==
dependencies:
detect-libc "^1.0.3"
expand-template "^2.0.3"
github-from-package "0.0.0"
minimist "^1.2.3"
mkdirp-classic "^0.5.3"
napi-build-utils "^1.0.1"
node-abi "^2.7.0"
noop-logger "^0.1.1"
npmlog "^4.0.1"
pump "^3.0.0"
rc "^1.2.7"
simple-get "^3.0.3"
tar-fs "^2.0.0"
tunnel-agent "^0.6.0"
which-pm-runs "^1.0.0"
precond@0.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac"
@ -19229,14 +19278,15 @@ url@^0.11.0:
punycode "1.3.2"
querystring "0.2.0"
usb@^1.6.3:
version "1.6.3"
resolved "https://registry.yarnpkg.com/usb/-/usb-1.6.3.tgz#c0bc14994e8f9cb16f9602ec0dbadaa57cb919f5"
integrity sha512-23KYMjaWydACd8wgGKMQ4MNwFspAT6Xeim4/9Onqe5Rz/nMb4TM/WHL+qPT0KNFxzNKzAs63n1xQWGEtgaQ2uw==
usb-detection@^4.10.0:
version "4.10.0"
resolved "https://registry.yarnpkg.com/usb-detection/-/usb-detection-4.10.0.tgz#0f8a3b8965a5e4e7fbee1667971ca97e455ed11f"
integrity sha512-YUzVWXwfSviE2pInXCKYXhR5heY9GUzlWsdZYxb/Br1Xela6P31A0KDHm7XW0Wsku1HwrokZx+/OD8cZSPHR3w==
dependencies:
bindings "^1.4.0"
nan "2.13.2"
prebuild-install "^5.3.3"
bindings "^1.3.0"
eventemitter2 "^5.0.1"
nan "^2.13.2"
prebuild-install "^5.3.5"
use-callback-ref@^1.2.1:
version "1.2.4"