add type
This commit is contained in:
parent
c01ec6304d
commit
dfa8af63e2
@ -81,6 +81,9 @@ export enum AnalyticsEvent {
|
||||
TradePlaceOrderConfirmed = 'TradePlaceOrderConfirmed',
|
||||
TradeCancelOrder = 'TradeCancelOrder',
|
||||
TradeCancelOrderConfirmed = 'TradeCancelOrderConfirmed',
|
||||
|
||||
// Notification
|
||||
NotificationAction = 'NotificationAction',
|
||||
}
|
||||
|
||||
export type AnalyticsEventData<T extends AnalyticsEvent> =
|
||||
@ -180,6 +183,12 @@ export type AnalyticsEventData<T extends AnalyticsEvent> =
|
||||
/** URL/IP of node the order was sent to */
|
||||
validatorUrl: string;
|
||||
}
|
||||
: // Notifcation
|
||||
T extends AnalyticsEvent.NotificationAction
|
||||
? {
|
||||
type: string;
|
||||
id: string;
|
||||
}
|
||||
: never;
|
||||
|
||||
export const DEFAULT_TRANSACTION_MEMO = 'dYdX Frontend (web)';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user