@trezor/transport
Advanced tools
Comparing version 1.1.16 to 1.1.17
@@ -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 @@ |
@@ -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`.` |
154086
64
3431
+ Added@trezor/protobuf@1.0.2(transitive)
+ Added@trezor/protocol@1.0.2(transitive)
+ Added@trezor/utils@9.0.14(transitive)
+ Added@types/node@22.13.5(transitive)
+ Addedcall-bound@1.0.3(transitive)
- Removed@trezor/protobuf@1.0.1(transitive)
- Removed@trezor/protocol@1.0.1(transitive)
- Removed@trezor/utils@9.0.13(transitive)
- Removed@types/node@22.13.9(transitive)
- Removedcall-bound@1.0.4(transitive)
Updated@trezor/protobuf@1.0.2
Updated@trezor/protocol@1.0.2
Updated@trezor/utils@9.0.14