mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-02-20 00:33:07 +01:00
chore(analytics): filter out c_ params from console report
- We can check them in the full url.
This commit is contained in:
@@ -89,7 +89,9 @@ export const reportEvent = async ({
|
|||||||
loggerEnabled,
|
loggerEnabled,
|
||||||
}: ReportEventProps) => {
|
}: ReportEventProps) => {
|
||||||
if (loggerEnabled) {
|
if (loggerEnabled) {
|
||||||
const payload = Object.fromEntries(new URL(url).searchParams.entries());
|
const payload = Object.fromEntries(
|
||||||
|
[...new URL(url).searchParams.entries()].filter(([key]) => !key.startsWith('c_')),
|
||||||
|
);
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(`[Analytics] '${type}'`, { type, url, retry, payload });
|
console.log(`[Analytics] '${type}'`, { type, url, retry, payload });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user