Skip to content

Commit 2ca7a4b

Browse files
authored
feat(analytics): add fields to SentinelMeta (#560)
1 parent 608555f commit 2ca7a4b

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ export {
2323
SmartTransactionCancellationReason,
2424
SmartTransactionStatuses,
2525
ClientId,
26+
Feature,
27+
Kind,
2628
} from './types';
2729
export { MetaMetricsEventName, MetaMetricsEventCategory } from './constants';
2830
export {

src/types.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,32 @@ import type { SmartTransactionsNetworkConfig } from './featureFlags';
66

77
export type SentinelMeta = {
88
txType?: TransactionType;
9+
feature?: Feature;
10+
kind?: Kind;
11+
client?: ClientId;
12+
wallet?: string;
913
};
1014

15+
// This list does not belong here, but as these are reported to tx-sentinel, it is ok to have it here for now.
16+
export enum Feature {
17+
Swap = 'Swap',
18+
Staking = 'Staking',
19+
Ramp = 'Ramp',
20+
Prediction = 'Prediction',
21+
Perp = 'Perp',
22+
Earn = 'Earn',
23+
Card = 'Card',
24+
Bridge = 'Bridge',
25+
dAppTransaction = 'dAppTransaction',
26+
}
27+
28+
export enum Kind {
29+
Regular = 'Regular',
30+
STX = 'STX',
31+
GaslessSendBundle = 'GaslessSendBundle',
32+
GaslessEIP7702 = 'GaslessEIP7702',
33+
}
34+
1135
/** API */
1236
export enum APIType {
1337
'GET_FEES',

0 commit comments

Comments
 (0)