@trezor/connect 9.2.2 → 9.2.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +102 -0
- package/README.md +1 -1
- package/lib/api/applyFlags.d.ts +8 -1
- package/lib/api/applyFlags.js +3 -8
- package/lib/api/applySettings.d.ts +8 -1
- package/lib/api/applySettings.js +3 -8
- package/lib/api/backupDevice.d.ts +10 -2
- package/lib/api/backupDevice.js +12 -9
- package/lib/api/binance/api/binanceGetAddress.d.ts +4 -3
- package/lib/api/binance/api/binanceGetAddress.js +8 -22
- package/lib/api/binance/api/binanceGetPublicKey.d.ts +4 -2
- package/lib/api/binance/api/binanceGetPublicKey.js +6 -18
- package/lib/api/blockchainDisconnect.d.ts +1 -0
- package/lib/api/blockchainDisconnect.js +3 -4
- package/lib/api/blockchainEstimateFee.d.ts +1 -0
- package/lib/api/blockchainEstimateFee.js +6 -4
- package/lib/api/blockchainGetAccountBalanceHistory.d.ts +1 -0
- package/lib/api/blockchainGetAccountBalanceHistory.js +3 -1
- package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -0
- package/lib/api/blockchainGetCurrentFiatRates.js +3 -1
- package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -0
- package/lib/api/blockchainGetFiatRatesForTimestamps.js +3 -1
- package/lib/api/blockchainGetTransactions.d.ts +1 -0
- package/lib/api/blockchainGetTransactions.js +3 -1
- package/lib/api/blockchainSetCustomBackend.js +1 -5
- package/lib/api/blockchainSubscribe.d.ts +2 -0
- package/lib/api/blockchainSubscribe.js +13 -2
- package/lib/api/blockchainSubscribeFiatRates.d.ts +1 -0
- package/lib/api/blockchainSubscribeFiatRates.js +3 -1
- package/lib/api/blockchainUnsubscribe.d.ts +1 -0
- package/lib/api/blockchainUnsubscribe.js +5 -2
- package/lib/api/blockchainUnsubscribeFiatRates.d.ts +1 -0
- package/lib/api/blockchainUnsubscribeFiatRates.js +6 -2
- package/lib/api/cardano/api/cardanoGetAddress.d.ts +4 -3
- package/lib/api/cardano/api/cardanoGetAddress.js +8 -22
- package/lib/api/cardano/api/cardanoGetPublicKey.d.ts +4 -3
- package/lib/api/cardano/api/cardanoGetPublicKey.js +9 -31
- package/lib/api/changeLanguage.d.ts +8 -2
- package/lib/api/changeLanguage.js +10 -51
- package/lib/api/composeTransaction.d.ts +2 -0
- package/lib/api/composeTransaction.js +10 -5
- package/lib/api/eos/api/eosGetPublicKey.d.ts +4 -2
- package/lib/api/eos/api/eosGetPublicKey.js +6 -18
- package/lib/api/eos/eosSignTx.d.ts +3 -3
- package/lib/api/ethereum/api/ethereumGetAddress.d.ts +4 -3
- package/lib/api/ethereum/api/ethereumGetAddress.js +4 -20
- package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +4 -2
- package/lib/api/ethereum/api/ethereumGetPublicKey.js +3 -10
- package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +2 -1
- package/lib/api/ethereum/ethereumDefinitions.js +1 -0
- package/lib/api/firmware/index.d.ts +2 -0
- package/lib/api/firmware/index.js +5 -1
- package/lib/api/firmware/parseFirmwareHeaders.d.ts +5 -0
- package/lib/api/firmware/parseFirmwareHeaders.js +35 -0
- package/lib/api/firmware/uploadFirmware.d.ts +1 -1
- package/lib/api/firmware/uploadFirmware.js +9 -1
- package/lib/api/getAccountDescriptor.d.ts +5 -3
- package/lib/api/getAccountDescriptor.js +8 -21
- package/lib/api/getAccountInfo.d.ts +23 -7
- package/lib/api/getAccountInfo.js +16 -28
- package/lib/api/getAddress.d.ts +4 -3
- package/lib/api/getAddress.js +8 -22
- package/lib/api/getCoinInfo.d.ts +3 -0
- package/lib/api/getFeatures.d.ts +1 -0
- package/lib/api/getOwnershipId.d.ts +4 -2
- package/lib/api/getOwnershipId.js +4 -15
- package/lib/api/getOwnershipProof.d.ts +4 -2
- package/lib/api/getOwnershipProof.js +4 -15
- package/lib/api/getPublicKey.d.ts +5 -4
- package/lib/api/getPublicKey.js +12 -35
- package/lib/api/index.d.ts +0 -1
- package/lib/api/index.js +1 -3
- package/lib/api/nem/api/nemGetAddress.d.ts +4 -3
- package/lib/api/nem/api/nemGetAddress.js +4 -20
- package/lib/api/pushTransaction.d.ts +1 -0
- package/lib/api/pushTransaction.js +2 -1
- package/lib/api/rebootToBootloader.d.ts +8 -2
- package/lib/api/rebootToBootloader.js +3 -10
- package/lib/api/recoveryDevice.d.ts +8 -1
- package/lib/api/recoveryDevice.js +3 -7
- package/lib/api/resetDevice.d.ts +5 -3
- package/lib/api/resetDevice.js +5 -12
- package/lib/api/ripple/api/rippleGetAddress.d.ts +4 -3
- package/lib/api/ripple/api/rippleGetAddress.js +4 -20
- package/lib/api/signTransaction.d.ts +1 -0
- package/lib/api/signTransaction.js +5 -3
- package/lib/api/solana/api/solanaGetAddress.d.ts +4 -3
- package/lib/api/solana/api/solanaGetAddress.js +7 -28
- package/lib/api/solana/api/solanaGetPublicKey.d.ts +4 -3
- package/lib/api/solana/api/solanaGetPublicKey.js +7 -27
- package/lib/api/stellar/api/stellarGetAddress.d.ts +4 -3
- package/lib/api/stellar/api/stellarGetAddress.js +4 -20
- package/lib/api/tezos/api/tezosGetAddress.d.ts +4 -3
- package/lib/api/tezos/api/tezosGetAddress.js +4 -20
- package/lib/api/tezos/api/tezosGetPublicKey.d.ts +4 -2
- package/lib/api/tezos/api/tezosGetPublicKey.js +6 -18
- package/lib/api/wipeDevice.d.ts +8 -2
- package/lib/api/wipeDevice.js +3 -10
- package/lib/backend/BackendManager.d.ts +6 -4
- package/lib/backend/BackendManager.js +36 -28
- package/lib/backend/Blockchain.d.ts +15 -4
- package/lib/backend/Blockchain.js +27 -17
- package/lib/backend/BlockchainLink.d.ts +3 -3
- package/lib/backend/BlockchainLink.js +3 -3
- package/lib/constants/errors.d.ts +1 -0
- package/lib/constants/errors.js +1 -0
- package/lib/core/AbstractMethod.d.ts +4 -8
- package/lib/core/AbstractMethod.js +7 -28
- package/lib/core/index.d.ts +2 -1
- package/lib/core/index.js +260 -231
- package/lib/core/onCallFirmwareUpdate.d.ts +31 -0
- package/lib/core/onCallFirmwareUpdate.js +259 -0
- package/lib/data/DataManager.d.ts +22 -0
- package/lib/data/DataManager.js +7 -3
- package/lib/data/analyticsInfo.d.ts +2 -2
- package/lib/data/analyticsInfo.js +6 -7
- package/lib/data/coinInfo.d.ts +14 -0
- package/lib/data/config.d.ts +22 -0
- package/lib/data/config.js +5 -1
- package/lib/data/connectSettings.js +3 -0
- package/lib/data/deviceAuthenticityConfig.d.ts +9 -0
- package/lib/data/deviceAuthenticityConfig.js +27 -3
- package/lib/data/firmwareInfo.js +2 -6
- package/lib/data/getLanguage.d.ts +6 -0
- package/lib/data/getLanguage.js +10 -0
- package/lib/data/models.d.ts +9 -0
- package/lib/data/models.js +9 -0
- package/lib/data/version.d.ts +1 -1
- package/lib/data/version.js +1 -1
- package/lib/device/Device.d.ts +13 -2
- package/lib/device/Device.js +55 -7
- package/lib/device/DeviceCommands.d.ts +3 -15
- package/lib/device/DeviceCommands.js +1 -43
- package/lib/device/DeviceList.d.ts +1 -1
- package/lib/device/DeviceList.js +22 -19
- package/lib/events/blockchain.d.ts +3 -0
- package/lib/events/index.d.ts +1 -0
- package/lib/events/ui-request.d.ts +13 -1
- package/lib/events/ui-request.js +1 -0
- package/lib/index.js +2 -2
- package/lib/types/api/authenticateDevice.d.ts +9 -0
- package/lib/types/api/backupDevice.d.ts +2 -2
- package/lib/types/api/bitcoin/index.d.ts +1 -0
- package/lib/types/api/blockchainSetCustomBackend.d.ts +3 -2
- package/lib/types/api/blockchainSubscribe.d.ts +1 -0
- package/lib/types/api/composeTransaction.d.ts +2 -0
- package/lib/types/api/dispose.d.ts +1 -1
- package/lib/types/api/firmwareUpdate.d.ts +7 -6
- package/lib/types/api/firmwareUpdate.js +1 -3
- package/lib/types/api/getAccountInfo.d.ts +1 -0
- package/lib/types/api/getCoinInfo.d.ts +4 -2
- package/lib/types/api/nemGetAddress.d.ts +11 -4
- package/lib/types/api/nemGetAddress.js +9 -0
- package/lib/types/api/pushTransaction.d.ts +1 -0
- package/lib/types/api/pushTransaction.js +1 -0
- package/lib/types/api/resetDevice.d.ts +1 -15
- package/lib/types/api/resetDevice.js +0 -9
- package/lib/types/api/setBusy.d.ts +2 -2
- package/lib/types/coinInfo.d.ts +15 -7
- package/lib/types/coinInfo.js +8 -6
- package/lib/types/firmware.d.ts +5 -15
- package/lib/types/params.d.ts +1 -0
- package/lib/types/params.js +1 -2
- package/lib/types/settings.d.ts +1 -0
- package/lib/utils/assetUtils.js +18 -8
- package/lib/utils/popupPromiseManager.d.ts +8 -0
- package/lib/utils/popupPromiseManager.js +21 -0
- package/lib/utils/uiPromiseManager.d.ts +38 -0
- package/lib/utils/uiPromiseManager.js +47 -0
- package/lib/workers/workers-browser.d.ts +3 -1
- package/lib/workers/workers-browser.js +2 -2
- package/package.json +10 -10
- package/lib/api/firmwareUpdate.d.ts +0 -19
- package/lib/api/firmwareUpdate.js +0 -78
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DeviceList } from '../device/DeviceList';
|
|
2
|
+
import { CoreEventMessage } from '../events';
|
|
3
|
+
import { CommonParams } from '../types';
|
|
4
|
+
import type { Log } from '../utils/debug';
|
|
5
|
+
import type { Device } from '../device/Device';
|
|
6
|
+
type PostMessage = (message: CoreEventMessage) => void;
|
|
7
|
+
export type Params = {
|
|
8
|
+
language?: string;
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
btcOnly?: boolean;
|
|
11
|
+
binary?: ArrayBuffer;
|
|
12
|
+
} & CommonParams;
|
|
13
|
+
type Context = {
|
|
14
|
+
deviceList: DeviceList;
|
|
15
|
+
postMessage: PostMessage;
|
|
16
|
+
initDevice: (path?: string) => Promise<Device>;
|
|
17
|
+
log: Log;
|
|
18
|
+
abortSignal: AbortSignal;
|
|
19
|
+
};
|
|
20
|
+
export declare const onCallFirmwareUpdate: ({ params, context: { deviceList, postMessage, initDevice, log, abortSignal }, }: {
|
|
21
|
+
params: Params;
|
|
22
|
+
context: Context;
|
|
23
|
+
}) => Promise<{
|
|
24
|
+
check: "other-error";
|
|
25
|
+
checkError: any;
|
|
26
|
+
} | {
|
|
27
|
+
check: string;
|
|
28
|
+
checkError?: undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=onCallFirmwareUpdate.d.ts.map
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.onCallFirmwareUpdate = void 0;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
const utils_1 = require("@trezor/utils");
|
|
6
|
+
const events_1 = require("../events");
|
|
7
|
+
const firmware_1 = require("../api/firmware");
|
|
8
|
+
const firmwareInfo_1 = require("../data/firmwareInfo");
|
|
9
|
+
const constants_1 = require("../constants");
|
|
10
|
+
const versionUtils_1 = require("@trezor/utils/lib/versionUtils");
|
|
11
|
+
const registerEvents = (device, postMessage) => {
|
|
12
|
+
device.on(events_1.DEVICE.BUTTON, (_d, request) => {
|
|
13
|
+
postMessage((0, events_1.createDeviceMessage)(events_1.DEVICE.BUTTON, {
|
|
14
|
+
code: request.code,
|
|
15
|
+
device: device.toMessageObject(),
|
|
16
|
+
}));
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const waitForReconnectedDevice = async ({ bootloader, method, intermediary }, { deviceList, device, postMessage, log, abortSignal }) => {
|
|
20
|
+
const target = intermediary || !bootloader ? 'normal' : 'bootloader';
|
|
21
|
+
let i = 0;
|
|
22
|
+
if (method !== 'auto') {
|
|
23
|
+
log.debug('onCallFirmwareUpdate', 'waiting for device to disconnect');
|
|
24
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_RECONNECT, {
|
|
25
|
+
device: device.toMessageObject(),
|
|
26
|
+
disconnected: false,
|
|
27
|
+
method,
|
|
28
|
+
target,
|
|
29
|
+
i,
|
|
30
|
+
}));
|
|
31
|
+
await new Promise(resolve => {
|
|
32
|
+
deviceList.once('device-disconnect', resolve);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
log.debug('onCallFirmwareUpdate', `waiting for device to reconnect in ${bootloader ? 'bootloader' : 'normal'} mode`);
|
|
36
|
+
let reconnectedDevice;
|
|
37
|
+
do {
|
|
38
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_RECONNECT, {
|
|
39
|
+
device: device.toMessageObject(),
|
|
40
|
+
disconnected: true,
|
|
41
|
+
method,
|
|
42
|
+
target,
|
|
43
|
+
i,
|
|
44
|
+
}));
|
|
45
|
+
await (0, utils_1.createTimeoutPromise)(2000);
|
|
46
|
+
try {
|
|
47
|
+
const path = deviceList.getFirstDevicePath();
|
|
48
|
+
reconnectedDevice = deviceList.getDevice(path);
|
|
49
|
+
}
|
|
50
|
+
catch { }
|
|
51
|
+
i++;
|
|
52
|
+
log.debug('onCallFirmwareUpdate', 'waiting for device to reconnect', i);
|
|
53
|
+
} while (!abortSignal.aborted &&
|
|
54
|
+
(!(reconnectedDevice === null || reconnectedDevice === void 0 ? void 0 : reconnectedDevice.features) ||
|
|
55
|
+
bootloader === !reconnectedDevice.features.bootloader_mode ||
|
|
56
|
+
(intermediary &&
|
|
57
|
+
!(0, versionUtils_1.isNewer)([
|
|
58
|
+
reconnectedDevice.features.major_version,
|
|
59
|
+
reconnectedDevice.features.minor_version,
|
|
60
|
+
reconnectedDevice.features.patch_version,
|
|
61
|
+
], [
|
|
62
|
+
device.features.major_version,
|
|
63
|
+
device.features.minor_version,
|
|
64
|
+
device.features.patch_version,
|
|
65
|
+
]))));
|
|
66
|
+
if (!reconnectedDevice) {
|
|
67
|
+
throw constants_1.ERRORS.TypedError('Method_Interrupted');
|
|
68
|
+
}
|
|
69
|
+
registerEvents(reconnectedDevice, postMessage);
|
|
70
|
+
await reconnectedDevice.waitForFirstRun();
|
|
71
|
+
await reconnectedDevice.acquire();
|
|
72
|
+
return reconnectedDevice;
|
|
73
|
+
};
|
|
74
|
+
const getInstallationParams = (device, binary) => {
|
|
75
|
+
var _a;
|
|
76
|
+
if (!device.features.bootloader_mode) {
|
|
77
|
+
const version = binary ? (0, firmware_1.parseFirmwareHeaders)(Buffer.from(binary)).version : undefined;
|
|
78
|
+
const isUpdatingToNewerVersion = !version
|
|
79
|
+
? (_a = device.firmwareRelease) === null || _a === void 0 ? void 0 : _a.isNewer
|
|
80
|
+
: (0, versionUtils_1.isNewer)(version, [
|
|
81
|
+
device.features.major_version,
|
|
82
|
+
device.features.minor_version,
|
|
83
|
+
device.features.patch_version,
|
|
84
|
+
]);
|
|
85
|
+
const upgrade = device.atLeast('2.6.3') && isUpdatingToNewerVersion;
|
|
86
|
+
const manual = !device.atLeast(['1.10.0', '2.6.0']) && !upgrade;
|
|
87
|
+
const language = device.atLeast('2.7.0');
|
|
88
|
+
return {
|
|
89
|
+
manual,
|
|
90
|
+
upgrade,
|
|
91
|
+
language,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return {
|
|
96
|
+
manual: false,
|
|
97
|
+
upgrade: false,
|
|
98
|
+
language: false,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const getFwHeader = (binary) => Buffer.from(binary.slice(0, 6000)).toString('hex');
|
|
103
|
+
const getBinaryHelper = (device, params, log, postMessage, intermediaryVersion) => {
|
|
104
|
+
var _a;
|
|
105
|
+
if (!device.firmwareRelease) {
|
|
106
|
+
throw constants_1.ERRORS.TypedError('Runtime', 'device.firmwareRelease is not set');
|
|
107
|
+
}
|
|
108
|
+
const btcOnly = params.btcOnly || (params.btcOnly === undefined && device.firmwareType === 'bitcoin-only');
|
|
109
|
+
log.debug('onCallFirmwareUpdate loading binary', 'intermediaryVersion', intermediaryVersion, 'version', device.firmwareRelease.release.version, 'btcOnly', btcOnly);
|
|
110
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_PROGRESS, {
|
|
111
|
+
device: device.toMessageObject(),
|
|
112
|
+
operation: 'downloading',
|
|
113
|
+
progress: 0,
|
|
114
|
+
}));
|
|
115
|
+
return (0, firmware_1.getBinary)({
|
|
116
|
+
features: device.features,
|
|
117
|
+
releases: (0, firmwareInfo_1.getReleases)((_a = device.features) === null || _a === void 0 ? void 0 : _a.internal_model),
|
|
118
|
+
baseUrl: params.baseUrl || 'https://data.trezor.io',
|
|
119
|
+
version: device.firmwareRelease.release.version,
|
|
120
|
+
btcOnly,
|
|
121
|
+
intermediaryVersion,
|
|
122
|
+
}).then(res => {
|
|
123
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_PROGRESS, {
|
|
124
|
+
device: device.toMessageObject(),
|
|
125
|
+
operation: 'downloading',
|
|
126
|
+
progress: 100,
|
|
127
|
+
}));
|
|
128
|
+
return res;
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const firmwareCheck = async (reconnectedDevice, device, stripped, postMessage) => {
|
|
132
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_PROGRESS, {
|
|
133
|
+
device: device.toMessageObject(),
|
|
134
|
+
operation: 'validating',
|
|
135
|
+
progress: 0,
|
|
136
|
+
}));
|
|
137
|
+
const { hash, challenge } = (0, firmware_1.calculateFirmwareHash)(device.features.major_version, stripped, (0, crypto_1.randomBytes)(32));
|
|
138
|
+
const getFirmwareHashResponse = await reconnectedDevice
|
|
139
|
+
.getCommands()
|
|
140
|
+
.typedCall('GetFirmwareHash', 'FirmwareHash', { challenge });
|
|
141
|
+
postMessage((0, events_1.createUiMessage)(events_1.UI.FIRMWARE_PROGRESS, {
|
|
142
|
+
device: device.toMessageObject(),
|
|
143
|
+
operation: 'validating',
|
|
144
|
+
progress: 100,
|
|
145
|
+
}));
|
|
146
|
+
return (getFirmwareHashResponse.message !== 'Unknown message' &&
|
|
147
|
+
getFirmwareHashResponse.message !== 'Unexpected message' &&
|
|
148
|
+
getFirmwareHashResponse.message.hash === hash);
|
|
149
|
+
};
|
|
150
|
+
const onCallFirmwareUpdate = async ({ params, context: { deviceList, postMessage, initDevice, log, abortSignal }, }) => {
|
|
151
|
+
var _a;
|
|
152
|
+
log.debug('onCallFirmwareUpdate with params: ', params);
|
|
153
|
+
const device = await initDevice((_a = params === null || params === void 0 ? void 0 : params.device) === null || _a === void 0 ? void 0 : _a.path);
|
|
154
|
+
if (!device.firmwareRelease) {
|
|
155
|
+
throw constants_1.ERRORS.TypedError('Runtime', 'device.firmwareRelease is not set');
|
|
156
|
+
}
|
|
157
|
+
if (deviceList.allDevices().length > 1) {
|
|
158
|
+
throw constants_1.ERRORS.TypedError('Device_MultipleNotSupported', 'Firmware update allowed with only 1 device connected');
|
|
159
|
+
}
|
|
160
|
+
log.debug('onCallFirmwareUpdate', 'device', device);
|
|
161
|
+
registerEvents(device, postMessage);
|
|
162
|
+
const { manual, upgrade, language } = getInstallationParams(device, params.binary);
|
|
163
|
+
log.debug('onCallFirmwareUpdate', 'installation params', { manual, upgrade, language });
|
|
164
|
+
const binary = params.binary ||
|
|
165
|
+
(await getBinaryHelper(device, params, log, postMessage, device.firmwareRelease.intermediaryVersion));
|
|
166
|
+
const deviceInitiallyConnectedInBootloader = device.features.bootloader_mode;
|
|
167
|
+
const deviceInitiallyConnectedWithoutFirmware = device.features.firmware_present === false;
|
|
168
|
+
let reconnectedDevice = device;
|
|
169
|
+
if (deviceInitiallyConnectedInBootloader) {
|
|
170
|
+
log.warn('onCallFirmwareUpdate', 'device is already in bootloader mode. language will not be updated');
|
|
171
|
+
await device.acquire();
|
|
172
|
+
}
|
|
173
|
+
else if (manual) {
|
|
174
|
+
reconnectedDevice = await waitForReconnectedDevice({ bootloader: true, method: 'manual' }, { deviceList, device, log, postMessage, abortSignal });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const rebootParams = upgrade
|
|
178
|
+
? {
|
|
179
|
+
boot_command: constants_1.PROTO.BootCommand.INSTALL_UPGRADE,
|
|
180
|
+
firmware_header: getFwHeader(binary),
|
|
181
|
+
}
|
|
182
|
+
: {};
|
|
183
|
+
await device.acquire();
|
|
184
|
+
const targetLanguage = params.language || device.features.language || 'en-US';
|
|
185
|
+
const languageBlob = language && targetLanguage !== 'en-US'
|
|
186
|
+
? await (0, firmware_1.getLanguage)({
|
|
187
|
+
language: targetLanguage,
|
|
188
|
+
version: device.firmwareRelease.release.version,
|
|
189
|
+
internal_model: device.features.internal_model,
|
|
190
|
+
})
|
|
191
|
+
: null;
|
|
192
|
+
if (!languageBlob) {
|
|
193
|
+
await device.getCommands().typedCall('RebootToBootloader', 'Success', rebootParams);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
let rebootResponse = await device.getCommands().typedCall('RebootToBootloader', ['TranslationDataRequest', 'Success'], { ...rebootParams, language_data_length: languageBlob === null || languageBlob === void 0 ? void 0 : languageBlob.byteLength });
|
|
197
|
+
log.debug('onCallFirmwareUpdate', 'RebootToBootloader response', rebootResponse.message);
|
|
198
|
+
while (languageBlob && rebootResponse.type !== 'Success') {
|
|
199
|
+
const start = rebootResponse.message.data_offset;
|
|
200
|
+
const end = rebootResponse.message.data_offset + rebootResponse.message.data_length;
|
|
201
|
+
const chunk = languageBlob.slice(start, end);
|
|
202
|
+
rebootResponse = await device.getCommands().typedCall('TranslationDataAck', ['TranslationDataRequest', 'Success'], { data_chunk: Buffer.from(chunk).toString('hex') });
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
await device.release();
|
|
206
|
+
if (device.features.major_version === 1) {
|
|
207
|
+
await (0, utils_1.createTimeoutPromise)(2000);
|
|
208
|
+
}
|
|
209
|
+
reconnectedDevice = await waitForReconnectedDevice({ bootloader: true, method: 'auto' }, { deviceList, device, log, postMessage, abortSignal });
|
|
210
|
+
}
|
|
211
|
+
const intermediary = !params.binary && device.firmwareRelease.intermediaryVersion;
|
|
212
|
+
await reconnectedDevice.initialize(false, false);
|
|
213
|
+
let stripped = (0, firmware_1.stripFwHeaders)(binary);
|
|
214
|
+
await (0, firmware_1.uploadFirmware)(reconnectedDevice.getCommands().typedCall.bind(reconnectedDevice.getCommands()), postMessage, reconnectedDevice, { payload: !intermediary && (0, firmware_1.shouldStripFwHeaders)(device.features) ? stripped : binary });
|
|
215
|
+
await reconnectedDevice.release();
|
|
216
|
+
if (intermediary) {
|
|
217
|
+
reconnectedDevice = await waitForReconnectedDevice({ bootloader: true, method: 'manual', intermediary: true }, { deviceList, device: reconnectedDevice, log, postMessage, abortSignal });
|
|
218
|
+
stripped = (0, firmware_1.stripFwHeaders)(await getBinaryHelper(reconnectedDevice, params, log, postMessage));
|
|
219
|
+
await reconnectedDevice.initialize(false, false);
|
|
220
|
+
await (0, firmware_1.uploadFirmware)(reconnectedDevice.getCommands().typedCall.bind(reconnectedDevice.getCommands()), postMessage, reconnectedDevice, { payload: stripped });
|
|
221
|
+
await reconnectedDevice.release();
|
|
222
|
+
}
|
|
223
|
+
reconnectedDevice = await waitForReconnectedDevice({ bootloader: false, method: 'wait' }, { deviceList, device: reconnectedDevice, log, postMessage, abortSignal });
|
|
224
|
+
if (reconnectedDevice.atLeast('2.7.0') &&
|
|
225
|
+
deviceInitiallyConnectedWithoutFirmware &&
|
|
226
|
+
params.language) {
|
|
227
|
+
try {
|
|
228
|
+
log.info('onCallFirmwareUpdate', 'changing language for fresh device to: ', params.language);
|
|
229
|
+
await reconnectedDevice.changeLanguage({ language: params.language });
|
|
230
|
+
}
|
|
231
|
+
catch (err) {
|
|
232
|
+
log.error('onCallFirmwareUpdate', 'changeLanguage failed silently: ', err);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const checkSupported = reconnectedDevice.atLeast(['1.11.1', '2.5.1']) && !params.binary;
|
|
236
|
+
if (checkSupported) {
|
|
237
|
+
try {
|
|
238
|
+
log.debug('onCallFirmwareUpdate', 'getFirmwareHash supported, proceed with check', stripped);
|
|
239
|
+
const isValid = await firmwareCheck(reconnectedDevice, device, stripped, postMessage);
|
|
240
|
+
await reconnectedDevice.release();
|
|
241
|
+
if (isValid) {
|
|
242
|
+
log.debug('onCallFirmwareUpdate', 'installed fw hash and calculated hash match');
|
|
243
|
+
return { check: 'valid' };
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
return { check: 'mismatch' };
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
catch (err) {
|
|
250
|
+
return { check: 'other-error', checkError: err.message };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
await reconnectedDevice.release();
|
|
255
|
+
return { check: 'omitted' };
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
exports.onCallFirmwareUpdate = onCallFirmwareUpdate;
|
|
259
|
+
//# sourceMappingURL=onCallFirmwareUpdate.js.map
|
|
@@ -64,6 +64,7 @@ export declare class DataManager {
|
|
|
64
64
|
T1B1: string;
|
|
65
65
|
T2T1: string;
|
|
66
66
|
T2B1?: undefined;
|
|
67
|
+
T3T1?: undefined;
|
|
67
68
|
};
|
|
68
69
|
max: undefined;
|
|
69
70
|
comment: string[];
|
|
@@ -74,6 +75,7 @@ export declare class DataManager {
|
|
|
74
75
|
T1B1: string;
|
|
75
76
|
T2T1: string;
|
|
76
77
|
T2B1?: undefined;
|
|
78
|
+
T3T1?: undefined;
|
|
77
79
|
};
|
|
78
80
|
comment: string[];
|
|
79
81
|
methods?: undefined;
|
|
@@ -85,6 +87,7 @@ export declare class DataManager {
|
|
|
85
87
|
T1B1: string;
|
|
86
88
|
T2T1: string;
|
|
87
89
|
T2B1?: undefined;
|
|
90
|
+
T3T1?: undefined;
|
|
88
91
|
};
|
|
89
92
|
comment: string[];
|
|
90
93
|
coin?: undefined;
|
|
@@ -96,6 +99,7 @@ export declare class DataManager {
|
|
|
96
99
|
T1B1: string;
|
|
97
100
|
T2T1: string;
|
|
98
101
|
T2B1?: undefined;
|
|
102
|
+
T3T1?: undefined;
|
|
99
103
|
};
|
|
100
104
|
comment: string[];
|
|
101
105
|
coin?: undefined;
|
|
@@ -108,6 +112,7 @@ export declare class DataManager {
|
|
|
108
112
|
T1B1: string;
|
|
109
113
|
T2T1: string;
|
|
110
114
|
T2B1?: undefined;
|
|
115
|
+
T3T1?: undefined;
|
|
111
116
|
};
|
|
112
117
|
comment: string[];
|
|
113
118
|
max?: undefined;
|
|
@@ -119,6 +124,7 @@ export declare class DataManager {
|
|
|
119
124
|
T1B1: string;
|
|
120
125
|
T2T1: string;
|
|
121
126
|
T2B1?: undefined;
|
|
127
|
+
T3T1?: undefined;
|
|
122
128
|
};
|
|
123
129
|
coin?: undefined;
|
|
124
130
|
max?: undefined;
|
|
@@ -129,6 +135,7 @@ export declare class DataManager {
|
|
|
129
135
|
T1B1: string;
|
|
130
136
|
T2T1: string;
|
|
131
137
|
T2B1: string;
|
|
138
|
+
T3T1?: undefined;
|
|
132
139
|
};
|
|
133
140
|
comment: string[];
|
|
134
141
|
coin?: undefined;
|
|
@@ -140,6 +147,7 @@ export declare class DataManager {
|
|
|
140
147
|
T1B1: string;
|
|
141
148
|
T2T1: string;
|
|
142
149
|
T2B1?: undefined;
|
|
150
|
+
T3T1?: undefined;
|
|
143
151
|
};
|
|
144
152
|
coin?: undefined;
|
|
145
153
|
max?: undefined;
|
|
@@ -151,6 +159,7 @@ export declare class DataManager {
|
|
|
151
159
|
T1B1: string;
|
|
152
160
|
T2T1: string;
|
|
153
161
|
T2B1: string;
|
|
162
|
+
T3T1?: undefined;
|
|
154
163
|
};
|
|
155
164
|
coin?: undefined;
|
|
156
165
|
max?: undefined;
|
|
@@ -162,11 +171,24 @@ export declare class DataManager {
|
|
|
162
171
|
T1B1: string;
|
|
163
172
|
T2T1: string;
|
|
164
173
|
T2B1: string;
|
|
174
|
+
T3T1?: undefined;
|
|
165
175
|
};
|
|
166
176
|
comment: string[];
|
|
167
177
|
coin?: undefined;
|
|
168
178
|
methods?: undefined;
|
|
169
179
|
max?: undefined;
|
|
180
|
+
} | {
|
|
181
|
+
methods: string[];
|
|
182
|
+
min: {
|
|
183
|
+
T1B1: string;
|
|
184
|
+
T2T1: string;
|
|
185
|
+
T2B1: string;
|
|
186
|
+
T3T1: string;
|
|
187
|
+
};
|
|
188
|
+
coin?: undefined;
|
|
189
|
+
max?: undefined;
|
|
190
|
+
comment?: undefined;
|
|
191
|
+
capabilities?: undefined;
|
|
170
192
|
})[];
|
|
171
193
|
};
|
|
172
194
|
}
|
package/lib/data/DataManager.js
CHANGED
|
@@ -24,9 +24,13 @@ class DataManager {
|
|
|
24
24
|
...this.assets.coins,
|
|
25
25
|
eth: this.assets.coinsEth,
|
|
26
26
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
for (const model in types_1.DeviceModelInternal) {
|
|
28
|
+
const firmwareKey = `firmware-${model.toLowerCase()}`;
|
|
29
|
+
const modelType = types_1.DeviceModelInternal[model];
|
|
30
|
+
if (this.assets[firmwareKey]) {
|
|
31
|
+
(0, firmwareInfo_1.parseFirmware)(this.assets[firmwareKey], modelType);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
30
34
|
}
|
|
31
35
|
static getProtobufMessages() {
|
|
32
36
|
return this.messages;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CoreEventMessage } from '../events';
|
|
2
2
|
import type { Device } from '../types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const enhanceMessageWithAnalytics: (message: CoreEventMessage, data: {
|
|
4
4
|
device?: Device;
|
|
5
|
-
}) =>
|
|
5
|
+
}) => CoreEventMessage;
|
|
6
6
|
//# sourceMappingURL=analyticsInfo.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.enhanceMessageWithAnalytics = void 0;
|
|
4
4
|
const events_1 = require("../events");
|
|
5
|
-
const
|
|
5
|
+
const enhanceMessageWithAnalytics = (message, data) => {
|
|
6
6
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7
7
|
switch (message.type) {
|
|
8
8
|
case events_1.UI_REQUEST.REQUEST_CONFIRMATION:
|
|
9
9
|
const { device } = data;
|
|
10
|
-
|
|
10
|
+
return {
|
|
11
11
|
...message,
|
|
12
12
|
payload: {
|
|
13
13
|
...message.payload,
|
|
@@ -27,11 +27,10 @@ const enhancePostMessageWithAnalytics = (callback, message, data) => {
|
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
|
-
}
|
|
31
|
-
break;
|
|
30
|
+
};
|
|
32
31
|
default:
|
|
33
|
-
|
|
32
|
+
return message;
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
|
-
exports.
|
|
35
|
+
exports.enhanceMessageWithAnalytics = enhanceMessageWithAnalytics;
|
|
37
36
|
//# sourceMappingURL=analyticsInfo.js.map
|
package/lib/data/coinInfo.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => ({
|
|
|
15
15
|
T1B1: string | false;
|
|
16
16
|
T2T1: string | false;
|
|
17
17
|
T2B1: string | false;
|
|
18
|
+
T3T1: string | false;
|
|
18
19
|
connect: boolean;
|
|
19
20
|
};
|
|
20
21
|
decimals: number;
|
|
@@ -71,6 +72,7 @@ export declare const getEthereumNetwork: (pathOrName: DerivationPath) => ({
|
|
|
71
72
|
T1B1: string | false;
|
|
72
73
|
T2T1: string | false;
|
|
73
74
|
T2B1: string | false;
|
|
75
|
+
T3T1: string | false;
|
|
74
76
|
connect: boolean;
|
|
75
77
|
};
|
|
76
78
|
decimals: number;
|
|
@@ -102,6 +104,7 @@ export declare const getMiscNetwork: (pathOrName: DerivationPath) => ({
|
|
|
102
104
|
T1B1: string | false;
|
|
103
105
|
T2T1: string | false;
|
|
104
106
|
T2B1: string | false;
|
|
107
|
+
T3T1: string | false;
|
|
105
108
|
connect: boolean;
|
|
106
109
|
};
|
|
107
110
|
decimals: number;
|
|
@@ -157,6 +160,7 @@ export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]
|
|
|
157
160
|
T1B1: string | false;
|
|
158
161
|
T2T1: string | false;
|
|
159
162
|
T2B1: string | false;
|
|
163
|
+
T3T1: string | false;
|
|
160
164
|
connect: boolean;
|
|
161
165
|
};
|
|
162
166
|
decimals: number;
|
|
@@ -213,6 +217,7 @@ export declare const getCoinInfoByHash: (hash: string, networkInfo: any) => {
|
|
|
213
217
|
T1B1: string | false;
|
|
214
218
|
T2T1: string | false;
|
|
215
219
|
T2B1: string | false;
|
|
220
|
+
T3T1: string | false;
|
|
216
221
|
connect: boolean;
|
|
217
222
|
};
|
|
218
223
|
decimals: number;
|
|
@@ -269,6 +274,7 @@ export declare const getCoinInfo: (currency: string) => ({
|
|
|
269
274
|
T1B1: string | false;
|
|
270
275
|
T2T1: string | false;
|
|
271
276
|
T2B1: string | false;
|
|
277
|
+
T3T1: string | false;
|
|
272
278
|
connect: boolean;
|
|
273
279
|
};
|
|
274
280
|
decimals: number;
|
|
@@ -324,6 +330,7 @@ export declare const getCoinInfo: (currency: string) => ({
|
|
|
324
330
|
T1B1: string | false;
|
|
325
331
|
T2T1: string | false;
|
|
326
332
|
T2B1: string | false;
|
|
333
|
+
T3T1: string | false;
|
|
327
334
|
connect: boolean;
|
|
328
335
|
};
|
|
329
336
|
decimals: number;
|
|
@@ -354,6 +361,7 @@ export declare const getCoinInfo: (currency: string) => ({
|
|
|
354
361
|
T1B1: string | false;
|
|
355
362
|
T2T1: string | false;
|
|
356
363
|
T2B1: string | false;
|
|
364
|
+
T3T1: string | false;
|
|
357
365
|
connect: boolean;
|
|
358
366
|
};
|
|
359
367
|
decimals: number;
|
|
@@ -402,6 +410,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
|
|
|
402
410
|
T1B1: string | false;
|
|
403
411
|
T2T1: string | false;
|
|
404
412
|
T2B1: string | false;
|
|
413
|
+
T3T1: string | false;
|
|
405
414
|
connect: boolean;
|
|
406
415
|
};
|
|
407
416
|
decimals: number;
|
|
@@ -457,6 +466,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
|
|
|
457
466
|
T1B1: string | false;
|
|
458
467
|
T2T1: string | false;
|
|
459
468
|
T2B1: string | false;
|
|
469
|
+
T3T1: string | false;
|
|
460
470
|
connect: boolean;
|
|
461
471
|
};
|
|
462
472
|
decimals: number;
|
|
@@ -487,6 +497,7 @@ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) =>
|
|
|
487
497
|
T1B1: string | false;
|
|
488
498
|
T2T1: string | false;
|
|
489
499
|
T2B1: string | false;
|
|
500
|
+
T3T1: string | false;
|
|
490
501
|
connect: boolean;
|
|
491
502
|
};
|
|
492
503
|
decimals: number;
|
|
@@ -518,6 +529,7 @@ export declare const getAllNetworks: () => (({
|
|
|
518
529
|
T1B1: string | false;
|
|
519
530
|
T2T1: string | false;
|
|
520
531
|
T2B1: string | false;
|
|
532
|
+
T3T1: string | false;
|
|
521
533
|
connect: boolean;
|
|
522
534
|
};
|
|
523
535
|
decimals: number;
|
|
@@ -573,6 +585,7 @@ export declare const getAllNetworks: () => (({
|
|
|
573
585
|
T1B1: string | false;
|
|
574
586
|
T2T1: string | false;
|
|
575
587
|
T2B1: string | false;
|
|
588
|
+
T3T1: string | false;
|
|
576
589
|
connect: boolean;
|
|
577
590
|
};
|
|
578
591
|
decimals: number;
|
|
@@ -603,6 +616,7 @@ export declare const getAllNetworks: () => (({
|
|
|
603
616
|
T1B1: string | false;
|
|
604
617
|
T2T1: string | false;
|
|
605
618
|
T2B1: string | false;
|
|
619
|
+
T3T1: string | false;
|
|
606
620
|
connect: boolean;
|
|
607
621
|
};
|
|
608
622
|
decimals: number;
|
package/lib/data/config.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export declare const config: {
|
|
|
52
52
|
T1B1: string;
|
|
53
53
|
T2T1: string;
|
|
54
54
|
T2B1?: undefined;
|
|
55
|
+
T3T1?: undefined;
|
|
55
56
|
};
|
|
56
57
|
max: undefined;
|
|
57
58
|
comment: string[];
|
|
@@ -62,6 +63,7 @@ export declare const config: {
|
|
|
62
63
|
T1B1: string;
|
|
63
64
|
T2T1: string;
|
|
64
65
|
T2B1?: undefined;
|
|
66
|
+
T3T1?: undefined;
|
|
65
67
|
};
|
|
66
68
|
comment: string[];
|
|
67
69
|
methods?: undefined;
|
|
@@ -73,6 +75,7 @@ export declare const config: {
|
|
|
73
75
|
T1B1: string;
|
|
74
76
|
T2T1: string;
|
|
75
77
|
T2B1?: undefined;
|
|
78
|
+
T3T1?: undefined;
|
|
76
79
|
};
|
|
77
80
|
comment: string[];
|
|
78
81
|
coin?: undefined;
|
|
@@ -84,6 +87,7 @@ export declare const config: {
|
|
|
84
87
|
T1B1: string;
|
|
85
88
|
T2T1: string;
|
|
86
89
|
T2B1?: undefined;
|
|
90
|
+
T3T1?: undefined;
|
|
87
91
|
};
|
|
88
92
|
comment: string[];
|
|
89
93
|
coin?: undefined;
|
|
@@ -96,6 +100,7 @@ export declare const config: {
|
|
|
96
100
|
T1B1: string;
|
|
97
101
|
T2T1: string;
|
|
98
102
|
T2B1?: undefined;
|
|
103
|
+
T3T1?: undefined;
|
|
99
104
|
};
|
|
100
105
|
comment: string[];
|
|
101
106
|
max?: undefined;
|
|
@@ -107,6 +112,7 @@ export declare const config: {
|
|
|
107
112
|
T1B1: string;
|
|
108
113
|
T2T1: string;
|
|
109
114
|
T2B1?: undefined;
|
|
115
|
+
T3T1?: undefined;
|
|
110
116
|
};
|
|
111
117
|
coin?: undefined;
|
|
112
118
|
max?: undefined;
|
|
@@ -117,6 +123,7 @@ export declare const config: {
|
|
|
117
123
|
T1B1: string;
|
|
118
124
|
T2T1: string;
|
|
119
125
|
T2B1: string;
|
|
126
|
+
T3T1?: undefined;
|
|
120
127
|
};
|
|
121
128
|
comment: string[];
|
|
122
129
|
coin?: undefined;
|
|
@@ -128,6 +135,7 @@ export declare const config: {
|
|
|
128
135
|
T1B1: string;
|
|
129
136
|
T2T1: string;
|
|
130
137
|
T2B1?: undefined;
|
|
138
|
+
T3T1?: undefined;
|
|
131
139
|
};
|
|
132
140
|
coin?: undefined;
|
|
133
141
|
max?: undefined;
|
|
@@ -139,6 +147,7 @@ export declare const config: {
|
|
|
139
147
|
T1B1: string;
|
|
140
148
|
T2T1: string;
|
|
141
149
|
T2B1: string;
|
|
150
|
+
T3T1?: undefined;
|
|
142
151
|
};
|
|
143
152
|
coin?: undefined;
|
|
144
153
|
max?: undefined;
|
|
@@ -150,11 +159,24 @@ export declare const config: {
|
|
|
150
159
|
T1B1: string;
|
|
151
160
|
T2T1: string;
|
|
152
161
|
T2B1: string;
|
|
162
|
+
T3T1?: undefined;
|
|
153
163
|
};
|
|
154
164
|
comment: string[];
|
|
155
165
|
coin?: undefined;
|
|
156
166
|
methods?: undefined;
|
|
157
167
|
max?: undefined;
|
|
168
|
+
} | {
|
|
169
|
+
methods: string[];
|
|
170
|
+
min: {
|
|
171
|
+
T1B1: string;
|
|
172
|
+
T2T1: string;
|
|
173
|
+
T2B1: string;
|
|
174
|
+
T3T1: string;
|
|
175
|
+
};
|
|
176
|
+
coin?: undefined;
|
|
177
|
+
max?: undefined;
|
|
178
|
+
comment?: undefined;
|
|
179
|
+
capabilities?: undefined;
|
|
158
180
|
})[];
|
|
159
181
|
};
|
|
160
182
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/data/config.js
CHANGED
|
@@ -76,6 +76,10 @@ exports.config = {
|
|
|
76
76
|
name: 'firmware-t2b1',
|
|
77
77
|
url: './data/firmware/t2b1/releases.json',
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
name: 'firmware-t3t1',
|
|
81
|
+
url: './data/firmware/t3t1/releases.json',
|
|
82
|
+
},
|
|
79
83
|
],
|
|
80
84
|
messages: './data/messages/messages.json',
|
|
81
85
|
supportedBrowsers: {
|
|
@@ -240,7 +244,7 @@ exports.config = {
|
|
|
240
244
|
},
|
|
241
245
|
{
|
|
242
246
|
methods: ['changeLanguage'],
|
|
243
|
-
min: { T1B1: '0', T2T1: '2.7.0', T2B1: '2.7.0' },
|
|
247
|
+
min: { T1B1: '0', T2T1: '2.7.0', T2B1: '2.7.0', T3T1: '2.7.1' },
|
|
244
248
|
},
|
|
245
249
|
],
|
|
246
250
|
};
|
|
@@ -110,6 +110,9 @@ const parseConnectSettings = (input = {}) => {
|
|
|
110
110
|
if (typeof input.useCoreInPopup === 'boolean') {
|
|
111
111
|
settings.useCoreInPopup = input.useCoreInPopup;
|
|
112
112
|
}
|
|
113
|
+
if (typeof input._extendWebextensionLifetime === 'boolean') {
|
|
114
|
+
settings._extendWebextensionLifetime = input._extendWebextensionLifetime;
|
|
115
|
+
}
|
|
113
116
|
return settings;
|
|
114
117
|
};
|
|
115
118
|
exports.parseConnectSettings = parseConnectSettings;
|