@lifi/widget 1.21.0 → 1.22.1

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 (206) hide show
  1. package/AppDrawer.style.d.ts +1 -1
  2. package/AppProvider.js +2 -4
  3. package/AppRoutes.js +4 -0
  4. package/cjs/AppDrawer.style.d.ts +1 -1
  5. package/cjs/AppProvider.js +1 -3
  6. package/cjs/AppRoutes.js +4 -0
  7. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  8. package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
  9. package/cjs/components/ChainSelect/ChainSelect.js +1 -3
  10. package/cjs/components/ChainSelect/useChainSelect.d.ts +1 -1
  11. package/cjs/components/Header/Header.style.d.ts +34 -1
  12. package/cjs/components/Header/Header.style.js +19 -1
  13. package/cjs/components/Header/NavigationHeader.js +6 -2
  14. package/cjs/components/Header/WalletHeader.js +34 -9
  15. package/cjs/components/Menu.d.ts +1 -0
  16. package/cjs/components/Menu.js +24 -0
  17. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  18. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  19. package/cjs/components/SelectChainAndToken.js +6 -1
  20. package/cjs/components/SelectTokenButton/SelectTokenButton.js +11 -6
  21. package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  22. package/cjs/components/SendToWallet/SendToWallet.js +5 -0
  23. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  24. package/cjs/components/SendToWallet/SendToWalletButton.js +5 -1
  25. package/cjs/components/Step/StepProcess.style.d.ts +2 -2
  26. package/cjs/components/Step/StepTimer.js +1 -1
  27. package/cjs/components/StepActions/StepActions.js +6 -1
  28. package/cjs/components/SwapButton/SwapButton.js +9 -4
  29. package/cjs/components/SwapInput/FormPriceHelperText.js +4 -4
  30. package/cjs/components/SwapInput/SwapInput.js +5 -2
  31. package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
  32. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  33. package/cjs/components/SwapRouteCard/SwapRouteCard.js +5 -3
  34. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  35. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  36. package/cjs/components/SwapRoutes/SwapRoutes.js +8 -3
  37. package/cjs/components/Token/Token.js +6 -5
  38. package/cjs/components/TokenAvatar/TokenAvatar.d.ts +11 -1
  39. package/cjs/components/TokenAvatar/TokenAvatar.js +14 -3
  40. package/cjs/components/TokenList/TokenList.js +2 -23
  41. package/cjs/components/TokenList/TokenListItem.d.ts +2 -1
  42. package/cjs/components/TokenList/TokenListItem.js +12 -6
  43. package/cjs/components/TokenList/index.d.ts +1 -0
  44. package/cjs/components/TokenList/index.js +1 -0
  45. package/cjs/components/TokenList/types.d.ts +6 -0
  46. package/cjs/components/TokenList/useTokenSelect.d.ts +2 -0
  47. package/cjs/components/TokenList/useTokenSelect.js +33 -0
  48. package/cjs/config/version.d.ts +1 -1
  49. package/cjs/config/version.js +1 -1
  50. package/cjs/hooks/useChain.d.ts +2 -2
  51. package/cjs/hooks/useChains.d.ts +2 -2
  52. package/cjs/hooks/useExpandableVariant.js +3 -5
  53. package/cjs/hooks/useProcessMessage.d.ts +2 -2
  54. package/cjs/hooks/useSwapRoutes.js +11 -7
  55. package/cjs/i18n/de.json +199 -0
  56. package/cjs/i18n/en.json +162 -151
  57. package/cjs/i18n/es.json +200 -0
  58. package/cjs/i18n/fr.json +199 -0
  59. package/cjs/i18n/index.d.ts +8 -200
  60. package/cjs/i18n/index.js +15 -19
  61. package/cjs/i18n/it.json +199 -0
  62. package/cjs/i18n/uk.json +200 -0
  63. package/cjs/i18n/zh.json +199 -0
  64. package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +2 -2
  65. package/cjs/pages/SelectChainPage/SelectChainPage.js +13 -9
  66. package/cjs/pages/SelectChainPage/types.d.ts +4 -0
  67. package/cjs/pages/SelectChainPage/types.js +2 -0
  68. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  69. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +21 -0
  70. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  71. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +20 -0
  72. package/cjs/pages/SelectNativeTokenPage/index.d.ts +1 -0
  73. package/cjs/pages/SelectNativeTokenPage/index.js +17 -0
  74. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  75. package/cjs/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  76. package/cjs/pages/SettingsPage/LanguageSelect.js +38 -0
  77. package/cjs/pages/SettingsPage/SettingsPage.js +2 -1
  78. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -1
  79. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  80. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  81. package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  82. package/cjs/pages/SwapPage/StatusBottomSheet.js +3 -3
  83. package/cjs/pages/SwapPage/SwapPage.js +1 -3
  84. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  85. package/cjs/providers/I18nProvider/I18nProvider.d.ts +2 -0
  86. package/cjs/providers/I18nProvider/I18nProvider.js +62 -0
  87. package/cjs/providers/I18nProvider/index.d.ts +2 -0
  88. package/cjs/providers/I18nProvider/index.js +18 -0
  89. package/cjs/providers/I18nProvider/types.d.ts +16 -0
  90. package/cjs/providers/I18nProvider/types.js +2 -0
  91. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  92. package/cjs/providers/WidgetProvider/utils.js +4 -4
  93. package/cjs/providers/index.d.ts +1 -0
  94. package/cjs/providers/index.js +1 -0
  95. package/cjs/stores/settings/types.d.ts +1 -0
  96. package/cjs/stores/settings/useSettingsStore.d.ts +2 -0
  97. package/cjs/types/widget.d.ts +24 -7
  98. package/cjs/types/widget.js +8 -0
  99. package/cjs/utils/deepMerge.d.ts +1 -0
  100. package/cjs/utils/deepMerge.js +18 -0
  101. package/cjs/utils/index.d.ts +1 -0
  102. package/cjs/utils/index.js +1 -0
  103. package/cjs/utils/input.js +3 -1
  104. package/cjs/utils/navigationRoutes.d.ts +8 -7
  105. package/cjs/utils/navigationRoutes.js +10 -7
  106. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  107. package/components/BottomSheet/BottomSheet.d.ts +1 -1
  108. package/components/ChainSelect/ChainSelect.js +1 -3
  109. package/components/ChainSelect/useChainSelect.d.ts +1 -1
  110. package/components/Header/Header.style.d.ts +34 -1
  111. package/components/Header/Header.style.js +19 -1
  112. package/components/Header/NavigationHeader.js +7 -3
  113. package/components/Header/WalletHeader.js +37 -12
  114. package/components/Menu.d.ts +1 -0
  115. package/components/Menu.js +21 -0
  116. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  117. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  118. package/components/SelectChainAndToken.js +7 -2
  119. package/components/SelectTokenButton/SelectTokenButton.js +12 -7
  120. package/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  121. package/components/SendToWallet/SendToWallet.js +6 -1
  122. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  123. package/components/SendToWallet/SendToWalletButton.js +6 -2
  124. package/components/Step/StepProcess.style.d.ts +2 -2
  125. package/components/Step/StepTimer.js +1 -1
  126. package/components/StepActions/StepActions.js +6 -1
  127. package/components/SwapButton/SwapButton.js +9 -4
  128. package/components/SwapInput/FormPriceHelperText.js +4 -4
  129. package/components/SwapInput/SwapInput.js +6 -3
  130. package/components/SwapInput/SwapInput.style.d.ts +1 -1
  131. package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  132. package/components/SwapRouteCard/SwapRouteCard.js +5 -3
  133. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  134. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  135. package/components/SwapRoutes/SwapRoutes.js +8 -3
  136. package/components/Token/Token.js +7 -6
  137. package/components/TokenAvatar/TokenAvatar.d.ts +11 -1
  138. package/components/TokenAvatar/TokenAvatar.js +11 -2
  139. package/components/TokenList/TokenList.js +4 -25
  140. package/components/TokenList/TokenListItem.d.ts +2 -1
  141. package/components/TokenList/TokenListItem.js +10 -5
  142. package/components/TokenList/index.d.ts +1 -0
  143. package/components/TokenList/index.js +1 -0
  144. package/components/TokenList/types.d.ts +6 -0
  145. package/components/TokenList/useTokenSelect.d.ts +2 -0
  146. package/components/TokenList/useTokenSelect.js +29 -0
  147. package/config/version.d.ts +1 -1
  148. package/config/version.js +1 -1
  149. package/hooks/useChain.d.ts +2 -2
  150. package/hooks/useChains.d.ts +2 -2
  151. package/hooks/useExpandableVariant.js +3 -5
  152. package/hooks/useProcessMessage.d.ts +2 -2
  153. package/hooks/useSwapRoutes.js +12 -8
  154. package/i18n/de.json +199 -0
  155. package/i18n/en.json +162 -151
  156. package/i18n/es.json +200 -0
  157. package/i18n/fr.json +199 -0
  158. package/i18n/index.d.ts +8 -200
  159. package/i18n/index.js +8 -18
  160. package/i18n/it.json +199 -0
  161. package/i18n/uk.json +200 -0
  162. package/i18n/zh.json +199 -0
  163. package/package.json +19 -18
  164. package/pages/SelectChainPage/SelectChainPage.d.ts +2 -2
  165. package/pages/SelectChainPage/SelectChainPage.js +13 -9
  166. package/pages/SelectChainPage/types.d.ts +4 -0
  167. package/pages/SelectChainPage/types.js +1 -0
  168. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  169. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +17 -0
  170. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  171. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +17 -0
  172. package/pages/SelectNativeTokenPage/index.d.ts +1 -0
  173. package/pages/SelectNativeTokenPage/index.js +1 -0
  174. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  175. package/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  176. package/pages/SettingsPage/LanguageSelect.js +34 -0
  177. package/pages/SettingsPage/SettingsPage.js +2 -1
  178. package/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -1
  179. package/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  180. package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  181. package/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  182. package/pages/SwapPage/StatusBottomSheet.js +3 -3
  183. package/pages/SwapPage/SwapPage.js +1 -3
  184. package/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  185. package/providers/I18nProvider/I18nProvider.d.ts +2 -0
  186. package/providers/I18nProvider/I18nProvider.js +58 -0
  187. package/providers/I18nProvider/index.d.ts +2 -0
  188. package/providers/I18nProvider/index.js +2 -0
  189. package/providers/I18nProvider/types.d.ts +16 -0
  190. package/providers/I18nProvider/types.js +1 -0
  191. package/providers/WidgetProvider/utils.d.ts +1 -1
  192. package/providers/WidgetProvider/utils.js +4 -4
  193. package/providers/index.d.ts +1 -0
  194. package/providers/index.js +1 -0
  195. package/stores/settings/types.d.ts +1 -0
  196. package/stores/settings/useSettingsStore.d.ts +2 -0
  197. package/tsconfig.cjs.tsbuildinfo +1 -1
  198. package/types/widget.d.ts +24 -7
  199. package/types/widget.js +7 -1
  200. package/utils/deepMerge.d.ts +1 -0
  201. package/utils/deepMerge.js +14 -0
  202. package/utils/index.d.ts +1 -0
  203. package/utils/index.js +1 -0
  204. package/utils/input.js +3 -1
  205. package/utils/navigationRoutes.d.ts +8 -7
  206. package/utils/navigationRoutes.js +10 -7
