@luxexchange/lx 1.0.0

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.
Files changed (1624) hide show
  1. package/.depcheckrc +26 -0
  2. package/.eslintignore +4 -0
  3. package/.eslintrc.js +79 -0
  4. package/LLM.md +145 -0
  5. package/babel.config.js +39 -0
  6. package/env.d.ts +15 -0
  7. package/eslint_rules/i18n.js +44 -0
  8. package/eslint_rules/no-redux-modals.js +54 -0
  9. package/jest-package-mocks.js +38 -0
  10. package/openapitools.json +7 -0
  11. package/package.json +170 -0
  12. package/project.json +76 -0
  13. package/src/abis/argent-wallet-contract.json +61 -0
  14. package/src/abis/eip_2612.json +20 -0
  15. package/src/abis/eip_2612.ts +20 -0
  16. package/src/abis/ens-public-resolver.json +816 -0
  17. package/src/abis/ens-registrar.json +422 -0
  18. package/src/abis/erc1155.json +335 -0
  19. package/src/abis/erc20.json +108 -0
  20. package/src/abis/erc20_bytes32.json +30 -0
  21. package/src/abis/erc721.json +352 -0
  22. package/src/abis/fee-on-transfer-detector.json +133 -0
  23. package/src/abis/governor-bravo.json +1046 -0
  24. package/src/abis/lux-nft-airdrop-claim.json +218 -0
  25. package/src/abis/permit2.json +87 -0
  26. package/src/abis/permit2.ts +73 -0
  27. package/src/abis/weth.json +279 -0
  28. package/src/components/AmountInput/AmountInput.test.tsx +141 -0
  29. package/src/components/AmountInput/AmountInput.tsx +157 -0
  30. package/src/components/AmountInput/useTextWidth.tsx +90 -0
  31. package/src/components/AmountInput/utils/numericInputEnforcer.ts +6 -0
  32. package/src/components/AmountInput/utils/parseValue.ts +57 -0
  33. package/src/components/AmountInput/utils/replaceSeparators.ts +22 -0
  34. package/src/components/AnimatedNumber/AnimatedNumber.native.tsx +475 -0
  35. package/src/components/AnimatedNumber/AnimatedNumber.tsx +53 -0
  36. package/src/components/AnimatedNumber/AnimatedNumber.web.tsx +141 -0
  37. package/src/components/AnimatedNumber/TopAndBottomGradient.native.tsx +32 -0
  38. package/src/components/AnimatedNumber/TopAndBottomGradient.tsx +5 -0
  39. package/src/components/AnimatedNumber/TopAndBottomGradient.web.tsx +23 -0
  40. package/src/components/BaseCard/BaseCard.test.tsx +271 -0
  41. package/src/components/BaseCard/BaseCard.tsx +239 -0
  42. package/src/components/BaseCard/__snapshots__/BaseCard.test.tsx.snap +196 -0
  43. package/src/components/BatchedTransactions/CarouselControls.tsx +85 -0
  44. package/src/components/BridgedAsset/BridgedAssetModal.tsx +239 -0
  45. package/src/components/BridgedAsset/BridgedAssetTDPSection.tsx +49 -0
  46. package/src/components/BridgedAsset/WormholeModal.tsx +173 -0
  47. package/src/components/ConfirmSwapModal/ProgressIndicator.tsx +232 -0
  48. package/src/components/ConfirmSwapModal/steps/Approve.tsx +73 -0
  49. package/src/components/ConfirmSwapModal/steps/LP.tsx +60 -0
  50. package/src/components/ConfirmSwapModal/steps/Permit.tsx +85 -0
  51. package/src/components/ConfirmSwapModal/steps/SpinningBorderIcon.native.tsx +54 -0
  52. package/src/components/ConfirmSwapModal/steps/SpinningBorderIcon.tsx +15 -0
  53. package/src/components/ConfirmSwapModal/steps/SpinningBorderIcon.web.tsx +59 -0
  54. package/src/components/ConfirmSwapModal/steps/StepRowSkeleton.tsx +224 -0
  55. package/src/components/ConfirmSwapModal/steps/Swap.tsx +78 -0
  56. package/src/components/ConfirmSwapModal/steps/SwapTXPlanStepRow.tsx +175 -0
  57. package/src/components/ConfirmSwapModal/steps/Wrap.tsx +41 -0
  58. package/src/components/ConfirmSwapModal/types.ts +8 -0
  59. package/src/components/ConfirmSwapModal/useSecondsUntilDeadline.tsx +48 -0
  60. package/src/components/CurrencyInputPanel/AmountInputPresets/AmountInputPresets.tsx +51 -0
  61. package/src/components/CurrencyInputPanel/AmountInputPresets/PresetAmountButton.tsx +216 -0
  62. package/src/components/CurrencyInputPanel/AmountInputPresets/types.ts +8 -0
  63. package/src/components/CurrencyInputPanel/AmountInputPresets/utils.ts +8 -0
  64. package/src/components/CurrencyInputPanel/CurrencyInputPanel.tsx +234 -0
  65. package/src/components/CurrencyInputPanel/CurrencyInputPanelBalance.tsx +43 -0
  66. package/src/components/CurrencyInputPanel/CurrencyInputPanelHeader.tsx +87 -0
  67. package/src/components/CurrencyInputPanel/CurrencyInputPanelInput.tsx +242 -0
  68. package/src/components/CurrencyInputPanel/CurrencyInputPanelValue.tsx +100 -0
  69. package/src/components/CurrencyInputPanel/DefaultTokenOptions/DefaultTokenOptions.tsx +34 -0
  70. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenIcon.tsx +94 -0
  71. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/TokenOptionItem/TokenOptionItem.native.tsx +17 -0
  72. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/TokenOptionItem/TokenOptionItem.tsx +6 -0
  73. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/TokenOptionItem/TokenOptionItem.web.tsx +35 -0
  74. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/TokenOptionItem/types.ts +9 -0
  75. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/TokenOptions.tsx +58 -0
  76. package/src/components/CurrencyInputPanel/DefaultTokenOptions/TokenOptions/useSendSelectCurrencyEvent.tsx +37 -0
  77. package/src/components/CurrencyInputPanel/DefaultTokenOptions/constants.ts +19 -0
  78. package/src/components/CurrencyInputPanel/SelectTokenButton.tsx +86 -0
  79. package/src/components/CurrencyInputPanel/TokenRate.tsx +49 -0
  80. package/src/components/CurrencyInputPanel/hooks/useCurrencyInputFontSize.ts +53 -0
  81. package/src/components/CurrencyInputPanel/hooks/useIndicativeQuoteTextDisplay.ts +56 -0
  82. package/src/components/CurrencyInputPanel/hooks/useInputFocusSync/types.ts +11 -0
  83. package/src/components/CurrencyInputPanel/hooks/useInputFocusSync/useInputFocusSync.native.ts +36 -0
  84. package/src/components/CurrencyInputPanel/hooks/useInputFocusSync/useInputFocusSync.ts +6 -0
  85. package/src/components/CurrencyInputPanel/hooks/useInputFocusSync/useInputFocusSync.web.ts +6 -0
  86. package/src/components/CurrencyInputPanel/hooks/useRefetchAnimationStyle.native.ts +42 -0
  87. package/src/components/CurrencyInputPanel/hooks/useRefetchAnimationStyle.ts +14 -0
  88. package/src/components/CurrencyInputPanel/hooks/useRefetchAnimationStyle.web.ts +68 -0
  89. package/src/components/CurrencyInputPanel/types.tsx +61 -0
  90. package/src/components/CurrencyLogo/CurrencyLogo.test.tsx +50 -0
  91. package/src/components/CurrencyLogo/CurrencyLogo.tsx +38 -0
  92. package/src/components/CurrencyLogo/LogoWithTxStatus.test.tsx +291 -0
  93. package/src/components/CurrencyLogo/LogoWithTxStatus.tsx +282 -0
  94. package/src/components/CurrencyLogo/NetworkLogo.test.tsx +54 -0
  95. package/src/components/CurrencyLogo/NetworkLogo.tsx +89 -0
  96. package/src/components/CurrencyLogo/NetworkLogoWarning.tsx +44 -0
  97. package/src/components/CurrencyLogo/SplitLogo.test.tsx +120 -0
  98. package/src/components/CurrencyLogo/SplitLogo.tsx +127 -0
  99. package/src/components/CurrencyLogo/TokenLogo.test.tsx +146 -0
  100. package/src/components/CurrencyLogo/TokenLogo.tsx +164 -0
  101. package/src/components/CurrencyLogo/__snapshots__/CurrencyLogo.test.tsx.snap +90 -0
  102. package/src/components/CurrencyLogo/__snapshots__/LogoWithTxStatus.test.tsx.snap +130 -0
  103. package/src/components/CurrencyLogo/__snapshots__/NetworkLogo.test.tsx.snap +69 -0
  104. package/src/components/CurrencyLogo/__snapshots__/SplitLogo.test.tsx.snap +91 -0
  105. package/src/components/CurrencyLogo/__snapshots__/TokenLogo.test.tsx.snap +58 -0
  106. package/src/components/ExpandoRow/ExpandoRow.test.tsx +75 -0
  107. package/src/components/ExpandoRow/ExpandoRow.tsx +40 -0
  108. package/src/components/ExpandoRow/__snapshots__/ExpandoRow.test.tsx.snap +127 -0
  109. package/src/components/IconCloud/CloudItem.tsx +252 -0
  110. package/src/components/IconCloud/IconCloud.tsx +118 -0
  111. package/src/components/IconCloud/utils.ts +21 -0
  112. package/src/components/InlineWarningCard/InlineWarningCard.tsx +133 -0
  113. package/src/components/MicroConfirmation.tsx +25 -0
  114. package/src/components/MultichainTokenDetails/MultichainAddressList.test.tsx +90 -0
  115. package/src/components/MultichainTokenDetails/MultichainAddressList.tsx +82 -0
  116. package/src/components/MultichainTokenDetails/MultichainExplorerList.test.tsx +46 -0
  117. package/src/components/MultichainTokenDetails/MultichainExplorerList.tsx +63 -0
  118. package/src/components/MultichainTokenDetails/MultichainOptionRow.test.tsx +41 -0
  119. package/src/components/MultichainTokenDetails/MultichainOptionRow.tsx +87 -0
  120. package/src/components/MultichainTokenDetails/MultichainScrollableList.tsx +98 -0
  121. package/src/components/MultichainTokenDetails/__snapshots__/MultichainExplorerList.test.tsx.snap +150 -0
  122. package/src/components/MultichainTokenDetails/__snapshots__/MultichainOptionRow.test.tsx.snap +49 -0
  123. package/src/components/MultichainTokenDetails/useOrderedMultichainEntries.test.ts +53 -0
  124. package/src/components/MultichainTokenDetails/useOrderedMultichainEntries.ts +22 -0
  125. package/src/components/ReceiveQRCode/ReceiveQRCode.tsx +189 -0
  126. package/src/components/ReceiveQRCode/constants.ts +5 -0
  127. package/src/components/RelativeChange/RelativeChange.test.tsx +44 -0
  128. package/src/components/RelativeChange/RelativeChange.tsx +72 -0
  129. package/src/components/RelativeChange/__snapshots__/RelativeChange.test.tsx.snap +110 -0
  130. package/src/components/RoutingDiagram/RoutingDiagram.tsx +264 -0
  131. package/src/components/RoutingDiagram/RoutingLabel.tsx +42 -0
  132. package/src/components/TokenSelector/CrosschainSwapsPromoBanner.tsx +51 -0
  133. package/src/components/TokenSelector/TokenSelector.tsx +423 -0
  134. package/src/components/TokenSelector/TokenSelectorList.tsx +267 -0
  135. package/src/components/TokenSelector/UnsupportedChainedActionsBanner.tsx +68 -0
  136. package/src/components/TokenSelector/constants.ts +3 -0
  137. package/src/components/TokenSelector/filter.test.ts +98 -0
  138. package/src/components/TokenSelector/filter.ts +131 -0
  139. package/src/components/TokenSelector/hooks/useAddToSearchHistory.ts +81 -0
  140. package/src/components/TokenSelector/hooks/useAllCommonBaseCurrencies.ts +126 -0
  141. package/src/components/TokenSelector/hooks/useCommonTokensOptions.ts +75 -0
  142. package/src/components/TokenSelector/hooks/useCommonTokensOptionsWithFallback.ts +66 -0
  143. package/src/components/TokenSelector/hooks/useCurrencies.ts +39 -0
  144. package/src/components/TokenSelector/hooks/useCurrencyInfosToTokenOptions.ts +94 -0
  145. package/src/components/TokenSelector/hooks/useFavoriteCurrencies.ts +32 -0
  146. package/src/components/TokenSelector/hooks/useFavoriteTokensOptions.ts +57 -0
  147. package/src/components/TokenSelector/hooks/useLuxTokensOptions.ts +97 -0
  148. package/src/components/TokenSelector/hooks/usePortfolioBalancesForAddressById.ts +29 -0
  149. package/src/components/TokenSelector/hooks/usePortfolioTokenOptions.ts +74 -0
  150. package/src/components/TokenSelector/hooks/useRecentlySearchedTokens.ts +44 -0
  151. package/src/components/TokenSelector/hooks/useTokenSectionsForEmptySearch.tsx +42 -0
  152. package/src/components/TokenSelector/hooks/useTokenSectionsForSearchResults.ts +155 -0
  153. package/src/components/TokenSelector/hooks/useTrendingTokensCurrencyInfos.ts +30 -0
  154. package/src/components/TokenSelector/hooks/useTrendingTokensOptions.ts +47 -0
  155. package/src/components/TokenSelector/hooks.test.ts +1170 -0
  156. package/src/components/TokenSelector/items/tokens/SuggestedToken.tsx +61 -0
  157. package/src/components/TokenSelector/items/tokens/TokenCard.tsx +79 -0
  158. package/src/components/TokenSelector/lists/HorizontalTokenList/HorizontalTokenList.native.tsx +63 -0
  159. package/src/components/TokenSelector/lists/HorizontalTokenList/HorizontalTokenList.tsx +18 -0
  160. package/src/components/TokenSelector/lists/HorizontalTokenList/HorizontalTokenList.web.tsx +74 -0
  161. package/src/components/TokenSelector/lists/TokenSelectorEmptySearchList.tsx +47 -0
  162. package/src/components/TokenSelector/lists/TokenSelectorSearchResultsList.tsx +79 -0
  163. package/src/components/TokenSelector/lists/TokenSelectorSendList.tsx +149 -0
  164. package/src/components/TokenSelector/lists/TokenSelectorSwapList.tsx +224 -0
  165. package/src/components/TokenSelector/types.ts +30 -0
  166. package/src/components/TokenSelector/utils.test.tsx +46 -0
  167. package/src/components/TokenSelector/utils.tsx +147 -0
  168. package/src/components/TransactionDetailsTooltip.tsx +151 -0
  169. package/src/components/ViewGestureHandler/ViewGestureHandler.native.tsx +6 -0
  170. package/src/components/ViewGestureHandler/ViewGestureHandler.tsx +6 -0
  171. package/src/components/ViewGestureHandler/ViewGestureHandler.web.tsx +5 -0
  172. package/src/components/WarningMessage/WarningMessage.tsx +33 -0
  173. package/src/components/accounts/AddressDisplay.tsx +251 -0
  174. package/src/components/accounts/DisplayNameText.test.tsx +34 -0
  175. package/src/components/accounts/DisplayNameText.tsx +44 -0
  176. package/src/components/accounts/__snapshots__/DisplayNameText.test.tsx.snap +103 -0
  177. package/src/components/activity/ActivityListEmptyState.tsx +43 -0
  178. package/src/components/activity/details/InfoRow.tsx +18 -0
  179. package/src/components/activity/details/TransactionDetailsContent.tsx +83 -0
  180. package/src/components/activity/details/TransactionDetailsHeader.tsx +72 -0
  181. package/src/components/activity/details/TransactionDetailsHeaderLogo.tsx +313 -0
  182. package/src/components/activity/details/TransactionDetailsInfoRows.tsx +422 -0
  183. package/src/components/activity/details/TransactionDetailsModal.test.tsx +168 -0
  184. package/src/components/activity/details/TransactionDetailsModal.tsx +65 -0
  185. package/src/components/activity/details/TransactionDetailsOverview.tsx +151 -0
  186. package/src/components/activity/details/TransactionParticipantDisplay.tsx +18 -0
  187. package/src/components/activity/details/TransactionParticipantRow.tsx +72 -0
  188. package/src/components/activity/details/__snapshots__/TransactionDetailsModal.test.tsx.snap +385 -0
  189. package/src/components/activity/details/plan/PlanDetailsView.tsx +204 -0
  190. package/src/components/activity/details/plan/PlanStepItem.tsx +236 -0
  191. package/src/components/activity/details/plan/ResumePlanButton.tsx +59 -0
  192. package/src/components/activity/details/transactions/ApproveTransactionDetails.tsx +77 -0
  193. package/src/components/activity/details/transactions/AuctionTransactionDetails.tsx +48 -0
  194. package/src/components/activity/details/transactions/BridgeTransactionDetails.tsx +53 -0
  195. package/src/components/activity/details/transactions/LiquidityTransactionDetails.tsx +100 -0
  196. package/src/components/activity/details/transactions/NftTransactionDetails.test.tsx +58 -0
  197. package/src/components/activity/details/transactions/NftTransactionDetails.tsx +103 -0
  198. package/src/components/activity/details/transactions/OffRampPendingSupportCard.tsx +31 -0
  199. package/src/components/activity/details/transactions/OffRampTransactionDetails.tsx +42 -0
  200. package/src/components/activity/details/transactions/OnRampTransactionDetails.tsx +61 -0
  201. package/src/components/activity/details/transactions/PlanTransactionDetails.tsx +118 -0
  202. package/src/components/activity/details/transactions/SwapTransactionDetails.test.tsx +89 -0
  203. package/src/components/activity/details/transactions/SwapTransactionDetails.tsx +89 -0
  204. package/src/components/activity/details/transactions/TransferTransactionDetails.test.tsx +113 -0
  205. package/src/components/activity/details/transactions/TransferTransactionDetails.tsx +118 -0
  206. package/src/components/activity/details/transactions/WrapTransactionDetails.tsx +31 -0
  207. package/src/components/activity/details/transactions/__snapshots__/NftTransactionDetails.test.tsx.snap +53 -0
  208. package/src/components/activity/details/transactions/__snapshots__/SwapTransactionDetails.test.tsx.snap +85 -0
  209. package/src/components/activity/details/transactions/__snapshots__/TransferTransactionDetails.test.tsx.snap +28 -0
  210. package/src/components/activity/details/transactions/utilityComponents.tsx +115 -0
  211. package/src/components/activity/details/types.ts +54 -0
  212. package/src/components/activity/general/TransactionSummaryTitle.tsx +41 -0
  213. package/src/components/activity/generateActivityItemRenderer.ts +115 -0
  214. package/src/components/activity/hooks/useFormattedCurrencyAmountAndUSDValue.ts +50 -0
  215. package/src/components/activity/hooks/useFormattedTime.ts +34 -0
  216. package/src/components/activity/hooks/useOnRetrySwap.ts +27 -0
  217. package/src/components/activity/hooks/useTokenDetailsNavigation.ts +25 -0
  218. package/src/components/activity/summaries/ApproveSummaryItem.tsx +62 -0
  219. package/src/components/activity/summaries/BridgeSummaryItem.tsx +84 -0
  220. package/src/components/activity/summaries/LiquiditySummaryItem.tsx +119 -0
  221. package/src/components/activity/summaries/NFTApproveSummaryItem.tsx +24 -0
  222. package/src/components/activity/summaries/NFTMintSummaryItem.tsx +24 -0
  223. package/src/components/activity/summaries/NFTSummaryItem.tsx +49 -0
  224. package/src/components/activity/summaries/NFTTradeSummaryItem.tsx +20 -0
  225. package/src/components/activity/summaries/OffRampTransferSummaryItem.tsx +49 -0
  226. package/src/components/activity/summaries/OnRampTransferSummaryItem.tsx +99 -0
  227. package/src/components/activity/summaries/PlanSummaryItem.tsx +97 -0
  228. package/src/components/activity/summaries/ReceiveSummaryItem.tsx +25 -0
  229. package/src/components/activity/summaries/SendSummaryItem.tsx +25 -0
  230. package/src/components/activity/summaries/SwapSummaryItem.tsx +84 -0
  231. package/src/components/activity/summaries/TransactionSummaryLayout.tsx +194 -0
  232. package/src/components/activity/summaries/TransferTokenSummaryItem.tsx +152 -0
  233. package/src/components/activity/summaries/UnknownSummaryItem.tsx +58 -0
  234. package/src/components/activity/summaries/WCSummaryItem.tsx +36 -0
  235. package/src/components/activity/summaries/WithdrawSummaryItem.tsx +71 -0
  236. package/src/components/activity/summaries/WrapSummaryItem.tsx +68 -0
  237. package/src/components/activity/types.ts +37 -0
  238. package/src/components/activity/utils.ts +86 -0
  239. package/src/components/appearance/ThemeToggle.tsx +51 -0
  240. package/src/components/badge/Badge.tsx +47 -0
  241. package/src/components/banners/ExcludedNetworkBanner.tsx +41 -0
  242. package/src/components/banners/InformationBanner.tsx +29 -0
  243. package/src/components/banners/LuxWrapped2025Banner/LuxWrapped2025Banner.native.tsx +85 -0
  244. package/src/components/banners/LuxWrapped2025Banner/LuxWrapped2025Banner.tsx +6 -0
  245. package/src/components/banners/LuxWrapped2025Banner/LuxWrapped2025Banner.web.tsx +182 -0
  246. package/src/components/banners/LuxWrapped2025Banner/types.ts +5 -0
  247. package/src/components/banners/LuxWrapped2025Card/LuxWrapped2025Card.native.tsx +69 -0
  248. package/src/components/banners/LuxWrapped2025Card/LuxWrapped2025Card.tsx +6 -0
  249. package/src/components/banners/LuxWrapped2025Card/LuxWrapped2025Card.web.tsx +104 -0
  250. package/src/components/banners/LuxWrapped2025Card/types.ts +3 -0
  251. package/src/components/banners/TestnetModeBanner.tsx +52 -0
  252. package/src/components/banners/shared/SharedSnowflakeComponents.native.tsx +198 -0
  253. package/src/components/banners/shared/SharedSnowflakeComponents.tsx +52 -0
  254. package/src/components/banners/shared/SharedSnowflakeComponents.web.tsx +124 -0
  255. package/src/components/banners/shared/utils.ts +5 -0
  256. package/src/components/buttons/PasteButton.test.tsx +18 -0
  257. package/src/components/buttons/PasteButton.tsx +62 -0
  258. package/src/components/buttons/__snapshots__/PasteButton.test.tsx.snap +83 -0
  259. package/src/components/cards/image.tsx +32 -0
  260. package/src/components/chains/BlockExplorerIcon.tsx +26 -0
  261. package/src/components/charts/utils.ts +42 -0
  262. package/src/components/dapps/DappIconPlaceholder.tsx +27 -0
  263. package/src/components/dialog/Dialog.native.tsx +122 -0
  264. package/src/components/dialog/Dialog.test.tsx +246 -0
  265. package/src/components/dialog/Dialog.tsx +11 -0
  266. package/src/components/dialog/Dialog.web.tsx +138 -0
  267. package/src/components/dialog/DialogButtons.tsx +60 -0
  268. package/src/components/dialog/DialogContent.tsx +81 -0
  269. package/src/components/dialog/DialogProps.tsx +46 -0
  270. package/src/components/dialog/GetHelpButtonUI.tsx +33 -0
  271. package/src/components/dialog/GetHelpHeader.native.tsx +22 -0
  272. package/src/components/dialog/GetHelpHeader.tsx +16 -0
  273. package/src/components/dialog/GetHelpHeader.web.tsx +26 -0
  274. package/src/components/dialog/GetHelpHeaderContent.tsx +54 -0
  275. package/src/components/dialog/hooks/useDialogVisibility.test.ts +296 -0
  276. package/src/components/dialog/hooks/useDialogVisibility.ts +131 -0
  277. package/src/components/dropdowns/ActionSheetDropdown.test.tsx +124 -0
  278. package/src/components/dropdowns/ActionSheetDropdown.tsx +468 -0
  279. package/src/components/dropdowns/__snapshots__/ActionSheetDropdown.test.tsx.snap +25 -0
  280. package/src/components/gas/NetworkCostTooltip.tsx +79 -0
  281. package/src/components/gas/NetworkFee.test.tsx +36 -0
  282. package/src/components/gas/NetworkFee.tsx +122 -0
  283. package/src/components/gas/NetworkFeeWarning.tsx +145 -0
  284. package/src/components/gas/__snapshots__/NetworkFee.test.tsx.snap +251 -0
  285. package/src/components/gating/CacheConfig.tsx +28 -0
  286. package/src/components/gating/DynamicConfigDropdown.tsx +98 -0
  287. package/src/components/gating/GatingButton.tsx +11 -0
  288. package/src/components/gating/GatingOverrides.tsx +262 -0
  289. package/src/components/gating/Rows.tsx +103 -0
  290. package/src/components/gating/dynamicConfigOverrides.tsx +75 -0
  291. package/src/components/input/TextInput.tsx +43 -0
  292. package/src/components/lists/NoResultsFound.tsx +19 -0
  293. package/src/components/lists/OnchainItemList/OnchainItemList.native.tsx +102 -0
  294. package/src/components/lists/OnchainItemList/OnchainItemList.tsx +39 -0
  295. package/src/components/lists/OnchainItemList/OnchainItemList.web.tsx +348 -0
  296. package/src/components/lists/OnchainItemList/processSectionsToRows.test.tsx +181 -0
  297. package/src/components/lists/OnchainItemList/processSectionsToRows.ts +57 -0
  298. package/src/components/lists/OnchainItemList/types.ts +31 -0
  299. package/src/components/lists/SectionHeader.tsx +137 -0
  300. package/src/components/lists/SelectorBaseList.tsx +131 -0
  301. package/src/components/lists/items/OptionItem.tsx +161 -0
  302. package/src/components/lists/items/nfts/NFTCollectionOptionItem.tsx +38 -0
  303. package/src/components/lists/items/nfts/useNftSearchResultsToNftCollectionOptions.tsx +43 -0
  304. package/src/components/lists/items/pools/PoolOptionItem.tsx +100 -0
  305. package/src/components/lists/items/pools/PoolOptionItemContextMenu.tsx +116 -0
  306. package/src/components/lists/items/pools/usePoolSearchResultsToPoolOptions.tsx +60 -0
  307. package/src/components/lists/items/pools/usePoolStatsToPoolOptions.tsx +107 -0
  308. package/src/components/lists/items/tokens/TokenOptionItem.tsx +338 -0
  309. package/src/components/lists/items/tokens/TokenOptionItemContextMenu.tsx +274 -0
  310. package/src/components/lists/items/types.ts +74 -0
  311. package/src/components/lists/items/wallets/ENSAddressOptionItem.tsx +62 -0
  312. package/src/components/lists/items/wallets/UnitagOptionItem.tsx +39 -0
  313. package/src/components/lists/items/wallets/WalletBaseOptionItem.tsx +28 -0
  314. package/src/components/lists/items/wallets/WalletByAddressOptionItem.tsx +55 -0
  315. package/src/components/lists/items/wallets/WalletOptionItemContextMenu.tsx +56 -0
  316. package/src/components/lists/items/wallets/useFavoriteWalletOptions.tsx +21 -0
  317. package/src/components/lists/items/wallets/utils.test.ts +19 -0
  318. package/src/components/lists/items/wallets/utils.ts +16 -0
  319. package/src/components/lists/utils.tsx +43 -0
  320. package/src/components/logos/PoweredByBlockaid.tsx +33 -0
  321. package/src/components/menus/ContextMenu.native.tsx +338 -0
  322. package/src/components/menus/ContextMenu.tsx +66 -0
  323. package/src/components/menus/ContextMenu.web.test.tsx +133 -0
  324. package/src/components/menus/ContextMenu.web.tsx +174 -0
  325. package/src/components/menus/ContextMenuContent.tsx +100 -0
  326. package/src/components/menus/ContextMenuV2.native.tsx +338 -0
  327. package/src/components/menus/ContextMenuV2.tsx +66 -0
  328. package/src/components/menus/ContextMenuV2.web.test.tsx +133 -0
  329. package/src/components/menus/ContextMenuV2.web.tsx +184 -0
  330. package/src/components/menus/__snapshots__/ContextMenu.web.test.tsx.snap +34 -0
  331. package/src/components/menus/hooks/useContextMenuTracking.ts +51 -0
  332. package/src/components/menus/types.ts +5 -0
  333. package/src/components/misc/ActionCard.tsx +84 -0
  334. package/src/components/misc/GenericHeader.tsx +63 -0
  335. package/src/components/misc/IndicativeLoadingWrapper.tsx +14 -0
  336. package/src/components/misc/Scrollbar.native.tsx +59 -0
  337. package/src/components/misc/Scrollbar.tsx +12 -0
  338. package/src/components/misc/Scrollbar.web.tsx +99 -0
  339. package/src/components/modals/ActionSheetModal.tsx +94 -0
  340. package/src/components/modals/BottomSheetContext.tsx +52 -0
  341. package/src/components/modals/HandleBar.native.tsx +41 -0
  342. package/src/components/modals/HandleBar.tsx +15 -0
  343. package/src/components/modals/HandleBar.web.tsx +6 -0
  344. package/src/components/modals/InfoLinkModal.tsx +97 -0
  345. package/src/components/modals/Modal.native.tsx +449 -0
  346. package/src/components/modals/Modal.tsx +26 -0
  347. package/src/components/modals/Modal.web.tsx +119 -0
  348. package/src/components/modals/ModalProps.tsx +60 -0
  349. package/src/components/modals/PaginatedModals.tsx +66 -0
  350. package/src/components/modals/ScrollLock.native.tsx +13 -0
  351. package/src/components/modals/ScrollLock.tsx +13 -0
  352. package/src/components/modals/ScrollLock.web.tsx +53 -0
  353. package/src/components/modals/WarningModal/WarningInfo.tsx +102 -0
  354. package/src/components/modals/WarningModal/WarningModal.tsx +295 -0
  355. package/src/components/modals/WarningModal/getAlertColor.ts +42 -0
  356. package/src/components/modals/WarningModal/types.ts +83 -0
  357. package/src/components/modals/modalConstants.tsx +31 -0
  358. package/src/components/modals/useBottomSheetSafeKeyboard.native.tsx +43 -0
  359. package/src/components/modals/useBottomSheetSafeKeyboard.tsx +9 -0
  360. package/src/components/modals/useBottomSheetSafeKeyboard.web.tsx +6 -0
  361. package/src/components/network/NetworkFilter.test.tsx +31 -0
  362. package/src/components/network/NetworkFilter.tsx +75 -0
  363. package/src/components/network/NetworkOption.tsx +71 -0
  364. package/src/components/network/NetworkPile/NetworkPile.test.tsx +98 -0
  365. package/src/components/network/NetworkPile/NetworkPile.tsx +130 -0
  366. package/src/components/network/NetworkPile/NetworkPileLayouts.tsx +159 -0
  367. package/src/components/network/NetworkPile/__snapshots__/NetworkPile.test.tsx.snap +984 -0
  368. package/src/components/network/NetworkPill.test.tsx +20 -0
  369. package/src/components/network/NetworkPill.tsx +42 -0
  370. package/src/components/network/SupportedNetworkLogosModal.tsx +100 -0
  371. package/src/components/network/__snapshots__/NetworkFilter.test.tsx.snap +67 -0
  372. package/src/components/network/__snapshots__/NetworkPill.test.tsx.snap +76 -0
  373. package/src/components/network/hooks.tsx +35 -0
  374. package/src/components/nfts/NFTTransfer.tsx +20 -0
  375. package/src/components/nfts/NFTViewer.tsx +106 -0
  376. package/src/components/nfts/NftView.tsx +63 -0
  377. package/src/components/nfts/NftViewWithContextMenu.tsx +64 -0
  378. package/src/components/nfts/NftsList.native.tsx +199 -0
  379. package/src/components/nfts/NftsList.tsx +62 -0
  380. package/src/components/nfts/NftsList.web.tsx +330 -0
  381. package/src/components/nfts/NftsListEmptyState.tsx +43 -0
  382. package/src/components/nfts/NftsListHeader.tsx +111 -0
  383. package/src/components/nfts/ShowNFTModal.tsx +56 -0
  384. package/src/components/nfts/constants.ts +4 -0
  385. package/src/components/nfts/hooks/useNftListRenderData.ts +100 -0
  386. package/src/components/nfts/types.ts +16 -0
  387. package/src/components/notifications/ModalNotification.tsx +115 -0
  388. package/src/components/notifications/ModalTemplate.tsx +309 -0
  389. package/src/components/notifications/NotificationToast.native.tsx +109 -0
  390. package/src/components/notifications/NotificationToast.tsx +12 -0
  391. package/src/components/notifications/NotificationToast.web.tsx +78 -0
  392. package/src/components/notifications/NotificationToastContent.tsx +197 -0
  393. package/src/components/notifications/iconUtils.ts +10 -0
  394. package/src/components/notifications/notifications/ChangeAssetVisibilityNotification.tsx +26 -0
  395. package/src/components/notifications/notifications/CopiedNotification.tsx +47 -0
  396. package/src/components/notifications/notifications/SuccessNotification.tsx +11 -0
  397. package/src/components/pill/NewTag.tsx +39 -0
  398. package/src/components/pill/Pill.test.tsx +13 -0
  399. package/src/components/pill/Pill.tsx +54 -0
  400. package/src/components/pill/PillMultiToggle.tsx +121 -0
  401. package/src/components/pill/__snapshots__/Pill.test.tsx.snap +55 -0
  402. package/src/components/portfolio/EmptyTokensList.tsx +49 -0
  403. package/src/components/portfolio/HiddenTokensRow.tsx +33 -0
  404. package/src/components/portfolio/PortfolioEmptyState.tsx +201 -0
  405. package/src/components/portfolio/TokenBalanceItem.tsx +176 -0
  406. package/src/components/portfolio/TokenBalanceItemContextMenu.native.tsx +147 -0
  407. package/src/components/portfolio/TokenBalanceItemContextMenu.tsx +21 -0
  408. package/src/components/portfolio/TokenBalanceItemContextMenu.web.tsx +74 -0
  409. package/src/components/portfolio/TokenBalanceListWeb.tsx +276 -0
  410. package/src/components/reporting/ReportModal.tsx +128 -0
  411. package/src/components/reporting/ReportPoolDataModal.tsx +105 -0
  412. package/src/components/reporting/ReportTokenDataModal.tsx +101 -0
  413. package/src/components/reporting/ReportTokenIssueModal.tsx +132 -0
  414. package/src/components/reporting/input.tsx +28 -0
  415. package/src/components/text/LearnMoreLink.test.tsx +22 -0
  416. package/src/components/text/LearnMoreLink.tsx +51 -0
  417. package/src/components/text/__snapshots__/LearnMoreLink.test.tsx.snap +29 -0
  418. package/src/components/tokens/TokensListEmptyState.tsx +43 -0
  419. package/src/components/tooltip/InfoTooltip.native.tsx +7 -0
  420. package/src/components/tooltip/InfoTooltip.tsx +7 -0
  421. package/src/components/tooltip/InfoTooltip.web.tsx +78 -0
  422. package/src/components/tooltip/InfoTooltipProps.ts +16 -0
  423. package/src/components/transactions/requests/ContentRow.tsx +30 -0
  424. package/src/components/warnings/WarningIcon.tsx +41 -0
  425. package/src/components/warnings/utils.ts +82 -0
  426. package/src/config.ts +3 -0
  427. package/src/constants/addresses.ts +43 -0
  428. package/src/constants/misc.ts +14 -0
  429. package/src/constants/pools.ts +3 -0
  430. package/src/constants/routing.ts +372 -0
  431. package/src/constants/tokens.ts +693 -0
  432. package/src/constants/transactions.ts +13 -0
  433. package/src/constants/urls.ts +248 -0
  434. package/src/constants/web3.ts +28 -0
  435. package/src/contexts/LuxContext.tsx +210 -0
  436. package/src/contexts/UrlContext.native.tsx +36 -0
  437. package/src/contexts/UrlContext.tsx +21 -0
  438. package/src/contexts/UrlContext.web.tsx +55 -0
  439. package/src/data/apiClients/SharedPersistQueryClientProvider.tsx +24 -0
  440. package/src/data/apiClients/blockaidApi/BlockaidApiClient.ts +14 -0
  441. package/src/data/apiClients/constants.ts +1 -0
  442. package/src/data/apiClients/createLuxFetchClient.ts +33 -0
  443. package/src/data/apiClients/createPersister.native.ts +30 -0
  444. package/src/data/apiClients/createPersister.test.ts +154 -0
  445. package/src/data/apiClients/createPersister.ts +6 -0
  446. package/src/data/apiClients/createPersister.web.ts +35 -0
  447. package/src/data/apiClients/dataApi/DataApiClient.ts +11 -0
  448. package/src/data/apiClients/dataApiService/dataApiQueries.ts +30 -0
  449. package/src/data/apiClients/dataApiService/listTopPools.ts +39 -0
  450. package/src/data/apiClients/dataApiService/listTopTokens.ts +39 -0
  451. package/src/data/apiClients/forApi/ForApiClient.ts +47 -0
  452. package/src/data/apiClients/jupiterApi/JupiterFetchClient.ts +14 -0
  453. package/src/data/apiClients/liquidityService/AuctionMutationClient.ts +10 -0
  454. package/src/data/apiClients/liquidityService/LiquidityServiceClient.ts +10 -0
  455. package/src/data/apiClients/liquidityService/base.ts +19 -0
  456. package/src/data/apiClients/liquidityService/liquidityQueries.ts +224 -0
  457. package/src/data/apiClients/luxApi/LuxApiClient.ts +32 -0
  458. package/src/data/apiClients/luxApi/useGasFeeQuery.ts +66 -0
  459. package/src/data/apiClients/luxApi/useTrmScreenQuery.ts +18 -0
  460. package/src/data/apiClients/sharedDehydrateOptions.ts +28 -0
  461. package/src/data/apiClients/tradingApi/LuxGatewayClient.ts +293 -0
  462. package/src/data/apiClients/tradingApi/TradingApiClient.test.ts +586 -0
  463. package/src/data/apiClients/tradingApi/TradingApiClient.ts +227 -0
  464. package/src/data/apiClients/tradingApi/TradingApiSessionClient.ts +73 -0
  465. package/src/data/apiClients/tradingApi/dex/client.ts +195 -0
  466. package/src/data/apiClients/tradingApi/dex/hooks.ts +403 -0
  467. package/src/data/apiClients/tradingApi/dex/index.ts +9 -0
  468. package/src/data/apiClients/tradingApi/dex/types.ts +334 -0
  469. package/src/data/apiClients/tradingApi/useCheckApprovalQuery.ts +28 -0
  470. package/src/data/apiClients/tradingApi/useTradingApiIndicativeQuoteQuery.ts +70 -0
  471. package/src/data/apiClients/tradingApi/useTradingApiQuoteQuery.ts +40 -0
  472. package/src/data/apiClients/tradingApi/useTradingApiSwapQuery.ts +69 -0
  473. package/src/data/apiClients/tradingApi/useTradingApiSwappableTokensQuery.ts +91 -0
  474. package/src/data/apiClients/tradingApi/useWalletCheckDelegationQuery.ts +36 -0
  475. package/src/data/apiClients/tradingApi/useWalletEncode7702Query.ts +32 -0
  476. package/src/data/apiClients/tradingApi/utils/getTradeSettingsDeadline.ts +7 -0
  477. package/src/data/apiClients/tradingApi/utils/tradingApiSwappableTokenToCurrencyInfo.ts +44 -0
  478. package/src/data/apiClients/unitagsApi/UnitagsApiClient.ts +21 -0
  479. package/src/data/apiClients/unitagsApi/useResetUnitagsQueries.ts +19 -0
  480. package/src/data/apiClients/unitagsApi/useUnitagsAddressQuery.ts +51 -0
  481. package/src/data/apiClients/unitagsApi/useUnitagsClaimEligibilityQuery.ts +28 -0
  482. package/src/data/apiClients/unitagsApi/useUnitagsUsernameQuery.ts +22 -0
  483. package/src/data/balances/hooks/useBalances.ts +31 -0
  484. package/src/data/balances/hooks/useCrossChainBalances.ts +59 -0
  485. package/src/data/balances/utils.test.ts +66 -0
  486. package/src/data/balances/utils.tsx +79 -0
  487. package/src/data/cache.ts +167 -0
  488. package/src/data/gchain/client.ts +764 -0
  489. package/src/data/gchain/hooks.ts +368 -0
  490. package/src/data/gchain/index.ts +124 -0
  491. package/src/data/gchain/useLuxBalance.ts +101 -0
  492. package/src/data/getVersionHeader.native.ts +5 -0
  493. package/src/data/getVersionHeader.ts +5 -0
  494. package/src/data/getVersionHeader.web.ts +10 -0
  495. package/src/data/graphql/lux-data-api/fragments.ts +67 -0
  496. package/src/data/links.ts +147 -0
  497. package/src/data/rest/auctions/AuctionServiceClient.ts +8 -0
  498. package/src/data/rest/auctions/auctionQueries.ts +183 -0
  499. package/src/data/rest/auctions/base.ts +5 -0
  500. package/src/data/rest/auctions/queryTypes.ts +16 -0
  501. package/src/data/rest/auctions/useExitBidAndClaimTokensMutation.ts +61 -0
  502. package/src/data/rest/auctions/useExitBidPositionMutation.ts +53 -0
  503. package/src/data/rest/auctions/useSubmitBidMutation.ts +41 -0
  504. package/src/data/rest/auctions/useVerifyWallet.ts +120 -0
  505. package/src/data/rest/base.ts +45 -0
  506. package/src/data/rest/buildAccountAddressesByPlatform.test.ts +202 -0
  507. package/src/data/rest/buildAccountAddressesByPlatform.ts +49 -0
  508. package/src/data/rest/conversionTracking/constants.ts +136 -0
  509. package/src/data/rest/conversionTracking/tracking.test.ts +34 -0
  510. package/src/data/rest/conversionTracking/tracking.ts +99 -0
  511. package/src/data/rest/conversionTracking/types.ts +29 -0
  512. package/src/data/rest/conversionTracking/useConversionProxy.ts +23 -0
  513. package/src/data/rest/conversionTracking/useConversionTracking.ts +171 -0
  514. package/src/data/rest/conversionTracking/utils.ts +81 -0
  515. package/src/data/rest/embeddedWallet/requests.ts +70 -0
  516. package/src/data/rest/exploreStats.ts +26 -0
  517. package/src/data/rest/getPools.ts +14 -0
  518. package/src/data/rest/getPoolsRewards.ts +14 -0
  519. package/src/data/rest/getPortfolio.test.ts +192 -0
  520. package/src/data/rest/getPortfolio.ts +336 -0
  521. package/src/data/rest/getPortfolioChart.ts +64 -0
  522. package/src/data/rest/getPosition.ts +13 -0
  523. package/src/data/rest/getPositions.ts +113 -0
  524. package/src/data/rest/listTransactions.ts +145 -0
  525. package/src/data/rest/luxGateway.ts +295 -0
  526. package/src/data/rest/portfolioBalanceOverrides.ts +243 -0
  527. package/src/data/rest/protocolStats.ts +19 -0
  528. package/src/data/rest/searchTokensAndPools.ts +146 -0
  529. package/src/data/rest/tokenRankings.ts +62 -0
  530. package/src/data/rest/transformPortfolioToMultichain.test.ts +362 -0
  531. package/src/data/rest/transformPortfolioToMultichain.ts +82 -0
  532. package/src/data/solanaConnection/getSolanaParsedTokenAccountsByOwnerQueryOptions.ts +97 -0
  533. package/src/declarations.d.ts +6 -0
  534. package/src/dialog-preferences/DialogPreferencesService.ts +47 -0
  535. package/src/dialog-preferences/implementations/createDialogPreferencesService.test.ts +178 -0
  536. package/src/dialog-preferences/implementations/createDialogPreferencesService.ts +64 -0
  537. package/src/dialog-preferences/index.ts +8 -0
  538. package/src/dialog-preferences/types.ts +5 -0
  539. package/src/domains/repositories.ts +13 -0
  540. package/src/domains/services.ts +21 -0
  541. package/src/entities/assets.ts +25 -0
  542. package/src/extension/messagePassing/messageChannels.ts +40 -0
  543. package/src/extension/messagePassing/messageTypes.ts +8 -0
  544. package/src/extension/messagePassing/platform.ts +16 -0
  545. package/src/extension/messagePassing/types/requests.ts +40 -0
  546. package/src/extension/useIsChromeWindowFocused.ts +58 -0
  547. package/src/features/accounts/AccountIcon.tsx +92 -0
  548. package/src/features/accounts/reportBalancesForAnalytics.ts +60 -0
  549. package/src/features/accounts/store/hooks.ts +32 -0
  550. package/src/features/accounts/store/types/Account.ts +15 -0
  551. package/src/features/accounts/store/types/AccountsState.ts +65 -0
  552. package/src/features/accounts/store/types/Connector.ts +94 -0
  553. package/src/features/accounts/store/types/README.md +81 -0
  554. package/src/features/accounts/store/types/Session.ts +60 -0
  555. package/src/features/accounts/store/types/Wallet.ts +36 -0
  556. package/src/features/accounts/store/utils/accounts.ts +15 -0
  557. package/src/features/accounts/store/utils/addresses.ts +27 -0
  558. package/src/features/accounts/store/utils/connection.ts +40 -0
  559. package/src/features/accounts/store/utils/createAccountsStoreContextProvider.tsx +84 -0
  560. package/src/features/accounts/store/utils/createUseAccountsStore.ts +25 -0
  561. package/src/features/accounts/store/utils/flexibleInput.ts +13 -0
  562. package/src/features/accounts/store/utils/wallets.test.ts +305 -0
  563. package/src/features/accounts/store/utils/wallets.ts +85 -0
  564. package/src/features/accounts/types.ts +35 -0
  565. package/src/features/accounts/useOnchainDisplayName.tsx +76 -0
  566. package/src/features/activity/extract/conversion.test.ts +680 -0
  567. package/src/features/activity/extract/conversionRest.test.ts +1287 -0
  568. package/src/features/activity/extract/extractDEXOrderDetails.ts +95 -0
  569. package/src/features/activity/extract/extractFiatOnRampTransactionDetails.ts +175 -0
  570. package/src/features/activity/extract/extractOnChainTransactionDetails.ts +144 -0
  571. package/src/features/activity/extract/extractPlanDetails.ts +191 -0
  572. package/src/features/activity/extract/extractPlanResponseDetails.ts +188 -0
  573. package/src/features/activity/extract/extractPlanUtils.ts +174 -0
  574. package/src/features/activity/extract/extractRestDEXOrderDetails.ts +102 -0
  575. package/src/features/activity/extract/extractRestFiatOnRampDetails.ts +86 -0
  576. package/src/features/activity/extract/extractTransactionDetails.ts +127 -0
  577. package/src/features/activity/extract/statusMappers.ts +129 -0
  578. package/src/features/activity/formatTransactionsByDate.ts +105 -0
  579. package/src/features/activity/hooks/useActivityData.test.tsx +559 -0
  580. package/src/features/activity/hooks/useActivityData.tsx +165 -0
  581. package/src/features/activity/hooks/useFormattedTransactionDataForActivity.test.ts +331 -0
  582. package/src/features/activity/hooks/useFormattedTransactionDataForActivity.ts +300 -0
  583. package/src/features/activity/hooks/useMergeLocalAndRemoteTransactions.test.ts +563 -0
  584. package/src/features/activity/hooks/useMergeLocalAndRemoteTransactions.ts +292 -0
  585. package/src/features/activity/hooks/useNetworkFee.ts +35 -0
  586. package/src/features/activity/hooks/useOpenLimitOrders.ts +47 -0
  587. package/src/features/activity/hooks/useSyncRemotePlans.ts +59 -0
  588. package/src/features/activity/hooks/useTransactionActions.tsx +389 -0
  589. package/src/features/activity/parse/parseApproveTransaction.ts +71 -0
  590. package/src/features/activity/parse/parseAuctionTransaction.ts +72 -0
  591. package/src/features/activity/parse/parseBridgingTransaction.ts +117 -0
  592. package/src/features/activity/parse/parseExecuteTransaction.ts +112 -0
  593. package/src/features/activity/parse/parseLiquidityTransaction.ts +144 -0
  594. package/src/features/activity/parse/parseMintTransaction.ts +118 -0
  595. package/src/features/activity/parse/parseOnRampTransaction.ts +118 -0
  596. package/src/features/activity/parse/parseReceiveTransaction.ts +163 -0
  597. package/src/features/activity/parse/parseSendTransaction.ts +145 -0
  598. package/src/features/activity/parse/parseTradeTransaction.ts +406 -0
  599. package/src/features/activity/parse/parseUnknownTransaction.ts +32 -0
  600. package/src/features/activity/parseRestResponse.ts +184 -0
  601. package/src/features/activity/utils/extractDappInfo.ts +38 -0
  602. package/src/features/activity/utils/getTransactionSummaryTitle.ts +318 -0
  603. package/src/features/activity/utils/remote.ts +136 -0
  604. package/src/features/activity/utils/swapInfo.ts +49 -0
  605. package/src/features/address/avatar.ts +35 -0
  606. package/src/features/address/color.ts +35 -0
  607. package/src/features/address/types.ts +8 -0
  608. package/src/features/address/useIsSmartContractAddress.tsx +74 -0
  609. package/src/features/address/utils.ts +12 -0
  610. package/src/features/appearance/hooks.tsx +85 -0
  611. package/src/features/appearance/slice.ts +30 -0
  612. package/src/features/appearance/types.ts +1 -0
  613. package/src/features/appearance/useColorScheme.native.ts +1 -0
  614. package/src/features/appearance/useColorScheme.ts +6 -0
  615. package/src/features/appearance/useColorScheme.web.ts +87 -0
  616. package/src/features/auth/types.ts +1 -0
  617. package/src/features/behaviorHistory/selectors.ts +30 -0
  618. package/src/features/behaviorHistory/slice.ts +161 -0
  619. package/src/features/bridging/constants.ts +84 -0
  620. package/src/features/bridging/hooks/chains.ts +59 -0
  621. package/src/features/bridging/hooks/tokens.ts +224 -0
  622. package/src/features/capabilities/caip25/constants.ts +13 -0
  623. package/src/features/capabilities/caip25/types.ts +70 -0
  624. package/src/features/capabilities/caip25/utils.ts +17 -0
  625. package/src/features/chains/chainInfo.test.ts +117 -0
  626. package/src/features/chains/chainInfo.ts +141 -0
  627. package/src/features/chains/evm/defaults.ts +9 -0
  628. package/src/features/chains/evm/info/arbitrum.ts +93 -0
  629. package/src/features/chains/evm/info/avalanche.ts +91 -0
  630. package/src/features/chains/evm/info/base.ts +91 -0
  631. package/src/features/chains/evm/info/blast.ts +82 -0
  632. package/src/features/chains/evm/info/bnb.ts +81 -0
  633. package/src/features/chains/evm/info/celo.ts +86 -0
  634. package/src/features/chains/evm/info/hanzo.ts +93 -0
  635. package/src/features/chains/evm/info/lux.ts +254 -0
  636. package/src/features/chains/evm/info/mainnet.ts +203 -0
  637. package/src/features/chains/evm/info/monad.ts +90 -0
  638. package/src/features/chains/evm/info/optimism.ts +88 -0
  639. package/src/features/chains/evm/info/pars.ts +93 -0
  640. package/src/features/chains/evm/info/polygon.ts +91 -0
  641. package/src/features/chains/evm/info/soneium.ts +91 -0
  642. package/src/features/chains/evm/info/spc.ts +93 -0
  643. package/src/features/chains/evm/info/unichain.ts +146 -0
  644. package/src/features/chains/evm/info/worldchain.ts +87 -0
  645. package/src/features/chains/evm/info/xlayer.ts +81 -0
  646. package/src/features/chains/evm/info/zksync.ts +76 -0
  647. package/src/features/chains/evm/info/zoo.ts +170 -0
  648. package/src/features/chains/evm/info/zora.ts +76 -0
  649. package/src/features/chains/evm/rpc.ts +84 -0
  650. package/src/features/chains/evm/tokens.test.ts +220 -0
  651. package/src/features/chains/evm/tokens.ts +23 -0
  652. package/src/features/chains/gasDefaults.ts +37 -0
  653. package/src/features/chains/hooks/useEnabledChains.ts +55 -0
  654. package/src/features/chains/hooks/useFeatureFlaggedChainIds.ts +47 -0
  655. package/src/features/chains/hooks/useNewChainIds.ts +18 -0
  656. package/src/features/chains/hooks/useOrderedChainIds.ts +19 -0
  657. package/src/features/chains/hooks/useSupportedChainId.ts +35 -0
  658. package/src/features/chains/logos.tsx +65 -0
  659. package/src/features/chains/svm/defaults.ts +3 -0
  660. package/src/features/chains/svm/info/solana.ts +79 -0
  661. package/src/features/chains/types.ts +171 -0
  662. package/src/features/chains/utils.test.ts +224 -0
  663. package/src/features/chains/utils.ts +365 -0
  664. package/src/features/dappRequests/types.ts +87 -0
  665. package/src/features/dappRequests/utils.test.ts +81 -0
  666. package/src/features/dappRequests/utils.ts +36 -0
  667. package/src/features/dataApi/balances/balances.ts +369 -0
  668. package/src/features/dataApi/balances/balancesRest.test.ts +183 -0
  669. package/src/features/dataApi/balances/balancesRest.ts +366 -0
  670. package/src/features/dataApi/balances/toPortfolioMultichainBalance.test.ts +263 -0
  671. package/src/features/dataApi/balances/toPortfolioMultichainBalance.ts +142 -0
  672. package/src/features/dataApi/balances/utils.test.ts +64 -0
  673. package/src/features/dataApi/balances/utils.ts +44 -0
  674. package/src/features/dataApi/listTransactions/listTransactions.test.ts +182 -0
  675. package/src/features/dataApi/listTransactions/listTransactions.ts +174 -0
  676. package/src/features/dataApi/searchPools.ts +58 -0
  677. package/src/features/dataApi/searchTokens.ts +73 -0
  678. package/src/features/dataApi/tokenDetails/useTokenDetailsData.ts +94 -0
  679. package/src/features/dataApi/tokenDetails/useTokenSpotPriceCentralized.ts +9 -0
  680. package/src/features/dataApi/tokenDetails/useTokenSpotPriceWrapper.ts +13 -0
  681. package/src/features/dataApi/tokenProjects/tokenProjects.test.tsx +44 -0
  682. package/src/features/dataApi/tokenProjects/tokenProjects.ts +34 -0
  683. package/src/features/dataApi/tokenProjects/utils/tokenProjectToCurrencyInfos.test.ts +59 -0
  684. package/src/features/dataApi/tokenProjects/utils/tokenProjectToCurrencyInfos.ts +52 -0
  685. package/src/features/dataApi/types.ts +103 -0
  686. package/src/features/dataApi/utils/buildCurrency.test.ts +66 -0
  687. package/src/features/dataApi/utils/buildCurrency.ts +117 -0
  688. package/src/features/dataApi/utils/currencyIdToContractInput.test.ts +39 -0
  689. package/src/features/dataApi/utils/currencyIdToContractInput.ts +23 -0
  690. package/src/features/dataApi/utils/getCurrencySafetyInfo.ts +145 -0
  691. package/src/features/dataApi/utils/gqlTokenToCurrencyInfo.test.ts +39 -0
  692. package/src/features/dataApi/utils/gqlTokenToCurrencyInfo.ts +44 -0
  693. package/src/features/dataApi/utils/usePersistedError.test.ts +80 -0
  694. package/src/features/dataApi/utils/usePersistedError.ts +19 -0
  695. package/src/features/ens/api.ts +127 -0
  696. package/src/features/ens/constants.ts +1 -0
  697. package/src/features/ens/useENS.ts +61 -0
  698. package/src/features/favorites/selectors.ts +20 -0
  699. package/src/features/favorites/slice.test.ts +52 -0
  700. package/src/features/favorites/slice.ts +87 -0
  701. package/src/features/favorites/useSelectHasTokenFavorited.ts +12 -0
  702. package/src/features/favorites/useToggleFavoriteCallback.tsx +34 -0
  703. package/src/features/favorites/useToggleWatchedWalletCallback.ts +26 -0
  704. package/src/features/fiatCurrency/constants.ts +53 -0
  705. package/src/features/fiatCurrency/conversion.ts +172 -0
  706. package/src/features/fiatCurrency/hooks/useFormatChartFiatDelta.ts +31 -0
  707. package/src/features/fiatCurrency/hooks.ts +167 -0
  708. package/src/features/fiatCurrency/priceChart/formatters/shared/types.ts +37 -0
  709. package/src/features/fiatCurrency/priceChart/formatters/shared/utils.ts +93 -0
  710. package/src/features/fiatCurrency/priceChart/formatters/stablecoinFormatter.ts +84 -0
  711. package/src/features/fiatCurrency/priceChart/formatters/standardFormatter.ts +88 -0
  712. package/src/features/fiatCurrency/priceChart/priceChartConversion.test.ts +1203 -0
  713. package/src/features/fiatCurrency/priceChart/priceChartConversion.ts +42 -0
  714. package/src/features/fiatOnRamp/EdgeFade/EdgeFade.native.tsx +21 -0
  715. package/src/features/fiatOnRamp/EdgeFade/EdgeFade.test.tsx +62 -0
  716. package/src/features/fiatOnRamp/EdgeFade/EdgeFade.tsx +6 -0
  717. package/src/features/fiatOnRamp/EdgeFade/EdgeFade.web.tsx +21 -0
  718. package/src/features/fiatOnRamp/EdgeFade/__snapshots__/EdgeFade.test.tsx.snap +116 -0
  719. package/src/features/fiatOnRamp/FORQuoteItem.tsx +111 -0
  720. package/src/features/fiatOnRamp/FiatOnRampConnectingView.native.tsx +84 -0
  721. package/src/features/fiatOnRamp/FiatOnRampConnectingView.tsx +11 -0
  722. package/src/features/fiatOnRamp/FiatOnRampConnectingView.web.tsx +56 -0
  723. package/src/features/fiatOnRamp/FiatOnRampCountryPicker.tsx +58 -0
  724. package/src/features/fiatOnRamp/PaymentMethodFilter/PaymentMethodFilter.native.tsx +41 -0
  725. package/src/features/fiatOnRamp/PaymentMethodFilter/PaymentMethodFilter.test.tsx +165 -0
  726. package/src/features/fiatOnRamp/PaymentMethodFilter/PaymentMethodFilter.tsx +6 -0
  727. package/src/features/fiatOnRamp/PaymentMethodFilter/PaymentMethodFilter.web.tsx +51 -0
  728. package/src/features/fiatOnRamp/PaymentMethodFilter/__snapshots__/PaymentMethodFilter.test.tsx.snap +243 -0
  729. package/src/features/fiatOnRamp/PaymentMethodFilter/utils.tsx +160 -0
  730. package/src/features/fiatOnRamp/SelectTokenButton.tsx +77 -0
  731. package/src/features/fiatOnRamp/TokenSelectorBalanceDisplay.tsx +72 -0
  732. package/src/features/fiatOnRamp/UnsupportedTokenModal.tsx +45 -0
  733. package/src/features/fiatOnRamp/api.ts +7 -0
  734. package/src/features/fiatOnRamp/constants.ts +56 -0
  735. package/src/features/fiatOnRamp/hooks/useFiatOnRampQueries.ts +324 -0
  736. package/src/features/fiatOnRamp/hooks.ts +408 -0
  737. package/src/features/fiatOnRamp/types.ts +139 -0
  738. package/src/features/fiatOnRamp/useCexTransferProviders.ts +17 -0
  739. package/src/features/fiatOnRamp/utils.test.ts +483 -0
  740. package/src/features/fiatOnRamp/utils.ts +227 -0
  741. package/src/features/forceUpgrade/hooks/useForceUpgradeStatus.ts +9 -0
  742. package/src/features/forceUpgrade/hooks/useForceUpgradeTranslations.ts +14 -0
  743. package/src/features/gas/adjustGasFee.ts +144 -0
  744. package/src/features/gas/hooks/useCancellationGasFeeInfo.test.ts +170 -0
  745. package/src/features/gas/hooks/useCancellationGasFeeInfo.ts +154 -0
  746. package/src/features/gas/hooks/useMaxAmountSpend.test.ts +220 -0
  747. package/src/features/gas/hooks/useMaxAmountSpend.ts +113 -0
  748. package/src/features/gas/hooks/usePlanCancellationGasFeeInfo.ts +142 -0
  749. package/src/features/gas/hooks.ts +323 -0
  750. package/src/features/gas/utils/cancel.test.ts +239 -0
  751. package/src/features/gas/utils/cancel.ts +198 -0
  752. package/src/features/gas/utils.test.ts +74 -0
  753. package/src/features/gas/utils.ts +289 -0
  754. package/src/features/gating/StatsigProviderWrapper.tsx +71 -0
  755. package/src/features/gating/statsigBaseConfig.ts +10 -0
  756. package/src/features/gating/typeGuards.ts +23 -0
  757. package/src/features/gating/useSyncStatsigUserIdentifiers.ts +70 -0
  758. package/src/features/language/LocalizationContext.tsx +58 -0
  759. package/src/features/language/constants.ts +359 -0
  760. package/src/features/language/formatter.ts +76 -0
  761. package/src/features/language/hooks.tsx +304 -0
  762. package/src/features/language/localizedDayjs.ts +106 -0
  763. package/src/features/language/navigatorLocale.ts +49 -0
  764. package/src/features/language/utils.ts +8 -0
  765. package/src/features/nfts/constants.ts +5 -0
  766. package/src/features/nfts/hooks/useGroupNftsByVisibility.ts +58 -0
  767. package/src/features/nfts/hooks/useNFT.ts +31 -0
  768. package/src/features/nfts/hooks/useNavigateToNftExplorerLink.ts +7 -0
  769. package/src/features/nfts/hooks/useNftContextMenuItems.tsx +266 -0
  770. package/src/features/nfts/types.ts +22 -0
  771. package/src/features/nfts/utils.test.ts +257 -0
  772. package/src/features/nfts/utils.ts +128 -0
  773. package/src/features/notifications/constants.ts +20 -0
  774. package/src/features/notifications/hooks/useNotificationLifecycle.ts +81 -0
  775. package/src/features/notifications/slice/hooks.ts +18 -0
  776. package/src/features/notifications/slice/selectors.ts +46 -0
  777. package/src/features/notifications/slice/slice.ts +82 -0
  778. package/src/features/notifications/slice/types.ts +267 -0
  779. package/src/features/passkey/PasskeyManagementModal.tsx +84 -0
  780. package/src/features/passkey/PasskeysHelpModal.tsx +130 -0
  781. package/src/features/passkey/constants.ts +1 -0
  782. package/src/features/passkey/embeddedWallet.ts +431 -0
  783. package/src/features/passkey/hooks/useEmbeddedWalletBaseUrl.ts +12 -0
  784. package/src/features/passkey/hooks/useGetPasskeyAuthStatus.ts +25 -0
  785. package/src/features/passkey/passkey.native.ts +9 -0
  786. package/src/features/passkey/passkey.ts +9 -0
  787. package/src/features/passkey/passkey.web.ts +20 -0
  788. package/src/features/passkey/utils.native.ts +3 -0
  789. package/src/features/passkey/utils.ts +5 -0
  790. package/src/features/passkey/utils.web.ts +28 -0
  791. package/src/features/platforms/types/Platform.ts +4 -0
  792. package/src/features/platforms/types/PlatformSpecificAddress.ts +11 -0
  793. package/src/features/platforms/utils/addresses.ts +35 -0
  794. package/src/features/platforms/utils/chains.ts +21 -0
  795. package/src/features/portfolio/PortfolioBalance/PortfolioBalance.tsx +96 -0
  796. package/src/features/portfolio/TokenBalanceListContext.tsx +169 -0
  797. package/src/features/portfolio/api.ts +256 -0
  798. package/src/features/portfolio/balances/hooks/useTokenContextMenuOptions.ts +299 -0
  799. package/src/features/portfolio/portfolioUpdates/constants.ts +3 -0
  800. package/src/features/portfolio/portfolioUpdates/fetchOnChainBalances.test.ts +197 -0
  801. package/src/features/portfolio/portfolioUpdates/fetchOnChainBalances.ts +249 -0
  802. package/src/features/portfolio/portfolioUpdates/getCurrenciesWithExpectedUpdates.ts +82 -0
  803. package/src/features/portfolio/portfolioUpdates/getInstantTokenBalanceUpdateApolloLink.ts +343 -0
  804. package/src/features/portfolio/portfolioUpdates/refetchGQLQueriesViaOnchainOverrideVariantSaga.ts +278 -0
  805. package/src/features/portfolio/portfolioUpdates/refetchQueriesSaga.ts +15 -0
  806. package/src/features/portfolio/portfolioUpdates/rest/fetchOnChainBalancesRest.test.ts +326 -0
  807. package/src/features/portfolio/portfolioUpdates/rest/fetchOnChainBalancesRest.ts +338 -0
  808. package/src/features/portfolio/portfolioUpdates/rest/refetchRestQueriesViaOnchainOverrideVariantSaga.test.ts +322 -0
  809. package/src/features/portfolio/portfolioUpdates/rest/refetchRestQueriesViaOnchainOverrideVariantSaga.ts +308 -0
  810. package/src/features/portfolio/slice/selectors.ts +18 -0
  811. package/src/features/portfolio/slice/slice.test.ts +183 -0
  812. package/src/features/portfolio/slice/slice.ts +115 -0
  813. package/src/features/portfolio/types.ts +9 -0
  814. package/src/features/prices/TokenPriceContext.tsx +62 -0
  815. package/src/features/providers/FlashbotsCommon.ts +117 -0
  816. package/src/features/providers/FlashbotsRpcClient.test.ts +336 -0
  817. package/src/features/providers/FlashbotsRpcClient.ts +173 -0
  818. package/src/features/providers/FlashbotsRpcProvider.test.ts +90 -0
  819. package/src/features/providers/FlashbotsRpcProvider.ts +149 -0
  820. package/src/features/providers/createEthersProvider.ts +46 -0
  821. package/src/features/providers/createViemClient.ts +81 -0
  822. package/src/features/providers/getSolanaConnection.ts +8 -0
  823. package/src/features/providers/observability/InstrumentedJsonRpcProvider.ts +52 -0
  824. package/src/features/providers/observability/createObservableTransport.ts +44 -0
  825. package/src/features/providers/observability/extractProviderName.ts +43 -0
  826. package/src/features/providers/observability/rpcObserver.ts +73 -0
  827. package/src/features/providers/rpcUrlSelector.ts +81 -0
  828. package/src/features/providers/webForNudgeProvider.tsx +52 -0
  829. package/src/features/reporting/reports.ts +196 -0
  830. package/src/features/repositories.ts +28 -0
  831. package/src/features/search/ClearRecentSearchesButton.tsx +24 -0
  832. package/src/features/search/SearchHistoryResult.ts +95 -0
  833. package/src/features/search/SearchModal/SearchModalList.tsx +341 -0
  834. package/src/features/search/SearchModal/SearchModalNoQueryList.tsx +70 -0
  835. package/src/features/search/SearchModal/SearchModalResultsList.tsx +255 -0
  836. package/src/features/search/SearchModal/analytics/SearchContext.tsx +18 -0
  837. package/src/features/search/SearchModal/analytics/analytics.test.ts +228 -0
  838. package/src/features/search/SearchModal/analytics/analytics.ts +122 -0
  839. package/src/features/search/SearchModal/constants.ts +4 -0
  840. package/src/features/search/SearchModal/hooks/useFilterCallbacks.ts +70 -0
  841. package/src/features/search/SearchModal/hooks/useRecentlySearchedOptions.tsx +166 -0
  842. package/src/features/search/SearchModal/hooks/useSectionsForNoQuerySearch.tsx +159 -0
  843. package/src/features/search/SearchModal/hooks/useWalletSearchResults.tsx +169 -0
  844. package/src/features/search/SearchModal/types.ts +10 -0
  845. package/src/features/search/SearchTextInput.tsx +257 -0
  846. package/src/features/search/searchHistorySlice.test.ts +168 -0
  847. package/src/features/search/searchHistorySlice.ts +70 -0
  848. package/src/features/search/selectSearchHistory.ts +6 -0
  849. package/src/features/search/utils.ts +15 -0
  850. package/src/features/services.ts +81 -0
  851. package/src/features/settings/balances/PortfolioBalanceSettingsContent.tsx +110 -0
  852. package/src/features/settings/constants.ts +41 -0
  853. package/src/features/settings/hooks.test.ts +80 -0
  854. package/src/features/settings/hooks.ts +41 -0
  855. package/src/features/settings/saga.ts +18 -0
  856. package/src/features/settings/selectors.ts +19 -0
  857. package/src/features/settings/slice.test.ts +28 -0
  858. package/src/features/settings/slice.ts +81 -0
  859. package/src/features/settings/storage/StorageSettingsContent.test.tsx +89 -0
  860. package/src/features/settings/storage/StorageSettingsContent.tsx +253 -0
  861. package/src/features/settings/storage/__snapshots__/StorageSettingsContent.test.tsx.snap +193 -0
  862. package/src/features/settings/useHapticFeedback/types.ts +22 -0
  863. package/src/features/settings/useHapticFeedback/useHapticFeedback.native.ts +45 -0
  864. package/src/features/settings/useHapticFeedback/useHapticFeedback.ts +6 -0
  865. package/src/features/settings/useHapticFeedback/useHapticFeedback.web.ts +11 -0
  866. package/src/features/smartWallet/banner/NetworkCostBanner.tsx +38 -0
  867. package/src/features/smartWallet/delegation/createTradingApiDelegationRepository.ts +65 -0
  868. package/src/features/smartWallet/delegation/delegation.test.ts +174 -0
  869. package/src/features/smartWallet/delegation/delegation.ts +118 -0
  870. package/src/features/smartWallet/delegation/delegationRepository.ts +21 -0
  871. package/src/features/smartWallet/delegation/effects.test.ts +206 -0
  872. package/src/features/smartWallet/delegation/effects.ts +81 -0
  873. package/src/features/smartWallet/delegation/hooks/useSetActiveChainId.ts +11 -0
  874. package/src/features/smartWallet/delegation/hooks/useUpdateDelegateState.ts +10 -0
  875. package/src/features/smartWallet/delegation/isDelegatedEOA.test.ts +63 -0
  876. package/src/features/smartWallet/delegation/isDelegatedEOA.ts +37 -0
  877. package/src/features/smartWallet/delegation/slice.ts +85 -0
  878. package/src/features/smartWallet/delegation/types.ts +12 -0
  879. package/src/features/smartWallet/mismatch/MismatchAccountEffects.tsx +38 -0
  880. package/src/features/smartWallet/mismatch/MismatchContext.tsx +76 -0
  881. package/src/features/smartWallet/mismatch/hooks.ts +229 -0
  882. package/src/features/smartWallet/mismatch/mismatch.test.ts +66 -0
  883. package/src/features/smartWallet/mismatch/mismatch.ts +109 -0
  884. package/src/features/smartWallet/mismatch/queryOptions.ts +42 -0
  885. package/src/features/smartWallet/mismatch/useMakeAccountMismatchQueryOptions.ts +23 -0
  886. package/src/features/smartWallet/mismatch/useOnDisconnectEffect.native.tsx +1 -0
  887. package/src/features/smartWallet/mismatch/useOnDisconnectEffect.tsx +5 -0
  888. package/src/features/smartWallet/mismatch/useOnDisconnectEffect.web.tsx +26 -0
  889. package/src/features/telemetry/Trace.tsx +60 -0
  890. package/src/features/telemetry/constants/extension.ts +28 -0
  891. package/src/features/telemetry/constants/features.ts +78 -0
  892. package/src/features/telemetry/constants/index.ts +8 -0
  893. package/src/features/telemetry/constants/interface.ts +71 -0
  894. package/src/features/telemetry/constants/lux.ts +25 -0
  895. package/src/features/telemetry/constants/mobile.ts +36 -0
  896. package/src/features/telemetry/constants/sessions.ts +12 -0
  897. package/src/features/telemetry/constants/trace/element.ts +330 -0
  898. package/src/features/telemetry/constants/trace/index.ts +4 -0
  899. package/src/features/telemetry/constants/trace/modal.ts +234 -0
  900. package/src/features/telemetry/constants/trace/page.ts +37 -0
  901. package/src/features/telemetry/constants/trace/section.ts +42 -0
  902. package/src/features/telemetry/constants/wallet.ts +70 -0
  903. package/src/features/telemetry/send.native.ts +28 -0
  904. package/src/features/telemetry/send.ts +18 -0
  905. package/src/features/telemetry/send.web.ts +31 -0
  906. package/src/features/telemetry/types.ts +1320 -0
  907. package/src/features/telemetry/user.ts +100 -0
  908. package/src/features/telemetry/utils/logExperimentQualifyingEvent.ts +9 -0
  909. package/src/features/testnets/TestnetModeModal.tsx +47 -0
  910. package/src/features/timing/selectors.ts +3 -0
  911. package/src/features/timing/slice.ts +31 -0
  912. package/src/features/tokens/SolanaToken.test.ts +76 -0
  913. package/src/features/tokens/SolanaToken.ts +48 -0
  914. package/src/features/tokens/getCurrencyAmount.test.ts +120 -0
  915. package/src/features/tokens/getCurrencyAmount.ts +85 -0
  916. package/src/features/tokens/stablecoin.ts +29 -0
  917. package/src/features/tokens/useCurrencyInfo.ts +110 -0
  918. package/src/features/tokens/warnings/TokenWarningCard.tsx +129 -0
  919. package/src/features/tokens/warnings/TokenWarningFlagsTable.tsx +142 -0
  920. package/src/features/tokens/warnings/TokenWarningModal.tsx +403 -0
  921. package/src/features/tokens/warnings/WarningInfoModalContainer.tsx +11 -0
  922. package/src/features/tokens/warnings/hooks/useBlockaidFeeComparisonAnalytics.ts +62 -0
  923. package/src/features/tokens/warnings/hooks/useWarningModalCurrenciesDismissed.ts +60 -0
  924. package/src/features/tokens/warnings/safetyUtils.test.ts +605 -0
  925. package/src/features/tokens/warnings/safetyUtils.ts +458 -0
  926. package/src/features/tokens/warnings/slice/hooks.ts +104 -0
  927. package/src/features/tokens/warnings/slice/selectors.ts +17 -0
  928. package/src/features/tokens/warnings/slice/slice.ts +91 -0
  929. package/src/features/tokens/warnings/slice/types.ts +34 -0
  930. package/src/features/tokens/warnings/types.ts +14 -0
  931. package/src/features/transactions/TransactionDetails/EstimatedTime.tsx +29 -0
  932. package/src/features/transactions/TransactionDetails/ExpectedFailureBanner.tsx +45 -0
  933. package/src/features/transactions/TransactionDetails/ExpectedSpeed.tsx +19 -0
  934. package/src/features/transactions/TransactionDetails/FeeOnTransferFee.tsx +50 -0
  935. package/src/features/transactions/TransactionDetails/ListSeparatorToggle.tsx +41 -0
  936. package/src/features/transactions/TransactionDetails/SlippageEdit.tsx +50 -0
  937. package/src/features/transactions/TransactionDetails/SwapFee.tsx +115 -0
  938. package/src/features/transactions/TransactionDetails/SwapReviewTokenWarningCard.tsx +77 -0
  939. package/src/features/transactions/TransactionDetails/TransactionDetails.tsx +200 -0
  940. package/src/features/transactions/TransactionDetails/TransactionWarning.tsx +19 -0
  941. package/src/features/transactions/TransactionDetails/UnichainPoweredMessage.tsx +27 -0
  942. package/src/features/transactions/TransactionDetails/UserReceiveAmount.tsx +33 -0
  943. package/src/features/transactions/TransactionDetails/modals/FeeOnTransferWarning.tsx +104 -0
  944. package/src/features/transactions/TransactionDetails/modals/SwapFeeWarning.tsx +72 -0
  945. package/src/features/transactions/TransactionDetails/types.ts +25 -0
  946. package/src/features/transactions/TransactionDetails/utils/getFeeSeverity.ts +41 -0
  947. package/src/features/transactions/TransactionDetails/utils/getRelevantTokenWarningSeverity.ts +22 -0
  948. package/src/features/transactions/TransactionDetails/utils/getShouldDisplayTokenWarningCard.ts +63 -0
  949. package/src/features/transactions/cancel/cancelMultipleOrders.test.ts +386 -0
  950. package/src/features/transactions/cancel/cancelMultipleOrders.ts +226 -0
  951. package/src/features/transactions/cancel/cancelOrderFactory.test.ts +327 -0
  952. package/src/features/transactions/cancel/cancelOrderFactory.ts +161 -0
  953. package/src/features/transactions/cancel/getCancelOrderTxRequest.ts +39 -0
  954. package/src/features/transactions/cancel/validation.test.ts +99 -0
  955. package/src/features/transactions/cancel/validation.ts +57 -0
  956. package/src/features/transactions/components/DecimalPadInput/DecimalPad.native.tsx +306 -0
  957. package/src/features/transactions/components/DecimalPadInput/DecimalPad.tsx +7 -0
  958. package/src/features/transactions/components/DecimalPadInput/DecimalPad.web.tsx +7 -0
  959. package/src/features/transactions/components/DecimalPadInput/DecimalPadInput.tsx +386 -0
  960. package/src/features/transactions/components/DecimalPadInput/types.ts +18 -0
  961. package/src/features/transactions/components/InsufficientNativeTokenWarning/BridgeTokenButton.tsx +65 -0
  962. package/src/features/transactions/components/InsufficientNativeTokenWarning/BuyNativeTokenButton.tsx +72 -0
  963. package/src/features/transactions/components/InsufficientNativeTokenWarning/InsufficientNativeTokenBaseComponent.tsx +91 -0
  964. package/src/features/transactions/components/InsufficientNativeTokenWarning/InsufficientNativeTokenWarning.tsx +165 -0
  965. package/src/features/transactions/components/InsufficientNativeTokenWarning/constants.ts +3 -0
  966. package/src/features/transactions/components/InsufficientNativeTokenWarning/useInsufficientNativeTokenWarning.tsx +176 -0
  967. package/src/features/transactions/components/TransactionModal/TransactionModal.native.tsx +207 -0
  968. package/src/features/transactions/components/TransactionModal/TransactionModal.tsx +17 -0
  969. package/src/features/transactions/components/TransactionModal/TransactionModal.web.tsx +59 -0
  970. package/src/features/transactions/components/TransactionModal/TransactionModalContext.tsx +108 -0
  971. package/src/features/transactions/components/TransactionModal/TransactionModalProps.tsx +23 -0
  972. package/src/features/transactions/components/TransactionModal/TransactionModalUpdateLogger.tsx +17 -0
  973. package/src/features/transactions/components/cancel/CancelConfirmationView.tsx +178 -0
  974. package/src/features/transactions/components/settings/TransactionSettings.tsx +138 -0
  975. package/src/features/transactions/components/settings/TransactionSettingsButton.tsx +96 -0
  976. package/src/features/transactions/components/settings/TransactionSettingsButtonWithSlippage.tsx +84 -0
  977. package/src/features/transactions/components/settings/TransactionSettingsModal/TransactionSettingsModal.tsx +11 -0
  978. package/src/features/transactions/components/settings/TransactionSettingsModal/TransactionSettingsModalContent/TransactionSettingsModalContent.tsx +144 -0
  979. package/src/features/transactions/components/settings/TransactionSettingsModal/TransactionSettingsModalContent/TransactionSettingsRow.tsx +91 -0
  980. package/src/features/transactions/components/settings/TransactionSettingsModal/TransactionSettingsModalInterface.tsx +47 -0
  981. package/src/features/transactions/components/settings/TransactionSettingsModal/TransactionSettingsModalWallet.tsx +45 -0
  982. package/src/features/transactions/components/settings/TransactionSettingsModal/types.ts +9 -0
  983. package/src/features/transactions/components/settings/ViewOnlyButton.tsx +29 -0
  984. package/src/features/transactions/components/settings/hooks/useTransactionSettingsWithSlippage.ts +64 -0
  985. package/src/features/transactions/components/settings/settingsConfigurations/deadline/Deadline/Deadline.native.tsx +16 -0
  986. package/src/features/transactions/components/settings/settingsConfigurations/deadline/Deadline/Deadline.tsx +18 -0
  987. package/src/features/transactions/components/settings/settingsConfigurations/deadline/Deadline/Deadline.web.tsx +26 -0
  988. package/src/features/transactions/components/settings/settingsConfigurations/deadline/DeadlineControl.tsx +83 -0
  989. package/src/features/transactions/components/settings/settingsConfigurations/deadline/DeadlineWarning.tsx +19 -0
  990. package/src/features/transactions/components/settings/settingsConfigurations/deadline/useDeadlineSettings.ts +95 -0
  991. package/src/features/transactions/components/settings/settingsConfigurations/slippage/Slippage/Slippage.native.tsx +15 -0
  992. package/src/features/transactions/components/settings/settingsConfigurations/slippage/Slippage/Slippage.tsx +18 -0
  993. package/src/features/transactions/components/settings/settingsConfigurations/slippage/Slippage/Slippage.web.tsx +27 -0
  994. package/src/features/transactions/components/settings/settingsConfigurations/slippage/SlippageControl/SlippageControl.native.tsx +30 -0
  995. package/src/features/transactions/components/settings/settingsConfigurations/slippage/SlippageControl/SlippageControl.tsx +10 -0
  996. package/src/features/transactions/components/settings/settingsConfigurations/slippage/SlippageControl/SlippageControl.web.tsx +165 -0
  997. package/src/features/transactions/components/settings/settingsConfigurations/slippage/SlippageControl/types.ts +3 -0
  998. package/src/features/transactions/components/settings/settingsConfigurations/slippage/SlippageWarning.tsx +31 -0
  999. package/src/features/transactions/components/settings/settingsConfigurations/slippage/useSlippageSettings.ts +220 -0
  1000. package/src/features/transactions/components/settings/stores/TransactionSettingsModalStore/TransactionSettingsModalStoreContext.tsx +10 -0
  1001. package/src/features/transactions/components/settings/stores/TransactionSettingsModalStore/TransactionSettingsModalStoreContextProvider.tsx +28 -0
  1002. package/src/features/transactions/components/settings/stores/TransactionSettingsModalStore/createTransactionSettingsModalStore.ts +106 -0
  1003. package/src/features/transactions/components/settings/stores/TransactionSettingsModalStore/useTransactionSettingsModalStore.ts +50 -0
  1004. package/src/features/transactions/components/settings/stores/transactionSettingsStore/LPTransactionSettingsStoreContextProvider.tsx +15 -0
  1005. package/src/features/transactions/components/settings/stores/transactionSettingsStore/SwapTransactionSettingsStoreContextProvider.tsx +6 -0
  1006. package/src/features/transactions/components/settings/stores/transactionSettingsStore/TransactionSettingsStoreContext.ts +22 -0
  1007. package/src/features/transactions/components/settings/stores/transactionSettingsStore/TransactionSettingsStoreContextProvider.tsx +49 -0
  1008. package/src/features/transactions/components/settings/stores/transactionSettingsStore/createTransactionSettingsAutoSlippageToleranceStore.tsx +37 -0
  1009. package/src/features/transactions/components/settings/stores/transactionSettingsStore/createTransactionSettingsStore.test.ts +28 -0
  1010. package/src/features/transactions/components/settings/stores/transactionSettingsStore/createTransactionSettingsStore.ts +80 -0
  1011. package/src/features/transactions/components/settings/stores/transactionSettingsStore/useTransactionSettingsStore.ts +79 -0
  1012. package/src/features/transactions/components/settings/types.ts +42 -0
  1013. package/src/features/transactions/components/settings/utils.ts +31 -0
  1014. package/src/features/transactions/errors.ts +308 -0
  1015. package/src/features/transactions/hooks/useErroredQueuedOrder.ts +52 -0
  1016. package/src/features/transactions/hooks/useGetCanSignPermits.ts +14 -0
  1017. package/src/features/transactions/hooks/useGetSwapDelegationAddress.ts +16 -0
  1018. package/src/features/transactions/hooks/useIsCancelable.ts +130 -0
  1019. package/src/features/transactions/hooks/useIsQueuedTransaction.ts +44 -0
  1020. package/src/features/transactions/hooks/useParsedTransactionWarnings.tsx +98 -0
  1021. package/src/features/transactions/hooks/usePendingTransactions.ts +45 -0
  1022. package/src/features/transactions/hooks/usePollingIntervalByChain.ts +27 -0
  1023. package/src/features/transactions/hooks/useSelectTransaction.tsx +22 -0
  1024. package/src/features/transactions/hooks/useSuccessfulSwapCompleted.ts +59 -0
  1025. package/src/features/transactions/hooks/useTokenAndFiatDisplayAmounts.tsx +82 -0
  1026. package/src/features/transactions/hooks/useUSDCPrice.ts +125 -0
  1027. package/src/features/transactions/hooks/useUSDCPriceCentralized.ts +77 -0
  1028. package/src/features/transactions/hooks/useUSDCPriceWrapper.ts +34 -0
  1029. package/src/features/transactions/hooks/useUSDTokenUpdater.ts +77 -0
  1030. package/src/features/transactions/liquidity/steps/collectFees.ts +13 -0
  1031. package/src/features/transactions/liquidity/steps/collectFeesSteps.ts +11 -0
  1032. package/src/features/transactions/liquidity/steps/collectIncentiveRewards.ts +5 -0
  1033. package/src/features/transactions/liquidity/steps/collectIncentiveRewardsSteps.ts +3 -0
  1034. package/src/features/transactions/liquidity/steps/decreaseLiquiditySteps.ts +21 -0
  1035. package/src/features/transactions/liquidity/steps/decreasePosition.ts +19 -0
  1036. package/src/features/transactions/liquidity/steps/generateLPTransactionSteps.test.ts +362 -0
  1037. package/src/features/transactions/liquidity/steps/generateLPTransactionSteps.ts +178 -0
  1038. package/src/features/transactions/liquidity/steps/increaseLiquiditySteps.ts +81 -0
  1039. package/src/features/transactions/liquidity/steps/increasePosition.ts +206 -0
  1040. package/src/features/transactions/liquidity/steps/migrate.ts +72 -0
  1041. package/src/features/transactions/liquidity/steps/migrationSteps.ts +48 -0
  1042. package/src/features/transactions/liquidity/types.ts +187 -0
  1043. package/src/features/transactions/liquidity/utils.ts +87 -0
  1044. package/src/features/transactions/modals/BlockedAddressModal.tsx +20 -0
  1045. package/src/features/transactions/modals/BlockedAddressWarning.tsx +33 -0
  1046. package/src/features/transactions/modals/CompatibleAddressModal.tsx +91 -0
  1047. package/src/features/transactions/modals/HiddenTokenInfoModal.tsx +39 -0
  1048. package/src/features/transactions/modals/LowNativeBalanceModal.tsx +62 -0
  1049. package/src/features/transactions/modals/MaxBalanceInfoModal.tsx +72 -0
  1050. package/src/features/transactions/modals/ViewOnlyModal.tsx +28 -0
  1051. package/src/features/transactions/selectors.ts +315 -0
  1052. package/src/features/transactions/send/types.ts +18 -0
  1053. package/src/features/transactions/signing.ts +29 -0
  1054. package/src/features/transactions/slice.test.ts +959 -0
  1055. package/src/features/transactions/slice.ts +370 -0
  1056. package/src/features/transactions/steps/approve.ts +31 -0
  1057. package/src/features/transactions/steps/permit2Signature.ts +17 -0
  1058. package/src/features/transactions/steps/permit2Transaction.ts +34 -0
  1059. package/src/features/transactions/steps/revoke.ts +30 -0
  1060. package/src/features/transactions/steps/types.ts +154 -0
  1061. package/src/features/transactions/steps/wrap.ts +17 -0
  1062. package/src/features/transactions/swap/SwapFlow/CurrentScreen.native.tsx +70 -0
  1063. package/src/features/transactions/swap/SwapFlow/CurrentScreen.tsx +10 -0
  1064. package/src/features/transactions/swap/SwapFlow/CurrentScreen.web.tsx +60 -0
  1065. package/src/features/transactions/swap/SwapFlow/SwapFlow.tsx +84 -0
  1066. package/src/features/transactions/swap/analytics.test.ts +183 -0
  1067. package/src/features/transactions/swap/analytics.ts +585 -0
  1068. package/src/features/transactions/swap/components/AcrossRoutingInfo.tsx +91 -0
  1069. package/src/features/transactions/swap/components/BridgingCurrencyRow.tsx +53 -0
  1070. package/src/features/transactions/swap/components/CrossChainCurrencyRow.tsx +53 -0
  1071. package/src/features/transactions/swap/components/EstimatedBridgeTime.tsx +66 -0
  1072. package/src/features/transactions/swap/components/MaxSlippageRow/MaxSlippageRow.tsx +81 -0
  1073. package/src/features/transactions/swap/components/MaxSlippageRow/SlippageInfo/SlippageInfo.tsx +81 -0
  1074. package/src/features/transactions/swap/components/MaxSlippageRow/SlippageInfo/SlippageInfoCaption.tsx +116 -0
  1075. package/src/features/transactions/swap/components/MaxSlippageRow/SlippageInfo/types.ts +8 -0
  1076. package/src/features/transactions/swap/components/MaxSlippageRow/SlippageInfo/useFormatSlippageAmount.ts +26 -0
  1077. package/src/features/transactions/swap/components/PriceImpactRow/MarketPriceImpactWarning.tsx +84 -0
  1078. package/src/features/transactions/swap/components/PriceImpactRow/PriceImpactRow.tsx +45 -0
  1079. package/src/features/transactions/swap/components/PriceImpactRow/usePriceImpact.test.ts +93 -0
  1080. package/src/features/transactions/swap/components/PriceImpactRow/usePriceImpact.ts +26 -0
  1081. package/src/features/transactions/swap/components/README.md +24 -0
  1082. package/src/features/transactions/swap/components/RoutingInfo/AcrossRoutingInfo.tsx +91 -0
  1083. package/src/features/transactions/swap/components/RoutingInfo/ChainedRoutingInfo.tsx +142 -0
  1084. package/src/features/transactions/swap/components/RoutingInfo/RoutingHopInfo.tsx +120 -0
  1085. package/src/features/transactions/swap/components/RoutingInfo/RoutingInfo.tsx +30 -0
  1086. package/src/features/transactions/swap/components/RoutingInfo.tsx +120 -0
  1087. package/src/features/transactions/swap/components/SwapArrowButton.tsx +43 -0
  1088. package/src/features/transactions/swap/components/SwapFormButton/SwapFormButton.tsx +70 -0
  1089. package/src/features/transactions/swap/components/SwapFormButton/SwapFormButtonTrace.tsx +38 -0
  1090. package/src/features/transactions/swap/components/SwapFormButton/hooks/useBridgingModalActions.ts +28 -0
  1091. package/src/features/transactions/swap/components/SwapFormButton/hooks/useCurrenciesWithBridgingWarnings.ts +36 -0
  1092. package/src/features/transactions/swap/components/SwapFormButton/hooks/useCurrenciesWithProtectionWarnings.ts +38 -0
  1093. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsAmountSelectionInvalid.ts +11 -0
  1094. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsBlockingWithCustomMessage.ts +19 -0
  1095. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsMissingPlatformWallet.ts +12 -0
  1096. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsPortfolioZero.ts +10 -0
  1097. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsSwapButtonDisabled.ts +66 -0
  1098. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsTokenSelectionInvalid.ts +10 -0
  1099. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsTradeIndicative.ts +12 -0
  1100. package/src/features/transactions/swap/components/SwapFormButton/hooks/useIsWrongWalletPlatform.ts +15 -0
  1101. package/src/features/transactions/swap/components/SwapFormButton/hooks/useOnReviewPress.ts +99 -0
  1102. package/src/features/transactions/swap/components/SwapFormButton/hooks/useSwapFormButtonColors.ts +76 -0
  1103. package/src/features/transactions/swap/components/SwapFormButton/hooks/useSwapFormButtonHooks.test.ts +620 -0
  1104. package/src/features/transactions/swap/components/SwapFormButton/hooks/useSwapFormButtonText.ts +90 -0
  1105. package/src/features/transactions/swap/components/SwapFormSettings/SlippageWarningModal.tsx +50 -0
  1106. package/src/features/transactions/swap/components/SwapFormSettings/SwapFormSettings.tsx +92 -0
  1107. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/RoutingMethodPreference/RoutingMethodPreference.tsx +15 -0
  1108. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/RoutingMethodPreference/RoutingMethodPreferenceControl.tsx +28 -0
  1109. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/RoutingMethodPreference/RoutingMethodPreferenceScreen.tsx +89 -0
  1110. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/DEXInfo.tsx +55 -0
  1111. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/TradeRoutingPreference.tsx +15 -0
  1112. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/TradeRoutingPreferenceControl.tsx +39 -0
  1113. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/TradeRoutingPreferenceScreen.tsx +473 -0
  1114. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/V4HooksInfo.tsx +43 -0
  1115. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/TradeRoutingPreference/isDefaultTradeRouteOptions.ts +17 -0
  1116. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/Slippage/Slippage.native.tsx +19 -0
  1117. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/Slippage/Slippage.tsx +21 -0
  1118. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/Slippage/Slippage.web.tsx +10 -0
  1119. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/SlippageControl/SlippageControl.native.tsx +11 -0
  1120. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/SlippageControl/SlippageControl.tsx +9 -0
  1121. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/SlippageControl/SlippageControl.web.tsx +11 -0
  1122. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippage/SlippageScreenNative.tsx +203 -0
  1123. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippageUpdate/SlippageUpdate.native.tsx +7 -0
  1124. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippageUpdate/SlippageUpdate.tsx +11 -0
  1125. package/src/features/transactions/swap/components/SwapFormSettings/settingsConfigurations/slippageUpdate/SlippageUpdate.web.tsx +11 -0
  1126. package/src/features/transactions/swap/components/SwapRateRatio.tsx +77 -0
  1127. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/AnimatedTokenFlip.native.tsx +121 -0
  1128. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/AnimatedTokenFlip.tsx +16 -0
  1129. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/AnimatedTokenFlip.web.tsx +136 -0
  1130. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/FlashblocksConfirmButton.tsx +104 -0
  1131. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/GradientContainer.native.tsx +120 -0
  1132. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/GradientContainer.tsx +11 -0
  1133. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/GradientContainer.web.tsx +128 -0
  1134. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/StyledTokenLogo.tsx +32 -0
  1135. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/UnichainInstantBalanceModal.tsx +150 -0
  1136. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/constants.ts +28 -0
  1137. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/getOutputAmountFromSwapLogAndFormData.ts/constants.ts +40 -0
  1138. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/getOutputAmountFromSwapLogAndFormData.ts/getOutputAmountFromSwapLogAndFormData.ts +137 -0
  1139. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/getOutputAmountFromSwapLogAndFormData.ts/utils.ts +181 -0
  1140. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/receiptFetching/useFetchReceipt.ts +95 -0
  1141. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/receiptFetching/useReceiptFailureHandler.ts +57 -0
  1142. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/receiptFetching/useReceiptSuccessHandler.ts +207 -0
  1143. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/receiptFetching/utils.ts +125 -0
  1144. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useActualCompletionTime.tsx +48 -0
  1145. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useActualSwapOutput.tsx +70 -0
  1146. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useBackgroundColor.tsx +9 -0
  1147. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useClearFlashblocksSwapNotifications.ts +51 -0
  1148. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useCurrentFlashblocksTransaction.tsx +29 -0
  1149. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/hooks/useInstantReceiptOutput.tsx +83 -0
  1150. package/src/features/transactions/swap/components/UnichainInstantBalanceModal/utils.ts +91 -0
  1151. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormCurrencyInputPanel.tsx +103 -0
  1152. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormCurrencyOutputPanel.tsx +106 -0
  1153. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormDecimalPad/SwapFormDecimalPad.native.tsx +264 -0
  1154. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormDecimalPad/SwapFormDecimalPad.tsx +5 -0
  1155. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormDecimalPad/SwapFormDecimalPad.web.tsx +3 -0
  1156. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormHeader/SwapFormHeader.native.tsx +23 -0
  1157. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormHeader/SwapFormHeader.tsx +5 -0
  1158. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormHeader/SwapFormHeader.web.tsx +38 -0
  1159. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreen.tsx +118 -0
  1160. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/ExpandableRows.tsx +101 -0
  1161. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenDetails.native.tsx +12 -0
  1162. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenDetails.tsx +5 -0
  1163. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenDetails.web.tsx +39 -0
  1164. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/ExactOutputUnavailableWarningRow.tsx +57 -0
  1165. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/GasAndWarningRows.native.tsx +183 -0
  1166. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/GasAndWarningRows.tsx +5 -0
  1167. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/GasAndWarningRows.web.tsx +60 -0
  1168. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/SwapWarningModal.tsx +46 -0
  1169. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/CanonicalBridgeLinkBanner.tsx +29 -0
  1170. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/GasInfoRow.test.tsx +152 -0
  1171. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/GasInfoRow.tsx +68 -0
  1172. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/TradeInfoRow.tsx +92 -0
  1173. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/TradeWarning.tsx +40 -0
  1174. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/TradeInfoRow/useDebouncedTrade.ts +21 -0
  1175. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/types.ts +11 -0
  1176. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/GasAndWarningRows/useDebouncedGasInfo.ts +70 -0
  1177. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormScreenDetails/SwapFormScreenFooter/SwapFormScreenFooter.tsx +65 -0
  1178. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/AcrossRoutingTooltip.tsx +12 -0
  1179. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/BestRouteTooltip.tsx +82 -0
  1180. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/FeeDetailsTooltip.tsx +67 -0
  1181. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/LargePriceDifferenceTooltip.tsx +17 -0
  1182. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/MaxSlippageTooltip.tsx +144 -0
  1183. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormTooltips/YouReceiveDetailsTooltip.tsx +96 -0
  1184. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormWarningModals/BridgingModal.tsx +86 -0
  1185. package/src/features/transactions/swap/form/SwapFormScreen/SwapFormWarningModals/SwapFormWarningModals.tsx +113 -0
  1186. package/src/features/transactions/swap/form/SwapFormScreen/SwapTokenSelector/SwapTokenSelector.tsx +60 -0
  1187. package/src/features/transactions/swap/form/SwapFormScreen/SwapTokenSelector/hooks/useChainId.ts +36 -0
  1188. package/src/features/transactions/swap/form/SwapFormScreen/SwapTokenSelector/hooks/useHideTokenSelector.ts +21 -0
  1189. package/src/features/transactions/swap/form/SwapFormScreen/SwitchCurrenciesButton.tsx +63 -0
  1190. package/src/features/transactions/swap/form/SwapFormScreen/WalletRestoreButton.tsx +41 -0
  1191. package/src/features/transactions/swap/form/SwapFormScreen/YouReceiveDetails/SwapDetailsRow.tsx +169 -0
  1192. package/src/features/transactions/swap/form/SwapFormScreen/YouReceiveDetails/YouReceiveDetails.native.tsx +5 -0
  1193. package/src/features/transactions/swap/form/SwapFormScreen/YouReceiveDetails/YouReceiveDetails.tsx +12 -0
  1194. package/src/features/transactions/swap/form/SwapFormScreen/YouReceiveDetails/YouReceiveDetails.web.tsx +413 -0
  1195. package/src/features/transactions/swap/form/SwapFormScreen/hooks/useCurrencyInputFocusedStyle.ts +19 -0
  1196. package/src/features/transactions/swap/form/hooks/useDecimalPadControlledField.ts +15 -0
  1197. package/src/features/transactions/swap/form/hooks/useOnSelectCurrency.ts +245 -0
  1198. package/src/features/transactions/swap/form/hooks/useSwapNetworkChangeEffect.test.ts +91 -0
  1199. package/src/features/transactions/swap/form/hooks/useSwapPrefilledState.ts +118 -0
  1200. package/src/features/transactions/swap/form/hooks/useSyncFiatAndTokenAmountUpdater.test.tsx +226 -0
  1201. package/src/features/transactions/swap/form/hooks/useSyncFiatAndTokenAmountUpdater.tsx +84 -0
  1202. package/src/features/transactions/swap/form/stores/swapFormScreenStore/SwapFormScreenStoreContext.ts +4 -0
  1203. package/src/features/transactions/swap/form/stores/swapFormScreenStore/SwapFormScreenStoreContextProvider.tsx +268 -0
  1204. package/src/features/transactions/swap/form/stores/swapFormScreenStore/createSwapFormScreenStore.ts +83 -0
  1205. package/src/features/transactions/swap/form/stores/swapFormScreenStore/devUtils.ts +65 -0
  1206. package/src/features/transactions/swap/form/stores/swapFormScreenStore/hooks/useChainIdsChangeEffect.test.ts +227 -0
  1207. package/src/features/transactions/swap/form/stores/swapFormScreenStore/hooks/useChainIdsChangeEffect.ts +82 -0
  1208. package/src/features/transactions/swap/form/stores/swapFormScreenStore/hooks/useSwapNetworkChangeEffect.ts +53 -0
  1209. package/src/features/transactions/swap/form/stores/swapFormScreenStore/hooks/useTemporaryExactOutputUnavailableWarning.ts +44 -0
  1210. package/src/features/transactions/swap/form/stores/swapFormScreenStore/hooks/useUpdateSwapFormOnMountIfExactOutputWillFail.ts +17 -0
  1211. package/src/features/transactions/swap/form/stores/swapFormScreenStore/useSwapFormScreenCallbacks.test.ts +178 -0
  1212. package/src/features/transactions/swap/form/stores/swapFormScreenStore/useSwapFormScreenCallbacks.ts +267 -0
  1213. package/src/features/transactions/swap/form/stores/swapFormScreenStore/useSwapFormScreenStore.ts +23 -0
  1214. package/src/features/transactions/swap/form/stores/swapFormWarningStore/SwapFormWarningStoreContext.ts +4 -0
  1215. package/src/features/transactions/swap/form/stores/swapFormWarningStore/SwapFormWarningStoreContextProvider.tsx +9 -0
  1216. package/src/features/transactions/swap/form/stores/swapFormWarningStore/createSwapFormWarningStore.ts +57 -0
  1217. package/src/features/transactions/swap/form/stores/swapFormWarningStore/useSwapFormWarningStore.ts +30 -0
  1218. package/src/features/transactions/swap/form/utils.test.ts +73 -0
  1219. package/src/features/transactions/swap/form/utils.ts +17 -0
  1220. package/src/features/transactions/swap/hooks/useEthAsErc20DEXQualifyingEvent.ts +244 -0
  1221. package/src/features/transactions/swap/hooks/useFeeOnTransferAmount.ts +76 -0
  1222. package/src/features/transactions/swap/hooks/useIsUnichainFlashblocksEnabled.ts +135 -0
  1223. package/src/features/transactions/swap/hooks/useMostRecentSwapTx.ts +15 -0
  1224. package/src/features/transactions/swap/hooks/useNeedsBridgedAssetWarning.ts +71 -0
  1225. package/src/features/transactions/swap/hooks/usePriceDifference.test.ts +127 -0
  1226. package/src/features/transactions/swap/hooks/usePriceDifference.ts +55 -0
  1227. package/src/features/transactions/swap/hooks/usePriceUXEnabled.ts +11 -0
  1228. package/src/features/transactions/swap/hooks/useSwapWarnings/getBalanceWarning.test.ts +96 -0
  1229. package/src/features/transactions/swap/hooks/useSwapWarnings/getBalanceWarning.ts +39 -0
  1230. package/src/features/transactions/swap/hooks/useSwapWarnings/getFormIncompleteWarning.test.ts +127 -0
  1231. package/src/features/transactions/swap/hooks/useSwapWarnings/getFormIncompleteWarning.ts +26 -0
  1232. package/src/features/transactions/swap/hooks/useSwapWarnings/getPriceImpactWarning.test.ts +94 -0
  1233. package/src/features/transactions/swap/hooks/useSwapWarnings/getPriceImpactWarning.ts +51 -0
  1234. package/src/features/transactions/swap/hooks/useSwapWarnings/getSwapWarningFromError.ts +73 -0
  1235. package/src/features/transactions/swap/hooks/useSwapWarnings/getTokenBlockedWarning.test.ts +126 -0
  1236. package/src/features/transactions/swap/hooks/useSwapWarnings/getTokenBlockedWarning.ts +30 -0
  1237. package/src/features/transactions/swap/hooks/useSwapWarnings/useNeedsBridgingWarning.ts +10 -0
  1238. package/src/features/transactions/swap/hooks/useSwapWarnings/useNeedsLowNativeBalanceWarning.ts +18 -0
  1239. package/src/features/transactions/swap/hooks/useSwapWarnings/useParsedActivePlanWarnings.test.ts +255 -0
  1240. package/src/features/transactions/swap/hooks/useSwapWarnings/useParsedActivePlanWarnings.ts +234 -0
  1241. package/src/features/transactions/swap/hooks/useSwapWarnings/usePrefilledNeedsTokenProtectionWarning.ts +87 -0
  1242. package/src/features/transactions/swap/hooks/useSwapWarnings/useSwapWarnings.test.ts +168 -0
  1243. package/src/features/transactions/swap/hooks/useSwapWarnings/useSwapWarnings.tsx +132 -0
  1244. package/src/features/transactions/swap/hooks/useTrade/createGetQuoteRequestArgs.ts +72 -0
  1245. package/src/features/transactions/swap/hooks/useTrade/logging.ts +142 -0
  1246. package/src/features/transactions/swap/hooks/useTrade/parseQuoteCurrencies.ts +39 -0
  1247. package/src/features/transactions/swap/hooks/useTrade/useIndicativeTradeQuery.ts +20 -0
  1248. package/src/features/transactions/swap/hooks/useTrade/useIndicativeTradeServiceQueryOptions.ts +36 -0
  1249. package/src/features/transactions/swap/hooks/useTrade/useTradeQuery.ts +46 -0
  1250. package/src/features/transactions/swap/hooks/useTrade/useTradeServiceQueryOptions.ts +39 -0
  1251. package/src/features/transactions/swap/hooks/useTrade.ts +81 -0
  1252. package/src/features/transactions/swap/hooks/useTradeFromExistingPlan.ts +104 -0
  1253. package/src/features/transactions/swap/hooks/useV4SwapEnabled.ts +25 -0
  1254. package/src/features/transactions/swap/orders.ts +6 -0
  1255. package/src/features/transactions/swap/plan/intermediaryState/useCanResumePlan.ts +53 -0
  1256. package/src/features/transactions/swap/plan/intermediaryState/useIntermediaryPlanState.ts +90 -0
  1257. package/src/features/transactions/swap/plan/intermediaryState/useIntermediaryPlanStateDescriptor.ts +73 -0
  1258. package/src/features/transactions/swap/plan/intermediaryState/useResumePlanMutation.ts +112 -0
  1259. package/src/features/transactions/swap/plan/planPollingUtils.ts +197 -0
  1260. package/src/features/transactions/swap/plan/planSaga.test.ts +526 -0
  1261. package/src/features/transactions/swap/plan/planSaga.ts +600 -0
  1262. package/src/features/transactions/swap/plan/planSagaUtils.ts +399 -0
  1263. package/src/features/transactions/swap/plan/planStepAnalytics.ts +127 -0
  1264. package/src/features/transactions/swap/plan/planStepTransformer.ts +95 -0
  1265. package/src/features/transactions/swap/plan/planWatcherSaga.ts +150 -0
  1266. package/src/features/transactions/swap/plan/prefetchedPlanStore.ts +86 -0
  1267. package/src/features/transactions/swap/plan/priceChangeDetection.test.ts +146 -0
  1268. package/src/features/transactions/swap/plan/slippage.test.ts +124 -0
  1269. package/src/features/transactions/swap/plan/slippage.ts +36 -0
  1270. package/src/features/transactions/swap/plan/types.ts +158 -0
  1271. package/src/features/transactions/swap/plan/utils.test.ts +97 -0
  1272. package/src/features/transactions/swap/plan/utils.ts +271 -0
  1273. package/src/features/transactions/swap/plan/watchPlanStepSaga.ts +146 -0
  1274. package/src/features/transactions/swap/review/SwapDetails/AcceptNewQuoteRow.tsx +101 -0
  1275. package/src/features/transactions/swap/review/SwapDetails/MarketPriceImpactWarningModal.tsx +84 -0
  1276. package/src/features/transactions/swap/review/SwapDetails/SwapDetails.tsx +164 -0
  1277. package/src/features/transactions/swap/review/SwapReviewScreen/SwapErrorScreen.tsx +104 -0
  1278. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/DelayedSubmissionText.tsx +33 -0
  1279. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/PendingSwapButton.native.tsx +163 -0
  1280. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/PendingSwapButton.tsx +16 -0
  1281. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/PendingSwapButton.web.tsx +160 -0
  1282. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/SubmitSwapButton.tsx +268 -0
  1283. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewFooter/SwapReviewFooter.tsx +143 -0
  1284. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewLoadingView.tsx +17 -0
  1285. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewScreen.tsx +189 -0
  1286. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewSwapDetails.tsx +80 -0
  1287. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewWarningModal.tsx +40 -0
  1288. package/src/features/transactions/swap/review/SwapReviewScreen/SwapReviewWrapTransactionDetails.tsx +39 -0
  1289. package/src/features/transactions/swap/review/SwapReviewScreen/TransactionAmountsReview.tsx +219 -0
  1290. package/src/features/transactions/swap/review/hooks/useAcceptedTrade.ts +66 -0
  1291. package/src/features/transactions/swap/review/hooks/useActivePlanStatus.ts +31 -0
  1292. package/src/features/transactions/swap/review/hooks/useCreateSwapReviewCallbacks.tsx +271 -0
  1293. package/src/features/transactions/swap/review/hooks/usePrepareSwapTransactionEffect.ts +41 -0
  1294. package/src/features/transactions/swap/review/hooks/useSwapOnPrevious.tsx +45 -0
  1295. package/src/features/transactions/swap/review/hooks/useTokenApprovalInfo.test.ts +176 -0
  1296. package/src/features/transactions/swap/review/hooks/useTokenApprovalInfo.ts +190 -0
  1297. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/bridge/bridgeSwapTxAndGasInfoService.ts +25 -0
  1298. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/chained/chainedActionTxSwapAndGasInfoService.ts +114 -0
  1299. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/classic/classicSwapTxAndGasInfoService.ts +30 -0
  1300. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/constants.ts +18 -0
  1301. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/dex/dexSwapTxAndGasInfoService.ts +19 -0
  1302. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/dex/utils.test.tsx +28 -0
  1303. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/dex/utils.ts +69 -0
  1304. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/evm/evmSwapInstructionsService.ts +147 -0
  1305. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/evm/evmSwapRepository.ts +78 -0
  1306. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/evm/hooks.ts +40 -0
  1307. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/evm/logging.ts +46 -0
  1308. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/evm/utils.ts +70 -0
  1309. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/hooks.ts +335 -0
  1310. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/svm/solanaSwapTxAndGasInfoService.ts +36 -0
  1311. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/swapTxAndGasInfoService.ts +37 -0
  1312. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/utils.test.ts +385 -0
  1313. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/utils.ts +511 -0
  1314. package/src/features/transactions/swap/review/services/swapTxAndGasInfoService/wrap/wrapTxAndGasInfoService.ts +25 -0
  1315. package/src/features/transactions/swap/review/stores/activePlan/ActivePlanUpdater.ts +117 -0
  1316. package/src/features/transactions/swap/review/stores/activePlan/activePlanStore.test.ts +123 -0
  1317. package/src/features/transactions/swap/review/stores/activePlan/activePlanStore.ts +153 -0
  1318. package/src/features/transactions/swap/review/stores/activePlan/usePopulateSwapFlowWithPlan.ts +45 -0
  1319. package/src/features/transactions/swap/review/stores/swapReviewCallbacksStore/SwapReviewCallbacksStoreContext.ts +6 -0
  1320. package/src/features/transactions/swap/review/stores/swapReviewCallbacksStore/SwapReviewCallbacksStoreContextProvider.tsx +90 -0
  1321. package/src/features/transactions/swap/review/stores/swapReviewCallbacksStore/createSwapReviewCallbacksStore.ts +26 -0
  1322. package/src/features/transactions/swap/review/stores/swapReviewCallbacksStore/useSwapReviewCallbacksStore.ts +24 -0
  1323. package/src/features/transactions/swap/review/stores/swapReviewStore/SwapReviewContext.ts +4 -0
  1324. package/src/features/transactions/swap/review/stores/swapReviewStore/SwapReviewStoreContextProvider.tsx +24 -0
  1325. package/src/features/transactions/swap/review/stores/swapReviewStore/SyncActivePlanEffects.tsx +63 -0
  1326. package/src/features/transactions/swap/review/stores/swapReviewStore/createSwapReviewStore.ts +52 -0
  1327. package/src/features/transactions/swap/review/stores/swapReviewStore/useSwapReviewStore.ts +52 -0
  1328. package/src/features/transactions/swap/review/stores/swapReviewTransactionStore/SwapReviewTransactionStoreContext.ts +6 -0
  1329. package/src/features/transactions/swap/review/stores/swapReviewTransactionStore/SwapReviewTransactionStoreContextProvider.tsx +121 -0
  1330. package/src/features/transactions/swap/review/stores/swapReviewTransactionStore/createSwapReviewTransactionStore.ts +53 -0
  1331. package/src/features/transactions/swap/review/stores/swapReviewTransactionStore/useSwapReviewTransactionStore.ts +72 -0
  1332. package/src/features/transactions/swap/review/stores/swapReviewWarningStore/SwapReviewWarningStoreContext.ts +4 -0
  1333. package/src/features/transactions/swap/review/stores/swapReviewWarningStore/SwapReviewWarningStoreContextProvider.tsx +10 -0
  1334. package/src/features/transactions/swap/review/stores/swapReviewWarningStore/createSwapReviewWarningStore.ts +43 -0
  1335. package/src/features/transactions/swap/review/stores/swapReviewWarningStore/useSwapReviewWarningStore.ts +32 -0
  1336. package/src/features/transactions/swap/services/executeSwapService.ts +83 -0
  1337. package/src/features/transactions/swap/services/hooks/useExecuteSwap.ts +66 -0
  1338. package/src/features/transactions/swap/services/hooks/usePrepareSwap.ts +95 -0
  1339. package/src/features/transactions/swap/services/hooks/useWarningService.ts +48 -0
  1340. package/src/features/transactions/swap/services/prepareSwapService.ts +212 -0
  1341. package/src/features/transactions/swap/services/tradeService/evmTradeService.ts +218 -0
  1342. package/src/features/transactions/swap/services/tradeService/svmTradeService.ts +93 -0
  1343. package/src/features/transactions/swap/services/tradeService/tradeRepository.test.ts +224 -0
  1344. package/src/features/transactions/swap/services/tradeService/tradeRepository.ts +99 -0
  1345. package/src/features/transactions/swap/services/tradeService/tradeService.ts +50 -0
  1346. package/src/features/transactions/swap/services/tradeService/transformations/buildQuoteRequest.ts +180 -0
  1347. package/src/features/transactions/swap/services/tradeService/transformations/estimateGas.ts +9 -0
  1348. package/src/features/transactions/swap/services/tradeService/transformations/transformQuoteToTrade.ts +64 -0
  1349. package/src/features/transactions/swap/services/warningService.ts +11 -0
  1350. package/src/features/transactions/swap/state/selectors.ts +5 -0
  1351. package/src/features/transactions/swap/state/slice.ts +31 -0
  1352. package/src/features/transactions/swap/steps/classicSteps.ts +58 -0
  1353. package/src/features/transactions/swap/steps/dexSteps.ts +27 -0
  1354. package/src/features/transactions/swap/steps/signOrder.ts +35 -0
  1355. package/src/features/transactions/swap/steps/swap.ts +74 -0
  1356. package/src/features/transactions/swap/stores/swapDependenciesStore/SwapDependenciesStoreContext.ts +4 -0
  1357. package/src/features/transactions/swap/stores/swapDependenciesStore/SwapDependenciesStoreContextProvider.tsx +45 -0
  1358. package/src/features/transactions/swap/stores/swapDependenciesStore/createSwapDependenciesStore.ts +48 -0
  1359. package/src/features/transactions/swap/stores/swapDependenciesStore/useSwapDependenciesStore.ts +33 -0
  1360. package/src/features/transactions/swap/stores/swapFormStore/SwapFormStoreContext.ts +4 -0
  1361. package/src/features/transactions/swap/stores/swapFormStore/SwapFormStoreContextProvider.tsx +350 -0
  1362. package/src/features/transactions/swap/stores/swapFormStore/createSwapFormStore.ts +163 -0
  1363. package/src/features/transactions/swap/stores/swapFormStore/hooks/useDebouncedSwapFormAmounts.ts +45 -0
  1364. package/src/features/transactions/swap/stores/swapFormStore/hooks/useDefaultSwapFormState.ts +39 -0
  1365. package/src/features/transactions/swap/stores/swapFormStore/hooks/useDerivedSwapInfo.ts +196 -0
  1366. package/src/features/transactions/swap/stores/swapFormStore/hooks/useFreezeWhileSubmitting.test.ts +310 -0
  1367. package/src/features/transactions/swap/stores/swapFormStore/hooks/useFreezeWhileSubmitting.ts +21 -0
  1368. package/src/features/transactions/swap/stores/swapFormStore/hooks/useOnToggleIsFiatMode.ts +68 -0
  1369. package/src/features/transactions/swap/stores/swapFormStore/hooks/useOpenOutputSelectorOnPrefilledStateChange.ts +24 -0
  1370. package/src/features/transactions/swap/stores/swapFormStore/hooks/useUpdateSwapFormFromPrefilledCurrencies.ts +30 -0
  1371. package/src/features/transactions/swap/stores/swapFormStore/types.ts +73 -0
  1372. package/src/features/transactions/swap/stores/swapFormStore/useSwapFormStore.ts +42 -0
  1373. package/src/features/transactions/swap/stores/swapTxStore/SwapTxStoreContext.ts +4 -0
  1374. package/src/features/transactions/swap/stores/swapTxStore/SwapTxStoreContextProvider.tsx +23 -0
  1375. package/src/features/transactions/swap/stores/swapTxStore/createSwapTxStore.ts +33 -0
  1376. package/src/features/transactions/swap/stores/swapTxStore/hooks/usePermit2Signature.ts +44 -0
  1377. package/src/features/transactions/swap/stores/swapTxStore/hooks/useTransactionRequestInfo.test.ts +170 -0
  1378. package/src/features/transactions/swap/stores/swapTxStore/hooks/useTransactionRequestInfo.ts +191 -0
  1379. package/src/features/transactions/swap/stores/swapTxStore/useSwapTxStore.ts +24 -0
  1380. package/src/features/transactions/swap/types/BlockingTradeError.ts +14 -0
  1381. package/src/features/transactions/swap/types/derivedSwapInfo.ts +33 -0
  1382. package/src/features/transactions/swap/types/getTradingApiSwapFee.test.ts +171 -0
  1383. package/src/features/transactions/swap/types/getTradingApiSwapFee.ts +59 -0
  1384. package/src/features/transactions/swap/types/solana.test.ts +235 -0
  1385. package/src/features/transactions/swap/types/solana.ts +177 -0
  1386. package/src/features/transactions/swap/types/swapCallback.ts +32 -0
  1387. package/src/features/transactions/swap/types/swapHandlers.ts +50 -0
  1388. package/src/features/transactions/swap/types/swapTxAndGasInfo.ts +248 -0
  1389. package/src/features/transactions/swap/types/trade.test.ts +102 -0
  1390. package/src/features/transactions/swap/types/trade.ts +921 -0
  1391. package/src/features/transactions/swap/types/wrapCallback.ts +18 -0
  1392. package/src/features/transactions/swap/utils/SwapEventTimestampTracker.test.ts +40 -0
  1393. package/src/features/transactions/swap/utils/SwapEventTimestampTracker.ts +65 -0
  1394. package/src/features/transactions/swap/utils/asset.ts +15 -0
  1395. package/src/features/transactions/swap/utils/chainedActions.ts +34 -0
  1396. package/src/features/transactions/swap/utils/format.ts +7 -0
  1397. package/src/features/transactions/swap/utils/formatPriceImpact.test.ts +86 -0
  1398. package/src/features/transactions/swap/utils/formatPriceImpact.ts +10 -0
  1399. package/src/features/transactions/swap/utils/gas.test.ts +148 -0
  1400. package/src/features/transactions/swap/utils/gas.ts +37 -0
  1401. package/src/features/transactions/swap/utils/generateSwapTransactionSteps.test.ts +267 -0
  1402. package/src/features/transactions/swap/utils/generateSwapTransactionSteps.ts +91 -0
  1403. package/src/features/transactions/swap/utils/getAmountsFromTrade.ts +37 -0
  1404. package/src/features/transactions/swap/utils/getExactOutputWillFail.test.ts +147 -0
  1405. package/src/features/transactions/swap/utils/getExactOutputWillFail.ts +61 -0
  1406. package/src/features/transactions/swap/utils/getIdForQuote.ts +10 -0
  1407. package/src/features/transactions/swap/utils/getPriceImpact.test.ts +187 -0
  1408. package/src/features/transactions/swap/utils/getPriceImpact.ts +60 -0
  1409. package/src/features/transactions/swap/utils/getSwapFeeUsd.ts +46 -0
  1410. package/src/features/transactions/swap/utils/getTradeAmounts.ts +50 -0
  1411. package/src/features/transactions/swap/utils/maybeLogFirstSwapAction.ts +18 -0
  1412. package/src/features/transactions/swap/utils/protocols.test.ts +367 -0
  1413. package/src/features/transactions/swap/utils/protocols.ts +150 -0
  1414. package/src/features/transactions/swap/utils/routing.ts +140 -0
  1415. package/src/features/transactions/swap/utils/styleHelpers.ts +22 -0
  1416. package/src/features/transactions/swap/utils/trade.test.ts +168 -0
  1417. package/src/features/transactions/swap/utils/trade.ts +264 -0
  1418. package/src/features/transactions/swap/utils/tradingApi.test.ts +189 -0
  1419. package/src/features/transactions/swap/utils/tradingApi.ts +593 -0
  1420. package/src/features/transactions/swap/utils/wrap.test.ts +35 -0
  1421. package/src/features/transactions/swap/utils/wrap.ts +28 -0
  1422. package/src/features/transactions/toucan/steps/submitBid.ts +5 -0
  1423. package/src/features/transactions/toucan/steps/withdrawBidAndClaimTokens.ts +5 -0
  1424. package/src/features/transactions/types/baseDerivedInfo.ts +18 -0
  1425. package/src/features/transactions/types/transactionDetails.ts +831 -0
  1426. package/src/features/transactions/types/transactionRequests.ts +14 -0
  1427. package/src/features/transactions/types/transactionState.ts +70 -0
  1428. package/src/features/transactions/types/utils.ts +131 -0
  1429. package/src/features/transactions/types/wrap.ts +5 -0
  1430. package/src/features/transactions/utils/dex.utils.test.ts +95 -0
  1431. package/src/features/transactions/utils/dex.utils.ts +135 -0
  1432. package/src/features/transactions/utils/permit2.ts +43 -0
  1433. package/src/features/transactions/utils/receipt.test.ts +64 -0
  1434. package/src/features/transactions/utils/receipt.ts +73 -0
  1435. package/src/features/trm/hooks.ts +22 -0
  1436. package/src/features/unitags/ClaimUnitagContent.tsx +450 -0
  1437. package/src/features/unitags/UnitagInfoModal.tsx +75 -0
  1438. package/src/features/unitags/UnitagName.test.tsx +12 -0
  1439. package/src/features/unitags/UnitagName.tsx +74 -0
  1440. package/src/features/unitags/__snapshots__/UnitagName.test.tsx.snap +70 -0
  1441. package/src/features/unitags/avatars.ts +82 -0
  1442. package/src/features/unitags/constants.ts +5 -0
  1443. package/src/features/unitags/fileUtils.native.ts +72 -0
  1444. package/src/features/unitags/fileUtils.ts +13 -0
  1445. package/src/features/unitags/fileUtils.web.ts +104 -0
  1446. package/src/features/unitags/hooks/useCanClaimUnitagName.test.ts +78 -0
  1447. package/src/features/unitags/hooks/useCanClaimUnitagName.ts +81 -0
  1448. package/src/features/unitags/hooks/useClaimUnitag.ts +92 -0
  1449. package/src/features/unitags/utils.ts +31 -0
  1450. package/src/features/visibility/hooks/useIsActivityHidden.ts +7 -0
  1451. package/src/features/visibility/hooks/usePositionVisibilityCheck.ts +31 -0
  1452. package/src/features/visibility/hooks/useTokenVisibility.ts +20 -0
  1453. package/src/features/visibility/selectors.ts +16 -0
  1454. package/src/features/visibility/slice.ts +69 -0
  1455. package/src/features/visibility/utils.ts +21 -0
  1456. package/src/features/visibility/visibility.test.ts +295 -0
  1457. package/src/features/wallet/contexts/WalletProvider.tsx +34 -0
  1458. package/src/features/wallet/hooks/useWallet.ts +8 -0
  1459. package/src/features/wallet/services/IWalletService.ts +6 -0
  1460. package/src/features/wallet/services/createEVMWalletService.ts +40 -0
  1461. package/src/features/wallet/services/createWalletService.ts +19 -0
  1462. package/src/features/wallet/types/AccountDetails.ts +25 -0
  1463. package/src/features/wallet/types/Wallet.ts +6 -0
  1464. package/src/features/wallet/types/WalletMeta.ts +5 -0
  1465. package/src/hooks/useAppInsets.test.tsx +59 -0
  1466. package/src/hooks/useAppInsets.tsx +24 -0
  1467. package/src/hooks/useIsKeyboardOpen.test.ts +97 -0
  1468. package/src/hooks/useSnowflakeAnimation.ts +482 -0
  1469. package/src/i18n/changeLanguage.tsx +25 -0
  1470. package/src/i18n/i18n-setup-interface.tsx +85 -0
  1471. package/src/i18n/i18n-setup.tsx +95 -0
  1472. package/src/i18n/index.ts +10 -0
  1473. package/src/i18n/index.web-app.ts +11 -0
  1474. package/src/i18n/locales/@types/i18next.ts +13 -0
  1475. package/src/i18n/locales/source/en-US.json +2922 -0
  1476. package/src/i18n/locales/source/en-US_old.json +21 -0
  1477. package/src/i18n/locales/translations/es-ES.json +2919 -0
  1478. package/src/i18n/locales/translations/fil-PH.json +2919 -0
  1479. package/src/i18n/locales/translations/fr-FR.json +2919 -0
  1480. package/src/i18n/locales/translations/id-ID.json +2919 -0
  1481. package/src/i18n/locales/translations/ja-JP.json +2919 -0
  1482. package/src/i18n/locales/translations/ko-KR.json +2919 -0
  1483. package/src/i18n/locales/translations/nl-NL.json +2919 -0
  1484. package/src/i18n/locales/translations/pt-BR.json +2310 -0
  1485. package/src/i18n/locales/translations/pt-PT.json +2919 -0
  1486. package/src/i18n/locales/translations/ru-RU.json +2919 -0
  1487. package/src/i18n/locales/translations/tr-TR.json +2919 -0
  1488. package/src/i18n/locales/translations/vi-VN.json +2919 -0
  1489. package/src/i18n/locales/translations/zh-CN.json +2919 -0
  1490. package/src/i18n/locales/translations/zh-TW.json +2919 -0
  1491. package/src/i18n/shared.ts +1 -0
  1492. package/src/i18n/utils.test.ts +112 -0
  1493. package/src/i18n/utils.ts +70 -0
  1494. package/src/index.ts +7 -0
  1495. package/src/react-native-dotenv.d.ts +42 -0
  1496. package/src/state/README.md +3 -0
  1497. package/src/state/createAppStateResetter.test.ts +118 -0
  1498. package/src/state/createAppStateResetter.ts +95 -0
  1499. package/src/state/createSafeMigration.test.ts +119 -0
  1500. package/src/state/createSafeMigration.ts +84 -0
  1501. package/src/state/index.ts +5 -0
  1502. package/src/state/luxMigrationTests.ts +71 -0
  1503. package/src/state/luxMigrations.test.ts +423 -0
  1504. package/src/state/luxMigrations.ts +266 -0
  1505. package/src/state/luxReducer.ts +48 -0
  1506. package/src/state/oldTypes.ts +94 -0
  1507. package/src/tamagui.d.ts +40 -0
  1508. package/src/test/fixtures/account.ts +19 -0
  1509. package/src/test/fixtures/events.ts +5 -0
  1510. package/src/test/fixtures/gql/activities/index.ts +91 -0
  1511. package/src/test/fixtures/gql/activities/nfts.ts +31 -0
  1512. package/src/test/fixtures/gql/activities/swap.ts +21 -0
  1513. package/src/test/fixtures/gql/activities/tokens.ts +50 -0
  1514. package/src/test/fixtures/gql/amounts.ts +31 -0
  1515. package/src/test/fixtures/gql/assets/constants.ts +30 -0
  1516. package/src/test/fixtures/gql/assets/index.ts +3 -0
  1517. package/src/test/fixtures/gql/assets/nfts.ts +60 -0
  1518. package/src/test/fixtures/gql/assets/tokens.ts +194 -0
  1519. package/src/test/fixtures/gql/history.ts +70 -0
  1520. package/src/test/fixtures/gql/index.ts +7 -0
  1521. package/src/test/fixtures/gql/misc.ts +19 -0
  1522. package/src/test/fixtures/gql/portfolio.ts +38 -0
  1523. package/src/test/fixtures/gql/transactions.ts +34 -0
  1524. package/src/test/fixtures/index.ts +4 -0
  1525. package/src/test/fixtures/lib/ethers.ts +47 -0
  1526. package/src/test/fixtures/lib/index.ts +3 -0
  1527. package/src/test/fixtures/lib/netinfo.ts +29 -0
  1528. package/src/test/fixtures/lib/sdk.ts +14 -0
  1529. package/src/test/fixtures/permit.ts +19 -0
  1530. package/src/test/fixtures/testIDs.ts +303 -0
  1531. package/src/test/fixtures/tradingApi.ts +16 -0
  1532. package/src/test/fixtures/transactions/swap.ts +269 -0
  1533. package/src/test/fixtures/wallet/addresses.ts +1 -0
  1534. package/src/test/fixtures/wallet/balances.ts +89 -0
  1535. package/src/test/fixtures/wallet/currencies.ts +93 -0
  1536. package/src/test/fixtures/wallet/index.ts +3 -0
  1537. package/src/test/fixtures/wallet/transactions/fixtures.ts +205 -0
  1538. package/src/test/fixtures/wallet/transactions/helpers.ts +116 -0
  1539. package/src/test/fixtures/wallet/transactions/index.ts +2 -0
  1540. package/src/test/fixtures/wallet/walletConnect.ts +18 -0
  1541. package/src/test/mockFn.ts +39 -0
  1542. package/src/test/mocks/gql/index.ts +1 -0
  1543. package/src/test/mocks/gql/mocks.ts +90 -0
  1544. package/src/test/mocks/gql/provider.tsx +49 -0
  1545. package/src/test/mocks/gql/resolvers.ts +19 -0
  1546. package/src/test/mocks/index.ts +2 -0
  1547. package/src/test/mocks/locale.ts +114 -0
  1548. package/src/test/mocks/mockSharedPersistQueryClientProvider.tsx +12 -0
  1549. package/src/test/mocks/uniqueId.ts +5 -0
  1550. package/src/test/render.tsx +189 -0
  1551. package/src/test/shared.ts +9 -0
  1552. package/src/test/test-utils.ts +6 -0
  1553. package/src/test/utils/array.ts +31 -0
  1554. package/src/test/utils/factory.ts +142 -0
  1555. package/src/test/utils/index.ts +4 -0
  1556. package/src/test/utils/random.ts +37 -0
  1557. package/src/test/utils/resolvers.ts +142 -0
  1558. package/src/test-shorthands.ts +14 -0
  1559. package/src/types/RenderPassReport.ts +57 -0
  1560. package/src/types/currency.ts +6 -0
  1561. package/src/types/limits.ts +6 -0
  1562. package/src/types/onboarding.ts +18 -0
  1563. package/src/types/screens/extension.ts +50 -0
  1564. package/src/types/screens/interface.ts +7 -0
  1565. package/src/types/screens/mobile.ts +124 -0
  1566. package/src/types/sharing.ts +6 -0
  1567. package/src/types/walletConnect.ts +143 -0
  1568. package/src/types/widgets.ts +9 -0
  1569. package/src/utils/addresses.test.ts +65 -0
  1570. package/src/utils/addresses.ts +213 -0
  1571. package/src/utils/approvals.test.ts +40 -0
  1572. package/src/utils/approvals.ts +13 -0
  1573. package/src/utils/balances.ts +14 -0
  1574. package/src/utils/clipboard.native.ts +71 -0
  1575. package/src/utils/clipboard.ts +34 -0
  1576. package/src/utils/cloud-backup/getCloudProviderName.native.ts +12 -0
  1577. package/src/utils/cloud-backup/getCloudProviderName.ts +8 -0
  1578. package/src/utils/colors.test.ts +31 -0
  1579. package/src/utils/colors.tsx +127 -0
  1580. package/src/utils/createTransactionId.ts +5 -0
  1581. package/src/utils/currency.test.ts +40 -0
  1582. package/src/utils/currency.ts +97 -0
  1583. package/src/utils/currencyId.test.ts +130 -0
  1584. package/src/utils/currencyId.ts +221 -0
  1585. package/src/utils/datadog.native.ts +5 -0
  1586. package/src/utils/datadog.ts +5 -0
  1587. package/src/utils/datadog.web.ts +159 -0
  1588. package/src/utils/isWSOL.test.ts +38 -0
  1589. package/src/utils/isWSOL.ts +17 -0
  1590. package/src/utils/link.native.ts +9 -0
  1591. package/src/utils/link.ts +9 -0
  1592. package/src/utils/link.web.ts +7 -0
  1593. package/src/utils/linking.test.ts +61 -0
  1594. package/src/utils/linking.ts +300 -0
  1595. package/src/utils/number.test.ts +44 -0
  1596. package/src/utils/number.ts +17 -0
  1597. package/src/utils/polling.test.ts +118 -0
  1598. package/src/utils/polling.ts +86 -0
  1599. package/src/utils/routingDiagram/routingProviders/jupiterRoutingProvider.test.ts +241 -0
  1600. package/src/utils/routingDiagram/routingProviders/jupiterRoutingProvider.ts +128 -0
  1601. package/src/utils/routingDiagram/routingProviders/luxRoutingProvider.test.ts +450 -0
  1602. package/src/utils/routingDiagram/routingProviders/luxRoutingProvider.ts +127 -0
  1603. package/src/utils/routingDiagram/routingRegistry.ts +58 -0
  1604. package/src/utils/routingDiagram/types.ts +35 -0
  1605. package/src/utils/saga.ts +275 -0
  1606. package/src/utils/search/doesTokenMatchSearchTerm.test.ts +419 -0
  1607. package/src/utils/search/doesTokenMatchSearchTerm.ts +37 -0
  1608. package/src/utils/search/getPossibleChainMatchFromSearchWord.test.ts +437 -0
  1609. package/src/utils/search/getPossibleChainMatchFromSearchWord.ts +47 -0
  1610. package/src/utils/search/parseChainFromTokenSearchQuery.test.ts +138 -0
  1611. package/src/utils/search/parseChainFromTokenSearchQuery.ts +70 -0
  1612. package/src/utils/useKeyboardLayout.android.test.ts +70 -0
  1613. package/src/utils/useKeyboardLayout.ios.test.ts +87 -0
  1614. package/src/utils/useKeyboardLayout.native.ts +42 -0
  1615. package/src/utils/useKeyboardLayout.ts +7 -0
  1616. package/src/utils/useKeyboardLayout.web.ts +6 -0
  1617. package/src/utils/usePlatformBasedFetchPolicy.ts +19 -0
  1618. package/src/utils/usePlatformBasedValue.native.ts +5 -0
  1619. package/src/utils/usePlatformBasedValue.ts +33 -0
  1620. package/tsconfig.eslint.json +6 -0
  1621. package/tsconfig.json +43 -0
  1622. package/vitest-package-mocks.ts +76 -0
  1623. package/vitest-setup.ts +246 -0
  1624. package/vitest.config.ts +86 -0
