mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-06 23:39:38 +01:00
fix(protocol-thp): add error to getExpectedHeaders
This commit is contained in:
committed by
Tomáš Martykán
parent
7dfeebf26a
commit
37a4375b33
@@ -95,7 +95,10 @@ export const getExpectedResponses = (bytes: Buffer) => {
|
||||
// get expected responses from ThpState (stored as numbers)
|
||||
// and join them with the channel to receive 3 bytes header
|
||||
export const getExpectedHeaders = (state: ThpState): Buffer[] =>
|
||||
state.expectedResponses.map(resp => {
|
||||
[
|
||||
...state.expectedResponses,
|
||||
THP_ERROR_HEADER_BYTE, // error could be sent any time
|
||||
].map(resp => {
|
||||
let magic;
|
||||
switch (resp) {
|
||||
case THP_CONTINUATION_PACKET:
|
||||
|
||||
Reference in New Issue
Block a user