@@ -3,17 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.backButtonRoutes = exports.stickyHeaderRoutes = exports.navigationRoutesValues = exports.navigationRoutes = void 0;
4
4
  exports.navigationRoutes = {
5
5
  home: '/',
6
+ activeSwaps: 'active-swaps',
7
+ fromChain: 'from-chain',
8
+ fromToken: 'from-token',
6
9
  selectWallet: 'wallet',
7
10
  settings: 'settings',
8
- fromToken: 'from-token',
9
- toToken: 'to-token',
10
- fromChain: 'from-chain',
11
- toChain: 'to-chain',
12
- swapRoutes: 'swap-routes',
11
+ swapDetails: 'swap-details',
13
12
  swapExecution: 'swap-execution',
14
13
  swapHistory: 'swap-history',
15
- activeSwaps: 'active-swaps',
16
- swapDetails: 'swap-details',
14
+ swapRoutes: 'swap-routes',
15
+ toChain: 'to-chain',
16
+ toToken: 'to-token',
17
+ toTokenNative: 'to-token-native',
17
18
  };
18
19
  exports.navigationRoutesValues = Object.values(exports.navigationRoutes);
19
20
  exports.stickyHeaderRoutes = [
@@ -26,6 +27,7 @@ exports.stickyHeaderRoutes = [
26
27
  exports.navigationRoutes.swapHistory,
27
28
  exports.navigationRoutes.swapRoutes,
28
29
  exports.navigationRoutes.toChain,
30
+ exports.navigationRoutes.toTokenNative,
29
31
  ];
30
32
  exports.backButtonRoutes = [
31
33
  exports.navigationRoutes.activeSwaps,
@@ -39,4 +41,5 @@ exports.backButtonRoutes = [
39
41
  exports.navigationRoutes.swapRoutes,
40
42
  exports.navigationRoutes.toChain,
41
43
  exports.navigationRoutes.toToken,
44
+ exports.navigationRoutes.toTokenNative,
42
45
  ];
@@ -33,7 +33,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
33
33
  export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
34
34
  children?: import("react").ReactNode;
35
35
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
36
- color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
36
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
37
37
  disabled?: boolean | undefined;
38
38
  disableElevation?: boolean | undefined;
39
39
  disableFocusRipple?: boolean | undefined;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import type { BottomSheetBase, BottomSheetProps } from './types';
3
- export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "components" | "elementRef" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "elevation" | "PaperProps" | "ModalProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
3
+ export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "transitionDuration" | "variant" | "open" | "anchor" | "components" | "elementRef" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "slotProps" | "slots" | "elevation" | "PaperProps" | "ModalProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
@@ -15,9 +15,7 @@ export const ChainSelect = ({ formType }) => {
15
15
  name: [SwapFormKeyHelper.getChainKey(formType)],
16
16
  });
17
17
  const showAllChains = () => {
18
- navigate(navigationRoutes[`${formType}Chain`], {
19
- state: { formType },
20
- });
18
+ navigate(navigationRoutes[`${formType}Chain`]);
21
19
  };
22
20
  const chainsToHide = ((_a = chains === null || chains === void 0 ? void 0 : chains.length) !== null && _a !== void 0 ? _a : 0) - maxChainToOrder;
23
21
  return (_jsxs(ChainContainer, { children: [isLoading
@@ -1,7 +1,7 @@
1
1
  import type { EVMChain } from '@lifi/sdk';
2
2
  import type { SwapFormType } from '../../providers';
3
3
  export declare const useChainSelect: (formType: SwapFormType) => {
4
- chains: EVMChain[] | undefined;
4
+ chains: import("@lifi/sdk").ExtendedChain[] | undefined;
5
5
  getChains: () => EVMChain[];
6
6
  setCurrentChain: (chainId: number) => void;
7
7
  isLoading: boolean;
@@ -7,7 +7,7 @@ export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omi
7
7
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
8
8
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").HTMLAttributes<HTMLElement> | "key"> & {
9
9
  ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
10
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
11
  export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
12
12
  children?: import("react").ReactNode;
13
13
  component?: import("react").ElementType<any> | undefined;
@@ -18,3 +18,36 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
18
18
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
19
19
  sticky?: boolean | undefined;
20
20
  }, {}, {}>;
21
+ export declare const WalletButton: import("@emotion/styled").StyledComponent<{
22
+ children?: import("react").ReactNode;
23
+ classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
24
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
25
+ disabled?: boolean | undefined;
26
+ disableElevation?: boolean | undefined;
27
+ disableFocusRipple?: boolean | undefined;
28
+ endIcon?: import("react").ReactNode;
29
+ fullWidth?: boolean | undefined;
30
+ href?: string | undefined;
31
+ size?: "small" | "medium" | "large" | undefined;
32
+ startIcon?: import("react").ReactNode;
33
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
34
+ variant?: "text" | "outlined" | "contained" | undefined;
35
+ } & Omit<{
36
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
37
+ centerRipple?: boolean | undefined;
38
+ children?: import("react").ReactNode;
39
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
40
+ disabled?: boolean | undefined;
41
+ disableRipple?: boolean | undefined;
42
+ disableTouchRipple?: boolean | undefined;
43
+ focusRipple?: boolean | undefined;
44
+ focusVisibleClassName?: string | undefined;
45
+ LinkComponent?: import("react").ElementType<any> | undefined;
46
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
47
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
48
+ tabIndex?: number | undefined;
49
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
50
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
51
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
52
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
53
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,4 +1,5 @@
1
- import { AppBar, Box } from '@mui/material';
1
+ import { AppBar, Box, Button } from '@mui/material';
2
+ import { buttonClasses } from '@mui/material/Button';
2
3
  import { alpha, styled } from '@mui/material/styles';
3
4
  export const HeaderAppBar = styled(AppBar)(({ theme }) => ({
4
5
  backgroundColor: 'transparent',
@@ -22,3 +23,20 @@ export const Container = styled(Box, {
22
23
  top: 0,
23
24
  zIndex: 1200,
24
25
  }));
26
+ export const WalletButton = styled(Button)(({ theme }) => ({
27
+ color: theme.palette.text.primary,
28
+ backgroundColor: 'transparent',
29
+ padding: theme.spacing(1, 1.5),
30
+ maxHeight: 40,
31
+ fontSize: '0.875rem',
32
+ fontWeight: 600,
33
+ borderRadius: theme.shape.borderRadius * 2,
34
+ '&:hover': {
35
+ backgroundColor: theme.palette.mode === 'light'
36
+ ? alpha(theme.palette.common.black, 0.04)
37
+ : alpha(theme.palette.common.white, 0.08),
38
+ },
39
+ [`.${buttonClasses.endIcon} > *:nth-of-type(1)`]: {
40
+ fontSize: '24px',
41
+ },
42
+ }));
@@ -4,12 +4,13 @@ import { Box, IconButton, Tooltip, Typography } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Route, Routes, useLocation } from 'react-router-dom';
6
6
  import { useNavigateBack } from '../../hooks';
7
- import { useWallet } from '../../providers';
7
+ import { useWallet, useWidgetConfig } from '../../providers';
8
8
  import { backButtonRoutes, navigationRoutes, navigationRoutesValues, } from '../../utils';
9
9
  import { HeaderAppBar } from './Header.style';
10
10
  import { useHeaderActionStore } from './useHeaderActionStore';
11
11
  export const NavigationHeader = () => {
12
12
  const { t } = useTranslation();
13
+ const { variant } = useWidgetConfig();
13
14
  const { navigate, navigateBack } = useNavigateBack();
14
15
  const { account } = useWallet();
15
16
  const { element } = useHeaderActionStore();
@@ -33,6 +34,7 @@ export const NavigationHeader = () => {
33
34
  return t(`header.to`);
34
35
  case navigationRoutes.fromChain:
35
36
  case navigationRoutes.toChain:
37
+ case navigationRoutes.toTokenNative:
36
38
  return t(`header.selectChain`);
37
39
  case navigationRoutes.swapRoutes:
38
40
  return t(`header.routes`);
@@ -43,8 +45,10 @@ export const NavigationHeader = () => {
43
45
  case navigationRoutes.swapDetails:
44
46
  return t(`header.swapDetails`);
45
47
  default:
46
- return t(`header.swap`);
48
+ return variant !== 'refuel' ? t(`header.swap`) : t(`header.gas`);
47
49
  }
48
50
  };
49
- return (_jsxs(HeaderAppBar, Object.assign({ elevation: 0 }, { children: [backButtonRoutes.includes(path) ? (_jsx(IconButton, Object.assign({ size: "medium", edge: "start", onClick: navigateBack }, { children: _jsx(ArrowBackIcon, {}) }))) : null, _jsx(Typography, Object.assign({ fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), _jsxs(Routes, { children: [_jsx(Route, { path: navigationRoutes.home, element: _jsxs(_Fragment, { children: [account.isActive ? (_jsx(Tooltip, Object.assign({ title: t(`header.swapHistory`), enterDelay: 400, arrow: true }, { children: _jsx(IconButton, Object.assign({ size: "medium", edge: "start", onClick: () => navigate(navigationRoutes.swapHistory) }, { children: _jsx(HistoryIcon, {}) })) }))) : null, _jsx(Tooltip, Object.assign({ title: t(`header.settings`), enterDelay: 400, arrow: true }, { children: _jsx(IconButton, Object.assign({ size: "medium", edge: "end", onClick: () => navigate(navigationRoutes.settings) }, { children: _jsx(SettingsIcon, {}) })) }))] }) }), _jsx(Route, { path: "*", element: element || _jsx(Box, { width: 28, height: 40 }) })] })] })));
51
+ return (_jsxs(HeaderAppBar, Object.assign({ elevation: 0 }, { children: [backButtonRoutes.includes(path) ? (_jsx(IconButton, Object.assign({ size: "medium", edge: "start", onClick: navigateBack }, { children: _jsx(ArrowBackIcon, {}) }))) : null, _jsx(Typography, Object.assign({ fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true }, { children: handleHeaderTitle() })), _jsxs(Routes, { children: [_jsx(Route, { path: navigationRoutes.home, element: _jsxs(_Fragment, { children: [account.isActive ? (_jsx(Tooltip, Object.assign({ title: t(`header.swapHistory`), enterDelay: 400, arrow: true }, { children: _jsx(IconButton, Object.assign({ size: "medium", edge: "start", onClick: () => navigate(navigationRoutes.swapHistory) }, { children: _jsx(HistoryIcon, {}) })) }))) : null, _jsx(Tooltip, Object.assign({ title: t(`header.settings`), enterDelay: 400, arrow: true }, { children: _jsx(IconButton, Object.assign({ size: "medium", onClick: () => navigate(navigationRoutes.settings), sx: {
52
+ marginRight: -1.25,
53
+ } }, { children: _jsx(SettingsIcon, {}) })) }))] }) }), _jsx(Route, { path: "*", element: element || _jsx(Box, { width: 28, height: 40 }) })] })] })));
50
54
  };
@@ -8,24 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
- import { Logout as LogoutIcon, WalletOutlined as WalletOutlinedIcon, } from '@mui/icons-material';
12
- import { Box, IconButton, Typography } from '@mui/material';
11
+ import { ContentCopy as ContentCopyIcon, ExpandMore as ExpandMoreIcon, PowerSettingsNew as PowerSettingsIcon, WalletOutlined as WalletOutlinedIcon, } from '@mui/icons-material';
12
+ import { Avatar, MenuItem } from '@mui/material';
13
+ import { useState } from 'react';
13
14
  import { useTranslation } from 'react-i18next';
14
15
  import { useLocation, useNavigate } from 'react-router-dom';
16
+ import { useChain } from '../../hooks';
15
17
  import { useWallet, useWidgetConfig } from '../../providers';
16
18
  import { navigationRoutes, shortenWalletAddress } from '../../utils';
17
- import { HeaderAppBar } from './Header.style';
19
+ import { Menu } from '../Menu';
20
+ import { HeaderAppBar, WalletButton } from './Header.style';
18
21
  export const WalletHeader = () => {
19
- const { t } = useTranslation();
20
- const { account, disconnect } = useWallet();
21
- const walletAddress = shortenWalletAddress(account.address);
22
- return (_jsx(HeaderAppBar, Object.assign({ elevation: 0 }, { children: walletAddress ? (_jsxs(_Fragment, { children: [_jsxs(Box, Object.assign({ sx: {
23
- display: 'flex',
24
- flex: 1,
25
- flexDirection: 'column',
26
- }, mr: 0.5 }, { children: [_jsx(Typography, Object.assign({ variant: "caption", align: "right" }, { children: t(`header.walletConnected`) })), _jsx(Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600" }, { children: walletAddress }))] })), _jsx(IconButton, Object.assign({ size: "medium", edge: "end", onClick: disconnect }, { children: _jsx(LogoutIcon, {}) }))] })) : (_jsxs(_Fragment, { children: [_jsx(Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600", flex: 1, mr: 0.5 }, { children: t(`header.connectWallet`) })), _jsx(ConnectButton, {})] })) })));
22
+ const { account } = useWallet();
23
+ return (_jsx(HeaderAppBar, Object.assign({ elevation: 0, sx: { justifyContent: 'flex-end' } }, { children: account.isActive ? _jsx(ConnectedButton, {}) : _jsx(ConnectButton, {}) })));
27
24
  };
28
25
  const ConnectButton = () => {
26
+ const { t } = useTranslation();
29
27
  const { pathname } = useLocation();
30
28
  const config = useWidgetConfig();
31
29
  const { connect: walletConnect } = useWallet();
@@ -37,5 +35,32 @@ const ConnectButton = () => {
37
35
  }
38
36
  navigate(navigationRoutes.selectWallet);
39
37
  });
40
- return (_jsx(IconButton, Object.assign({ size: "medium", edge: "end", onClick: !pathname.includes(navigationRoutes.selectWallet) ? connect : undefined }, { children: _jsx(WalletOutlinedIcon, {}) })));
38
+ return (_jsx(WalletButton, Object.assign({ endIcon: _jsx(WalletOutlinedIcon, {}), onClick: !pathname.includes(navigationRoutes.selectWallet) ? connect : undefined, sx: {
39
+ marginRight: -1.25,
40
+ } }, { children: t(`button.connectWallet`) })));
41
+ };
42
+ const ConnectedButton = () => {
43
+ const { t } = useTranslation();
44
+ const { account, disconnect } = useWallet();
45
+ const walletAddress = shortenWalletAddress(account.address);
46
+ const { chain } = useChain(account.chainId);
47
+ const [anchorEl, setAnchorEl] = useState(null);
48
+ const handleClick = (event) => {
49
+ setAnchorEl(event.currentTarget);
50
+ };
51
+ const handleClose = () => {
52
+ setAnchorEl(null);
53
+ };
54
+ const handleDisconnect = () => {
55
+ disconnect();
56
+ handleClose();
57
+ };
58
+ const handleCopyAddress = () => __awaiter(void 0, void 0, void 0, function* () {
59
+ var _a;
60
+ yield navigator.clipboard.writeText((_a = account.address) !== null && _a !== void 0 ? _a : '');
61
+ handleClose();
62
+ });
63
+ return (_jsxs(_Fragment, { children: [_jsx(WalletButton, Object.assign({ endIcon: _jsx(ExpandMoreIcon, {}), startIcon: _jsx(Avatar, Object.assign({ src: chain === null || chain === void 0 ? void 0 : chain.logoURI, alt: chain === null || chain === void 0 ? void 0 : chain.key, sx: { width: 24, height: 24 } }, { children: chain === null || chain === void 0 ? void 0 : chain.name[0] })), sx: {
64
+ marginRight: -1.25,
65
+ }, onClick: handleClick }, { children: walletAddress })), _jsxs(Menu, Object.assign({ elevation: 2, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose }, { children: [_jsxs(MenuItem, Object.assign({ onClick: handleCopyAddress, disableRipple: true, dense: true }, { children: [_jsx(ContentCopyIcon, {}), t(`button.copyAddress`)] })), _jsxs(MenuItem, Object.assign({ onClick: handleDisconnect, disableRipple: true, dense: true }, { children: [_jsx(PowerSettingsIcon, {}), t(`button.disconnectWallet`)] }))] }))] }));
41
66
  };
@@ -0,0 +1 @@
1
+ export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,21 @@
1
+ import { Menu as MuiMenu } from '@mui/material';
2
+ import { menuClasses } from '@mui/material/Menu';
3
+ import { menuItemClasses } from '@mui/material/MenuItem';
4
+ import { styled } from '@mui/material/styles';
5
+ import { svgIconClasses } from '@mui/material/SvgIcon';
6
+ export const Menu = styled(MuiMenu)(({ theme }) => ({
7
+ [`& .${menuClasses.paper}`]: {
8
+ borderRadius: theme.shape.borderRadiusSecondary,
9
+ color: theme.palette.text.primary,
10
+ [`& .${menuClasses.list}`]: {
11
+ padding: theme.spacing(0.5, 0),
12
+ },
13
+ [`& .${menuItemClasses.root}`]: {
14
+ [`& .${svgIconClasses.root}`]: {
15
+ fontSize: 18,
16
+ color: theme.palette.text.primary,
17
+ marginRight: theme.spacing(1.5),
18
+ },
19
+ },
20
+ },
21
+ }));
@@ -9,4 +9,4 @@ export declare const Link: import("@emotion/styled").StyledComponent<Omit<import
9
9
  variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
10
10
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
11
11
  ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
12
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "underline" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
+ }, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "underline" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -2,7 +2,7 @@
2
2
  export declare const IconButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
5
- color?: "inherit" | "default" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "default" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
@@ -3,9 +3,11 @@ import { Box, useMediaQuery } from '@mui/material';
3
3
  import { useWatch } from 'react-hook-form';
4
4
  import { ReverseTokensButton } from '../components/ReverseTokensButton';
5
5
  import { SelectTokenButton } from '../components/SelectTokenButton';
6
- import { SwapFormKey } from '../providers';
6
+ import { SwapFormKey, useWidgetConfig } from '../providers';
7
+ import { DisabledUI } from '../types';
7
8
  export const SelectChainAndToken = (props) => {
8
9
  const prefersNarrowView = useMediaQuery((theme) => theme.breakpoints.down('sm'));
10
+ const { disabledUI, variant } = useWidgetConfig();
9
11
  const [fromChain, toChain, fromToken, toToken] = useWatch({
10
12
  name: [
11
13
  SwapFormKey.FromChain,
@@ -14,6 +16,9 @@ export const SelectChainAndToken = (props) => {
14
16
  SwapFormKey.ToToken,
15
17
  ],
16
18
  });
19
+ const disabledReverse = variant === 'refuel' ||
20
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.FromToken)) ||
21
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToToken));
17
22
  const isCompact = fromChain && toChain && fromToken && toToken && !prefersNarrowView;
18
- return (_jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [_jsx(SelectTokenButton, { formType: "from", compact: isCompact }), _jsx(Box, Object.assign({ sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, m: -1.25 }, { children: _jsx(ReverseTokensButton, { vertical: !isCompact }) })), _jsx(SelectTokenButton, { formType: "to", compact: isCompact })] })));
23
+ return (_jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [_jsx(SelectTokenButton, { formType: "from", compact: isCompact }), _jsx(Box, Object.assign({ sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, m: !disabledReverse ? -1.25 : 1 }, { children: !disabledReverse ? (_jsx(ReverseTokensButton, { vertical: !isCompact })) : null })), _jsx(SelectTokenButton, { formType: "to", compact: isCompact })] })));
19
24
  };
