From 2b868773da6f3905fc041e5e9847ae050d15952e Mon Sep 17 00:00:00 2001 From: Martin Varmuza Date: Thu, 16 Jan 2025 17:29:24 +0100 Subject: [PATCH] meow --- packages/connect-web/src/module/index.ts | 1 + packages/connect/src/events/transport.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/connect-web/src/module/index.ts b/packages/connect-web/src/module/index.ts index 011860b0aad..3b1b31948f2 100644 --- a/packages/connect-web/src/module/index.ts +++ b/packages/connect-web/src/module/index.ts @@ -31,6 +31,7 @@ const impl = new TrezorConnectDynamic< type: 'core-in-module', impl: new CoreInModule((message: CoreEventMessage) => { if (message.event === TRANSPORT_EVENT) { + // note: udev and bridge are part of the event already emitted from "core" but without "preferred" field set const platform = getInstallerPackage(); message.payload.bridge = cloneObject(suggestBridgeInstaller(platform)); message.payload.udev = cloneObject(suggestUdevInstaller(platform)); diff --git a/packages/connect/src/events/transport.ts b/packages/connect/src/events/transport.ts index 6558bee7582..0a3b62a9470 100644 --- a/packages/connect/src/events/transport.ts +++ b/packages/connect/src/events/transport.ts @@ -4,6 +4,8 @@ import { TRANSPORT } from '@trezor/transport/src/constants'; import { serializeError } from '../constants/errors'; import type { MessageFactoryFn } from '../types/utils'; import { ConnectSettings } from '../exports'; +import { suggestBridgeInstaller } from '../data/transportInfo'; +import { suggestUdevInstaller } from '../data/udevInfo'; export { TRANSPORT } from '@trezor/transport/src/constants'; @@ -89,5 +91,13 @@ export const createTransportMessage: MessageFactoryFn