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

@trezor/transport

Package Overview
Dependencies
Maintainers
6
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trezor/transport - npm Package Compare versions

Comparing version 1.1.16 to 1.1.17

lib/utils/applyContentTypeHeader.d.ts

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 1.1.17
- chore: edit links to trezor-firmware repo after renaming its main branch (2b0606371)
- fix: content type header applied for native (#9594) (c84270e13)
- fix: use type header with the bridge API (#9590) (b8bb2dfe6)
# 1.1.16

@@ -2,0 +8,0 @@

9

lib/utils/bridgeApiCall.js

@@ -43,2 +43,3 @@ "use strict";

const protocol_1 = require("@trezor/protocol");
const applyContentTypeHeader_1 = require("./applyContentTypeHeader");
const _isNode = typeof process !== 'undefined' && typeof window === 'undefined';

@@ -78,5 +79,7 @@ function contentType(body) {

};
if (options.skipContentTypeHeader == null || options.skipContentTypeHeader === false) {
fetchOptions.headers = Object.assign(Object.assign({}, fetchOptions.headers), { 'Content-Type': contentType(options.body == null ? '' : options.body) });
}
fetchOptions.headers = (0, applyContentTypeHeader_1.applyContentTypeHeader)({
headers: fetchOptions.headers,
contentType: contentType(options.body == null ? '' : options.body),
skipContentTypeHeader: options.skipContentTypeHeader,
});
if (_isNode) {

@@ -83,0 +86,0 @@ fetchOptions.headers = Object.assign(Object.assign({}, fetchOptions.headers), { Origin: 'https://node.trezor.io' });

{
"name": "@trezor/transport",
"version": "1.1.16",
"version": "1.1.17",
"description": "Low level library facilitating protocol buffers based communication with Trezor devices",

@@ -27,2 +27,6 @@ "npmPublishAccess": "public",

},
"react-native": {
"__comment__": "Fixes commutation between android device and bridge by always applying content-type header.",
"./lib/utils/applyContentTypeHeader": "./lib/utils/applyContentTypeHeader.native.js"
},
"files": [

@@ -56,5 +60,5 @@ "lib/",

"dependencies": {
"@trezor/protobuf": "1.0.1",
"@trezor/protocol": "1.0.1",
"@trezor/utils": "9.0.13",
"@trezor/protobuf": "1.0.2",
"@trezor/protocol": "1.0.2",
"@trezor/utils": "9.0.14",
"bytebuffer": "^5.0.1",

@@ -61,0 +65,0 @@ "cross-fetch": "^3.1.6",

@@ -37,3 +37,3 @@ # @trezor/transport

The beginning and source of truth are the `.proto` definitions in the [firmware repository](https://github.com/trezor/trezor-firmware/tree/master/common/protob). These are duplicated as read-only in the [trezor-common](https://github.com/trezor/trezor-common) repository.
The beginning and source of truth are the `.proto` definitions in the [firmware repository](https://github.com/trezor/trezor-firmware/tree/main/common/protob). These are duplicated as read-only in the [trezor-common](https://github.com/trezor/trezor-common) repository.

@@ -40,0 +40,0 @@ `trezor-common` is included in `trezor-suite` as a git submodule mounted at `packages/transport/trezor-common`.`

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