@@ -5,7 +5,7 @@ import { useWatch } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { useNavigate } from 'react-router-dom';
7
7
  import { useChain, useToken } from '../../hooks';
8
- import { SwapFormKeyHelper } from '../../providers';
8
+ import { SwapFormKeyHelper, useWidgetConfig } from '../../providers';
9
9
  import { navigationRoutes } from '../../utils';
10
10
  import { Card, CardTitle } from '../Card';
11
11
  import { TokenAvatar } from '../TokenAvatar';
@@ -13,19 +13,24 @@ import { SelectTokenCardHeader } from './SelectTokenButton.style';
13
13
  export const SelectTokenButton = ({ formType, compact }) => {
14
14
  const { t } = useTranslation();
15
15
  const navigate = useNavigate();
16
+ const { disabledUI, variant } = useWidgetConfig();
17
+ const tokenKey = SwapFormKeyHelper.getTokenKey(formType);
16
18
  const [chainId, tokenAddress] = useWatch({
17
- name: [
18
- SwapFormKeyHelper.getChainKey(formType),
19
- SwapFormKeyHelper.getTokenKey(formType),
20
- ],
19
+ name: [SwapFormKeyHelper.getChainKey(formType), tokenKey],
21
20
  });
22
21
  const { chain, isLoading: isChainLoading } = useChain(chainId);
23
22
  const { token, isLoading: isTokenLoading } = useToken(chainId, tokenAddress);
24
23
  const handleClick = () => {
25
24
  navigate(formType === 'from'
26
25
  ? navigationRoutes.fromToken
27
- : navigationRoutes.toToken);
26
+ : variant === 'refuel'
27
+ ? navigationRoutes.toTokenNative
28
+ : navigationRoutes.toToken);
28
29
  };
