@metamask-previews/bridge-controller 16.0.0-preview-6df5889d → 16.0.0-preview-72122b6f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -6
- package/dist/bridge-controller.cjs +11 -131
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts +3 -26
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts +3 -26
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +11 -131
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/index.cjs +11 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +0 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +0 -3
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.cjs +1 -2
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts.map +1 -1
- package/dist/selectors.mjs +1 -2
- package/dist/selectors.mjs.map +1 -1
- package/dist/types.cjs +1 -9
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -9
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -9
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +0 -8
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/utils/metrics/constants.cjs +0 -43
- package/dist/utils/metrics/constants.cjs.map +0 -1
- package/dist/utils/metrics/constants.d.cts +0 -36
- package/dist/utils/metrics/constants.d.cts.map +0 -1
- package/dist/utils/metrics/constants.d.mts +0 -36
- package/dist/utils/metrics/constants.d.mts.map +0 -1
- package/dist/utils/metrics/constants.mjs +0 -40
- package/dist/utils/metrics/constants.mjs.map +0 -1
- package/dist/utils/metrics/properties.cjs +0 -77
- package/dist/utils/metrics/properties.cjs.map +0 -1
- package/dist/utils/metrics/properties.d.cts +0 -22
- package/dist/utils/metrics/properties.d.cts.map +0 -1
- package/dist/utils/metrics/properties.d.mts +0 -22
- package/dist/utils/metrics/properties.d.mts.map +0 -1
- package/dist/utils/metrics/properties.mjs +0 -66
- package/dist/utils/metrics/properties.mjs.map +0 -1
- package/dist/utils/metrics/types.cjs +0 -3
- package/dist/utils/metrics/types.cjs.map +0 -1
- package/dist/utils/metrics/types.d.cts +0 -156
- package/dist/utils/metrics/types.d.cts.map +0 -1
- package/dist/utils/metrics/types.d.mts +0 -156
- package/dist/utils/metrics/types.d.mts.map +0 -1
- package/dist/utils/metrics/types.mjs +0 -2
- package/dist/utils/metrics/types.mjs.map +0 -1
@@ -1,43 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.MetricsSwapType = exports.MetricsActionType = exports.MetaMetricsSwapsEventSource = exports.UnifiedSwapBridgeEventName = exports.UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = void 0;
|
4
|
-
exports.UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';
|
5
|
-
/**
|
6
|
-
* These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps
|
7
|
-
*/
|
8
|
-
var UnifiedSwapBridgeEventName;
|
9
|
-
(function (UnifiedSwapBridgeEventName) {
|
10
|
-
UnifiedSwapBridgeEventName["ButtonClicked"] = "Unified SwapBridge Button Clicked";
|
11
|
-
UnifiedSwapBridgeEventName["PageViewed"] = "Unified SwapBridge Page Viewed";
|
12
|
-
UnifiedSwapBridgeEventName["InputChanged"] = "Unified SwapBridge Input Changed";
|
13
|
-
UnifiedSwapBridgeEventName["InputSourceDestinationFlipped"] = "Unified SwapBridge Source Destination Flipped";
|
14
|
-
UnifiedSwapBridgeEventName["QuotesRequested"] = "Unified SwapBridge Quotes Requested";
|
15
|
-
UnifiedSwapBridgeEventName["QuotesReceived"] = "Unified SwapBridge Quotes Received";
|
16
|
-
UnifiedSwapBridgeEventName["QuoteError"] = "Unified SwapBridge Quote Error";
|
17
|
-
UnifiedSwapBridgeEventName["SnapConfirmationViewed"] = "Unified SwapBridge Snap Confirmation Page Viewed";
|
18
|
-
UnifiedSwapBridgeEventName["Submitted"] = "Unified SwapBridge Submitted";
|
19
|
-
UnifiedSwapBridgeEventName["Completed"] = "Unified SwapBridge Completed";
|
20
|
-
UnifiedSwapBridgeEventName["Failed"] = "Unified SwapBridge Failed";
|
21
|
-
UnifiedSwapBridgeEventName["AllQuotesOpened"] = "Unified SwapBridge All Quotes Opened";
|
22
|
-
UnifiedSwapBridgeEventName["AllQuotesSorted"] = "Unified SwapBridge All Quotes Sorted";
|
23
|
-
UnifiedSwapBridgeEventName["QuoteSelected"] = "Unified SwapBridge Quote Selected";
|
24
|
-
})(UnifiedSwapBridgeEventName || (exports.UnifiedSwapBridgeEventName = UnifiedSwapBridgeEventName = {}));
|
25
|
-
/**
|
26
|
-
* @deprecated remove this event property
|
27
|
-
*/
|
28
|
-
var MetaMetricsSwapsEventSource;
|
29
|
-
(function (MetaMetricsSwapsEventSource) {
|
30
|
-
MetaMetricsSwapsEventSource["MainView"] = "Main View";
|
31
|
-
MetaMetricsSwapsEventSource["TokenView"] = "Token View";
|
32
|
-
})(MetaMetricsSwapsEventSource || (exports.MetaMetricsSwapsEventSource = MetaMetricsSwapsEventSource = {}));
|
33
|
-
var MetricsActionType;
|
34
|
-
(function (MetricsActionType) {
|
35
|
-
MetricsActionType["CROSSCHAIN_V1"] = "crosschain-v1";
|
36
|
-
MetricsActionType["SWAPBRIDGE_V1"] = "swapbridge-v1";
|
37
|
-
})(MetricsActionType || (exports.MetricsActionType = MetricsActionType = {}));
|
38
|
-
var MetricsSwapType;
|
39
|
-
(function (MetricsSwapType) {
|
40
|
-
MetricsSwapType["SINGLE"] = "single chain";
|
41
|
-
MetricsSwapType["CROSSCHAIN"] = "crosschain";
|
42
|
-
})(MetricsSwapType || (exports.MetricsSwapType = MetricsSwapType = {}));
|
43
|
-
//# sourceMappingURL=constants.cjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,kCAAkC,GAAG,oBAAoB,CAAC;AAEvE;;GAEG;AACH,IAAY,0BAeX;AAfD,WAAY,0BAA0B;IACpC,iFAAsE,CAAA;IACtE,2EAAgE,CAAA;IAChE,+EAAoE,CAAA;IACpE,6GAAkG,CAAA;IAClG,qFAA0E,CAAA;IAC1E,mFAAwE,CAAA;IACxE,2EAAgE,CAAA;IAChE,yGAA8F,CAAA;IAC9F,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAC7D,kEAAuD,CAAA;IACvD,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAC3E,iFAAsE,CAAA;AACxE,CAAC,EAfW,0BAA0B,0CAA1B,0BAA0B,QAerC;AAED;;GAEG;AACH,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,qDAAsB,CAAA;IACtB,uDAAwB,CAAA;AAC1B,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,oDAA+B,CAAA;AACjC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;AAC3B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["export const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';\n\n/**\n * These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps\n */\nexport enum UnifiedSwapBridgeEventName {\n ButtonClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Button Clicked`,\n PageViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Page Viewed`,\n InputChanged = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Input Changed`,\n InputSourceDestinationFlipped = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Source Destination Flipped`,\n QuotesRequested = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Requested`,\n QuotesReceived = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Received`,\n QuoteError = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Error`,\n SnapConfirmationViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Snap Confirmation Page Viewed`,\n Submitted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Submitted`,\n Completed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Completed`,\n Failed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Failed`,\n AllQuotesOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Opened`,\n AllQuotesSorted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Sorted`,\n QuoteSelected = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Selected`,\n}\n\n/**\n * @deprecated remove this event property\n */\nexport enum MetaMetricsSwapsEventSource {\n MainView = 'Main View',\n TokenView = 'Token View',\n}\n\nexport enum MetricsActionType {\n CROSSCHAIN_V1 = 'crosschain-v1',\n SWAPBRIDGE_V1 = 'swapbridge-v1',\n}\n\nexport enum MetricsSwapType {\n SINGLE = 'single chain',\n CROSSCHAIN = 'crosschain',\n}\n"]}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
export declare const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = "Unified SwapBridge";
|
2
|
-
/**
|
3
|
-
* These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps
|
4
|
-
*/
|
5
|
-
export declare enum UnifiedSwapBridgeEventName {
|
6
|
-
ButtonClicked = "Unified SwapBridge Button Clicked",
|
7
|
-
PageViewed = "Unified SwapBridge Page Viewed",
|
8
|
-
InputChanged = "Unified SwapBridge Input Changed",
|
9
|
-
InputSourceDestinationFlipped = "Unified SwapBridge Source Destination Flipped",
|
10
|
-
QuotesRequested = "Unified SwapBridge Quotes Requested",
|
11
|
-
QuotesReceived = "Unified SwapBridge Quotes Received",
|
12
|
-
QuoteError = "Unified SwapBridge Quote Error",
|
13
|
-
SnapConfirmationViewed = "Unified SwapBridge Snap Confirmation Page Viewed",
|
14
|
-
Submitted = "Unified SwapBridge Submitted",
|
15
|
-
Completed = "Unified SwapBridge Completed",
|
16
|
-
Failed = "Unified SwapBridge Failed",
|
17
|
-
AllQuotesOpened = "Unified SwapBridge All Quotes Opened",
|
18
|
-
AllQuotesSorted = "Unified SwapBridge All Quotes Sorted",
|
19
|
-
QuoteSelected = "Unified SwapBridge Quote Selected"
|
20
|
-
}
|
21
|
-
/**
|
22
|
-
* @deprecated remove this event property
|
23
|
-
*/
|
24
|
-
export declare enum MetaMetricsSwapsEventSource {
|
25
|
-
MainView = "Main View",
|
26
|
-
TokenView = "Token View"
|
27
|
-
}
|
28
|
-
export declare enum MetricsActionType {
|
29
|
-
CROSSCHAIN_V1 = "crosschain-v1",
|
30
|
-
SWAPBRIDGE_V1 = "swapbridge-v1"
|
31
|
-
}
|
32
|
-
export declare enum MetricsSwapType {
|
33
|
-
SINGLE = "single chain",
|
34
|
-
CROSSCHAIN = "crosschain"
|
35
|
-
}
|
36
|
-
//# sourceMappingURL=constants.d.cts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,6BAA6B,kDAAqE;IAClG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,UAAU,mCAAsD;IAChE,sBAAsB,qDAAwE;IAC9F,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;CACvE;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;CACzB;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
export declare const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = "Unified SwapBridge";
|
2
|
-
/**
|
3
|
-
* These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps
|
4
|
-
*/
|
5
|
-
export declare enum UnifiedSwapBridgeEventName {
|
6
|
-
ButtonClicked = "Unified SwapBridge Button Clicked",
|
7
|
-
PageViewed = "Unified SwapBridge Page Viewed",
|
8
|
-
InputChanged = "Unified SwapBridge Input Changed",
|
9
|
-
InputSourceDestinationFlipped = "Unified SwapBridge Source Destination Flipped",
|
10
|
-
QuotesRequested = "Unified SwapBridge Quotes Requested",
|
11
|
-
QuotesReceived = "Unified SwapBridge Quotes Received",
|
12
|
-
QuoteError = "Unified SwapBridge Quote Error",
|
13
|
-
SnapConfirmationViewed = "Unified SwapBridge Snap Confirmation Page Viewed",
|
14
|
-
Submitted = "Unified SwapBridge Submitted",
|
15
|
-
Completed = "Unified SwapBridge Completed",
|
16
|
-
Failed = "Unified SwapBridge Failed",
|
17
|
-
AllQuotesOpened = "Unified SwapBridge All Quotes Opened",
|
18
|
-
AllQuotesSorted = "Unified SwapBridge All Quotes Sorted",
|
19
|
-
QuoteSelected = "Unified SwapBridge Quote Selected"
|
20
|
-
}
|
21
|
-
/**
|
22
|
-
* @deprecated remove this event property
|
23
|
-
*/
|
24
|
-
export declare enum MetaMetricsSwapsEventSource {
|
25
|
-
MainView = "Main View",
|
26
|
-
TokenView = "Token View"
|
27
|
-
}
|
28
|
-
export declare enum MetricsActionType {
|
29
|
-
CROSSCHAIN_V1 = "crosschain-v1",
|
30
|
-
SWAPBRIDGE_V1 = "swapbridge-v1"
|
31
|
-
}
|
32
|
-
export declare enum MetricsSwapType {
|
33
|
-
SINGLE = "single chain",
|
34
|
-
CROSSCHAIN = "crosschain"
|
35
|
-
}
|
36
|
-
//# sourceMappingURL=constants.d.mts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,6BAA6B,kDAAqE;IAClG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,UAAU,mCAAsD;IAChE,sBAAsB,qDAAwE;IAC9F,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;CACvE;AAED;;GAEG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;CACzB;AAED,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
export const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';
|
2
|
-
/**
|
3
|
-
* These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps
|
4
|
-
*/
|
5
|
-
export var UnifiedSwapBridgeEventName;
|
6
|
-
(function (UnifiedSwapBridgeEventName) {
|
7
|
-
UnifiedSwapBridgeEventName["ButtonClicked"] = "Unified SwapBridge Button Clicked";
|
8
|
-
UnifiedSwapBridgeEventName["PageViewed"] = "Unified SwapBridge Page Viewed";
|
9
|
-
UnifiedSwapBridgeEventName["InputChanged"] = "Unified SwapBridge Input Changed";
|
10
|
-
UnifiedSwapBridgeEventName["InputSourceDestinationFlipped"] = "Unified SwapBridge Source Destination Flipped";
|
11
|
-
UnifiedSwapBridgeEventName["QuotesRequested"] = "Unified SwapBridge Quotes Requested";
|
12
|
-
UnifiedSwapBridgeEventName["QuotesReceived"] = "Unified SwapBridge Quotes Received";
|
13
|
-
UnifiedSwapBridgeEventName["QuoteError"] = "Unified SwapBridge Quote Error";
|
14
|
-
UnifiedSwapBridgeEventName["SnapConfirmationViewed"] = "Unified SwapBridge Snap Confirmation Page Viewed";
|
15
|
-
UnifiedSwapBridgeEventName["Submitted"] = "Unified SwapBridge Submitted";
|
16
|
-
UnifiedSwapBridgeEventName["Completed"] = "Unified SwapBridge Completed";
|
17
|
-
UnifiedSwapBridgeEventName["Failed"] = "Unified SwapBridge Failed";
|
18
|
-
UnifiedSwapBridgeEventName["AllQuotesOpened"] = "Unified SwapBridge All Quotes Opened";
|
19
|
-
UnifiedSwapBridgeEventName["AllQuotesSorted"] = "Unified SwapBridge All Quotes Sorted";
|
20
|
-
UnifiedSwapBridgeEventName["QuoteSelected"] = "Unified SwapBridge Quote Selected";
|
21
|
-
})(UnifiedSwapBridgeEventName || (UnifiedSwapBridgeEventName = {}));
|
22
|
-
/**
|
23
|
-
* @deprecated remove this event property
|
24
|
-
*/
|
25
|
-
export var MetaMetricsSwapsEventSource;
|
26
|
-
(function (MetaMetricsSwapsEventSource) {
|
27
|
-
MetaMetricsSwapsEventSource["MainView"] = "Main View";
|
28
|
-
MetaMetricsSwapsEventSource["TokenView"] = "Token View";
|
29
|
-
})(MetaMetricsSwapsEventSource || (MetaMetricsSwapsEventSource = {}));
|
30
|
-
export var MetricsActionType;
|
31
|
-
(function (MetricsActionType) {
|
32
|
-
MetricsActionType["CROSSCHAIN_V1"] = "crosschain-v1";
|
33
|
-
MetricsActionType["SWAPBRIDGE_V1"] = "swapbridge-v1";
|
34
|
-
})(MetricsActionType || (MetricsActionType = {}));
|
35
|
-
export var MetricsSwapType;
|
36
|
-
(function (MetricsSwapType) {
|
37
|
-
MetricsSwapType["SINGLE"] = "single chain";
|
38
|
-
MetricsSwapType["CROSSCHAIN"] = "crosschain";
|
39
|
-
})(MetricsSwapType || (MetricsSwapType = {}));
|
40
|
-
//# sourceMappingURL=constants.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kCAAkC,GAAG,oBAAoB,CAAC;AAEvE;;GAEG;AACH,MAAM,CAAN,IAAY,0BAeX;AAfD,WAAY,0BAA0B;IACpC,iFAAsE,CAAA;IACtE,2EAAgE,CAAA;IAChE,+EAAoE,CAAA;IACpE,6GAAkG,CAAA;IAClG,qFAA0E,CAAA;IAC1E,mFAAwE,CAAA;IACxE,2EAAgE,CAAA;IAChE,yGAA8F,CAAA;IAC9F,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAC7D,kEAAuD,CAAA;IACvD,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAC3E,iFAAsE,CAAA;AACxE,CAAC,EAfW,0BAA0B,KAA1B,0BAA0B,QAerC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,qDAAsB,CAAA;IACtB,uDAAwB,CAAA;AAC1B,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,oDAA+B,CAAA;AACjC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;AAC3B,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["export const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';\n\n/**\n * These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps\n */\nexport enum UnifiedSwapBridgeEventName {\n ButtonClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Button Clicked`,\n PageViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Page Viewed`,\n InputChanged = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Input Changed`,\n InputSourceDestinationFlipped = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Source Destination Flipped`,\n QuotesRequested = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Requested`,\n QuotesReceived = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Received`,\n QuoteError = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Error`,\n SnapConfirmationViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Snap Confirmation Page Viewed`,\n Submitted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Submitted`,\n Completed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Completed`,\n Failed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Failed`,\n AllQuotesOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Opened`,\n AllQuotesSorted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Sorted`,\n QuoteSelected = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Selected`,\n}\n\n/**\n * @deprecated remove this event property\n */\nexport enum MetaMetricsSwapsEventSource {\n MainView = 'Main View',\n TokenView = 'Token View',\n}\n\nexport enum MetricsActionType {\n CROSSCHAIN_V1 = 'crosschain-v1',\n SWAPBRIDGE_V1 = 'swapbridge-v1',\n}\n\nexport enum MetricsSwapType {\n SINGLE = 'single chain',\n CROSSCHAIN = 'crosschain',\n}\n"]}
|
@@ -1,77 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.isCustomSlippage = exports.isHardwareWallet = exports.getRequestParams = exports.formatProviderLabel = exports.getSwapTypeFromQuote = exports.getSwapType = exports.getActionTypeFromQuoteRequest = exports.getActionType = exports.toInputChangedPropertyValue = exports.toInputChangedPropertyKey = void 0;
|
4
|
-
const constants_1 = require("./constants.cjs");
|
5
|
-
const bridge_1 = require("../../constants/bridge.cjs");
|
6
|
-
const bridge_2 = require("../bridge.cjs");
|
7
|
-
const caip_formatters_1 = require("../caip-formatters.cjs");
|
8
|
-
exports.toInputChangedPropertyKey = {
|
9
|
-
srcTokenAddress: 'token_source',
|
10
|
-
destTokenAddress: 'token_destination',
|
11
|
-
srcChainId: 'chain_source',
|
12
|
-
destChainId: 'chain_destination',
|
13
|
-
slippage: 'slippage',
|
14
|
-
};
|
15
|
-
exports.toInputChangedPropertyValue = {
|
16
|
-
srcTokenAddress: ({ srcTokenAddress, srcChainId }) => srcChainId
|
17
|
-
? (0, caip_formatters_1.formatAddressToAssetId)(srcTokenAddress ?? '', srcChainId)
|
18
|
-
: undefined,
|
19
|
-
destTokenAddress: ({ destTokenAddress, destChainId }) => destChainId
|
20
|
-
? (0, caip_formatters_1.formatAddressToAssetId)(destTokenAddress ?? '', destChainId)
|
21
|
-
: undefined,
|
22
|
-
srcChainId: ({ srcChainId }) => srcChainId ? (0, caip_formatters_1.formatChainIdToCaip)(srcChainId) : undefined,
|
23
|
-
destChainId: ({ destChainId }) => destChainId ? (0, caip_formatters_1.formatChainIdToCaip)(destChainId) : undefined,
|
24
|
-
slippage: ({ slippage }) => (slippage ? Number(slippage) : slippage),
|
25
|
-
};
|
26
|
-
const getActionType = (srcChainId, destChainId) => {
|
27
|
-
if (srcChainId &&
|
28
|
-
(0, caip_formatters_1.formatChainIdToCaip)(srcChainId) ===
|
29
|
-
(0, caip_formatters_1.formatChainIdToCaip)(destChainId ?? srcChainId)) {
|
30
|
-
return constants_1.MetricsActionType.SWAPBRIDGE_V1;
|
31
|
-
}
|
32
|
-
return constants_1.MetricsActionType.CROSSCHAIN_V1;
|
33
|
-
};
|
34
|
-
exports.getActionType = getActionType;
|
35
|
-
const getActionTypeFromQuoteRequest = (quoteRequest) => {
|
36
|
-
return (0, exports.getActionType)(quoteRequest.srcChainId, quoteRequest.destChainId);
|
37
|
-
};
|
38
|
-
exports.getActionTypeFromQuoteRequest = getActionTypeFromQuoteRequest;
|
39
|
-
const getSwapType = (srcChainId, destChainId) => {
|
40
|
-
if (srcChainId &&
|
41
|
-
(0, caip_formatters_1.formatChainIdToCaip)(srcChainId) ===
|
42
|
-
(0, caip_formatters_1.formatChainIdToCaip)(destChainId ?? srcChainId)) {
|
43
|
-
return constants_1.MetricsSwapType.SINGLE;
|
44
|
-
}
|
45
|
-
return constants_1.MetricsSwapType.CROSSCHAIN;
|
46
|
-
};
|
47
|
-
exports.getSwapType = getSwapType;
|
48
|
-
const getSwapTypeFromQuote = (quoteRequest) => {
|
49
|
-
return (0, exports.getSwapType)(quoteRequest.srcChainId, quoteRequest.destChainId);
|
50
|
-
};
|
51
|
-
exports.getSwapTypeFromQuote = getSwapTypeFromQuote;
|
52
|
-
const formatProviderLabel = ({ bridgeId, bridges, }) => `${bridgeId}_${bridges[0]}`;
|
53
|
-
exports.formatProviderLabel = formatProviderLabel;
|
54
|
-
const getRequestParams = ({ destChainId, srcTokenAddress, destTokenAddress, }, srcChainIdCaip) => {
|
55
|
-
return {
|
56
|
-
chain_id_source: srcChainIdCaip,
|
57
|
-
chain_id_destination: destChainId ? (0, caip_formatters_1.formatChainIdToCaip)(destChainId) : null,
|
58
|
-
token_address_source: srcTokenAddress
|
59
|
-
? ((0, caip_formatters_1.formatAddressToAssetId)(srcTokenAddress, srcChainIdCaip) ??
|
60
|
-
(0, bridge_2.getNativeAssetForChainId)(srcChainIdCaip)?.assetId ??
|
61
|
-
null)
|
62
|
-
: ((0, bridge_2.getNativeAssetForChainId)(srcChainIdCaip)?.assetId ?? null),
|
63
|
-
token_address_destination: destTokenAddress
|
64
|
-
? ((0, caip_formatters_1.formatAddressToAssetId)(destTokenAddress, destChainId ?? srcChainIdCaip) ?? null)
|
65
|
-
: null,
|
66
|
-
};
|
67
|
-
};
|
68
|
-
exports.getRequestParams = getRequestParams;
|
69
|
-
const isHardwareWallet = (selectedAccount) => {
|
70
|
-
return selectedAccount?.metadata?.keyring.type?.includes('Hardware') ?? false;
|
71
|
-
};
|
72
|
-
exports.isHardwareWallet = isHardwareWallet;
|
73
|
-
const isCustomSlippage = (slippage) => {
|
74
|
-
return slippage !== bridge_1.DEFAULT_BRIDGE_CONTROLLER_STATE.quoteRequest.slippage;
|
75
|
-
};
|
76
|
-
exports.isCustomSlippage = isCustomSlippage;
|
77
|
-
//# sourceMappingURL=properties.cjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"properties.cjs","sourceRoot":"","sources":["../../../src/utils/metrics/properties.ts"],"names":[],"mappings":";;;AAEA,+CAAiE;AAGjE,uDAAyE;AAGzE,0CAAqD;AACrD,4DAG4B;AAEf,QAAA,yBAAyB,GAElC;IACF,eAAe,EAAE,cAAc;IAC/B,gBAAgB,EAAE,mBAAmB;IACrC,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,mBAAmB;IAChC,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E,OAAO,IAAI,IAAI,CAAC;QAC/D,yBAAyB,EAAE,gBAAgB;YACzC,CAAC,CAAC,CAAC,IAAA,wCAAsB,EACrB,gBAAgB,EAChB,WAAW,IAAI,cAAc,CAC9B,IAAI,IAAI,CAAC;YACZ,CAAC,CAAC,IAAI;KACT,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B;AAEK,MAAM,gBAAgB,GAAG,CAC9B,eAAiF,EACjF,EAAE;IACF,OAAO,eAAe,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;AAChF,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B;AAEK,MAAM,gBAAgB,GAAG,CAAC,QAAyC,EAAE,EAAE;IAC5E,OAAO,QAAQ,KAAK,wCAA+B,CAAC,YAAY,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B","sourcesContent":["import type { CaipChainId } from '@metamask/utils';\n\nimport { MetricsActionType, MetricsSwapType } from './constants';\nimport type { InputKeys, InputValues } from './types';\nimport type { AccountsControllerState } from '../../../../accounts-controller/src/AccountsController';\nimport { DEFAULT_BRIDGE_CONTROLLER_STATE } from '../../constants/bridge';\nimport type { BridgeControllerState, QuoteResponse, TxData } from '../../types';\nimport { type GenericQuoteRequest, type QuoteRequest } from '../../types';\nimport { getNativeAssetForChainId } from '../bridge';\nimport {\n formatAddressToAssetId,\n formatChainIdToCaip,\n} from '../caip-formatters';\n\nexport const toInputChangedPropertyKey: Partial<\n Record<keyof QuoteRequest, InputKeys>\n> = {\n srcTokenAddress: 'token_source',\n destTokenAddress: 'token_destination',\n srcChainId: 'chain_source',\n destChainId: 'chain_destination',\n slippage: 'slippage',\n};\n\nexport const toInputChangedPropertyValue: Partial<\n Record<\n keyof typeof toInputChangedPropertyKey,\n (\n value: Partial<GenericQuoteRequest>,\n ) => InputValues[keyof InputValues] | undefined\n >\n> = {\n srcTokenAddress: ({ srcTokenAddress, srcChainId }) =>\n srcChainId\n ? formatAddressToAssetId(srcTokenAddress ?? '', srcChainId)\n : undefined,\n destTokenAddress: ({ destTokenAddress, destChainId }) =>\n destChainId\n ? formatAddressToAssetId(destTokenAddress ?? '', destChainId)\n : undefined,\n srcChainId: ({ srcChainId }) =>\n srcChainId ? formatChainIdToCaip(srcChainId) : undefined,\n destChainId: ({ destChainId }) =>\n destChainId ? formatChainIdToCaip(destChainId) : undefined,\n slippage: ({ slippage }) => (slippage ? Number(slippage) : slippage),\n};\n\nexport const getActionType = (\n srcChainId?: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n if (\n srcChainId &&\n formatChainIdToCaip(srcChainId) ===\n formatChainIdToCaip(destChainId ?? srcChainId)\n ) {\n return MetricsActionType.SWAPBRIDGE_V1;\n }\n return MetricsActionType.CROSSCHAIN_V1;\n};\n\nexport const getActionTypeFromQuoteRequest = (\n quoteRequest: Partial<GenericQuoteRequest>,\n) => {\n return getActionType(quoteRequest.srcChainId, quoteRequest.destChainId);\n};\n\nexport const getSwapType = (\n srcChainId?: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n if (\n srcChainId &&\n formatChainIdToCaip(srcChainId) ===\n formatChainIdToCaip(destChainId ?? srcChainId)\n ) {\n return MetricsSwapType.SINGLE;\n }\n return MetricsSwapType.CROSSCHAIN;\n};\n\nexport const getSwapTypeFromQuote = (\n quoteRequest: Partial<GenericQuoteRequest>,\n) => {\n return getSwapType(quoteRequest.srcChainId, quoteRequest.destChainId);\n};\n\nexport const formatProviderLabel = ({\n bridgeId,\n bridges,\n}: QuoteResponse<TxData | string>['quote']): `${string}_${string}` =>\n `${bridgeId}_${bridges[0]}`;\n\nexport const getRequestParams = (\n {\n destChainId,\n srcTokenAddress,\n destTokenAddress,\n }: BridgeControllerState['quoteRequest'],\n srcChainIdCaip: CaipChainId,\n) => {\n return {\n chain_id_source: srcChainIdCaip,\n chain_id_destination: destChainId ? formatChainIdToCaip(destChainId) : null,\n token_address_source: srcTokenAddress\n ? (formatAddressToAssetId(srcTokenAddress, srcChainIdCaip) ??\n getNativeAssetForChainId(srcChainIdCaip)?.assetId ??\n null)\n : (getNativeAssetForChainId(srcChainIdCaip)?.assetId ?? null),\n token_address_destination: destTokenAddress\n ? (formatAddressToAssetId(\n destTokenAddress,\n destChainId ?? srcChainIdCaip,\n ) ?? null)\n : null,\n };\n};\n\nexport const isHardwareWallet = (\n selectedAccount?: AccountsControllerState['internalAccounts']['accounts'][string],\n) => {\n return selectedAccount?.metadata?.keyring.type?.includes('Hardware') ?? false;\n};\n\nexport const isCustomSlippage = (slippage: GenericQuoteRequest['slippage']) => {\n return slippage !== DEFAULT_BRIDGE_CONTROLLER_STATE.quoteRequest.slippage;\n};\n"]}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import type { CaipChainId } from "@metamask/utils";
|
2
|
-
import { MetricsActionType, MetricsSwapType } from "./constants.cjs";
|
3
|
-
import type { InputKeys, InputValues } from "./types.cjs";
|
4
|
-
import type { AccountsControllerState } from "../../../../accounts-controller/src/AccountsController.cjs";
|
5
|
-
import type { BridgeControllerState, QuoteResponse, TxData } from "../../types.cjs";
|
6
|
-
import { type GenericQuoteRequest, type QuoteRequest } from "../../types.cjs";
|
7
|
-
export declare const toInputChangedPropertyKey: Partial<Record<keyof QuoteRequest, InputKeys>>;
|
8
|
-
export declare const toInputChangedPropertyValue: Partial<Record<keyof typeof toInputChangedPropertyKey, (value: Partial<GenericQuoteRequest>) => InputValues[keyof InputValues] | undefined>>;
|
9
|
-
export declare const getActionType: (srcChainId?: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => MetricsActionType;
|
10
|
-
export declare const getActionTypeFromQuoteRequest: (quoteRequest: Partial<GenericQuoteRequest>) => MetricsActionType;
|
11
|
-
export declare const getSwapType: (srcChainId?: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => MetricsSwapType;
|
12
|
-
export declare const getSwapTypeFromQuote: (quoteRequest: Partial<GenericQuoteRequest>) => MetricsSwapType;
|
13
|
-
export declare const formatProviderLabel: ({ bridgeId, bridges, }: QuoteResponse<TxData | string>['quote']) => `${string}_${string}`;
|
14
|
-
export declare const getRequestParams: ({ destChainId, srcTokenAddress, destTokenAddress, }: BridgeControllerState['quoteRequest'], srcChainIdCaip: CaipChainId) => {
|
15
|
-
chain_id_source: `${string}:${string}`;
|
16
|
-
chain_id_destination: `${string}:${string}` | null;
|
17
|
-
token_address_source: `${string}:${string}/${string}:${string}`;
|
18
|
-
token_address_destination: `${string}:${string}/${string}:${string}` | null;
|
19
|
-
};
|
20
|
-
export declare const isHardwareWallet: (selectedAccount?: AccountsControllerState['internalAccounts']['accounts'][string]) => boolean;
|
21
|
-
export declare const isCustomSlippage: (slippage: GenericQuoteRequest['slippage']) => boolean;
|
22
|
-
//# sourceMappingURL=properties.d.cts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"properties.d.cts","sourceRoot":"","sources":["../../../src/utils/metrics/properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAEnD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,wBAAoB;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,oBAAgB;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,mEAA+D;AAEtG,OAAO,KAAK,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,EAAE,wBAAoB;AAChF,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,YAAY,EAAE,wBAAoB;AAO1E,eAAO,MAAM,yBAAyB,EAAE,OAAO,CAC7C,MAAM,CAAC,MAAM,YAAY,EAAE,SAAS,CAAC,CAOtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,OAAO,CAC/C,MAAM,CACJ,MAAM,OAAO,yBAAyB,EACtC,CACE,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,KAChC,WAAW,CAAC,MAAM,WAAW,CAAC,GAAG,SAAS,CAChD,CAeF,CAAC;AAEF,eAAO,MAAM,aAAa,gBACX,mBAAmB,CAAC,YAAY,CAAC,gBAChC,mBAAmB,CAAC,aAAa,CAAC,sBAUjD,CAAC;AAEF,eAAO,MAAM,6BAA6B,iBAC1B,QAAQ,mBAAmB,CAAC,sBAG3C,CAAC;AAEF,eAAO,MAAM,WAAW,gBACT,mBAAmB,CAAC,YAAY,CAAC,gBAChC,mBAAmB,CAAC,aAAa,CAAC,oBAUjD,CAAC;AAEF,eAAO,MAAM,oBAAoB,iBACjB,QAAQ,mBAAmB,CAAC,oBAG3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,2BAG7B,cAAc,MAAM,GAAG,MAAM,CAAC,CAAC,OAAO,CAAC,KAAG,GAAG,MAAM,IAAI,MAAM,EACnC,CAAC;AAE9B,eAAO,MAAM,gBAAgB,wDAKxB,qBAAqB,CAAC,cAAc,CAAC,kBACxB,WAAW;;;;;CAiB5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBACT,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,YAGlF,CAAC;AAEF,eAAO,MAAM,gBAAgB,aAAc,mBAAmB,CAAC,UAAU,CAAC,YAEzE,CAAC"}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import type { CaipChainId } from "@metamask/utils";
|
2
|
-
import { MetricsActionType, MetricsSwapType } from "./constants.mjs";
|
3
|
-
import type { InputKeys, InputValues } from "./types.mjs";
|
4
|
-
import type { AccountsControllerState } from "../../../../accounts-controller/src/AccountsController.mjs";
|
5
|
-
import type { BridgeControllerState, QuoteResponse, TxData } from "../../types.mjs";
|
6
|
-
import { type GenericQuoteRequest, type QuoteRequest } from "../../types.mjs";
|
7
|
-
export declare const toInputChangedPropertyKey: Partial<Record<keyof QuoteRequest, InputKeys>>;
|
8
|
-
export declare const toInputChangedPropertyValue: Partial<Record<keyof typeof toInputChangedPropertyKey, (value: Partial<GenericQuoteRequest>) => InputValues[keyof InputValues] | undefined>>;
|
9
|
-
export declare const getActionType: (srcChainId?: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => MetricsActionType;
|
10
|
-
export declare const getActionTypeFromQuoteRequest: (quoteRequest: Partial<GenericQuoteRequest>) => MetricsActionType;
|
11
|
-
export declare const getSwapType: (srcChainId?: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => MetricsSwapType;
|
12
|
-
export declare const getSwapTypeFromQuote: (quoteRequest: Partial<GenericQuoteRequest>) => MetricsSwapType;
|
13
|
-
export declare const formatProviderLabel: ({ bridgeId, bridges, }: QuoteResponse<TxData | string>['quote']) => `${string}_${string}`;
|
14
|
-
export declare const getRequestParams: ({ destChainId, srcTokenAddress, destTokenAddress, }: BridgeControllerState['quoteRequest'], srcChainIdCaip: CaipChainId) => {
|
15
|
-
chain_id_source: `${string}:${string}`;
|
16
|
-
chain_id_destination: `${string}:${string}` | null;
|
17
|
-
token_address_source: `${string}:${string}/${string}:${string}`;
|
18
|
-
token_address_destination: `${string}:${string}/${string}:${string}` | null;
|
19
|
-
};
|
20
|
-
export declare const isHardwareWallet: (selectedAccount?: AccountsControllerState['internalAccounts']['accounts'][string]) => boolean;
|
21
|
-
export declare const isCustomSlippage: (slippage: GenericQuoteRequest['slippage']) => boolean;
|
22
|
-
//# sourceMappingURL=properties.d.mts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"properties.d.mts","sourceRoot":"","sources":["../../../src/utils/metrics/properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB;AAEnD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,wBAAoB;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,oBAAgB;AACt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|
@@ -1,66 +0,0 @@
|
|
1
|
-
import { MetricsActionType, MetricsSwapType } from "./constants.mjs";
|
2
|
-
import { DEFAULT_BRIDGE_CONTROLLER_STATE } from "../../constants/bridge.mjs";
|
3
|
-
import { getNativeAssetForChainId } from "../bridge.mjs";
|
4
|
-
import { formatAddressToAssetId, formatChainIdToCaip } from "../caip-formatters.mjs";
|
5
|
-
export const toInputChangedPropertyKey = {
|
6
|
-
srcTokenAddress: 'token_source',
|
7
|
-
destTokenAddress: 'token_destination',
|
8
|
-
srcChainId: 'chain_source',
|
9
|
-
destChainId: 'chain_destination',
|
10
|
-
slippage: 'slippage',
|
11
|
-
};
|
12
|
-
export const toInputChangedPropertyValue = {
|
13
|
-
srcTokenAddress: ({ srcTokenAddress, srcChainId }) => srcChainId
|
14
|
-
? formatAddressToAssetId(srcTokenAddress ?? '', srcChainId)
|
15
|
-
: undefined,
|
16
|
-
destTokenAddress: ({ destTokenAddress, destChainId }) => destChainId
|
17
|
-
? formatAddressToAssetId(destTokenAddress ?? '', destChainId)
|
18
|
-
: undefined,
|
19
|
-
srcChainId: ({ srcChainId }) => srcChainId ? formatChainIdToCaip(srcChainId) : undefined,
|
20
|
-
destChainId: ({ destChainId }) => destChainId ? formatChainIdToCaip(destChainId) : undefined,
|
21
|
-
slippage: ({ slippage }) => (slippage ? Number(slippage) : slippage),
|
22
|
-
};
|
23
|
-
export const getActionType = (srcChainId, destChainId) => {
|
24
|
-
if (srcChainId &&
|
25
|
-
formatChainIdToCaip(srcChainId) ===
|
26
|
-
formatChainIdToCaip(destChainId ?? srcChainId)) {
|
27
|
-
return MetricsActionType.SWAPBRIDGE_V1;
|
28
|
-
}
|
29
|
-
return MetricsActionType.CROSSCHAIN_V1;
|
30
|
-
};
|
31
|
-
export const getActionTypeFromQuoteRequest = (quoteRequest) => {
|
32
|
-
return getActionType(quoteRequest.srcChainId, quoteRequest.destChainId);
|
33
|
-
};
|
34
|
-
export const getSwapType = (srcChainId, destChainId) => {
|
35
|
-
if (srcChainId &&
|
36
|
-
formatChainIdToCaip(srcChainId) ===
|
37
|
-
formatChainIdToCaip(destChainId ?? srcChainId)) {
|
38
|
-
return MetricsSwapType.SINGLE;
|
39
|
-
}
|
40
|
-
return MetricsSwapType.CROSSCHAIN;
|
41
|
-
};
|
42
|
-
export const getSwapTypeFromQuote = (quoteRequest) => {
|
43
|
-
return getSwapType(quoteRequest.srcChainId, quoteRequest.destChainId);
|
44
|
-
};
|
45
|
-
export const formatProviderLabel = ({ bridgeId, bridges, }) => `${bridgeId}_${bridges[0]}`;
|
46
|
-
export const getRequestParams = ({ destChainId, srcTokenAddress, destTokenAddress, }, srcChainIdCaip) => {
|
47
|
-
return {
|
48
|
-
chain_id_source: srcChainIdCaip,
|
49
|
-
chain_id_destination: destChainId ? formatChainIdToCaip(destChainId) : null,
|
50
|
-
token_address_source: srcTokenAddress
|
51
|
-
? (formatAddressToAssetId(srcTokenAddress, srcChainIdCaip) ??
|
52
|
-
getNativeAssetForChainId(srcChainIdCaip)?.assetId ??
|
53
|
-
null)
|
54
|
-
: (getNativeAssetForChainId(srcChainIdCaip)?.assetId ?? null),
|
55
|
-
token_address_destination: destTokenAddress
|
56
|
-
? (formatAddressToAssetId(destTokenAddress, destChainId ?? srcChainIdCaip) ?? null)
|
57
|
-
: null,
|
58
|
-
};
|
59
|
-
};
|
60
|
-
export const isHardwareWallet = (selectedAccount) => {
|
61
|
-
return selectedAccount?.metadata?.keyring.type?.includes('Hardware') ?? false;
|
62
|
-
};
|
63
|
-
export const isCustomSlippage = (slippage) => {
|
64
|
-
return slippage !== DEFAULT_BRIDGE_CONTROLLER_STATE.quoteRequest.slippage;
|
65
|
-
};
|
66
|
-
//# sourceMappingURL=properties.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"properties.mjs","sourceRoot":"","sources":["../../../src/utils/metrics/properties.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,wBAAoB;AAGj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AAe,EAAE,cAAc,CAAC;gBACxD,wBAAwB,CAAC,cAAc,CAAC,EAAE,OAAO;gBACjD,IAAI,CAAC;YACP,CAAC,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC,EAAE,OAAO,IAAI,IAAI,CAAC;QAC/D,yBAAyB,EAAE,gBAAgB;YACzC,CAAC,CAAC,CAAC,sBAAsB,CACrB,gBAAgB,EAChB,WAAW,IAAI,cAAc,CAC9B,IAAI,IAAI,CAAC;YACZ,CAAC,CAAC,IAAI;KACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,eAAiF,EACjF,EAAE;IACF,OAAO,eAAe,EAAE,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;AAChF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAyC,EAAE,EAAE;IAC5E,OAAO,QAAQ,KAAK,+BAA+B,CAAC,YAAY,CAAC,QAAQ,CAAC;AAC5E,CAAC,CAAC","sourcesContent":["import type { CaipChainId } from '@metamask/utils';\n\nimport { MetricsActionType, MetricsSwapType } from './constants';\nimport type { InputKeys, InputValues } from './types';\nimport type { AccountsControllerState } from '../../../../accounts-controller/src/AccountsController';\nimport { DEFAULT_BRIDGE_CONTROLLER_STATE } from '../../constants/bridge';\nimport type { BridgeControllerState, QuoteResponse, TxData } from '../../types';\nimport { type GenericQuoteRequest, type QuoteRequest } from '../../types';\nimport { getNativeAssetForChainId } from '../bridge';\nimport {\n formatAddressToAssetId,\n formatChainIdToCaip,\n} from '../caip-formatters';\n\nexport const toInputChangedPropertyKey: Partial<\n Record<keyof QuoteRequest, InputKeys>\n> = {\n srcTokenAddress: 'token_source',\n destTokenAddress: 'token_destination',\n srcChainId: 'chain_source',\n destChainId: 'chain_destination',\n slippage: 'slippage',\n};\n\nexport const toInputChangedPropertyValue: Partial<\n Record<\n keyof typeof toInputChangedPropertyKey,\n (\n value: Partial<GenericQuoteRequest>,\n ) => InputValues[keyof InputValues] | undefined\n >\n> = {\n srcTokenAddress: ({ srcTokenAddress, srcChainId }) =>\n srcChainId\n ? formatAddressToAssetId(srcTokenAddress ?? '', srcChainId)\n : undefined,\n destTokenAddress: ({ destTokenAddress, destChainId }) =>\n destChainId\n ? formatAddressToAssetId(destTokenAddress ?? '', destChainId)\n : undefined,\n srcChainId: ({ srcChainId }) =>\n srcChainId ? formatChainIdToCaip(srcChainId) : undefined,\n destChainId: ({ destChainId }) =>\n destChainId ? formatChainIdToCaip(destChainId) : undefined,\n slippage: ({ slippage }) => (slippage ? Number(slippage) : slippage),\n};\n\nexport const getActionType = (\n srcChainId?: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n if (\n srcChainId &&\n formatChainIdToCaip(srcChainId) ===\n formatChainIdToCaip(destChainId ?? srcChainId)\n ) {\n return MetricsActionType.SWAPBRIDGE_V1;\n }\n return MetricsActionType.CROSSCHAIN_V1;\n};\n\nexport const getActionTypeFromQuoteRequest = (\n quoteRequest: Partial<GenericQuoteRequest>,\n) => {\n return getActionType(quoteRequest.srcChainId, quoteRequest.destChainId);\n};\n\nexport const getSwapType = (\n srcChainId?: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n if (\n srcChainId &&\n formatChainIdToCaip(srcChainId) ===\n formatChainIdToCaip(destChainId ?? srcChainId)\n ) {\n return MetricsSwapType.SINGLE;\n }\n return MetricsSwapType.CROSSCHAIN;\n};\n\nexport const getSwapTypeFromQuote = (\n quoteRequest: Partial<GenericQuoteRequest>,\n) => {\n return getSwapType(quoteRequest.srcChainId, quoteRequest.destChainId);\n};\n\nexport const formatProviderLabel = ({\n bridgeId,\n bridges,\n}: QuoteResponse<TxData | string>['quote']): `${string}_${string}` =>\n `${bridgeId}_${bridges[0]}`;\n\nexport const getRequestParams = (\n {\n destChainId,\n srcTokenAddress,\n destTokenAddress,\n }: BridgeControllerState['quoteRequest'],\n srcChainIdCaip: CaipChainId,\n) => {\n return {\n chain_id_source: srcChainIdCaip,\n chain_id_destination: destChainId ? formatChainIdToCaip(destChainId) : null,\n token_address_source: srcTokenAddress\n ? (formatAddressToAssetId(srcTokenAddress, srcChainIdCaip) ??\n getNativeAssetForChainId(srcChainIdCaip)?.assetId ??\n null)\n : (getNativeAssetForChainId(srcChainIdCaip)?.assetId ?? null),\n token_address_destination: destTokenAddress\n ? (formatAddressToAssetId(\n destTokenAddress,\n destChainId ?? srcChainIdCaip,\n ) ?? null)\n : null,\n };\n};\n\nexport const isHardwareWallet = (\n selectedAccount?: AccountsControllerState['internalAccounts']['accounts'][string],\n) => {\n return selectedAccount?.metadata?.keyring.type?.includes('Hardware') ?? false;\n};\n\nexport const isCustomSlippage = (slippage: GenericQuoteRequest['slippage']) => {\n return slippage !== DEFAULT_BRIDGE_CONTROLLER_STATE.quoteRequest.slippage;\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../../../src/utils/metrics/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CaipAssetType, CaipChainId } from '@metamask/utils';\n\nimport type {\n UnifiedSwapBridgeEventName,\n MetaMetricsSwapsEventSource,\n MetricsActionType,\n MetricsSwapType,\n} from './constants';\nimport type { SortOrder, StatusTypes } from '../../types';\n\n/**\n * These properties map to properties required by the segment-schema. For example: https://github.com/Consensys/segment-schema/blob/main/libraries/properties/cross-chain-swaps-action.yaml\n */\nexport type RequestParams = {\n chain_id_source: CaipChainId;\n chain_id_destination: CaipChainId | null;\n token_symbol_source: string;\n token_symbol_destination: string | null;\n token_address_source: CaipAssetType;\n token_address_destination: CaipAssetType | null;\n};\n\nexport type RequestMetadata = {\n slippage_limit?: number; // undefined === auto\n custom_slippage: boolean;\n usd_amount_source: number; // Use quoteResponse when available\n stx_enabled: boolean;\n is_hardware_wallet: boolean;\n swap_type: MetricsSwapType;\n};\n\nexport type QuoteFetchData = {\n can_submit: boolean;\n best_quote_provider?: `${string}_${string}`;\n quotes_count: number;\n quotes_list: `${string}_${string}`[];\n initial_load_time_all_quotes: number;\n};\n\nexport type TradeData = {\n usd_quoted_gas: number;\n gas_included: boolean;\n quoted_time_minutes: number;\n usd_quoted_return: number;\n provider: `${string}_${string}`;\n price_impact: number;\n};\n\nexport type TxStatusData = {\n allowance_reset_transaction?: StatusTypes;\n approval_transaction?: StatusTypes;\n source_transaction?: StatusTypes;\n destination_transaction?: StatusTypes;\n};\n\nexport type InputKeys =\n | 'token_source'\n | 'token_destination'\n | 'chain_source'\n | 'chain_destination'\n | 'slippage';\n\nexport type InputValues = {\n token_source: CaipAssetType;\n token_destination: CaipAssetType;\n chain_source: CaipChainId;\n chain_destination: CaipChainId;\n slippage: number;\n};\n\n/**\n * Properties that are required to be provided when trackMetaMetricsEvent is called\n */\nexport type RequiredEventContextFromClient = {\n [UnifiedSwapBridgeEventName.ButtonClicked]: {\n location: MetaMetricsSwapsEventSource;\n } & Pick<RequestParams, 'token_symbol_source' | 'token_symbol_destination'>;\n // When type is object, the payload can be anything\n [UnifiedSwapBridgeEventName.PageViewed]: object;\n [UnifiedSwapBridgeEventName.InputChanged]: {\n input:\n | 'token_source'\n | 'token_destination'\n | 'chain_source'\n | 'chain_destination'\n | 'slippage';\n value: InputValues[keyof InputValues];\n };\n [UnifiedSwapBridgeEventName.InputSourceDestinationFlipped]: {\n token_symbol_source: RequestParams['token_symbol_source'];\n token_symbol_destination: RequestParams['token_symbol_destination'];\n token_address_source: RequestParams['token_address_source'];\n token_address_destination: RequestParams['token_address_destination'];\n chain_id_source: RequestParams['chain_id_source'];\n chain_id_destination: RequestParams['chain_id_destination'];\n /*\n Only needed for non-EVM chains\n */\n security_warnings: string[]; // TODO standardize warnings\n };\n [UnifiedSwapBridgeEventName.QuotesRequested]: Pick<\n RequestMetadata,\n 'stx_enabled'\n > & {\n token_symbol_source: RequestParams['token_symbol_source'];\n token_symbol_destination: RequestParams['token_symbol_destination'];\n };\n [UnifiedSwapBridgeEventName.QuotesReceived]: TradeData & {\n warnings: string[]; // TODO standardize warnings\n best_quote_provider: QuoteFetchData['best_quote_provider'];\n };\n [UnifiedSwapBridgeEventName.QuoteError]: Pick<\n RequestMetadata,\n 'stx_enabled'\n > & {\n token_symbol_source: RequestParams['token_symbol_source'];\n token_symbol_destination: RequestParams['token_symbol_destination'];\n /*\n Only needed for non-EVM chains\n */\n security_warnings: string[]; // TODO standardize warnings\n };\n // Emitted by BridgeStatusController\n [UnifiedSwapBridgeEventName.SnapConfirmationViewed]: object;\n [UnifiedSwapBridgeEventName.Submitted]: RequestParams &\n RequestMetadata &\n TradeData & {\n action_type: MetricsActionType;\n };\n [UnifiedSwapBridgeEventName.Completed]: RequestParams &\n RequestMetadata &\n TxStatusData &\n TradeData & {\n actual_time_minutes: number;\n usd_actual_return: number;\n usd_actual_gas: number;\n quote_vs_execution_ratio: number;\n quoted_vs_used_gas_ratio: number;\n action_type: MetricsActionType;\n };\n [UnifiedSwapBridgeEventName.Failed]: RequestParams &\n RequestMetadata &\n TxStatusData &\n TradeData & {\n actual_time_minutes: number;\n error_message: string;\n action_type: MetricsActionType;\n };\n // Emitted by clients\n [UnifiedSwapBridgeEventName.AllQuotesOpened]: Pick<\n TradeData,\n 'price_impact' | 'gas_included'\n > & {\n stx_enabled: RequestMetadata['stx_enabled'];\n token_symbol_source: RequestParams['token_symbol_source'];\n token_symbol_destination: RequestParams['token_symbol_destination'];\n };\n [UnifiedSwapBridgeEventName.AllQuotesSorted]: Pick<\n TradeData,\n 'price_impact' | 'gas_included'\n > & {\n stx_enabled: RequestMetadata['stx_enabled'];\n token_symbol_source: RequestParams['token_symbol_source'];\n token_symbol_destination: RequestParams['token_symbol_destination'];\n sort_order: SortOrder;\n best_quote_provider: QuoteFetchData['best_quote_provider'];\n };\n [UnifiedSwapBridgeEventName.QuoteSelected]: TradeData & {\n is_best_quote: boolean;\n best_quote_provider: QuoteFetchData['best_quote_provider'];\n };\n};\n\n/**\n * Properties that can be derived from the bridge controller state\n */\nexport type EventPropertiesFromControllerState = {\n [UnifiedSwapBridgeEventName.ButtonClicked]: RequestParams;\n [UnifiedSwapBridgeEventName.PageViewed]: RequestParams;\n [UnifiedSwapBridgeEventName.InputChanged]: {\n input: InputKeys;\n value: string;\n };\n [UnifiedSwapBridgeEventName.InputSourceDestinationFlipped]: RequestParams;\n [UnifiedSwapBridgeEventName.QuotesRequested]: RequestParams &\n RequestMetadata & {\n has_sufficient_funds: boolean;\n };\n [UnifiedSwapBridgeEventName.QuotesReceived]: RequestParams &\n RequestMetadata &\n QuoteFetchData & {\n refresh_count: number; // starts from 0\n };\n [UnifiedSwapBridgeEventName.QuoteError]: RequestParams &\n RequestMetadata & {\n has_sufficient_funds: boolean;\n error_message: string;\n };\n [UnifiedSwapBridgeEventName.SnapConfirmationViewed]: RequestMetadata &\n RequestParams;\n [UnifiedSwapBridgeEventName.Submitted]: null;\n [UnifiedSwapBridgeEventName.Completed]: null;\n [UnifiedSwapBridgeEventName.Failed]: null;\n [UnifiedSwapBridgeEventName.AllQuotesOpened]: RequestParams &\n RequestMetadata &\n QuoteFetchData &\n Pick<TradeData, 'price_impact'>;\n [UnifiedSwapBridgeEventName.AllQuotesSorted]: RequestParams &\n RequestMetadata &\n QuoteFetchData &\n Pick<TradeData, 'price_impact'>;\n [UnifiedSwapBridgeEventName.QuoteSelected]: RequestParams &\n RequestMetadata &\n QuoteFetchData &\n TradeData;\n};\n\n/**\n * trackMetaMetricsEvent payload properties consist of required properties from the client\n * and properties from the bridge controller\n */\nexport type CrossChainSwapsEventProperties<\n T extends UnifiedSwapBridgeEventName,\n> =\n | {\n action_type: MetricsActionType;\n }\n | Pick<EventPropertiesFromControllerState, T>[T]\n | Pick<RequiredEventContextFromClient, T>[T];\n"]}
|
@@ -1,156 +0,0 @@
|
|
1
|
-
import type { CaipAssetType, CaipChainId } from "@metamask/utils";
|
2
|
-
import type { UnifiedSwapBridgeEventName, MetaMetricsSwapsEventSource, MetricsActionType, MetricsSwapType } from "./constants.cjs";
|
3
|
-
import type { SortOrder, StatusTypes } from "../../types.cjs";
|
4
|
-
/**
|
5
|
-
* These properties map to properties required by the segment-schema. For example: https://github.com/Consensys/segment-schema/blob/main/libraries/properties/cross-chain-swaps-action.yaml
|
6
|
-
*/
|
7
|
-
export type RequestParams = {
|
8
|
-
chain_id_source: CaipChainId;
|
9
|
-
chain_id_destination: CaipChainId | null;
|
10
|
-
token_symbol_source: string;
|
11
|
-
token_symbol_destination: string | null;
|
12
|
-
token_address_source: CaipAssetType;
|
13
|
-
token_address_destination: CaipAssetType | null;
|
14
|
-
};
|
15
|
-
export type RequestMetadata = {
|
16
|
-
slippage_limit?: number;
|
17
|
-
custom_slippage: boolean;
|
18
|
-
usd_amount_source: number;
|
19
|
-
stx_enabled: boolean;
|
20
|
-
is_hardware_wallet: boolean;
|
21
|
-
swap_type: MetricsSwapType;
|
22
|
-
};
|
23
|
-
export type QuoteFetchData = {
|
24
|
-
can_submit: boolean;
|
25
|
-
best_quote_provider?: `${string}_${string}`;
|
26
|
-
quotes_count: number;
|
27
|
-
quotes_list: `${string}_${string}`[];
|
28
|
-
initial_load_time_all_quotes: number;
|
29
|
-
};
|
30
|
-
export type TradeData = {
|
31
|
-
usd_quoted_gas: number;
|
32
|
-
gas_included: boolean;
|
33
|
-
quoted_time_minutes: number;
|
34
|
-
usd_quoted_return: number;
|
35
|
-
provider: `${string}_${string}`;
|
36
|
-
price_impact: number;
|
37
|
-
};
|
38
|
-
export type TxStatusData = {
|
39
|
-
allowance_reset_transaction?: StatusTypes;
|
40
|
-
approval_transaction?: StatusTypes;
|
41
|
-
source_transaction?: StatusTypes;
|
42
|
-
destination_transaction?: StatusTypes;
|
43
|
-
};
|
44
|
-
export type InputKeys = 'token_source' | 'token_destination' | 'chain_source' | 'chain_destination' | 'slippage';
|
45
|
-
export type InputValues = {
|
46
|
-
token_source: CaipAssetType;
|
47
|
-
token_destination: CaipAssetType;
|
48
|
-
chain_source: CaipChainId;
|
49
|
-
chain_destination: CaipChainId;
|
50
|
-
slippage: number;
|
51
|
-
};
|
52
|
-
/**
|
53
|
-
* Properties that are required to be provided when trackMetaMetricsEvent is called
|
54
|
-
*/
|
55
|
-
export type RequiredEventContextFromClient = {
|
56
|
-
[UnifiedSwapBridgeEventName.ButtonClicked]: {
|
57
|
-
location: MetaMetricsSwapsEventSource;
|
58
|
-
} & Pick<RequestParams, 'token_symbol_source' | 'token_symbol_destination'>;
|
59
|
-
[UnifiedSwapBridgeEventName.PageViewed]: object;
|
60
|
-
[UnifiedSwapBridgeEventName.InputChanged]: {
|
61
|
-
input: 'token_source' | 'token_destination' | 'chain_source' | 'chain_destination' | 'slippage';
|
62
|
-
value: InputValues[keyof InputValues];
|
63
|
-
};
|
64
|
-
[UnifiedSwapBridgeEventName.InputSourceDestinationFlipped]: {
|
65
|
-
token_symbol_source: RequestParams['token_symbol_source'];
|
66
|
-
token_symbol_destination: RequestParams['token_symbol_destination'];
|
67
|
-
token_address_source: RequestParams['token_address_source'];
|
68
|
-
token_address_destination: RequestParams['token_address_destination'];
|
69
|
-
chain_id_source: RequestParams['chain_id_source'];
|
70
|
-
chain_id_destination: RequestParams['chain_id_destination'];
|
71
|
-
security_warnings: string[];
|
72
|
-
};
|
73
|
-
[UnifiedSwapBridgeEventName.QuotesRequested]: Pick<RequestMetadata, 'stx_enabled'> & {
|
74
|
-
token_symbol_source: RequestParams['token_symbol_source'];
|
75
|
-
token_symbol_destination: RequestParams['token_symbol_destination'];
|
76
|
-
};
|
77
|
-
[UnifiedSwapBridgeEventName.QuotesReceived]: TradeData & {
|
78
|
-
warnings: string[];
|
79
|
-
best_quote_provider: QuoteFetchData['best_quote_provider'];
|
80
|
-
};
|
81
|
-
[UnifiedSwapBridgeEventName.QuoteError]: Pick<RequestMetadata, 'stx_enabled'> & {
|
82
|
-
token_symbol_source: RequestParams['token_symbol_source'];
|
83
|
-
token_symbol_destination: RequestParams['token_symbol_destination'];
|
84
|
-
security_warnings: string[];
|
85
|
-
};
|
86
|
-
[UnifiedSwapBridgeEventName.SnapConfirmationViewed]: object;
|
87
|
-
[UnifiedSwapBridgeEventName.Submitted]: RequestParams & RequestMetadata & TradeData & {
|
88
|
-
action_type: MetricsActionType;
|
89
|
-
};
|
90
|
-
[UnifiedSwapBridgeEventName.Completed]: RequestParams & RequestMetadata & TxStatusData & TradeData & {
|
91
|
-
actual_time_minutes: number;
|
92
|
-
usd_actual_return: number;
|
93
|
-
usd_actual_gas: number;
|
94
|
-
quote_vs_execution_ratio: number;
|
95
|
-
quoted_vs_used_gas_ratio: number;
|
96
|
-
action_type: MetricsActionType;
|
97
|
-
};
|
98
|
-
[UnifiedSwapBridgeEventName.Failed]: RequestParams & RequestMetadata & TxStatusData & TradeData & {
|
99
|
-
actual_time_minutes: number;
|
100
|
-
error_message: string;
|
101
|
-
action_type: MetricsActionType;
|
102
|
-
};
|
103
|
-
[UnifiedSwapBridgeEventName.AllQuotesOpened]: Pick<TradeData, 'price_impact' | 'gas_included'> & {
|
104
|
-
stx_enabled: RequestMetadata['stx_enabled'];
|
105
|
-
token_symbol_source: RequestParams['token_symbol_source'];
|
106
|
-
token_symbol_destination: RequestParams['token_symbol_destination'];
|
107
|
-
};
|
108
|
-
[UnifiedSwapBridgeEventName.AllQuotesSorted]: Pick<TradeData, 'price_impact' | 'gas_included'> & {
|
109
|
-
stx_enabled: RequestMetadata['stx_enabled'];
|
110
|
-
token_symbol_source: RequestParams['token_symbol_source'];
|
111
|
-
token_symbol_destination: RequestParams['token_symbol_destination'];
|
112
|
-
sort_order: SortOrder;
|
113
|
-
best_quote_provider: QuoteFetchData['best_quote_provider'];
|
114
|
-
};
|
115
|
-
[UnifiedSwapBridgeEventName.QuoteSelected]: TradeData & {
|
116
|
-
is_best_quote: boolean;
|
117
|
-
best_quote_provider: QuoteFetchData['best_quote_provider'];
|
118
|
-
};
|
119
|
-
};
|
120
|
-
/**
|
121
|
-
* Properties that can be derived from the bridge controller state
|
122
|
-
*/
|
123
|
-
export type EventPropertiesFromControllerState = {
|
124
|
-
[UnifiedSwapBridgeEventName.ButtonClicked]: RequestParams;
|
125
|
-
[UnifiedSwapBridgeEventName.PageViewed]: RequestParams;
|
126
|
-
[UnifiedSwapBridgeEventName.InputChanged]: {
|
127
|
-
input: InputKeys;
|
128
|
-
value: string;
|
129
|
-
};
|
130
|
-
[UnifiedSwapBridgeEventName.InputSourceDestinationFlipped]: RequestParams;
|
131
|
-
[UnifiedSwapBridgeEventName.QuotesRequested]: RequestParams & RequestMetadata & {
|
132
|
-
has_sufficient_funds: boolean;
|
133
|
-
};
|
134
|
-
[UnifiedSwapBridgeEventName.QuotesReceived]: RequestParams & RequestMetadata & QuoteFetchData & {
|
135
|
-
refresh_count: number;
|
136
|
-
};
|
137
|
-
[UnifiedSwapBridgeEventName.QuoteError]: RequestParams & RequestMetadata & {
|
138
|
-
has_sufficient_funds: boolean;
|
139
|
-
error_message: string;
|
140
|
-
};
|
141
|
-
[UnifiedSwapBridgeEventName.SnapConfirmationViewed]: RequestMetadata & RequestParams;
|
142
|
-
[UnifiedSwapBridgeEventName.Submitted]: null;
|
143
|
-
[UnifiedSwapBridgeEventName.Completed]: null;
|
144
|
-
[UnifiedSwapBridgeEventName.Failed]: null;
|
145
|
-
[UnifiedSwapBridgeEventName.AllQuotesOpened]: RequestParams & RequestMetadata & QuoteFetchData & Pick<TradeData, 'price_impact'>;
|
146
|
-
[UnifiedSwapBridgeEventName.AllQuotesSorted]: RequestParams & RequestMetadata & QuoteFetchData & Pick<TradeData, 'price_impact'>;
|
147
|
-
[UnifiedSwapBridgeEventName.QuoteSelected]: RequestParams & RequestMetadata & QuoteFetchData & TradeData;
|
148
|
-
};
|
149
|
-
/**
|
150
|
-
* trackMetaMetricsEvent payload properties consist of required properties from the client
|
151
|
-
* and properties from the bridge controller
|
152
|
-
*/
|
153
|
-
export type CrossChainSwapsEventProperties<T extends UnifiedSwapBridgeEventName> = {
|
154
|
-
action_type: MetricsActionType;
|
155
|
-
} | Pick<EventPropertiesFromControllerState, T>[T] | Pick<RequiredEventContextFromClient, T>[T];
|
156
|
-
//# sourceMappingURL=types.d.cts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../../../src/utils/metrics/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,wBAAwB;AAElE,OAAO,KAAK,EACV,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EAChB,wBAAoB;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,wBAAoB;AAE1D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,eAAe,EAAE,WAAW,CAAC;IAC7B,oBAAoB,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wBAAwB,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,oBAAoB,EAAE,aAAa,CAAC;IACpC,yBAAyB,EAAE,aAAa,GAAG,IAAI,CAAC;CACjD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,EAAE,CAAC;IACrC,4BAA4B,EAAE,MAAM,CAAC;CACtC,CAAC;AAEF,M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