mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-14 11:18:56 +01:00
fix(suite-native): change device label analytics
This commit is contained in:
@@ -4,7 +4,7 @@ import { yupResolver } from '@hookform/resolvers/yup';
|
||||
|
||||
import { yup } from '@suite-common/validators';
|
||||
import { selectSelectedDeviceLabelOrName } from '@suite-common/wallet-core';
|
||||
import { EventType, analytics } from '@trezor/suite-analytics';
|
||||
import { EventTypeShared, analytics } from '@trezor/suite-analytics';
|
||||
import { isAscii } from '@trezor/utils';
|
||||
|
||||
import { applySettings } from 'src/actions/settings/deviceSettingsActions';
|
||||
@@ -60,7 +60,7 @@ export const useChangeDeviceLabel = (): {
|
||||
const onSubmit = form.handleSubmit(({ deviceLabel }) => {
|
||||
dispatch(applySettings({ label: deviceLabel }));
|
||||
analytics.report({
|
||||
type: EventType.SettingsDeviceChangeLabel,
|
||||
type: EventTypeShared.SettingsDeviceChangeLabel,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ export enum EventType {
|
||||
WalletConnectSessionRequest = 'wallet-connect/session-request',
|
||||
WalletConnectError = 'wallet-connect/error',
|
||||
|
||||
SettingsDeviceChangeLabel = 'settings/device/change-label',
|
||||
|
||||
ConnectPopupInit = 'connect-popup/init',
|
||||
ConnectPopupPermissions = 'connect-popup/permissions',
|
||||
ConnectPopupCall = 'connect-popup/call',
|
||||
|
||||
@@ -41,6 +41,7 @@ export type SuiteSharedAnalyticsEvent =
|
||||
error: string;
|
||||
};
|
||||
}
|
||||
| { type: EventType.SettingsDeviceChangeLabel }
|
||||
| {
|
||||
type: EventType.ConnectPopupInit;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ export enum EventType {
|
||||
SettingsDeviceSetupWipeCode = 'settings/device/setup-wipe-code',
|
||||
SettingsDeviceChangeWipeCode = 'settings/device/change-wipe-code',
|
||||
SettingsDeviceDisableWipeCode = 'settings/device/disable-wipe-code',
|
||||
SettingsDeviceChangeLabel = 'settings/device/change-label',
|
||||
SettingsDeviceUpdateAutoLock = 'settings/device/update-auto-lock',
|
||||
SettingsDeviceChangeOrientation = 'settings/device/change-orientation',
|
||||
SettingsDeviceChangeHapticFeedback = 'settings/device/change-haptic-feedback',
|
||||
|
||||
@@ -492,7 +492,6 @@ export type SuiteAnalyticsEvent =
|
||||
| { type: EventType.SettingsDeviceSetupWipeCode }
|
||||
| { type: EventType.SettingsDeviceChangeWipeCode }
|
||||
| { type: EventType.SettingsDeviceDisableWipeCode }
|
||||
| { type: EventType.SettingsDeviceChangeLabel }
|
||||
| {
|
||||
type: EventType.SettingsDeviceUpdateAutoLock;
|
||||
payload: {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { useSelector } from 'react-redux';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
|
||||
import { selectSelectedDevice } from '@suite-common/wallet-core';
|
||||
import { EventTypeShared, analytics } from '@suite-native/analytics';
|
||||
import { useForm } from '@suite-native/forms';
|
||||
import { useTranslate } from '@suite-native/intl';
|
||||
import {
|
||||
@@ -11,7 +12,6 @@ import {
|
||||
StackNavigationProps,
|
||||
} from '@suite-native/navigation';
|
||||
import TrezorConnect from '@trezor/connect';
|
||||
import { EventType, analytics } from '@trezor/suite-analytics';
|
||||
|
||||
import { deviceNameFormValidationSchema } from '../deviceNameFormSchema';
|
||||
|
||||
@@ -73,7 +73,7 @@ export const useChangeDeviceName = () => {
|
||||
navigation.navigate(DeviceNameStackRoutes.DeviceNameLoadingScreen);
|
||||
|
||||
analytics.report({
|
||||
type: EventType.SettingsDeviceChangeLabel,
|
||||
type: EventTypeShared.SettingsDeviceChangeLabel,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user