29
30
  const isSelected = !!(chain && token);
30
- return (_jsxs(Card, Object.assign({ flex: 1, onClick: handleClick }, { children: [_jsx(CardTitle, { children: t(`swap.${formType}`) }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? (_jsx(SelectTokenCardHeader, { avatar: _jsx(Skeleton, { variant: "circular", width: 32, height: 32 }), title: _jsx(Skeleton, { variant: "text", width: 64, height: 24 }), subheader: _jsx(Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : (_jsx(SelectTokenCardHeader, { avatar: isSelected ? _jsx(TokenAvatar, { token: token }) : null, action: !compact ? _jsx(KeyboardArrowRightIcon, {}) : null, title: isSelected ? token.symbol : t(`swap.selectChainAndToken`), subheader: isSelected ? `on ${chain.name}` : null, selected: isSelected, compact: compact }))] })));
31
+ const onClick = !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(tokenKey)) ? handleClick : undefined;
32
+ const defaultTitle = formType === 'to' && variant === 'refuel'
33
+ ? t(`header.selectChain`)
34
+ : t(`swap.selectChainAndToken`);
35
+ return (_jsxs(Card, Object.assign({ flex: 1, onClick: onClick }, { children: [_jsx(CardTitle, { children: t(`swap.${formType}`) }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? (_jsx(SelectTokenCardHeader, { avatar: _jsx(Skeleton, { variant: "circular", width: 32, height: 32 }), title: _jsx(Skeleton, { variant: "text", width: 64, height: 24 }), subheader: _jsx(Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : (_jsx(SelectTokenCardHeader, { avatar: isSelected ? _jsx(TokenAvatar, { token: token, chain: chain }) : null, action: !compact ? _jsx(KeyboardArrowRightIcon, {}) : null, title: isSelected ? token.symbol : defaultTitle, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
31
36
  };
@@ -12,8 +12,9 @@ export const SelectTokenCardHeader = styled(CardHeader, {
12
12
  textOverflow: 'ellipsis',
13
13
  whiteSpace: 'nowrap',
14
14
  overflow: 'hidden',
15
- width: compact ? 92 : 224,
15
+ width: compact ? (selected ? 92 : 142) : 224,
16
16
  fontWeight: selected ? 500 : 400,
17
+ fontSize: compact && !selected ? '1rem' : '1.125rem',
17
18
  },
18
19
  [`.${cardHeaderClasses.subheader}`]: {
19
20
  textOverflow: 'ellipsis',
@@ -13,18 +13,23 @@ import { Collapse, FormHelperText } from '@mui/material';
13
13
  import { forwardRef, useEffect } from 'react';
14
14
  import { useFormContext, useFormState } from 'react-hook-form';
15
15
  import { useTranslation } from 'react-i18next';
16
- import { SwapFormKey, useWallet } from '../../providers';
16
+ import { SwapFormKey, useWallet, useWidgetConfig } from '../../providers';
17
+ import { DisabledUI } from '../../types';
17
18
  import { Card, CardTitle } from '../Card';
18
19
  import { FormControl, Input } from './SendToWallet.style';
19
20
  import { useSendToWalletStore } from './store';
20
21
  export const SendToWallet = forwardRef((props, ref) => {
21
22
  const { t } = useTranslation();
23
+ const { disabledUI } = useWidgetConfig();
22
24
  const showSendToWallet = useSendToWalletStore((state) => state.showSendToWallet);
23
25
  const { account, provider } = useWallet();
24
26
  const { register, trigger } = useFormContext();
25
27
  useEffect(() => {
26
28
  trigger(SwapFormKey.ToAddress);
27
29
  }, [account.chainId, trigger]);
30
+ if (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToAddress)) {
31
+ return null;
32
+ }
28
33
  const { onChange, onBlur, name, ref: inputRef, } = register(SwapFormKey.ToAddress, {
29
34
  validate: (value) => __awaiter(void 0, void 0, void 0, function* () {
30
35
  try {
@@ -2,7 +2,7 @@
2
2
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
5
- color?: "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  error?: boolean | undefined;
8
8
  fullWidth?: boolean | undefined;
@@ -3,16 +3,20 @@ import { WalletOutlined as WalletOutlinedIcon } from '@mui/icons-material';
3
3
  import { Button, Tooltip } from '@mui/material';
4
4
  import { useFormContext } from 'react-hook-form';
5
5
  import { useTranslation } from 'react-i18next';
6
- import { SwapFormKey, useWallet } from '../../providers';
6
+ import { SwapFormKey, useWallet, useWidgetConfig } from '../../providers';
7
7
  import { useSettings } from '../../stores';
8
+ import { DisabledUI } from '../../types';
8
9
  import { useSendToWalletStore } from './store';
9
10
  export const SendToWalletButton = () => {
10
11
  const { t } = useTranslation();
12
+ const { disabledUI } = useWidgetConfig();
11
13
  const { account } = useWallet();
12
14
  const { setValue } = useFormContext();
13
15
  const { showDestinationWallet } = useSettings(['showDestinationWallet']);
14
16
  const { showSendToWallet, toggleSendToWallet } = useSendToWalletStore();
15
- if (!showDestinationWallet || !account.isActive) {
17
+ if (!showDestinationWallet ||
18
+ !account.isActive ||
19
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToAddress))) {
16
20
  return null;
17
21
  }
18
22
  const handleClick = () => {