Commit c6e677d8 authored by lynn's avatar lynn Committed by GitHub

feat: new swap events and properties in taxonomy (#4204)

* init commit

* remove absolute value in date calc

* all the events are now logged properly plus changed native token address to NATIVE

* add documentation line

* remove unnecessary prop

* init

* add approve token event

* fix build

* add route event properties

* fix build

* respond to vm comments

* respond to vm comments

* remove routes properties
parent 7a78a7b4
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
* and logged. * and logged.
*/ */
export enum EventName { export enum EventName {
APPROVE_TOKEN_TXN_SUBMITTED = 'Approve Token Transaction Submitted',
CONNECT_WALLET_BUTTON_CLICKED = 'Connect Wallet Button Clicked', CONNECT_WALLET_BUTTON_CLICKED = 'Connect Wallet Button Clicked',
PAGE_VIEWED = 'Page Viewed', PAGE_VIEWED = 'Page Viewed',
SWAP_AUTOROUTER_VISUALIZATION_EXPANDED = 'Swap Autorouter Visualization Expanded', SWAP_AUTOROUTER_VISUALIZATION_EXPANDED = 'Swap Autorouter Visualization Expanded',
...@@ -20,6 +21,7 @@ export enum EventName { ...@@ -20,6 +21,7 @@ export enum EventName {
TOKEN_SELECTOR_OPENED = 'Token Selector Opened', TOKEN_SELECTOR_OPENED = 'Token Selector Opened',
WALLET_CONNECT_TXN_COMPLETED = 'Wallet Connect Transaction Completed', WALLET_CONNECT_TXN_COMPLETED = 'Wallet Connect Transaction Completed',
WALLET_SELECTED = 'Wallet Selected', WALLET_SELECTED = 'Wallet Selected',
WRAP_TOKEN_TXN_SUBMITTED = 'Wrap Token Transaction Submitted',
// alphabetize additional event names. // alphabetize additional event names.
} }
...@@ -81,6 +83,7 @@ export const enum ModalName { ...@@ -81,6 +83,7 @@ export const enum ModalName {
* Use to identify low-level components given a TraceContext * Use to identify low-level components given a TraceContext
*/ */
export const enum ElementName { export const enum ElementName {
APPROVE_TOKEN_BUTTON = 'approve-token-button',
AUTOROUTER_VISUALIZATION_ROW = 'expandable-autorouter-visualization-row', AUTOROUTER_VISUALIZATION_ROW = 'expandable-autorouter-visualization-row',
COMMON_BASES_CURRENCY_BUTTON = 'common-bases-currency-button', COMMON_BASES_CURRENCY_BUTTON = 'common-bases-currency-button',
CONFIRM_SWAP_BUTTON = 'confirm-swap-or-send', CONFIRM_SWAP_BUTTON = 'confirm-swap-or-send',
...@@ -93,6 +96,7 @@ export const enum ElementName { ...@@ -93,6 +96,7 @@ export const enum ElementName {
SWAP_TOKENS_REVERSE_ARROW_BUTTON = 'swap-tokens-reverse-arrow-button', SWAP_TOKENS_REVERSE_ARROW_BUTTON = 'swap-tokens-reverse-arrow-button',
TOKEN_SELECTOR_ROW = 'token-selector-row', TOKEN_SELECTOR_ROW = 'token-selector-row',
WALLET_TYPE_OPTION = 'wallet-type-option', WALLET_TYPE_OPTION = 'wallet-type-option',
WRAP_TOKEN_BUTTON = 'wrap-token-button',
// alphabetize additional element names. // alphabetize additional element names.
} }
......
...@@ -19,3 +19,5 @@ export const formatToDecimal = ( ...@@ -19,3 +19,5 @@ export const formatToDecimal = (
export const getTokenAddress = (currency: Currency) => (currency.isNative ? NATIVE_CHAIN_ID : currency.address) export const getTokenAddress = (currency: Currency) => (currency.isNative ? NATIVE_CHAIN_ID : currency.address)
export const formatPercentInBasisPointsNumber = (percent: Percent): number => parseFloat(percent.toFixed(2)) * 100 export const formatPercentInBasisPointsNumber = (percent: Percent): number => parseFloat(percent.toFixed(2)) * 100
export const formatPercentNumber = (percent: Percent): number => parseFloat(percent.toFixed(2))
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment