diff --git a/package.json b/package.json index 26b0f4305e..4e1006ba9c 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,6 @@ "@types/react-router-dom": "5.3.3", "@types/react-svg-inline": "2.1.3", "@types/react-table": "^7.7.9", - "@types/trezor-connect": "8.1.18", "@types/uuid": "8.3.4", "@typescript-eslint/eslint-plugin": "5.20.0", "@typescript-eslint/parser": "5.20.0", @@ -205,6 +204,7 @@ "@cardano-foundation/ledgerjs-hw-app-cardano": "5.0.0", "@iohk-jormungandr/wallet-js": "0.5.0-pre7", "@ledgerhq/hw-transport-node-hid": "6.27.1", + "@trezor/connect": "9.0.2", "aes-js": "3.1.2", "bech32": "2.0.0", "bignumber.js": "9.0.1", @@ -289,7 +289,6 @@ "spectron-fake-dialog": "0.0.1", "tail": "2.2.4", "tcp-port-used": "1.0.1", - "trezor-connect": "8.2.8-extended", "unorm": "1.6.0", "url": "0.11.0", "usb-detection": "4.13.0", diff --git a/source/common/ipc/api.ts b/source/common/ipc/api.ts index 9b63d3900d..d2c9fc6813 100644 --- a/source/common/ipc/api.ts +++ b/source/common/ipc/api.ts @@ -4,7 +4,7 @@ import { CommonParams, Success, Unsuccessful, -} from 'trezor-connect'; +} from '@trezor/connect'; import type { BugReportRequestHttpOptions, BugReportRequestPayload, diff --git a/source/common/types/hardware-wallets.types.ts b/source/common/types/hardware-wallets.types.ts index 02091da65a..bbea6ec0ac 100644 --- a/source/common/types/hardware-wallets.types.ts +++ b/source/common/types/hardware-wallets.types.ts @@ -1,4 +1,4 @@ -import { BridgeInfo, Device as TrezorDevice, UdevInfo } from 'trezor-connect'; +import { BridgeInfo, Device as TrezorDevice, UdevInfo } from '@trezor/connect'; export type BIP32Path = Array; export type LedgerModel = 'nanoS' | 'nanoSP' | 'nanoX'; diff --git a/source/main/ipc/getHardwareWalletChannel.ts b/source/main/ipc/getHardwareWalletChannel.ts index 49b928c1e5..992e1f3142 100644 --- a/source/main/ipc/getHardwareWalletChannel.ts +++ b/source/main/ipc/getHardwareWalletChannel.ts @@ -4,7 +4,6 @@ import TransportNodeHid, { } from '@ledgerhq/hw-transport-node-hid-noevents'; import AppAda, { utils } from '@cardano-foundation/ledgerjs-hw-app-cardano'; import TrezorConnect, { - CardanoPublicKey, DEVICE, DEVICE_EVENT, Features, @@ -14,7 +13,7 @@ import TrezorConnect, { UI, UI_EVENT, Unsuccessful, -} from 'trezor-connect'; +} from '@trezor/connect'; import { find, get, includes, last, omit } from 'lodash'; import { derivePublic as deriveChildXpub } from 'cardano-crypto.js'; import { diff --git a/source/main/trezor/connection.ts b/source/main/trezor/connection.ts index 49fcda15ef..c4426fe65e 100644 --- a/source/main/trezor/connection.ts +++ b/source/main/trezor/connection.ts @@ -1,4 +1,4 @@ -import TrezorConnect from 'trezor-connect'; +import TrezorConnect from '@trezor/connect'; import { logger } from '../utils/logging'; import { manifest } from './manifest'; diff --git a/source/main/trezor/manifest.ts b/source/main/trezor/manifest.ts index 65e19a54a9..34a35e6ca9 100644 --- a/source/main/trezor/manifest.ts +++ b/source/main/trezor/manifest.ts @@ -1,4 +1,4 @@ -import { Manifest } from 'trezor-connect'; +import { Manifest } from '@trezor/connect'; export const manifest: Manifest = { email: 'support@iohk.io', diff --git a/source/main/webpack.config.js b/source/main/webpack.config.js index f231411dcb..576f821d37 100644 --- a/source/main/webpack.config.js +++ b/source/main/webpack.config.js @@ -91,7 +91,7 @@ module.exports = { 'js-chain-libs-node': 'commonjs2 js-chain-libs-node', usb: 'commonjs2 usb', 'node-hid': 'commonjs2 node-hid', - 'trezor-connect': 'commonjs2 trezor-connect', + '@trezor/connect': 'commonjs2 @trezor/connect', pdfkit: 'commonjs2 pdfkit', 'usb-detection': 'commonjs2 usb-detection', }, diff --git a/yarn.lock b/yarn.lock index 49038b6c99..dec768cb96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -952,7 +952,7 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.8", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.1", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.1", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.8", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" dependencies: @@ -2702,45 +2702,59 @@ version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" -"@trezor/blockchain-link@^2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@trezor/blockchain-link/-/blockchain-link-2.1.3.tgz#1bae384b4af8a40cbcf74f44641da583e40b79c5" +"@trezor/blockchain-link@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@trezor/blockchain-link/-/blockchain-link-2.1.4.tgz#4f558f0187f7bea324f38f70b1e25473957ca265" dependencies: - "@trezor/utils" "^1.0.0" + "@trezor/utils" "^9.0.2" "@trezor/utxo-lib" "^1.0.0" "@types/web" "^0.0.51" - bignumber.js "^9.0.1" + bignumber.js "^9.1.0" events "^3.3.0" ripple-lib "1.10.0" socks-proxy-agent "6.1.1" ws "7.4.6" -"@trezor/connect-common@^0.0.4": - version "0.0.4" - resolved "https://registry.yarnpkg.com/@trezor/connect-common/-/connect-common-0.0.4.tgz#0df221685272544770399aca1c624b037870e310" +"@trezor/connect-common@0.0.9": + version "0.0.9" + resolved "https://registry.yarnpkg.com/@trezor/connect-common/-/connect-common-0.0.9.tgz#22478585dac463d376f74c54510887516936850f" -"@trezor/rollout@^1.3.2": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@trezor/rollout/-/rollout-1.3.2.tgz#9120f77c31bb12253a509b7b894b3777317dd763" +"@trezor/connect@9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@trezor/connect/-/connect-9.0.2.tgz#61bf6eb7d26cf527bfe55d5e0739e7f94afbe2f2" dependencies: - "@trezor/utils" "^1.0.0" + "@trezor/blockchain-link" "^2.1.4" + "@trezor/connect-common" "0.0.9" + "@trezor/transport" "^1.1.4" + "@trezor/utils" "^9.0.2" + "@trezor/utxo-lib" "^1.0.0" + bignumber.js "^9.1.0" + blakejs "^1.2.1" + bowser "^2.11.0" cross-fetch "^3.1.5" - runtypes "^6.5.1" + events "^3.3.0" + parse-uri "1.0.7" + randombytes "2.1.0" + tslib "^2.3.1" -"@trezor/transport@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@trezor/transport/-/transport-1.1.2.tgz#a176257d269724045e2860c0255e7663d1a00424" +"@trezor/transport@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@trezor/transport/-/transport-1.1.4.tgz#3ffa2260f951242c427a669aa6abab010c53c678" dependencies: - "@trezor/utils" "^1.0.0" + "@trezor/utils" "^9.0.2" bytebuffer "^5.0.1" json-stable-stringify "^1.0.1" long "^4.0.0" - protobufjs "^6.11.2" + protobufjs "^6.11.3" "@trezor/utils@^1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/@trezor/utils/-/utils-1.0.1.tgz#594e31343bef1bec39ad7aad4624dd2a1329eb4a" +"@trezor/utils@^9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@trezor/utils/-/utils-9.0.2.tgz#a0e43227d454521fe115f371bfdfcfcd947c00c7" + "@trezor/utxo-lib@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@trezor/utxo-lib/-/utxo-lib-1.0.0.tgz#d6f28c9b1b0a2e3e7b83b59f5b9dad54889072ae" @@ -3093,14 +3107,7 @@ "@types/react" "*" "@types/react-router" "*" -"@types/react-router@*": - version "5.1.18" - resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.18.tgz#c8851884b60bc23733500d86c1266e1cfbbd9ef3" - dependencies: - "@types/history" "^4.7.11" - "@types/react" "*" - -"@types/react-router@5.1.18": +"@types/react-router@*", "@types/react-router@5.1.18": version "5.1.18" resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-5.1.18.tgz#c8851884b60bc23733500d86c1266e1cfbbd9ef3" dependencies: @@ -3173,12 +3180,6 @@ dependencies: "@types/jest" "*" -"@types/trezor-connect@8.1.18": - version "8.1.18" - resolved "https://registry.yarnpkg.com/@types/trezor-connect/-/trezor-connect-8.1.18.tgz#f9758bc38c6867e1be2775de67503b5191f97823" - dependencies: - trezor-connect "*" - "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d" @@ -4774,10 +4775,14 @@ bignumber.js@9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" -bignumber.js@^9.0.0, bignumber.js@^9.0.1, bignumber.js@^9.0.2: +bignumber.js@^9.0.0: version "9.0.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" +bignumber.js@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -4854,6 +4859,10 @@ blakejs@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" +blakejs@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + bluebird@^3.1.1, bluebird@^3.3.5, bluebird@^3.4.1, bluebird@^3.5.0, bluebird@^3.5.5: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" @@ -5393,7 +5402,7 @@ cashaddrjs@0.4.4: dependencies: big-integer "1.6.36" -cbor-web@7.0.6, cbor-web@^7.0.6: +cbor-web@7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cbor-web/-/cbor-web-7.0.6.tgz#6e23a0c58db4c38e485e395de511b9e2f628961c" @@ -12842,7 +12851,7 @@ parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" -parse-uri@^1.0.5: +parse-uri@1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/parse-uri/-/parse-uri-1.0.7.tgz#287629a09328a97e398468f21b8a00c4a2d9cc73" @@ -13518,7 +13527,7 @@ proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" -protobufjs@^6.11.2: +protobufjs@^6.11.3: version "6.11.3" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" dependencies: @@ -14824,10 +14833,6 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -runtypes@^6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-6.5.1.tgz#125d9a50c3b7dd45db6e47d42bb1c411b4f3f008" - rust-cardano-crypto@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/rust-cardano-crypto/-/rust-cardano-crypto-0.2.0.tgz#f665b0aa29b40a212f0c0814262bf4eca6d4f4fd" @@ -16447,32 +16452,6 @@ tree-kill@^1.1.0, tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" -trezor-connect@*: - version "8.2.8" - resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-8.2.8.tgz#184381a671e61c8d7242696199587b790a303aa0" - dependencies: - "@babel/runtime" "^7.15.4" - cross-fetch "^3.1.5" - events "^3.3.0" - -trezor-connect@8.2.8-extended: - version "8.2.8-extended" - resolved "https://registry.yarnpkg.com/trezor-connect/-/trezor-connect-8.2.8-extended.tgz#f940330eafb20f276670c8325007bedac275913e" - dependencies: - "@babel/runtime" "^7.15.4" - "@trezor/blockchain-link" "^2.1.3" - "@trezor/connect-common" "^0.0.4" - "@trezor/rollout" "^1.3.2" - "@trezor/transport" "1.1.2" - "@trezor/utxo-lib" "^1.0.0" - bignumber.js "^9.0.2" - bowser "^2.11.0" - cbor-web "^7.0.6" - cross-fetch "^3.1.5" - events "^3.3.0" - parse-uri "^1.0.5" - randombytes "2.1.0" - trim-newlines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"