1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 09:45:28 +03:00

remove object-hash and lru_map (#3271)

* refactor: replace `object-hash` with `crypto-es`

* chore: remove `lru_map`
This commit is contained in:
Tomas Chmelevskij 2023-01-25 16:02:46 +01:00 committed by GitHub
parent c14a056dae
commit 7c6f90bea5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 16 deletions

View file

@ -22,6 +22,7 @@ import { updateTabList } from "./utils/updateTabList";
import { get as getConfig, set as setConfig } from "./ConfigStorage";
import { tracking } from "./Analytics";
import semver from 'semver';
import CryptoES from "crypto-es";
let mspHelper;
let connectionTimestamp;
@ -463,7 +464,7 @@ function processUid() {
MSP.send_message(MSPCodes.MSP_UID, false, false, function () {
const deviceIdentifier = FC.CONFIG.deviceIdentifier;
tracking.setFlightControllerData(tracking.DATA.MCU_ID, objectHash.sha1(deviceIdentifier));
tracking.setFlightControllerData(tracking.DATA.MCU_ID, CryptoES.SHA1(deviceIdentifier));
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'Connected');
connectionTimestamp = Date.now();
gui_log(i18n.getMessage('uniqueDeviceIdReceived', [deviceIdentifier]));