Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 30, 2024
1 parent 663b589 commit 89b2759
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/scripts/controllers/metametrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
sum,
} from 'lodash';
import { ObservableStore } from '@metamask/obs-store';
import { bufferToHex } from 'ethereumjs-util';
import { keccak256 } from 'ethereum-cryptography/keccak';
import { v4 as uuidv4 } from 'uuid';
import { NameControllerState, NameType } from '@metamask/name-controller';
import { AccountsControllerState } from '@metamask/accounts-controller';
import {
add0x,
getErrorMessage,
Hex,
isErrorWithMessage,
Expand Down Expand Up @@ -375,15 +375,15 @@ export default class MetaMetricsController {
}

generateMetaMetricsId(): string {
return bufferToHex(
return add0x(
Buffer.from(
keccak256(
Buffer.from(
String(Date.now()) +
String(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)),
),
),
),
).toString('hex')
);
}

Expand Down

0 comments on commit 89b2759

Please sign in to comment.