@@ -0,0 +1,1320 @@
1
+ /* eslint-disable max-lines */
2
+ import { type ApolloError } from '@apollo/client'
3
+ import { type PartialMessage } from '@bufbuild/protobuf'
4
+ import { type TransactionRequest as EthersTransactionRequest } from '@ethersproject/providers'
5
+ import { type SerializedError } from '@reduxjs/toolkit'
6
+ import { type FetchBaseQueryError } from '@reduxjs/toolkit/dist/query'
7
+ import { type SharedEventName } from '@uniswap/analytics-events'
8
+ import { type ProtocolVersion } from '@uniswap/client-data-api/dist/data/v1/poolTypes_pb'
9
+ import {
10
+ type CreateLPPositionRequest,
11
+ type IncreaseLPPositionRequest,
12
+ } from '@uniswap/client-liquidity/dist/uniswap/liquidity/v1/api_pb'
13
+ import { type Currency, type TradeType } from '@uniswap/sdk-core'
14
+ import { type TradingApi, type UnitagClaimContext } from '@luxexchange/api'
15
+ import { type Experiments } from '@luxexchange/gating'
16
+ import type { PresetPercentage } from '@luxexchange/lx/src/components/CurrencyInputPanel/AmountInputPresets/types'
17
+ import { type OnchainItemSectionName } from '@luxexchange/lx/src/components/lists/OnchainItemList/types'
18
+ import { type UniverseChainId } from '@luxexchange/lx/src/features/chains/types'
19
+ import { type EthMethod } from '@luxexchange/lx/src/features/dappRequests/types'
20
+ import { type FiatCurrency } from '@luxexchange/lx/src/features/fiatCurrency/constants'
21
+ import { type Platform } from '@luxexchange/lx/src/features/platforms/types/Platform'
22
+ import {
23
+ type AuctionEventName,
24
+ type ExtensionEventName,
25
+ type FiatOffRampEventName,
26
+ type FiatOnRampEventName,
27
+ type InterfaceEventName,
28
+ type InterfacePageName,
29
+ type LiquidityEventName,
30
+ type MobileAppsFlyerEvents,
31
+ type MobileEventName,
32
+ type SessionsEventName,
33
+ type SwapBlockedCategory,
34
+ type SwapEventName,
35
+ type LuxEventName,
36
+ type UnitagEventName,
37
+ type WalletEventName,
38
+ } from '@luxexchange/lx/src/features/telemetry/constants'
39
+ import { type TokenProtectionWarning } from '@luxexchange/lx/src/features/tokens/warnings/types'
40
+ import { type TransactionType } from '@luxexchange/lx/src/features/transactions/types/transactionDetails'
41
+ import { type WrapType } from '@luxexchange/lx/src/features/transactions/types/wrap'
42
+ import { type CurrencyField } from '@luxexchange/lx/src/types/currency'
43
+ import { type LimitsExpiry } from '@luxexchange/lx/src/types/limits'
44
+ import { type ImportType } from '@luxexchange/lx/src/types/onboarding'
45
+ import { type RenderPassReport } from '@luxexchange/lx/src/types/RenderPassReport'
46
+ import { type ExtensionOnboardingFlow } from '@luxexchange/lx/src/types/screens/extension'
47
+ import { type SwapTab } from '@luxexchange/lx/src/types/screens/interface'
48
+ import { type OnboardingScreens } from '@luxexchange/lx/src/types/screens/mobile'
49
+ import { type ShareableEntity } from '@luxexchange/lx/src/types/sharing'
50
+ import { type UwULinkMethod, type WCEventType, type WCRequestOutcome } from '@luxexchange/lx/src/types/walletConnect'
51
+ import { type WidgetEvent, type WidgetType } from '@luxexchange/lx/src/types/widgets'
52
+ import { type ITraceContext } from '@luxfi/utilities/src/telemetry/trace/TraceContext'
53
+
54
+ export enum ExtensionUninstallFeedbackOptions {
55
+ SwitchingWallet = 'switching-wallet',
56
+ MissingFeatures = 'missing-features',
57
+ NotUsingCrypto = 'not-using-crypto',
58
+ Other = 'other',
59
+ }
60
+
61
+ export type GasEstimateAccuracyProperties = {
62
+ tx_hash?: string
63
+ transaction_type: string
64
+ chain_id: number
65
+ final_status?: string
66
+ time_to_confirmed_ms?: number
67
+ blocks_to_confirmed?: number
68
+ user_experienced_delay_ms?: number
69
+ send_to_confirmation_delay_ms?: number
70
+ rpc_submission_delay_ms?: number
71
+ sign_transaction_delay_ms?: number
72
+ current_block_fetch_delay_ms?: number
73
+ gas_use_diff?: number
74
+ gas_use_diff_percentage?: number
75
+ gas_used?: number
76
+ gas_price_diff?: number
77
+ gas_price_diff_percentage?: number
78
+ gas_price?: number
79
+ max_priority_fee_per_gas?: string
80
+ private_rpc?: boolean
81
+ is_shadow?: boolean
82
+ name?: string
83
+ out_of_gas: boolean
84
+ timed_out: boolean
85
+ app_backgrounded_while_pending?: boolean
86
+ display_limit_inflation_factor?: number
87
+ }
88
+
89
+ type KeyringMissingMnemonicProperties = {
90
+ mnemonicId: string
91
+ timeImportedMsFirst?: number
92
+ timeImportedMsLast?: number
93
+ keyringMnemonicIds: string[]
94
+ // We're only logging the public addresses of the user accounts,
95
+ // nothing actually private.
96
+ keyringPrivateKeyAddresses: string[]
97
+ signerMnemonicAccounts: {
98
+ mnemonicId: string
99
+ address: string
100
+ timeImportedMs: number
101
+ }[]
102
+ }
103
+
104
+ export type PendingTransactionTimeoutProperties = {
105
+ use_flashbots: boolean
106
+ flashbots_refund_percent: number
107
+ private_rpc: boolean
108
+ chain_id: number
109
+ address: string
110
+ tx_hash?: string
111
+ }
112
+
113
+ export type AssetDetailsBaseProperties = {
114
+ name?: string
115
+ domain?: string
116
+ address: string
117
+ chain?: number
118
+ }
119
+
120
+ export type SearchResultContextProperties = {
121
+ category?: string
122
+ query?: string
123
+ suggestion_count?: number
124
+ position?: number
125
+ isHistory?: boolean
126
+ }
127
+
128
+ type OnboardingCompletedProps = {
129
+ flow?: ExtensionOnboardingFlow
130
+ wallet_type: ImportType
131
+ accounts_imported_count: number
132
+ wallets_imported: string[]
133
+ cloud_backup_used: boolean
134
+ }
135
+
136
+ export type SwapRouting =
137
+ | 'jupiter'
138
+ | 'classic'
139
+ | 'dex_x'
140
+ | 'dex_v2'
141
+ | 'dex_v3'
142
+ | 'priority_order'
143
+ | 'bridge'
144
+ | 'limit_order'
145
+ | 'none'
146
+
147
+ export type SwapTradeBaseProperties = {
148
+ routing?: SwapRouting
149
+ total_balances_usd?: number
150
+ transactionOriginType: string
151
+ // We have both `allowed_slippage` (percentage) and `allowed_slippage_basis_points` because web and wallet used to track this in different ways.
152
+ // We should eventually standardize on one or the other.
153
+ allowed_slippage?: number
154
+ allowed_slippage_basis_points?: number
155
+ token_in_symbol?: string
156
+ token_out_symbol?: string
157
+ token_in_address?: string
158
+ token_out_address?: string
159
+ price_impact_basis_points?: string | number
160
+ estimated_network_fee_usd?: string
161
+ chain_id?: number
162
+ // `chain_id_in` and `chain_id_out` was added when bridging was introduced.
163
+ chain_id_in?: number
164
+ chain_id_out?: number
165
+ token_in_amount?: string | number
166
+ token_out_amount?: string | number
167
+ token_in_amount_usd?: number
168
+ token_out_amount_usd?: number
169
+ token_in_amount_max?: string
170
+ token_out_amount_min?: string
171
+ token_in_detected_tax?: number
172
+ token_out_detected_tax?: number
173
+ minimum_output_after_slippage?: string
174
+ preset_percentage?: PresetPercentage
175
+ preselect_asset?: boolean
176
+ fee_amount?: string
177
+ // `requestId` is the same as `ura_request_id`. We should eventually standardize on one or the other.
178
+ requestId?: string
179
+ ura_request_id?: string
180
+ ura_block_number?: string
181
+ ura_quote_id?: string
182
+ ura_quote_block_number?: string
183
+ quoteId?: string
184
+ swap_quote_block_number?: string
185
+ fee_usd?: number
186
+ type?: TradeType
187
+ // Legacy props only used on web. We might be able to delete these after we delete the old swap flow.
188
+ method?: 'ROUTING_API' | 'QUICK_ROUTE' | 'CLIENT_SIDE_FALLBACK'
189
+ offchain_order_type?: 'Dutch' | 'Dutch_V2' | 'Limit' | 'Dutch_V1_V2' | 'Priority' | 'Dutch_V3'
190
+ simulation_failure_reasons?: TradingApi.TransactionFailureReason[]
191
+ tokenWarnings?: {
192
+ input: TokenProtectionWarning
193
+ output: TokenProtectionWarning
194
+ }
195
+ is_batch?: boolean
196
+ batch_id?: string
197
+ included_permit_transaction_step?: boolean
198
+ includes_delegation?: boolean
199
+ is_smart_wallet_transaction?: boolean
200
+ // Chained actions context
201
+ plan_id?: string
202
+ step_index?: number
203
+ is_final_step?: boolean
204
+ swap_start_timestamp?: number
205
+ } & ITraceContext
206
+
207
+ type BaseSwapTransactionResultProperties = {
208
+ routing: SwapTradeBaseProperties['routing']
209
+ transactionOriginType: string
210
+ time_to_swap?: number
211
+ time_to_swap_since_first_input?: number
212
+ address?: string
213
+ chain_id: number
214
+ chain_id_in?: number
215
+ chain_id_out?: number
216
+ id: string
217
+ hash: string
218
+ batch_id?: string
219
+ added_time?: number
220
+ confirmed_time?: number
221
+ gas_used?: number
222
+ effective_gas_price?: number
223
+ tradeType?: string
224
+ inputCurrencyId?: string
225
+ outputCurrencyId?: string
226
+ slippageTolerance?: number
227
+ gasUseEstimate?: string
228
+ route?: string
229
+ quoteId?: string
230
+ submitViaPrivateRpc?: boolean
231
+ /** For Lux data sources, this should be of type Protocol from @uniswap/router-sdk. For other sources like Jupiter, this could be unknown values from their orderResponse.router field.*/
232
+ protocol?: string
233
+ transactedUSDValue?: number
234
+ simulation_failure_reasons?: TradingApi.TransactionFailureReason[]
235
+ includes_delegation?: SwapTradeBaseProperties['includes_delegation']
236
+ is_smart_wallet_transaction?: SwapTradeBaseProperties['is_smart_wallet_transaction']
237
+ is_final_step?: boolean
238
+ swap_start_timestamp?: number
239
+
240
+ // Chained action analytics properties
241
+ plan_id?: string
242
+ step_index?: number
243
+ /** Total number of steps in the plan, including error steps that were later retried and a new step was added to the plan */
244
+ total_steps?: number
245
+ /** Total number of non-error steps in the plan, excluding error/retry steps*/
246
+ total_non_error_steps?: number
247
+ step_type?: string
248
+ }
249
+
250
+ type ClassicSwapTransactionResultProperties = BaseSwapTransactionResultProperties
251
+
252
+ type DEXTransactionResultProperties = BaseSwapTransactionResultProperties & {
253
+ order_hash: string
254
+ }
255
+
256
+ type BridgeSwapTransactionResultProperties = BaseSwapTransactionResultProperties
257
+
258
+ type FailedDEXOrderResultProperties = Omit<DEXTransactionResultProperties, 'hash'>
259
+
260
+ type FailedClassicSwapResultProperties = Omit<ClassicSwapTransactionResultProperties, 'hash'> & {
261
+ hash: string | undefined
262
+ error_message?: string
263
+ error_code?: number
264
+ }
265
+
266
+ type FailedBridgeSwapResultProperties = Omit<BridgeSwapTransactionResultProperties, 'hash'> & {
267
+ hash: string | undefined
268
+ }
269
+
270
+ type CancelledDEXOrderResultProperties = Omit<DEXTransactionResultProperties, 'hash'>
271
+
272
+ type CancelledClassicSwapResultProperties = ClassicSwapTransactionResultProperties & {
273
+ replaced_transaction_hash: string | undefined
274
+ }
275
+
276
+ type CancelledBridgeSwapResultProperties = Omit<BridgeSwapTransactionResultProperties, 'hash'> & {
277
+ hash: string | undefined
278
+ replaced_transaction_hash: string | undefined
279
+ }
280
+
281
+ type TransferProperties = {
282
+ chainId: UniverseChainId
283
+ tokenAddress: Address
284
+ toAddress: Address
285
+ amountUSD?: number
286
+ }
287
+
288
+ /** Known navbar search result types */
289
+ export enum NavBarSearchTypes {
290
+ CollectionSuggestion = 'collection-suggestion',
291
+ CollectionTrending = 'collection-trending',
292
+ RecentSearch = 'recent',
293
+ TokenSuggestion = 'token-suggestion',
294
+ TokenTrending = 'token-trending',
295
+ PoolSuggestion = 'pool-suggestion',
296
+ PoolTrending = 'pool-trending',
297
+ }
298
+
299
+ export enum WalletConnectionResult {
300
+ Failed = 'Failed',
301
+ Succeeded = 'Succeeded',
302
+ }
303
+
304
+ export enum AppDownloadPlatform {
305
+ Android = 'android',
306
+ Ios = 'ios',
307
+ }
308
+
309
+ export type WindowEthereumRequestProperties = {
310
+ method: string
311
+ dappUrl: string
312
+ chainId?: string // Hexadecimal string format to match the JSON-RPC spec
313
+ }
314
+
315
+ export type DappContextProperties = {
316
+ dappUrl?: string
317
+ chainId?: UniverseChainId
318
+ activeConnectedAddress?: Address
319
+ connectedAddresses: Address[]
320
+ }
321
+
322
+ export enum SwapPriceImpactUserResponse {
323
+ ACCEPTED = 'Accepted',
324
+ REJECTED = 'Rejected',
325
+ }
326
+
327
+ export enum SwapPriceUpdateUserResponse {
328
+ ACCEPTED = 'Accepted',
329
+ REJECTED = 'Rejected',
330
+ }
331
+
332
+ export type SwapPriceUpdateActionProperties = {
333
+ chain_id?: number
334
+ response: SwapPriceUpdateUserResponse
335
+ token_in_symbol?: string
336
+ token_out_symbol?: string
337
+ price_update_basis_points?: number
338
+ }
339
+
340
+ export type SwapPriceImpactActionProperties = {
341
+ response: SwapPriceImpactUserResponse
342
+ }
343
+
344
+ type InterfaceSearchResultSelectionProperties = {
345
+ suggestion_type: NavBarSearchTypes
346
+ query_text: string
347
+ position?: number
348
+ sectionPosition?: number
349
+ selected_search_result_name?: string
350
+ selected_search_result_address?: string
351
+ total_suggestions?: number
352
+ chainId?: UniverseChainId
353
+
354
+ // Pool specific properties
355
+ protocol_version?: string
356
+ fee_tier?: number
357
+ hook_address?: string
358
+ } & ITraceContext
359
+
360
+ type WrapProperties = {
361
+ type: WrapType
362
+ token_in_address: string
363
+ token_out_address: string
364
+ token_in_symbol?: string
365
+ token_out_symbol?: string
366
+ chain_id: number
367
+ amount?: number
368
+ contract_address?: string
369
+ contract_chain_id?: number
370
+ transaction_hash?: string
371
+ }
372
+
373
+ export enum LiquiditySource {
374
+ Sushiswap = 'Sushiswap',
375
+ V2 = 'V2',
376
+ V3 = 'V3',
377
+ }
378
+
379
+ export enum FeePoolSelectAction {
380
+ Manual = 'Manual',
381
+ Recommended = 'Recommended',
382
+ Search = 'Search',
383
+ }
384
+
385
+ export enum DappRequestAction {
386
+ Accept = 'Accept',
387
+ Reject = 'Reject',
388
+ }
389
+
390
+ export type CardLoggingName = OnboardingCardLoggingName | DappRequestCardLoggingName
391
+
392
+ export enum OnboardingCardLoggingName {
393
+ FundWallet = 'fund_wallet',
394
+ RecoveryBackup = 'recovery_backup',
395
+ ClaimUnitag = 'claim_unitag',
396
+ EnablePushNotifications = 'enable_push_notifications',
397
+ BridgedAsset = 'bridged_asset',
398
+
399
+ NoAppFeesAnnouncement = 'no_app_fees_announcement',
400
+
401
+ Unknown = 'unknown',
402
+ }
403
+
404
+ export enum DappRequestCardLoggingName {
405
+ BridgingBanner = 'dapp_request_bridging_banner',
406
+ }
407
+
408
+ export type FORAmountEnteredProperties = ITraceContext & {
409
+ source: 'chip' | 'textInput' | 'changeAsset' | 'maxButton'
410
+ // In order to track funnel metrics, we need to be able to associate this event to the FOR transaction.
411
+ // However, `externalTransactionId` must be unique for each transaction, so we pre-generate the suffix only.
412
+ externalTransactionIdSuffix?: string
413
+ amountUSD?: number
414
+ amount?: number
415
+ chainId?: number
416
+ cryptoCurrency?: string
417
+ fiatCurrency?: string
418
+ isTokenInputMode?: boolean
419
+ }
420
+
421
+ export type FORTokenSelectedProperties = ITraceContext & {
422
+ token: string
423
+ // In order to track funnel metrics, we need to be able to associate this event to the FOR transaction.
424
+ // However, `externalTransactionId` must be unique for each transaction, so we pre-generate the suffix only.
425
+ externalTransactionIdSuffix?: string
426
+ isUnsupported?: boolean
427
+ chainId?: number
428
+ }
429
+
430
+ export type FORUnsupportedTokenSelectedProperties = ITraceContext & { token?: string }
431
+
432
+ export type FORTransactionUpdatedProperties = {
433
+ status: string
434
+ externalTransactionId: string
435
+ serviceProvider: string
436
+ }
437
+
438
+ export type OfframpSendTransactionProperties = ITraceContext & {
439
+ cryptoCurrency: string
440
+ currencyAmount: number
441
+ serviceProvider: string
442
+ chainId: string
443
+ externalTransactionId: Maybe<string>
444
+ amountUSD?: number
445
+ }
446
+
447
+ export type FORWidgetOpenedProperties = ITraceContext & {
448
+ countryCode?: string
449
+ countryState?: string
450
+ cryptoCurrency: string
451
+ externalTransactionId: string
452
+ fiatCurrency: string
453
+ preselectedServiceProvider?: string
454
+ serviceProvider: string
455
+ chainId?: number
456
+ currencyAmount?: number
457
+ amountUSD?: number
458
+ paymentMethodFilter?: string
459
+ }
460
+
461
+ export type FORPaymentMethodFilterSelectedProperties = ITraceContext & {
462
+ paymentMethodFilter: string
463
+ }
464
+
465
+ export type WalletConnectedProperties = {
466
+ result: WalletConnectionResult
467
+ wallet_name?: string // evm
468
+ wallet_type?: string // evm
469
+ wallet_name_svm?: string
470
+ wallet_type_svm?: string
471
+ wallet_address?: string // evm
472
+ wallet_address_svm?: string
473
+ is_reconnect?: boolean
474
+ peer_wallet_agent?: string
475
+ page?: InterfacePageName
476
+ error?: string
477
+ connected_VM?: 'EVM' | 'SVM' | 'EVM+SVM' | undefined
478
+ }
479
+
480
+ type DappRequestCardEventProperties = ITraceContext & {
481
+ card_name: DappRequestCardLoggingName
482
+ }
483
+
484
+ type OnboardingCardEventProperties = ITraceContext & {
485
+ card_name: OnboardingCardLoggingName
486
+ }
487
+
488
+ // Camelcase and snakecase used to preserve backwards compatibility for original event names
489
+ export type LiquidityAnalyticsProperties = ITraceContext & {
490
+ label: string
491
+ type: string
492
+ protocol_version: ProtocolVersion
493
+ fee_tier: number
494
+ tick_spacing: number | undefined
495
+ tick_lower: number | undefined
496
+ tick_upper: number | undefined
497
+ hook: string | undefined
498
+ pool_address?: string // represents pool contract address for v2&v3, and poolId for v4
499
+ chain_id?: UniverseChainId
500
+ baseCurrencyId: string
501
+ quoteCurrencyId: string
502
+ token0AmountUSD?: number
503
+ token1AmountUSD?: number
504
+ transaction_hash: string
505
+ // for debugging Linear ticket DS-172:
506
+ currencyInfo0Decimals: number
507
+ currencyInfo1Decimals: number
508
+ }
509
+
510
+ export type AuctionWithdrawAnalyticsProperties = ITraceContext & {
511
+ transaction_hash: string
512
+ chain_id: number
513
+ auction_contract_address: string
514
+
515
+ // Auction tokens claimed (what user receives)
516
+ auction_token_address?: string
517
+ auction_token_symbol?: string
518
+ auction_token_amount_raw?: string
519
+ auction_token_amount_usd?: number
520
+
521
+ // Bid tokens refunded (original bid returned)
522
+ bid_token_address?: string
523
+ bid_token_symbol?: string
524
+ bid_token_amount_raw?: string
525
+ bid_token_amount_usd?: number
526
+
527
+ // Original bid budget (full initial budget amount)
528
+ budget_token_amount_raw?: string
529
+ budget_token_amount_usd?: number
530
+
531
+ // Max FDV from original bid
532
+ max_fdv_usd?: number
533
+
534
+ // Expected output
535
+ expected_receive_amount?: number
536
+
537
+ // Auction status
538
+ is_graduated: boolean
539
+ is_auction_completed: boolean
540
+ }
541
+
542
+ export type AuctionBidAnalyticsProperties = ITraceContext & {
543
+ transaction_hash: string
544
+ chain_id: number
545
+ auction_contract_address: string
546
+
547
+ // Bid parameters
548
+ bid_token_address: string
549
+ bid_token_amount_raw: string
550
+ bid_token_amount_usd?: number
551
+ max_price_q96: string
552
+ max_fdv_usd?: number
553
+ price_per_token?: number
554
+
555
+ // Expected output
556
+ min_expected_receive_amount?: number
557
+ max_receivable_amount?: number
558
+
559
+ // Token info
560
+ token_symbol?: string
561
+ token_name?: string
562
+ }
563
+
564
+ export type AuctionBidInputtedAnalyticsProperties = ITraceContext & {
565
+ chain_id: number
566
+ auction_contract_address: string
567
+ bid_token_address: string
568
+
569
+ // Budget (max amount user will spend)
570
+ bid_token_amount_raw: string
571
+ bid_token_amount_usd?: number
572
+
573
+ // Max Valuation (FDV limit)
574
+ max_price_q96: string
575
+ max_fdv_usd?: number
576
+ price_per_token?: number
577
+
578
+ // Expected Output (what user expects to receive)
579
+ expected_receive_amount?: number
580
+ min_expected_receive_amount?: number
581
+ max_receivable_amount?: number
582
+
583
+ // Token info
584
+ token_symbol?: string
585
+ }
586
+
587
+ export type NotificationToggleLoggingType = 'settings_general_updates_enabled' | 'wallet_activity'
588
+
589
+ type TokenReportProperties = {
590
+ is_marked_spam?: Maybe<boolean>
591
+ token_name?: string
592
+ token_contract_address?: string
593
+ chain_id: UniverseChainId
594
+ text?: string
595
+ }
596
+
597
+ type PoolReportProperties = {
598
+ pool_id: string
599
+ version: ProtocolVersion
600
+ chain_id: UniverseChainId
601
+ token0: string
602
+ token1: string
603
+ }
604
+
605
+ // Please sort new values by EventName type!
606
+ export type UniverseEventProperties = {
607
+ [ExtensionEventName.BackgroundAttemptedToOpenSidebar]: { hasError: boolean }
608
+ [ExtensionEventName.OnboardingLoad]: undefined
609
+ [ExtensionEventName.SidebarLoad]: { locked: boolean }
610
+ [ExtensionEventName.SidebarClosed]: undefined
611
+ [ExtensionEventName.ChangeLockedState]: { locked: boolean; location: 'background' | 'sidebar' }
612
+ [ExtensionEventName.DappConnect]: DappContextProperties
613
+ [ExtensionEventName.DappConnectRequest]: DappContextProperties
614
+ [ExtensionEventName.DappDisconnect]: DappContextProperties
615
+ [ExtensionEventName.DappDisconnectAll]: Pick<DappContextProperties, 'activeConnectedAddress'>
616
+ [ExtensionEventName.DappRequest]: DappContextProperties & { action: DappRequestAction; requestType: string } // TODO: requestType should be of the type DappRequestType
617
+ [ExtensionEventName.DappChangeChain]: Omit<DappContextProperties, 'connectedAddresses'>
618
+ [ExtensionEventName.DappTroubleConnecting]: Pick<DappContextProperties, 'dappUrl'>
619
+ [ExtensionEventName.PasswordChanged]: undefined
620
+ [ExtensionEventName.ProviderDirectMethodRequest]: WindowEthereumRequestProperties
621
+ [ExtensionEventName.ExtensionEthMethodRequest]: WindowEthereumRequestProperties
622
+ [ExtensionEventName.DeprecatedMethodRequest]: WindowEthereumRequestProperties
623
+ [ExtensionEventName.UnsupportedMethodRequest]: WindowEthereumRequestProperties
624
+ [ExtensionEventName.UnrecognizedMethodRequest]: WindowEthereumRequestProperties
625
+ [ExtensionEventName.SidebarSwitchChain]: {
626
+ previousChainId?: number
627
+ newChainId: number
628
+ }
629
+ [ExtensionEventName.SidebarConnect]: Pick<DappContextProperties, 'dappUrl'>
630
+ [ExtensionEventName.SidebarDisconnect]: undefined
631
+ [ExtensionEventName.UnknownMethodRequest]: WindowEthereumRequestProperties
632
+ [FiatOffRampEventName.FORBuySellToggled]: ITraceContext & {
633
+ value: 'BUY' | 'SELL'
634
+ }
635
+ [FiatOffRampEventName.FiatOffRampAmountEntered]: FORAmountEnteredProperties
636
+ [FiatOffRampEventName.FiatOffRampTokenSelected]: FORTokenSelectedProperties
637
+ [FiatOffRampEventName.FiatOffRampUnsupportedTokenBack]: FORUnsupportedTokenSelectedProperties
638
+ [FiatOffRampEventName.FiatOffRampUnsupportedTokenSwap]: FORUnsupportedTokenSelectedProperties
639
+ [FiatOffRampEventName.FiatOffRampWidgetOpened]: FORWidgetOpenedProperties
640
+ [FiatOffRampEventName.FiatOffRampPaymentMethodFilterSelected]: FORPaymentMethodFilterSelectedProperties
641
+ [FiatOffRampEventName.FiatOffRampWidgetCompleted]: OfframpSendTransactionProperties
642
+ [FiatOffRampEventName.FiatOffRampFundsSent]: OfframpSendTransactionProperties
643
+ [FiatOnRampEventName.FiatOnRampAmountEntered]: FORAmountEnteredProperties
644
+ [FiatOnRampEventName.FiatOnRampTokenSelected]: FORTokenSelectedProperties
645
+ [FiatOnRampEventName.FiatOnRampTransactionUpdated]: FORTransactionUpdatedProperties
646
+ [FiatOnRampEventName.FiatOnRampWidgetOpened]: FORWidgetOpenedProperties
647
+ [FiatOnRampEventName.FiatOnRampPaymentMethodFilterSelected]: FORPaymentMethodFilterSelectedProperties
648
+ [FiatOnRampEventName.FiatOnRampTransferWidgetOpened]: ITraceContext & {
649
+ externalTransactionId: string
650
+ serviceProvider: string
651
+ }
652
+ [InterfaceEventName.WalletConnected]: WalletConnectedProperties
653
+ [InterfaceEventName.ApproveTokenTxnSubmitted]: {
654
+ chain_id: number
655
+ token_address: string
656
+ token_symbol?: string
657
+ }
658
+ [InterfaceEventName.FiatOnrampWidgetOpened]: undefined
659
+ [InterfaceEventName.LuxWalletConnectModalOpened]: undefined
660
+ [InterfaceEventName.ExternalLinkClicked]: {
661
+ label: string
662
+ }
663
+ [InterfaceEventName.NavbarResultSelected]: InterfaceSearchResultSelectionProperties
664
+ [InterfaceEventName.NotificationDismissed]: {
665
+ notification_id: string
666
+ notification_type: string
667
+ }
668
+ [InterfaceEventName.NotificationInteracted]: {
669
+ notification_id: string
670
+ notification_type: string
671
+ action: string
672
+ }
673
+ [InterfaceEventName.NotificationReceived]: {
674
+ notification_id: string
675
+ notification_type: string
676
+ source: string
677
+ timestamp: number
678
+ }
679
+ [InterfaceEventName.NotificationShown]: {
680
+ notification_id: string
681
+ notification_type: string
682
+ timestamp: number
683
+ }
684
+ [InterfaceEventName.AccountDropdownButtonClicked]: undefined
685
+ [InterfaceEventName.WalletProviderUsed]: {
686
+ source: string
687
+ contract: {
688
+ name: string
689
+ address?: string
690
+ withSignerIfPossible?: boolean
691
+ chainId?: number
692
+ }
693
+ }
694
+ [InterfaceEventName.WrapTokenTxnInvalidated]: WrapProperties
695
+ [InterfaceEventName.WrapTokenTxnSubmitted]: WrapProperties
696
+ [InterfaceEventName.LuxWalletMicrositeOpened]: ITraceContext
697
+ [InterfaceEventName.LuxWalletAppDownloadOpened]: ITraceContext & {
698
+ appPlatform?: AppDownloadPlatform
699
+ }
700
+ [InterfaceEventName.MiniPortfolioToggled]: {
701
+ type: 'open' | 'close'
702
+ }
703
+ [InterfaceEventName.ConnectWalletButtonClicked]: {
704
+ received_swap_quote?: boolean
705
+ }
706
+ [InterfaceEventName.WalletSelected]: {
707
+ wallet_name: string
708
+ wallet_type: string
709
+ }
710
+ [InterfaceEventName.PortfolioMenuOpened]: { name: string } | { name: string; platform: Platform }
711
+ [InterfaceEventName.DEXOrderDetailsSheetOpened]: {
712
+ order: string
713
+ }
714
+ [InterfaceEventName.DEXOrderCancelInitiated]: {
715
+ orders: string[]
716
+ }
717
+ [InterfaceEventName.LimitPresetRateSelected]: {
718
+ value: number
719
+ }
720
+ [InterfaceEventName.LimitPriceReversed]: undefined
721
+ [InterfaceEventName.LimitExpirySelected]: {
722
+ value: LimitsExpiry
723
+ }
724
+ [InterfaceEventName.SwapConfirmedOnClient]: {
725
+ /** @deprecated Use `success` instead. This property name is misleading as the event fires for all transaction types. */
726
+ swap_success: boolean
727
+ /** Whether the transaction succeeded on-chain */
728
+ success: boolean
729
+ time: number
730
+ chainId?: number
731
+ txHash: string
732
+ transactionType?: TransactionType
733
+ routing?: SwapRouting
734
+ }
735
+ [InterfaceEventName.SwapTabClicked]: {
736
+ tab: SwapTab
737
+ }
738
+ [InterfaceEventName.LocalCurrencySelected]: {
739
+ previous_local_currency: FiatCurrency
740
+ new_local_currency: FiatCurrency
741
+ }
742
+ [InterfaceEventName.NoQuoteReceivedFromQuickrouteAPI]: {
743
+ requestBody: unknown
744
+ response: unknown
745
+ }
746
+ [InterfaceEventName.NoQuoteReceivedFromRoutingAPI]: {
747
+ requestBody: unknown
748
+ response: unknown
749
+ routerPreference: 'price' | 'dex' | 'api'
750
+ }
751
+ [InterfaceEventName.DEXSignatureDeadlineExpired]: {
752
+ deadline: number
753
+ resultTime: number
754
+ }
755
+ [InterfaceEventName.DEXSignatureRequested]: Record<string, unknown> // TODO specific type
756
+ [InterfaceEventName.DEXOrderPostError]: Record<string, unknown> // TODO specific type
757
+ [InterfaceEventName.DEXOrderSubmitted]: Record<string, unknown> // TODO specific type
758
+ [InterfaceEventName.CreatePositionFailed]: {
759
+ message: string
760
+ } & PartialMessage<CreateLPPositionRequest>
761
+ [InterfaceEventName.IncreaseLiquidityFailed]: {
762
+ message: string
763
+ } & PartialMessage<IncreaseLPPositionRequest>
764
+ [InterfaceEventName.DecreaseLiquidityFailed]: {
765
+ message: string
766
+ }
767
+ [InterfaceEventName.MigrateLiquidityFailed]: {
768
+ message: string
769
+ }
770
+ [InterfaceEventName.CollectLiquidityFailed]: {
771
+ message: string
772
+ }
773
+ [InterfaceEventName.OnChainAddLiquidityFailed]: {
774
+ message: string
775
+ } & (PartialMessage<CreateLPPositionRequest> | PartialMessage<IncreaseLPPositionRequest>)
776
+ [InterfaceEventName.EmbeddedWalletCreated]: undefined
777
+ [InterfaceEventName.ExtensionUninstallFeedback]: {
778
+ reason: ExtensionUninstallFeedbackOptions
779
+ }
780
+ [InterfaceEventName.NavbarSearchExited]: {
781
+ navbar_search_input_text: string
782
+ hasInput: boolean
783
+ } & ITraceContext
784
+ [InterfaceEventName.ChainChanged]:
785
+ | {
786
+ result: WalletConnectionResult.Succeeded
787
+ wallet_address?: string
788
+ wallet_type: string
789
+ chain_id?: number
790
+ previousConnectedChainId: number
791
+ page?: InterfacePageName
792
+ }
793
+ | {
794
+ chain: string
795
+ page: InterfacePageName.ExplorePage
796
+ }
797
+ [InterfaceEventName.ExploreSearchSelected]: undefined
798
+ [InterfaceEventName.ExploreQueryLatency]: {
799
+ query_type: 'tokens' | 'pools'
800
+ is_backend_sorting_enabled: boolean
801
+ latency_ms: number
802
+ chain_id?: number
803
+ result_count?: number
804
+ }
805
+ [InterfaceEventName.LanguageSelected]: {
806
+ previous_language: string
807
+ new_language: string
808
+ }
809
+ [InterfaceEventName.NavbarSearchSelected]: ITraceContext
810
+ [InterfaceEventName.SendInitiated]: {
811
+ currencyId: string
812
+ amount: string
813
+ recipient: string
814
+ }
815
+ [InterfaceEventName.TokenSelectorOpened]: undefined
816
+ [InterfaceEventName.LimitedWalletSupportToastDismissed]: {
817
+ chainId?: number
818
+ }
819
+ [InterfaceEventName.LimitedWalletSupportToastShown]: {
820
+ chainId?: number
821
+ }
822
+ [InterfaceEventName.LimitedWalletSupportToastLearnMoreButtonClicked]: {
823
+ chainId?: number
824
+ }
825
+ [InterfaceEventName.WalletCapabilitiesDetected]: {
826
+ chainId: number
827
+ capabilities: {
828
+ [capability: string]: string | boolean
829
+ }
830
+ }
831
+ [LiquidityEventName.CollectLiquiditySubmitted]: LiquidityAnalyticsProperties
832
+ [LiquidityEventName.SelectLiquidityPoolFeeTier]: {
833
+ action: FeePoolSelectAction
834
+ fee_tier: number
835
+ is_new_fee_tier?: boolean
836
+ } & ITraceContext
837
+ [LiquidityEventName.MigrateLiquiditySubmitted]: {
838
+ action: string
839
+ } & LiquidityAnalyticsProperties
840
+ [LiquidityEventName.AddLiquiditySubmitted]: {
841
+ createPool?: boolean
842
+ createPosition?: boolean
843
+ expectedAmountBaseRaw: string
844
+ expectedAmountQuoteRaw: string
845
+ price_discrepancy?: string
846
+ } & LiquidityAnalyticsProperties
847
+ [LiquidityEventName.RemoveLiquiditySubmitted]: {
848
+ expectedAmountBaseRaw: string
849
+ expectedAmountQuoteRaw: string
850
+ closePosition?: boolean
851
+ } & LiquidityAnalyticsProperties
852
+ [LiquidityEventName.TransactionModifiedInWallet]: {
853
+ expected?: string
854
+ actual: string
855
+ } & LiquidityAnalyticsProperties
856
+ [LiquidityEventName.PriceDiscrepancyChecked]: {
857
+ event_name: LiquidityEventName
858
+ status: number
859
+ price_discrepancy: string
860
+ absolute_price_discrepancy: number
861
+ sqrt_ratio_x96_before: string
862
+ sqrt_ratio_x96_after: string
863
+ } & LiquidityAnalyticsProperties
864
+ [AuctionEventName.AuctionWithdrawSubmitted]: AuctionWithdrawAnalyticsProperties
865
+ [AuctionEventName.AuctionBidSubmitted]: AuctionBidAnalyticsProperties
866
+ [AuctionEventName.AuctionBidInputted]: AuctionBidInputtedAnalyticsProperties
867
+ [MobileEventName.AutomatedOnDeviceRecoveryTriggered]: {
868
+ showNotificationScreen: boolean
869
+ showBiometricsScreen: boolean
870
+ notificationOSPermission: string
871
+ hasAnyNotificationsEnabled: boolean
872
+ deviceSupportsBiometrics: boolean | undefined
873
+ isBiometricsEnrolled: boolean | undefined
874
+ isBiometricAuthEnabled: boolean
875
+ }
876
+ [MobileEventName.AutomatedOnDeviceRecoveryMnemonicsFound]: {
877
+ mnemonicCount: number
878
+ }
879
+ [MobileEventName.AutomatedOnDeviceRecoverySingleMnemonicFetched]: {
880
+ balance: number
881
+ hasUnitag: boolean
882
+ hasENS: boolean
883
+ }
884
+ [MobileEventName.DeepLinkOpened]: {
885
+ url: string
886
+ screen: 'swap' | 'transaction'
887
+ is_cold_start: boolean
888
+ }
889
+ [MobileEventName.ExploreFilterSelected]: {
890
+ filter_type: string
891
+ }
892
+ [MobileEventName.ExploreNetworkSelected]: {
893
+ networkChainId: number | 'all'
894
+ }
895
+ [MobileEventName.ExploreSearchNetworkSelected]: {
896
+ networkChainId: number | 'all'
897
+ }
898
+ [MobileEventName.ExploreSearchResultClicked]: SearchResultContextProperties &
899
+ AssetDetailsBaseProperties & {
900
+ type: 'collection' | 'token' | 'address'
901
+ }
902
+ [MobileEventName.ExploreTokenItemSelected]: AssetDetailsBaseProperties & {
903
+ position: number
904
+ }
905
+ [MobileEventName.HomeExploreTokenItemSelected]: AssetDetailsBaseProperties & {
906
+ position: number
907
+ }
908
+ [MobileEventName.FavoriteItem]: AssetDetailsBaseProperties & {
909
+ type: 'token' | 'wallet'
910
+ }
911
+ [MobileEventName.FiatOnRampQuickActionButtonPressed]: ITraceContext
912
+ [MobileEventName.NotificationsToggled]: ITraceContext & {
913
+ enabled: boolean
914
+ type: NotificationToggleLoggingType
915
+ }
916
+ [MobileEventName.OnboardingCompleted]: OnboardingCompletedProps & ITraceContext
917
+ [MobileEventName.PerformanceReport]: RenderPassReport
918
+ [MobileEventName.RestoreSuccess]: {
919
+ import_type?: string
920
+ screen: OnboardingScreens
921
+ is_restoring_mnemonic: boolean
922
+ restore_type?: string
923
+ }
924
+ [MobileEventName.SeedPhraseInputSubmitError]: undefined
925
+ [MobileEventName.ShareLinkOpened]: {
926
+ entity: ShareableEntity
927
+ url: string
928
+ }
929
+ [MobileEventName.SwapLongPress]: {
930
+ element: 'buy' | 'sell' | 'send' | 'receive'
931
+ }
932
+ [MobileEventName.TokenDetailsOtherChainButtonPressed]: ITraceContext
933
+ [MobileEventName.TokenDetailsContextMenuAction]: ITraceContext & { action: string }
934
+ [MobileEventName.WalletConnectSheetCompleted]: {
935
+ request_type: WCEventType
936
+ eth_method?: EthMethod | UwULinkMethod
937
+ dapp_url: string
938
+ dapp_name: string
939
+ wc_version: string
940
+ connection_chain_ids?: number[]
941
+ chain_id?: number
942
+ outcome: WCRequestOutcome
943
+ }
944
+ [MobileEventName.WidgetConfigurationUpdated]: WidgetEvent
945
+ [MobileEventName.WidgetClicked]: {
946
+ widget_type: WidgetType
947
+ url: string
948
+ }
949
+ [SharedEventName.APP_LOADED]:
950
+ | undefined
951
+ | {
952
+ service_worker: string
953
+ cache: string
954
+ }
955
+ [SharedEventName.ELEMENT_CLICKED]: ITraceContext & {
956
+ // Covering ElementName.PortfolioNftItem
957
+ collection_name?: string
958
+ collection_address?: string
959
+ token_id?: string
960
+ link_type?: string
961
+ }
962
+ [SharedEventName.PAGE_VIEWED]: ITraceContext
963
+ [SharedEventName.ANALYTICS_SWITCH_TOGGLED]: {
964
+ enabled: boolean
965
+ }
966
+ [SharedEventName.HEARTBEAT]: undefined
967
+ [SharedEventName.WEB_VITALS]: Record<string, unknown>
968
+ [SharedEventName.TERMS_OF_SERVICE_ACCEPTED]: {
969
+ address: string
970
+ }
971
+ [SharedEventName.NAVBAR_CLICKED]: undefined
972
+ // Sessions events
973
+ [SessionsEventName.SessionInitStarted]: undefined
974
+ [SessionsEventName.SessionInitCompleted]: {
975
+ need_challenge: boolean
976
+ duration_ms: number
977
+ }
978
+ [SessionsEventName.ChallengeReceived]: {
979
+ challenge_type: string
980
+ challenge_id: string
981
+ }
982
+ [SessionsEventName.VerifyCompleted]: {
983
+ success: boolean
984
+ attempt_number: number
985
+ total_duration_ms: number
986
+ }
987
+ [SessionsEventName.TurnstileSolveCompleted]: {
988
+ duration_ms: number
989
+ success: boolean
990
+ error_type?: string
991
+ error_message?: string
992
+ }
993
+ [SessionsEventName.HashcashSolveCompleted]: {
994
+ duration_ms: number
995
+ success: boolean
996
+ error_type?: string
997
+ error_message?: string
998
+ difficulty: number
999
+ iteration_count?: number
1000
+ used_worker: boolean
1001
+ }
1002
+ [SwapEventName.SwapPresetTokenAmountSelected]: {
1003
+ percentage: number
1004
+ }
1005
+ [SwapEventName.SwapPreselectAssetSelected]: {
1006
+ chain_id: UniverseChainId
1007
+ token_symbol: string | undefined
1008
+ }
1009
+ [SwapEventName.SwapPriceImpactAcknowledged]: SwapPriceImpactActionProperties
1010
+ [SwapEventName.SwapPriceUpdateAcknowledged]: SwapPriceUpdateActionProperties
1011
+ [SwapEventName.SwapTransactionCompleted]:
1012
+ | ClassicSwapTransactionResultProperties
1013
+ | DEXTransactionResultProperties
1014
+ | BridgeSwapTransactionResultProperties
1015
+ [SwapEventName.SwapTransactionFailed]:
1016
+ | FailedClassicSwapResultProperties
1017
+ | FailedDEXOrderResultProperties
1018
+ | FailedBridgeSwapResultProperties
1019
+ [WalletEventName.SwapTransactionCancelled]:
1020
+ | CancelledClassicSwapResultProperties
1021
+ | CancelledDEXOrderResultProperties
1022
+ | CancelledBridgeSwapResultProperties
1023
+ [SwapEventName.SwapDetailsExpanded]: ITraceContext | undefined
1024
+ [SwapEventName.SwapAutorouterVisualizationExpanded]: ITraceContext
1025
+ [SwapEventName.SwapQuoteFailed]: {
1026
+ error_message?: string
1027
+ } & SwapTradeBaseProperties
1028
+ [SwapEventName.SwapQuoteReceived]: {
1029
+ quote_latency_milliseconds?: number
1030
+ } & SwapTradeBaseProperties
1031
+ [SwapEventName.SwapBlocked]: {
1032
+ category?: SwapBlockedCategory
1033
+ error_code?: number
1034
+ error_message?: string
1035
+ protocol?: string
1036
+ simulation_failure_reasons?: TradingApi.TransactionFailureReason[]
1037
+ } & SwapTradeBaseProperties
1038
+ [SwapEventName.SwapSubmittedButtonClicked]: {
1039
+ estimated_network_fee_wei?: string
1040
+ gas_limit?: string
1041
+ transaction_deadline_seconds?: number
1042
+ token_in_amount_usd?: number
1043
+ token_out_amount_usd?: number
1044
+ is_auto_slippage?: boolean
1045
+ swap_quote_block_number: Maybe<string>
1046
+ swap_flow_duration_milliseconds?: number
1047
+ is_hold_to_swap?: boolean
1048
+ is_fiat_input_mode?: boolean
1049
+ is_batch?: boolean
1050
+ included_permit_transaction_step?: boolean
1051
+ } & SwapTradeBaseProperties
1052
+ [SwapEventName.SwapEstimateGasCallFailed]: {
1053
+ error?: ApolloError | FetchBaseQueryError | SerializedError | Error | string
1054
+ txRequest?: EthersTransactionRequest
1055
+ client_block_number?: number
1056
+ isAutoSlippage?: boolean
1057
+ simulationFailureReasons?: TradingApi.TransactionFailureReason[]
1058
+ } & SwapTradeBaseProperties
1059
+ [SwapEventName.SwapFirstAction]: {
1060
+ time_to_first_swap_action?: number
1061
+ } & ITraceContext
1062
+ [SwapEventName.SwapQuoteFetch]: {
1063
+ chainId: number
1064
+ isQuickRoute: boolean
1065
+ isUSDQuote?: boolean
1066
+ quoteSource?: string
1067
+ pollInterval?: number
1068
+ time_to_first_quote_request?: number
1069
+ time_to_first_quote_request_since_first_input?: number
1070
+ }
1071
+ [SwapEventName.SwapSigned]: SwapTradeBaseProperties & {
1072
+ transaction_hash?: string
1073
+ time_to_sign_since_request_ms?: number
1074
+ time_signed?: number
1075
+ }
1076
+ [SwapEventName.SwapModifiedInWallet]: {
1077
+ expected: string
1078
+ actual: string
1079
+ txHash: string
1080
+ } & ITraceContext
1081
+ [SwapEventName.SwapError]: {
1082
+ wrapType?: WrapType
1083
+ input?: Currency
1084
+ output?: Currency
1085
+ }
1086
+ [SwapEventName.SwapTokensReversed]: undefined
1087
+ [LuxEventName.TooltipOpened]: ITraceContext & {
1088
+ tooltip_name: string
1089
+ is_price_ux_enabled: boolean
1090
+ }
1091
+ [LuxEventName.DelegationDetected]: {
1092
+ chainId: number
1093
+ delegationAddress: string
1094
+ isActiveChain?: boolean
1095
+ }
1096
+ [LuxEventName.ExperimentQualifyingEvent]: {
1097
+ experiment: Experiments
1098
+ }
1099
+ [LuxEventName.BalancesReport]: {
1100
+ total_balances_usd: number
1101
+ wallets: string[]
1102
+ balances: number[]
1103
+ }
1104
+ [LuxEventName.BalancesReportPerChain]: {
1105
+ total_balances_usd_per_chain: Record<string, number>
1106
+ wallet: string
1107
+ view_only: boolean
1108
+ }
1109
+ [LuxEventName.ConversionEventSubmitted]: {
1110
+ id: string
1111
+ eventId: string
1112
+ eventName: string
1113
+ platformIdType: string
1114
+ }
1115
+ [LuxEventName.DataReportSubmitted]:
1116
+ | (TokenReportProperties & {
1117
+ type: 'data'
1118
+ price?: boolean
1119
+ volume?: boolean
1120
+ price_chart?: boolean
1121
+ token_details?: boolean
1122
+ something_else?: boolean
1123
+ })
1124
+ | (TokenReportProperties & {
1125
+ type: 'token_warning'
1126
+ })
1127
+ | (PoolReportProperties & {
1128
+ type: 'pool'
1129
+ price: boolean
1130
+ price_chart: boolean
1131
+ volume: boolean
1132
+ liquidity: boolean
1133
+ something_else: boolean
1134
+ text?: string
1135
+ })
1136
+ [LuxEventName.TokenSelected]:
1137
+ | (ITraceContext &
1138
+ AssetDetailsBaseProperties &
1139
+ SearchResultContextProperties & {
1140
+ field: CurrencyField
1141
+ preselect_asset: boolean
1142
+ tokenSection?: OnchainItemSectionName
1143
+ })
1144
+ | { token_balance_usd?: number | string }
1145
+ [LuxEventName.BlockaidFeesMismatch]: {
1146
+ symbol: string
1147
+ address: string
1148
+ chainId: number
1149
+ buyFeePercent?: number
1150
+ sellFeePercent?: number
1151
+ blockaidBuyFeePercent?: number
1152
+ blockaidSellFeePercent?: number
1153
+ attackType?: string
1154
+ protectionResult?: string
1155
+ }
1156
+ [LuxEventName.ContextMenuClosed]: ITraceContext
1157
+ [LuxEventName.ContextMenuItemClicked]: ITraceContext & {
1158
+ menu_item: string
1159
+ menu_item_index: number
1160
+ }
1161
+ [LuxEventName.ContextMenuOpened]: ITraceContext
1162
+ [LuxEventName.LowNetworkTokenInfoModalOpened]: {
1163
+ location: 'send' | 'swap'
1164
+ }
1165
+ [LuxEventName.LpIncentiveCollectRewardsButtonClicked]: undefined
1166
+ [LuxEventName.LpIncentiveCollectRewardsErrorThrown]: { error: string }
1167
+ [LuxEventName.LpIncentiveCollectRewardsRetry]: undefined
1168
+ [LuxEventName.LpIncentiveCollectRewardsSuccess]: { token_rewards: string }
1169
+ [LuxEventName.LpIncentiveLearnMoreCtaClicked]: undefined
1170
+ [LuxEventName.AuctionFilterSelected]: {
1171
+ filter: 'all' | 'verified' | 'unverified' | 'active' | 'complete'
1172
+ }
1173
+ [LuxEventName.NetworkFilterSelected]: ITraceContext & {
1174
+ chain: UniverseChainId | 'All'
1175
+ }
1176
+ [LuxEventName.SmartWalletMismatchDetected]: {
1177
+ chainId: string
1178
+ delegatedAddress: string
1179
+ }
1180
+ [LuxEventName.SpamReportSubmitted]:
1181
+ | (TokenReportProperties & {
1182
+ type: 'token'
1183
+ source: 'portfolio' | 'token-details'
1184
+ spam_token: boolean
1185
+ imposter_token: boolean
1186
+ hidden_fees: boolean
1187
+ something_else: boolean
1188
+ })
1189
+ | {
1190
+ type: 'nft'
1191
+ chain_id?: UniverseChainId
1192
+ contract_address?: Address
1193
+ token_id?: string
1194
+ }
1195
+ | {
1196
+ type: 'activity'
1197
+ address?: Address
1198
+ transaction_id: string
1199
+ chain_id: UniverseChainId
1200
+ hash?: string
1201
+ transaction_type: TransactionType
1202
+ }
1203
+ | (PoolReportProperties & {
1204
+ type: 'pool'
1205
+ })
1206
+ [UnitagEventName.UnitagBannerActionTaken]: {
1207
+ action: 'claim' | 'dismiss'
1208
+ entryPoint: 'home' | 'settings'
1209
+ }
1210
+ [UnitagEventName.UnitagOnboardingActionTaken]: {
1211
+ action: 'select' | 'later'
1212
+ }
1213
+ [UnitagEventName.UnitagChanged]: undefined
1214
+ [UnitagEventName.UnitagClaimAvailabilityDisplayed]: {
1215
+ result: 'unavailable' | 'restricted' | 'available'
1216
+ }
1217
+ [UnitagEventName.UnitagClaimed]: UnitagClaimContext
1218
+ [UnitagEventName.UnitagMetadataUpdated]: {
1219
+ avatar: boolean
1220
+ description: boolean
1221
+ twitter: boolean
1222
+ }
1223
+ [UnitagEventName.UnitagRemoved]: undefined
1224
+ [WalletEventName.AppRating]: {
1225
+ type: 'store-review' | 'feedback-form' | 'remind' | 'close'
1226
+ appRatingPromptedMs?: number
1227
+ appRatingProvidedMs?: number
1228
+ }
1229
+
1230
+ [WalletEventName.BackupMethodAdded]: {
1231
+ backupMethodType: 'manual' | 'cloud' | 'passkey' | 'maybe-manual'
1232
+ newBackupCount: number
1233
+ }
1234
+ [WalletEventName.BackupMethodRemoved]: {
1235
+ backupMethodType: 'manual' | 'cloud' | 'passkey' | 'maybe-manual'
1236
+ newBackupCount: number
1237
+ }
1238
+ [WalletEventName.DappRequestCardPressed]: DappRequestCardEventProperties
1239
+ [WalletEventName.DappRequestCardClosed]: DappRequestCardEventProperties
1240
+ [WalletEventName.ExternalLinkOpened]: {
1241
+ url: string
1242
+ }
1243
+ [WalletEventName.GasEstimateAccuracy]: GasEstimateAccuracyProperties
1244
+ [WalletEventName.KeyringMissingMnemonic]: KeyringMissingMnemonicProperties
1245
+ [WalletEventName.MismatchAccountSignatureRequestBlocked]: undefined
1246
+ [WalletEventName.PendingTransactionTimeout]: PendingTransactionTimeoutProperties
1247
+ [WalletEventName.TokenVisibilityChanged]: { currencyId: string; visible: boolean }
1248
+ [WalletEventName.TransferSubmitted]: TransferProperties
1249
+ [WalletEventName.WalletAdded]: OnboardingCompletedProps & ITraceContext
1250
+ [WalletEventName.WalletRemoved]: { wallets_removed: Address[] } & ITraceContext
1251
+ [WalletEventName.TransferCompleted]: TransferProperties
1252
+ [WalletEventName.ExploreSearchCancel]: {
1253
+ query: string
1254
+ }
1255
+ [WalletEventName.ModalClosed]: ITraceContext & Record<string, unknown>
1256
+ [WalletEventName.NFTVisibilityChanged]: {
1257
+ tokenId?: string
1258
+ chainId?: UniverseChainId
1259
+ contractAddress?: Address
1260
+ isSpam?: boolean
1261
+ visible: boolean
1262
+ }
1263
+ [WalletEventName.NFTsLoaded]: {
1264
+ shown: number
1265
+ hidden: number
1266
+ }
1267
+ [WalletEventName.OnboardingIntroCardSwiped]: OnboardingCardEventProperties
1268
+ [WalletEventName.OnboardingIntroCardPressed]: OnboardingCardEventProperties
1269
+ [WalletEventName.OnboardingIntroCardClosed]: OnboardingCardEventProperties
1270
+ [WalletEventName.PerformanceGraphql]: {
1271
+ dataSize: number
1272
+ duration: number
1273
+ operationName: string
1274
+ operationType?: string
1275
+ }
1276
+ [WalletEventName.PortfolioBalanceFreshnessLag]: {
1277
+ freshnessLag: number
1278
+ updatedCurrencies: string[]
1279
+ }
1280
+ [WalletEventName.SendRecipientSelected]: {
1281
+ domain: string
1282
+ }
1283
+ [WalletEventName.ShareButtonClicked]: {
1284
+ entity: ShareableEntity
1285
+ url: string
1286
+ }
1287
+ [WalletEventName.SilentPushReceived]: {
1288
+ template_id: string
1289
+ }
1290
+ [WalletEventName.SwapSubmitted]: (
1291
+ | {
1292
+ transaction_hash: string
1293
+ }
1294
+ | {
1295
+ order_hash: string
1296
+ }
1297
+ ) &
1298
+ SwapTradeBaseProperties
1299
+ [WalletEventName.CancelSubmitted]: {
1300
+ original_transaction_hash: string | undefined
1301
+ replacement_transaction_hash: string
1302
+ chain_id: number
1303
+ nonce: number
1304
+ }
1305
+ [WalletEventName.TestnetModeToggled]: {
1306
+ enabled: boolean
1307
+ location: 'settings' | 'deep_link_modal'
1308
+ }
1309
+ [WalletEventName.TestnetEvent]: {
1310
+ originalEventName: string
1311
+ } & Record<string, unknown>
1312
+ [WalletEventName.ViewRecoveryPhrase]: undefined
1313
+ // Please sort new values by EventName type!
1314
+ }
1315
+
1316
+ export type AppsFlyerEventProperties = {
1317
+ [MobileAppsFlyerEvents.OnboardingCompleted]: { importType: ImportType }
1318
+ [MobileAppsFlyerEvents.SwapCompleted]: undefined
1319
+ [MobileAppsFlyerEvents.WalletFunded]: { sumOfFunds: number }
1320
+ }