@velora-dex/widget 0.1.3 → 0.2.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.
- package/dist/_virtual/index.js +1 -1
- package/dist/components/ui/accordion.d.ts +3 -1
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +42 -27
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/web3/AccountButton.d.ts.map +1 -1
- package/dist/components/web3/AccountButton.js +24 -27
- package/dist/components/web3/AccountButton.js.map +1 -1
- package/dist/components/web3/ConnectExternalProvider/AutoconnectExternal.js.map +1 -1
- package/dist/components/web3/ConnectWallets/WalletConnectButtons.js.map +1 -1
- package/dist/components/web3/ConnectWallets/index.js +43 -35
- package/dist/components/web3/ConnectWallets/index.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/button.js.map +1 -1
- package/dist/components/web3/ConnectWallets/privy/iframe.js.map +1 -1
- package/dist/components/web3/ConnectWallets/walletIcons.js.map +1 -1
- package/dist/components/web3/ConnectedWallet/ConnectedWallet.d.ts.map +1 -1
- package/dist/components/web3/ConnectedWallet/ConnectedWallet.js +103 -133
- package/dist/components/web3/ConnectedWallet/ConnectedWallet.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/Activities.js +4 -12
- package/dist/components/widget/AppHeader/Activities/Activities.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/ActivityItems.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/Drawers.js.map +1 -1
- package/dist/components/widget/AppHeader/Activities/hooks.js.map +1 -1
- package/dist/components/widget/AppHeader/ActivityButton.js.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.d.ts.map +1 -1
- package/dist/components/widget/AppHeader/AppHeader.js +39 -33
- package/dist/components/widget/AppHeader/AppHeader.js.map +1 -1
- package/dist/components/widget/AppHeader/TradeModeSwitcher.js.map +1 -1
- package/dist/components/widget/Details/DetailWithValueList.js.map +1 -1
- package/dist/components/widget/Details/DetailWithValueListExpandable.js.map +1 -1
- package/dist/components/widget/DexesList/DexItem.js.map +1 -1
- package/dist/components/widget/DexesList/DexesList.js +3 -14
- package/dist/components/widget/DexesList/DexesList.js.map +1 -1
- package/dist/components/widget/Dialog/DialogRoot.js.map +1 -1
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressDialog.js +131 -115
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressDialog.js.map +1 -1
- package/dist/components/widget/Dialog/ReceiverAddressDialog/ReceiverAddressInput.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/SelectTokenDialog.js +4 -12
- package/dist/components/widget/Dialog/SelectTokenDialog/SelectTokenDialog.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/AcrossTokenList.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/RegularTokenList.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenCloud/index.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenListBody/TokenListRow.js.map +1 -1
- package/dist/components/widget/Dialog/SelectTokenDialog/TokenSearch.js.map +1 -1
- package/dist/components/widget/Dialog/state/dialogAtom.js +24 -26
- package/dist/components/widget/Dialog/state/dialogAtom.js.map +1 -1
- package/dist/components/widget/Drawer/Overlay.js.map +1 -1
- package/dist/components/widget/Drawer/index.d.ts.map +1 -1
- package/dist/components/widget/Drawer/index.js +119 -54
- package/dist/components/widget/Drawer/index.js.map +1 -1
- package/dist/components/widget/Drawer/state/useDrawerControls.js.map +1 -1
- package/dist/components/widget/ImportToken/ImportToken.js.map +1 -1
- package/dist/components/widget/ImportToken/useImportTokenDrawer.js.map +1 -1
- package/dist/components/widget/LimitOrdersDrawer/LimitOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/LimitOrdersDrawer/LimitOrderDetails/LimitOrderDetails.js.map +1 -1
- package/dist/components/widget/LimitOrdersDrawer/LimitOrderListItem.js +84 -66
- package/dist/components/widget/LimitOrdersDrawer/LimitOrderListItem.js.map +1 -1
- package/dist/components/widget/LimitPriceInput/index.js.map +1 -1
- package/dist/components/widget/Line/Line.js.map +1 -1
- package/dist/components/widget/NetworkIcon/NetworkIconSquare.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/CompactNetworkSwitcher.js.map +1 -1
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherDropdown.js +28 -30
- package/dist/components/widget/NetworkSwitcher/NetworkSwitcherDropdown.js.map +1 -1
- package/dist/components/widget/NetworkWithIcon/NetworkIconWithChevron.js.map +1 -1
- package/dist/components/widget/NetworkWithIcon/NetworkWithIcon.js.map +1 -1
- package/dist/components/widget/OrderExpiryInput/index.js.map +1 -1
- package/dist/components/widget/OtcOrdersDrawer/OtcOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/OtcOrdersDrawer/OtcOrderDetails/OtcOrderDetails.js.map +1 -1
- package/dist/components/widget/OtcOrdersDrawer/OtcOrderListItem.js.map +1 -1
- package/dist/components/widget/PayReceiveInfo/PayReceiveInfo.js.map +1 -1
- package/dist/components/widget/ReceiverAddress/ReceiverAddress.js.map +1 -1
- package/dist/components/widget/ReceiverAddress/state/receiverAddressAtom.js.map +1 -1
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcControls.js.map +1 -1
- package/dist/components/widget/ReviewAndConfirm/FillOtcReviewAndConfirm/FillOtcReviewAndConfirm.js.map +1 -1
- package/dist/components/widget/SelectToken/SelectTokenButton.d.ts.map +1 -1
- package/dist/components/widget/SelectToken/SelectTokenButton.js +51 -51
- package/dist/components/widget/SelectToken/SelectTokenButton.js.map +1 -1
- package/dist/components/widget/SelectToken/types.d.ts +1 -1
- package/dist/components/widget/SelectToken/types.d.ts.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/SwapModeSwitcherExpandable.js.map +1 -1
- package/dist/components/widget/SwapModeSwitcher/state/swapSideAtom.js.map +1 -1
- package/dist/components/widget/SwapRate/SwapRate.js +75 -43
- package/dist/components/widget/SwapRate/SwapRate.js.map +1 -1
- package/dist/components/widget/Tabs/Tabs.js.map +1 -1
- package/dist/components/widget/Toasts/CustomToast.js.map +1 -1
- package/dist/components/widget/TokenBadge/TokenBadge.js.map +1 -1
- package/dist/components/widget/TokenInput/index.d.ts.map +1 -1
- package/dist/components/widget/TokenInput/index.js +107 -148
- package/dist/components/widget/TokenInput/index.js.map +1 -1
- package/dist/components/widget/TokenSwitcher/TokenSwitcher.js.map +1 -1
- package/dist/components/widget/TradeOverview/Step/Step.js.map +1 -1
- package/dist/components/widget/TradeOverview/Stepper.js +23 -38
- package/dist/components/widget/TradeOverview/Stepper.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteFooter.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteHeader.js +36 -27
- package/dist/components/widget/TradeOverview/TradeComplete/TradeCompleteHeader.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeComplete/useTradeCompleteDetails.js +79 -36
- package/dist/components/widget/TradeOverview/TradeComplete/useTradeCompleteDetails.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeDetailsDisplay.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverview.d.ts +3 -0
- package/dist/components/widget/TradeOverview/TradeOverview.d.ts.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverview.js.map +1 -1
- package/dist/components/widget/TradeOverview/TradeOverviewFooter.js.map +1 -1
- package/dist/components/widget/TradeOverview/tradeFlowContext.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/SlippageParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/SlippageParameter/hooks/useCustomSlippageProps.js.map +1 -1
- package/dist/components/widget/TradeParameters/TradeParameters.js.map +1 -1
- package/dist/components/widget/TradeParameters/TransactionSpeedParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/hooks/useIsNotDefaultAnyParameter.js.map +1 -1
- package/dist/components/widget/TradeParameters/state/gasPresetParamAtom.js.map +1 -1
- package/dist/components/widget/TradeParameters/useTempTradeParameters.js.map +1 -1
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/Controls.js.map +1 -1
- package/dist/components/widget/TransactionDetails/LimitOrderDetails/TransactionDetails.js.map +1 -1
- package/dist/components/widget/TransactionDetails/TransactionListItem.js +57 -38
- package/dist/components/widget/TransactionDetails/TransactionListItem.js.map +1 -1
- package/dist/components/widget/Warning/InsufficientBalanceMessage.js.map +1 -1
- package/dist/components/widget/Warning/Warning.js.map +1 -1
- package/dist/components/widget/Warning/WarningMessage.js.map +1 -1
- package/dist/components/widget/WrapEth/WrapEthContent.js.map +1 -1
- package/dist/components/widget/WrapEth/WrapEthDrawerButton.d.ts.map +1 -1
- package/dist/components/widget/WrapEth/WrapEthDrawerButton.js +72 -90
- package/dist/components/widget/WrapEth/WrapEthDrawerButton.js.map +1 -1
- package/dist/components/widget/WrapEth/hooks/useWrapEthProps.d.ts.map +1 -1
- package/dist/components/widget/WrapEth/hooks/useWrapEthProps.js +141 -84
- package/dist/components/widget/WrapEth/hooks/useWrapEthProps.js.map +1 -1
- package/dist/components/widget/YouGet/YouGet.js.map +1 -1
- package/dist/configurator/Configurator.d.ts.map +1 -1
- package/dist/configurator/components/AllowNoUsdPricesSwitcher.d.ts +5 -0
- package/dist/configurator/components/AllowNoUsdPricesSwitcher.d.ts.map +1 -0
- package/dist/configurator/components/CrossChainSwitcher.d.ts +5 -0
- package/dist/configurator/components/CrossChainSwitcher.d.ts.map +1 -0
- package/dist/configurator/components/DeltaSwitcher.d.ts +5 -0
- package/dist/configurator/components/DeltaSwitcher.d.ts.map +1 -0
- package/dist/configurator/components/DevTools.d.ts +7 -0
- package/dist/configurator/components/DevTools.d.ts.map +1 -0
- package/dist/configurator/components/EnabledChainsSelector.d.ts +8 -0
- package/dist/configurator/components/EnabledChainsSelector.d.ts.map +1 -0
- package/dist/configurator/components/FormPropsInputs.d.ts +6 -0
- package/dist/configurator/components/FormPropsInputs.d.ts.map +1 -0
- package/dist/configurator/components/PanelHeader.d.ts +6 -0
- package/dist/configurator/components/PanelHeader.d.ts.map +1 -0
- package/dist/configurator/components/PartnerInput.d.ts +5 -0
- package/dist/configurator/components/PartnerInput.d.ts.map +1 -0
- package/dist/configurator/components/PrivyInputs.d.ts +7 -0
- package/dist/configurator/components/PrivyInputs.d.ts.map +1 -0
- package/dist/configurator/components/ThemeSwitcher.d.ts +6 -0
- package/dist/configurator/components/ThemeSwitcher.d.ts.map +1 -0
- package/dist/configurator/components/TokenListsInput.d.ts +5 -0
- package/dist/configurator/components/TokenListsInput.d.ts.map +1 -0
- package/dist/configurator/components/TradeModesSelector.d.ts +7 -0
- package/dist/configurator/components/TradeModesSelector.d.ts.map +1 -0
- package/dist/configurator/components/WidgetModeSwitcher.d.ts +5 -0
- package/dist/configurator/components/WidgetModeSwitcher.d.ts.map +1 -0
- package/dist/configurator/components/common/DetailWithTooltip.d.ts +3 -0
- package/dist/configurator/components/common/DetailWithTooltip.d.ts.map +1 -0
- package/dist/configurator/components/common/Input.d.ts +8 -0
- package/dist/configurator/components/common/Input.d.ts.map +1 -0
- package/dist/configurator/components/common/Switch.d.ts +12 -0
- package/dist/configurator/components/common/Switch.d.ts.map +1 -0
- package/dist/configurator/state/themeAtom.d.ts +3 -0
- package/dist/configurator/state/themeAtom.d.ts.map +1 -0
- package/dist/core/ConnectWalletDrawerButton.d.ts.map +1 -1
- package/dist/core/ConnectWalletDrawerButton.js +73 -64
- package/dist/core/ConnectWalletDrawerButton.js.map +1 -1
- package/dist/core/LimitOrderButton.js.map +1 -1
- package/dist/core/LimitOrderDetails.js.map +1 -1
- package/dist/core/OtcOrderButton.d.ts.map +1 -1
- package/dist/core/OtcOrderButton.js +4 -1
- package/dist/core/OtcOrderButton.js.map +1 -1
- package/dist/core/OtcOrderDetails.js.map +1 -1
- package/dist/core/Toaster.js.map +1 -1
- package/dist/core/TradeFlowButton.d.ts.map +1 -1
- package/dist/core/TradeFlowButton.js +414 -621
- package/dist/core/TradeFlowButton.js.map +1 -1
- package/dist/core/Updaters.js.map +1 -1
- package/dist/core/Warnings.js.map +1 -1
- package/dist/core/button/hooks/useWidgetButtonExtraProps.d.ts +1 -0
- package/dist/core/button/hooks/useWidgetButtonExtraProps.d.ts.map +1 -1
- package/dist/core/button/hooks/useWidgetButtonExtraProps.js +85 -49
- package/dist/core/button/hooks/useWidgetButtonExtraProps.js.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +98 -90
- package/dist/core/index.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenFromInputProps.d.ts.map +1 -1
- package/dist/core/inputs/hooks/useTokenFromInputProps.js +83 -54
- package/dist/core/inputs/hooks/useTokenFromInputProps.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenSwitcherProps.js.map +1 -1
- package/dist/core/inputs/hooks/useTokenToInputProps.js +20 -28
- package/dist/core/inputs/hooks/useTokenToInputProps.js.map +1 -1
- package/dist/core/inputs/state/common.d.ts +2 -2
- package/dist/core/inputs/state/common.js.map +1 -1
- package/dist/core/inputs/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/inputs/state/setTokenByAddressAtom.d.ts +1 -14
- package/dist/core/inputs/state/setTokenByAddressAtom.d.ts.map +1 -1
- package/dist/core/inputs/state/setTokenByAddressAtom.js.map +1 -1
- package/dist/core/inputs/state/types.d.ts +15 -0
- package/dist/core/inputs/state/types.d.ts.map +1 -0
- package/dist/core/limit/state/deadlineAtom.js.map +1 -1
- package/dist/core/limit/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/limit/useLimitDetailsListProps.js.map +1 -1
- package/dist/core/limit/useLimitNotSupported.js +12 -1
- package/dist/core/limit/useLimitNotSupported.js.map +1 -1
- package/dist/core/limit/useLimitPriceDifference.js.map +1 -1
- package/dist/core/limit/useLimitPriceInputProps.js.map +1 -1
- package/dist/core/limit/useLimitRate.js.map +1 -1
- package/dist/core/limit/useLimitTokenFromInputProps.d.ts.map +1 -1
- package/dist/core/limit/useLimitTokenFromInputProps.js +69 -52
- package/dist/core/limit/useLimitTokenFromInputProps.js.map +1 -1
- package/dist/core/limit/useLimitTokenSwitcherProps.js.map +1 -1
- package/dist/core/limit/useLimitTokenToInputProps.js.map +1 -1
- package/dist/core/logger.js +12 -14
- package/dist/core/logger.js.map +1 -1
- package/dist/core/otc/state/deadlineAtom.js.map +1 -1
- package/dist/core/otc/state/receiverAddressAtom.js.map +1 -1
- package/dist/core/otc/state/selectedTokenAtom.js.map +1 -1
- package/dist/core/otc/useOtcDetailsListProps.js.map +1 -1
- package/dist/core/otc/useOtcNotSupported.js +12 -1
- package/dist/core/otc/useOtcNotSupported.js.map +1 -1
- package/dist/core/otc/useOtcPriceDifference.js.map +1 -1
- package/dist/core/otc/useOtcPriceInputProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenFromInputProps.d.ts.map +1 -1
- package/dist/core/otc/useOtcTokenFromInputProps.js +69 -52
- package/dist/core/otc/useOtcTokenFromInputProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenSwitcherProps.js.map +1 -1
- package/dist/core/otc/useOtcTokenToInputProps.js.map +1 -1
- package/dist/core/state/chainToAtom.js.map +1 -1
- package/dist/core/state/configActionsAtom.d.ts.map +1 -1
- package/dist/core/state/configActionsAtom.js +3 -1
- package/dist/core/state/configActionsAtom.js.map +1 -1
- package/dist/core/state/configAtom.d.ts +5 -3
- package/dist/core/state/configAtom.d.ts.map +1 -1
- package/dist/core/state/configAtom.js +5 -9
- package/dist/core/state/configAtom.js.map +1 -1
- package/dist/core/state/configEffectAtom.js.map +1 -1
- package/dist/core/state/containerAtom.js.map +1 -1
- package/dist/core/state/enabledChainsAtom.js.map +1 -1
- package/dist/core/state/externalProviderAtom.js.map +1 -1
- package/dist/core/state/isCrosschainAtom.js.map +1 -1
- package/dist/core/state/tradeModeAtom.js.map +1 -1
- package/dist/core/state/widgetEventsAtom.d.ts.map +1 -1
- package/dist/core/state/widgetEventsAtom.js +55 -41
- package/dist/core/state/widgetEventsAtom.js.map +1 -1
- package/dist/core/swapDetails/useSwapDetailsListProps.js +34 -36
- package/dist/core/swapDetails/useSwapDetailsListProps.js.map +1 -1
- package/dist/core/types.d.ts +4 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/events/getters/limit.d.ts.map +1 -1
- package/dist/events/getters/limit.js +3 -2
- package/dist/events/getters/limit.js.map +1 -1
- package/dist/events/getters/otc.d.ts.map +1 -1
- package/dist/events/getters/otc.js +3 -2
- package/dist/events/getters/otc.js.map +1 -1
- package/dist/events/getters/swap.d.ts.map +1 -1
- package/dist/events/getters/swap.js +3 -2
- package/dist/events/getters/swap.js.map +1 -1
- package/dist/events/hooks/useActivateEffects.js.map +1 -1
- package/dist/events/hooks/useOnWalletConnect.d.ts.map +1 -1
- package/dist/events/hooks/useOnWalletConnect.js +2 -0
- package/dist/events/hooks/useOnWalletConnect.js.map +1 -1
- package/dist/events/types/approve.d.ts +22 -6
- package/dist/events/types/approve.d.ts.map +1 -1
- package/dist/events/types/common.d.ts +3 -2
- package/dist/events/types/common.d.ts.map +1 -1
- package/dist/events/types/connectWallet.d.ts +2 -0
- package/dist/events/types/connectWallet.d.ts.map +1 -1
- package/dist/events/types/index.d.ts +5 -2
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/external/.pnpm/react-compiler-runtime@1.0.0_react@19.1.1/external/react-compiler-runtime/dist/index.js.map +1 -0
- package/dist/hooks/batch/useAwaitCalls.d.ts.map +1 -1
- package/dist/hooks/batch/useAwaitCalls.js +20 -16
- package/dist/hooks/batch/useAwaitCalls.js.map +1 -1
- package/dist/hooks/batch/useCanBatchTxs.js.map +1 -1
- package/dist/hooks/batch/useSendBatchTx.js.map +1 -1
- package/dist/hooks/connectors/useIsConnectedSafe.js +10 -18
- package/dist/hooks/connectors/useIsConnectedSafe.js.map +1 -1
- package/dist/hooks/connectors/useIsGnosisSafeConnector.js.map +1 -1
- package/dist/hooks/connectors/useIsSafeThroughWalletConnect.js +4 -15
- package/dist/hooks/connectors/useIsSafeThroughWalletConnect.js.map +1 -1
- package/dist/hooks/gas/useGasPrices.js.map +1 -1
- package/dist/hooks/getCode/useIsAccountContract.js.map +1 -1
- package/dist/hooks/getCode/useIsContractAtAddress.js +30 -46
- package/dist/hooks/getCode/useIsContractAtAddress.js.map +1 -1
- package/dist/hooks/otc/mutations/useCancelLimitOrder.d.ts.map +1 -1
- package/dist/hooks/otc/mutations/useCancelLimitOrder.js +21 -12
- package/dist/hooks/otc/mutations/useCancelLimitOrder.js.map +1 -1
- package/dist/hooks/otc/mutations/useCreateLimitOrder.d.ts.map +1 -1
- package/dist/hooks/otc/mutations/useCreateLimitOrder.js +22 -12
- package/dist/hooks/otc/mutations/useCreateLimitOrder.js.map +1 -1
- package/dist/hooks/otc/mutations/useFillOrder.d.ts.map +1 -1
- package/dist/hooks/otc/mutations/useFillOrder.js +10 -32
- package/dist/hooks/otc/mutations/useFillOrder.js.map +1 -1
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.d.ts +22 -3
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.d.ts.map +1 -1
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.js +39 -2
- package/dist/hooks/otc/queries/useLimitOrderRequiredBalance.js.map +1 -1
- package/dist/hooks/otc/queries/useLimitOrders.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderFlow.d.ts.map +1 -1
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderFlow.js +2 -3
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderFlow.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useFillOtcOrderStep.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.d.ts +7 -4
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.d.ts.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.js +46 -4
- package/dist/hooks/otc/tradeFlow/useOtcOrderFlow.js.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderStep.d.ts.map +1 -1
- package/dist/hooks/otc/tradeFlow/useOtcOrderStep.js +38 -36
- package/dist/hooks/otc/tradeFlow/useOtcOrderStep.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useSignArbitraryTypedData.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useSignPermit.js.map +1 -1
- package/dist/hooks/permit/hooks/common/useWalletSupportsPermit.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useGetPermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useGetSafePermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useSignTokenPermit1.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermit1Nonce.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTokenFromPermitInfo.js.map +1 -1
- package/dist/hooks/permit/hooks/permit1/useTryToSignPermit1.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/usePermit2Allowance.js +39 -31
- package/dist/hooks/permit/hooks/permit2/usePermit2Allowance.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/useSignTokenPermit2TransferFrom.js +7 -15
- package/dist/hooks/permit/hooks/permit2/useSignTokenPermit2TransferFrom.js.map +1 -1
- package/dist/hooks/permit/hooks/permit2/useTokenFromPermit2TransferFromNonce.js.map +1 -1
- package/dist/hooks/sdk/useGetContracts.js.map +1 -1
- package/dist/hooks/sdk/useSpender.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelLimitDeltaOrders.d.ts +2 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelLimitDeltaOrders.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCancelLimitDeltaOrders.js +23 -13
- package/dist/hooks/swap/prices/delta/mutations/useCancelLimitDeltaOrders.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.d.ts +3 -2
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.js +41 -10
- package/dist/hooks/swap/prices/delta/mutations/useCreateDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.d.ts +25 -0
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.d.ts.map +1 -0
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.js +88 -0
- package/dist/hooks/swap/prices/delta/mutations/useCreatePreSignableDeltaOrder.js.map +1 -0
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.d.ts +16 -0
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.d.ts.map +1 -0
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.js +83 -0
- package/dist/hooks/swap/prices/delta/mutations/usePostDeltaOrder.js.map +1 -0
- package/dist/hooks/swap/prices/delta/orders/utils.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/orders/utils.js +3 -2
- package/dist/hooks/swap/prices/delta/orders/utils.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useBridgeInfo.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.d.ts +22 -3
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.d.ts.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.js +39 -2
- package/dist/hooks/swap/prices/delta/queries/useDeltaLimitOrderRequiredBalance.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaOrders.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useDeltaPriceQuery.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useIsTokenSupportedInDelta.js.map +1 -1
- package/dist/hooks/swap/prices/delta/queries/useWatchDeltaOrder.js.map +1 -1
- package/dist/hooks/swap/prices/market/mutations/useBuildTx.js.map +1 -1
- package/dist/hooks/swap/prices/market/mutations/useSendMarketSwapTx.js.map +1 -1
- package/dist/hooks/swap/prices/market/queries/useMarketPriceQuery.js.map +1 -1
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.d.ts +9 -0
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.d.ts.map +1 -1
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.js +49 -2
- package/dist/hooks/swap/prices/market/queries/useSpenderAndContracts.js.map +1 -1
- package/dist/hooks/swap/prices/usePricesParams.js.map +1 -1
- package/dist/hooks/swap/prices/useSwapPrices.js.map +1 -1
- package/dist/hooks/swap/prices/useTokenInputsFromPrice.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/types.d.ts +17 -0
- package/dist/hooks/swap/tradeFlow/common/types.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.d.ts +3 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.js +164 -140
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermit.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useApproveOrPermitEvents.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.d.ts +46 -0
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.d.ts.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.js +328 -0
- package/dist/hooks/swap/tradeFlow/common/useBatchWrapAndApprove.js.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/useConstructGasParams.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/useConstructGasParams.js +16 -14
- package/dist/hooks/swap/tradeFlow/common/useConstructGasParams.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.d.ts +74 -0
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.d.ts.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.js +274 -0
- package/dist/hooks/swap/tradeFlow/common/usePreSignAndSubmitDeltaOrder.js.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.d.ts +15 -0
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.d.ts.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.js +88 -0
- package/dist/hooks/swap/tradeFlow/common/useRequiredAllowanceForOrders.js.map +1 -0
- package/dist/hooks/swap/tradeFlow/common/useSignPermit1Or2.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/utils.d.ts +1 -0
- package/dist/hooks/swap/tradeFlow/common/utils.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/common/utils.js +16 -1
- package/dist/hooks/swap/tradeFlow/common/utils.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.d.ts +28 -23
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js +59 -17
- package/dist/hooks/swap/tradeFlow/useDeltaFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useDeltaSwapStep.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.d.ts +4 -3
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js +61 -15
- package/dist/hooks/swap/tradeFlow/useLimitOrderFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useLimitOrderStep.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.d.ts +2 -18
- package/dist/hooks/swap/tradeFlow/useMarketFlow.d.ts.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketFlow.js.map +1 -1
- package/dist/hooks/swap/tradeFlow/useMarketSwapStep.js.map +1 -1
- package/dist/hooks/tokens/allowance/useTokenAllowance.js +25 -15
- package/dist/hooks/tokens/allowance/useTokenAllowance.js.map +1 -1
- package/dist/hooks/tokens/balances/useAttachTokenBalanceMultichain.js +8 -10
- package/dist/hooks/tokens/balances/useAttachTokenBalanceMultichain.js.map +1 -1
- package/dist/hooks/tokens/balances/useIsInsufficientTokenBalance.js.map +1 -1
- package/dist/hooks/tokens/balances/useIsLimitOrderInsufficientBalance.js.map +1 -1
- package/dist/hooks/tokens/balances/useMultichainTokenBalances.js +20 -37
- package/dist/hooks/tokens/balances/useMultichainTokenBalances.js.map +1 -1
- package/dist/hooks/tokens/balances/useTokenBalance.js.map +1 -1
- package/dist/hooks/tokens/data/useCombineTokensWithFetched.js +11 -19
- package/dist/hooks/tokens/data/useCombineTokensWithFetched.js.map +1 -1
- package/dist/hooks/tokens/data/useFetchTokens.js.map +1 -1
- package/dist/hooks/tokens/data/useMultichainTokensData.js.map +1 -1
- package/dist/hooks/tokens/prices/useMultichainTokenPrices.js +21 -25
- package/dist/hooks/tokens/prices/useMultichainTokenPrices.js.map +1 -1
- package/dist/hooks/tokens/prices/useTokenPrices.js.map +1 -1
- package/dist/hooks/tokens/useAllTokensWithFilter.js +121 -49
- package/dist/hooks/tokens/useAllTokensWithFilter.js.map +1 -1
- package/dist/hooks/tokens/useNativeToken.js +1 -1
- package/dist/hooks/tokens/useNativeToken.js.map +1 -1
- package/dist/hooks/tokens/useTokenTaxFee.js.map +1 -1
- package/dist/hooks/tokens/useTokensByAddress.js.map +1 -1
- package/dist/hooks/tokens/useTokensFromAcross.js.map +1 -1
- package/dist/hooks/txs/mutations/useApprove.js.map +1 -1
- package/dist/hooks/txs/mutations/useDepositWeth.js.map +1 -1
- package/dist/hooks/txs/mutations/useSendTx.js.map +1 -1
- package/dist/hooks/txs/queries/useAwaitTx.js.map +1 -1
- package/dist/hooks/txs/queries/useTxHistory.js.map +1 -1
- package/dist/hooks/useAvailableCrosses.js.map +1 -1
- package/dist/hooks/useBridgeInfo.js.map +1 -1
- package/dist/hooks/useCurrentChain.js.map +1 -1
- package/dist/hooks/useDebouncedInputState.js.map +1 -1
- package/dist/hooks/useEIP1559Enabled.js.map +1 -1
- package/dist/hooks/useGlobalDeltaEnabled.js.map +1 -1
- package/dist/hooks/useIsCrosschainPossible.js.map +1 -1
- package/dist/hooks/useMinViemClient.js.map +1 -1
- package/dist/hooks/useSDK.d.ts +3 -2
- package/dist/hooks/useSDK.d.ts.map +1 -1
- package/dist/hooks/useSDK.js +37 -8
- package/dist/hooks/useSDK.js.map +1 -1
- package/dist/hooks/useSelectableDestChains.js.map +1 -1
- package/dist/hooks/useSlippage.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/utils/approval.js.map +1 -1
- package/dist/lib/utils/theme.d.ts +2 -0
- package/dist/lib/utils/theme.d.ts.map +1 -0
- package/dist/lib/utils/theme.js +10 -0
- package/dist/lib/utils/theme.js.map +1 -0
- package/dist/lib/utils/tradeFlow.d.ts +3 -0
- package/dist/lib/utils/tradeFlow.d.ts.map +1 -0
- package/dist/lib/utils/tradeFlow.js +12 -0
- package/dist/lib/utils/tradeFlow.js.map +1 -0
- package/dist/lib/web3/wagmi/isInsideSafeIframe.js.map +1 -1
- package/dist/styles.css +89 -44
- package/dist/tokens/hooks.js.map +1 -1
- package/dist/tokens/lists/state/effects.js.map +1 -1
- package/dist/tokens/queries.js +6 -10
- package/dist/tokens/queries.js.map +1 -1
- package/dist/tokens/stabeCoins/hooks.js +3 -5
- package/dist/tokens/stabeCoins/hooks.js.map +1 -1
- package/dist/tokens/utils/transferAmountsFromReceipt.js.map +1 -1
- package/dist/transactions/queries/ensureCallsStatus.d.ts +1 -0
- package/dist/transactions/queries/ensureCallsStatus.d.ts.map +1 -1
- package/dist/transactions/queries/ensureCallsStatus.js +7 -5
- package/dist/transactions/queries/ensureCallsStatus.js.map +1 -1
- package/dist/transactions/state/hooks/useActivateEffects.js.map +1 -1
- package/dist/transactions/state/hooks/useTransactions.js.map +1 -1
- package/dist/transactions/types.d.ts +21 -1
- package/dist/transactions/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/widget/TokenInput/EmptyInput.js +0 -58
- package/dist/components/widget/TokenInput/EmptyInput.js.map +0 -1
- package/dist/external/.pnpm/react-compiler-runtime@19.1.0-rc.2_react@19.1.1/external/react-compiler-runtime/dist/index.js.map +0 -1
- /package/dist/external/.pnpm/{react-compiler-runtime@19.1.0-rc.2_react@19.1.1 → react-compiler-runtime@1.0.0_react@19.1.1}/external/react-compiler-runtime/dist/index.js +0 -0
|
@@ -18,6 +18,8 @@ import { useState } from 'react';
|
|
|
18
18
|
import { formatUnits } from 'viem';
|
|
19
19
|
import { useAccount } from 'wagmi';
|
|
20
20
|
import { useWidgetEvents } from './state/widgetEventsAtom.js';
|
|
21
|
+
import { wrappedNativeTokensByChainId } from '../tokens/constructor.js';
|
|
22
|
+
import { isETH } from '../tokens/utils/eth.js';
|
|
21
23
|
|
|
22
24
|
function SwapTradeFlowButton(t0) {
|
|
23
25
|
const $ = distExports.c(25);
|
|
@@ -141,68 +143,46 @@ function SwapTradeFlowButton(t0) {
|
|
|
141
143
|
return t4;
|
|
142
144
|
}
|
|
143
145
|
function MarketSwapDrawerButton(t0) {
|
|
144
|
-
const $ = distExports.c(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
orderProps,
|
|
154
|
-
drawerContainer,
|
|
155
|
-
marketPrice,
|
|
156
|
-
labelOverride,
|
|
157
|
-
drawerControls,
|
|
158
|
-
...buttonProps
|
|
159
|
-
} = t0);
|
|
160
|
-
$[0] = t0;
|
|
161
|
-
$[1] = buttonProps;
|
|
162
|
-
$[2] = drawerContainer;
|
|
163
|
-
$[3] = drawerControls;
|
|
164
|
-
$[4] = labelOverride;
|
|
165
|
-
$[5] = marketPrice;
|
|
166
|
-
$[6] = orderProps;
|
|
167
|
-
} else {
|
|
168
|
-
buttonProps = $[1];
|
|
169
|
-
drawerContainer = $[2];
|
|
170
|
-
drawerControls = $[3];
|
|
171
|
-
labelOverride = $[4];
|
|
172
|
-
marketPrice = $[5];
|
|
173
|
-
orderProps = $[6];
|
|
174
|
-
}
|
|
146
|
+
const $ = distExports.c(45);
|
|
147
|
+
const {
|
|
148
|
+
orderProps,
|
|
149
|
+
drawerContainer,
|
|
150
|
+
marketPrice,
|
|
151
|
+
labelOverride,
|
|
152
|
+
drawerControls,
|
|
153
|
+
...buttonProps
|
|
154
|
+
} = t0;
|
|
175
155
|
let drawerProps;
|
|
176
156
|
let onClose;
|
|
177
157
|
let onOpen;
|
|
178
|
-
if ($[
|
|
158
|
+
if ($[0] !== drawerControls) {
|
|
179
159
|
({
|
|
180
160
|
onOpen,
|
|
181
161
|
onClose,
|
|
182
162
|
...drawerProps
|
|
183
163
|
} = drawerControls);
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
164
|
+
$[0] = drawerControls;
|
|
165
|
+
$[1] = drawerProps;
|
|
166
|
+
$[2] = onClose;
|
|
167
|
+
$[3] = onOpen;
|
|
188
168
|
} else {
|
|
189
|
-
drawerProps = $[
|
|
190
|
-
onClose = $[
|
|
191
|
-
onOpen = $[
|
|
169
|
+
drawerProps = $[1];
|
|
170
|
+
onClose = $[2];
|
|
171
|
+
onOpen = $[3];
|
|
192
172
|
}
|
|
193
173
|
const {
|
|
194
174
|
isConnected
|
|
195
175
|
} = useAccount();
|
|
196
176
|
const disabled = !isConnected || !orderProps || !marketPrice;
|
|
197
177
|
let t1;
|
|
198
|
-
if ($[
|
|
178
|
+
if ($[4] !== marketPrice) {
|
|
199
179
|
t1 = {
|
|
200
180
|
marketPrice
|
|
201
181
|
};
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
182
|
+
$[4] = marketPrice;
|
|
183
|
+
$[5] = t1;
|
|
204
184
|
} else {
|
|
205
|
-
t1 = $[
|
|
185
|
+
t1 = $[5];
|
|
206
186
|
}
|
|
207
187
|
const {
|
|
208
188
|
step,
|
|
@@ -219,198 +199,156 @@ function MarketSwapDrawerButton(t0) {
|
|
|
219
199
|
tradeFlowType
|
|
220
200
|
} = useMarketSwapStep(t1);
|
|
221
201
|
let t2;
|
|
222
|
-
if ($[
|
|
202
|
+
if ($[6] !== usedPrice) {
|
|
223
203
|
t2 = (orderProps_0) => usedPrice ? formatUnits(BigInt(usedPrice.srcAmount), usedPrice.srcDecimals) : orderProps_0.fromAmount;
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
204
|
+
$[6] = usedPrice;
|
|
205
|
+
$[7] = t2;
|
|
226
206
|
} else {
|
|
227
|
-
t2 = $[
|
|
207
|
+
t2 = $[7];
|
|
228
208
|
}
|
|
229
209
|
const getFromAmount = t2;
|
|
230
210
|
let t3;
|
|
231
|
-
if ($[
|
|
211
|
+
if ($[8] !== usedPrice) {
|
|
232
212
|
t3 = (orderProps_1) => usedPrice ? formatUnits(BigInt(usedPrice.destAmount), usedPrice.destDecimals) : orderProps_1.toAmount;
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
213
|
+
$[8] = usedPrice;
|
|
214
|
+
$[9] = t3;
|
|
235
215
|
} else {
|
|
236
|
-
t3 = $[
|
|
216
|
+
t3 = $[9];
|
|
237
217
|
}
|
|
238
218
|
const getToAmount = t3;
|
|
239
219
|
let t4;
|
|
240
|
-
if ($[
|
|
220
|
+
if ($[10] !== onClose || $[11] !== reset) {
|
|
241
221
|
t4 = () => {
|
|
242
222
|
onClose();
|
|
243
223
|
reset();
|
|
244
224
|
};
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
225
|
+
$[10] = onClose;
|
|
226
|
+
$[11] = reset;
|
|
227
|
+
$[12] = t4;
|
|
248
228
|
} else {
|
|
249
|
-
t4 = $[
|
|
229
|
+
t4 = $[12];
|
|
250
230
|
}
|
|
251
231
|
const onDismiss = t4;
|
|
252
232
|
let t5;
|
|
253
|
-
if ($[
|
|
233
|
+
if ($[13] !== cancelFlow || $[14] !== error || $[15] !== erroredStep || $[16] !== explorerLink || $[17] !== getFromAmount || $[18] !== getToAmount || $[19] !== isFlowCancellable || $[20] !== onDismiss || $[21] !== orderProps || $[22] !== result || $[23] !== retryFlow || $[24] !== step || $[25] !== tradeFlowType) {
|
|
254
234
|
t5 = orderProps ? /* @__PURE__ */ jsx(MarketSwapTradeOverview, { fromToken: orderProps.fromToken, toToken: orderProps.toToken, fromAmount: getFromAmount(orderProps), toAmount: getToAmount(orderProps), onDismiss, onCancelFlow: cancelFlow, onRetry: retryFlow, activeStep: step, isFlowCancellable, explorerLink, result, error, erroredStep, tradeFlowType }) : null;
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
} else {
|
|
270
|
-
t5 = $[
|
|
235
|
+
$[13] = cancelFlow;
|
|
236
|
+
$[14] = error;
|
|
237
|
+
$[15] = erroredStep;
|
|
238
|
+
$[16] = explorerLink;
|
|
239
|
+
$[17] = getFromAmount;
|
|
240
|
+
$[18] = getToAmount;
|
|
241
|
+
$[19] = isFlowCancellable;
|
|
242
|
+
$[20] = onDismiss;
|
|
243
|
+
$[21] = orderProps;
|
|
244
|
+
$[22] = result;
|
|
245
|
+
$[23] = retryFlow;
|
|
246
|
+
$[24] = step;
|
|
247
|
+
$[25] = tradeFlowType;
|
|
248
|
+
$[26] = t5;
|
|
249
|
+
} else {
|
|
250
|
+
t5 = $[26];
|
|
271
251
|
}
|
|
272
252
|
const content = t5;
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
$[38] = t6;
|
|
286
|
-
} else {
|
|
287
|
-
t6 = $[38];
|
|
288
|
-
}
|
|
289
|
-
const onClick = t6;
|
|
290
|
-
let t7;
|
|
291
|
-
if ($[39] !== buttonProps.className) {
|
|
292
|
-
t7 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
293
|
-
$[39] = buttonProps.className;
|
|
294
|
-
$[40] = t7;
|
|
295
|
-
} else {
|
|
296
|
-
t7 = $[40];
|
|
297
|
-
}
|
|
298
|
-
const t8 = buttonProps.disabled || disabled;
|
|
299
|
-
const t9 = labelOverride || "Swap";
|
|
300
|
-
let t10;
|
|
301
|
-
if ($[41] !== buttonProps || $[42] !== onClick || $[43] !== t7 || $[44] !== t8 || $[45] !== t9) {
|
|
302
|
-
t10 = /* @__PURE__ */ jsx(Button, { variant: "cta", radius: "lg", ...buttonProps, className: t7, onClick, disabled: t8, children: t9 });
|
|
303
|
-
$[41] = buttonProps;
|
|
304
|
-
$[42] = onClick;
|
|
305
|
-
$[43] = t7;
|
|
306
|
-
$[44] = t8;
|
|
307
|
-
$[45] = t9;
|
|
308
|
-
$[46] = t10;
|
|
309
|
-
} else {
|
|
310
|
-
t10 = $[46];
|
|
311
|
-
}
|
|
253
|
+
const onClick = orderProps ? () => {
|
|
254
|
+
onOpen();
|
|
255
|
+
startMarketSwap({
|
|
256
|
+
onTxSent: handleTxSent
|
|
257
|
+
});
|
|
258
|
+
} : buttonProps.onClick;
|
|
259
|
+
const T0 = Button;
|
|
260
|
+
const t6 = "cta";
|
|
261
|
+
const t7 = "lg";
|
|
262
|
+
const t8 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
263
|
+
const t9 = buttonProps.disabled || disabled;
|
|
264
|
+
const t10 = labelOverride || "Swap";
|
|
312
265
|
let t11;
|
|
313
|
-
if ($[
|
|
314
|
-
t11 = (
|
|
266
|
+
if ($[27] !== T0 || $[28] !== buttonProps || $[29] !== onClick || $[30] !== t10 || $[31] !== t8 || $[32] !== t9) {
|
|
267
|
+
t11 = /* @__PURE__ */ jsx(T0, { variant: t6, radius: t7, ...buttonProps, className: t8, onClick, disabled: t9, children: t10 });
|
|
268
|
+
$[27] = T0;
|
|
269
|
+
$[28] = buttonProps;
|
|
270
|
+
$[29] = onClick;
|
|
271
|
+
$[30] = t10;
|
|
272
|
+
$[31] = t8;
|
|
273
|
+
$[32] = t9;
|
|
274
|
+
$[33] = t11;
|
|
275
|
+
} else {
|
|
276
|
+
t11 = $[33];
|
|
277
|
+
}
|
|
278
|
+
let t12;
|
|
279
|
+
if ($[34] !== cancelFlow || $[35] !== isFlowCancellable) {
|
|
280
|
+
t12 = () => {
|
|
315
281
|
if (isFlowCancellable) {
|
|
316
282
|
cancelFlow();
|
|
317
283
|
}
|
|
318
284
|
};
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
} else {
|
|
323
|
-
t11 = $[49];
|
|
324
|
-
}
|
|
325
|
-
let t12;
|
|
326
|
-
if ($[50] !== content || $[51] !== drawerContainer || $[52] !== drawerProps || $[53] !== t11) {
|
|
327
|
-
t12 = /* @__PURE__ */ jsx(ControlledDrawer, { ...drawerProps, container: drawerContainer, onClose: t11, children: content });
|
|
328
|
-
$[50] = content;
|
|
329
|
-
$[51] = drawerContainer;
|
|
330
|
-
$[52] = drawerProps;
|
|
331
|
-
$[53] = t11;
|
|
332
|
-
$[54] = t12;
|
|
285
|
+
$[34] = cancelFlow;
|
|
286
|
+
$[35] = isFlowCancellable;
|
|
287
|
+
$[36] = t12;
|
|
333
288
|
} else {
|
|
334
|
-
t12 = $[
|
|
289
|
+
t12 = $[36];
|
|
335
290
|
}
|
|
336
291
|
let t13;
|
|
337
|
-
if ($[
|
|
338
|
-
t13 = /* @__PURE__ */
|
|
339
|
-
|
|
340
|
-
|
|
292
|
+
if ($[37] !== content || $[38] !== drawerContainer || $[39] !== drawerProps || $[40] !== t12) {
|
|
293
|
+
t13 = /* @__PURE__ */ jsx(ControlledDrawer, { ...drawerProps, container: drawerContainer, onClose: t12, children: content });
|
|
294
|
+
$[37] = content;
|
|
295
|
+
$[38] = drawerContainer;
|
|
296
|
+
$[39] = drawerProps;
|
|
297
|
+
$[40] = t12;
|
|
298
|
+
$[41] = t13;
|
|
299
|
+
} else {
|
|
300
|
+
t13 = $[41];
|
|
301
|
+
}
|
|
302
|
+
let t14;
|
|
303
|
+
if ($[42] !== t11 || $[43] !== t13) {
|
|
304
|
+
t14 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
305
|
+
t11,
|
|
306
|
+
t13
|
|
341
307
|
] });
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
308
|
+
$[42] = t11;
|
|
309
|
+
$[43] = t13;
|
|
310
|
+
$[44] = t14;
|
|
345
311
|
} else {
|
|
346
|
-
|
|
312
|
+
t14 = $[44];
|
|
347
313
|
}
|
|
348
|
-
return
|
|
314
|
+
return t14;
|
|
349
315
|
}
|
|
350
316
|
function DeltaSwapDrawerButton(t0) {
|
|
351
|
-
const $ = distExports.c(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
orderProps,
|
|
361
|
-
drawerContainer,
|
|
362
|
-
deltaPrice,
|
|
363
|
-
labelOverride,
|
|
364
|
-
drawerControls,
|
|
365
|
-
...buttonProps
|
|
366
|
-
} = t0);
|
|
367
|
-
$[0] = t0;
|
|
368
|
-
$[1] = buttonProps;
|
|
369
|
-
$[2] = deltaPrice;
|
|
370
|
-
$[3] = drawerContainer;
|
|
371
|
-
$[4] = drawerControls;
|
|
372
|
-
$[5] = labelOverride;
|
|
373
|
-
$[6] = orderProps;
|
|
374
|
-
} else {
|
|
375
|
-
buttonProps = $[1];
|
|
376
|
-
deltaPrice = $[2];
|
|
377
|
-
drawerContainer = $[3];
|
|
378
|
-
drawerControls = $[4];
|
|
379
|
-
labelOverride = $[5];
|
|
380
|
-
orderProps = $[6];
|
|
381
|
-
}
|
|
317
|
+
const $ = distExports.c(29);
|
|
318
|
+
const {
|
|
319
|
+
orderProps: orderPropsFromForm,
|
|
320
|
+
drawerContainer,
|
|
321
|
+
deltaPrice,
|
|
322
|
+
labelOverride,
|
|
323
|
+
drawerControls,
|
|
324
|
+
...buttonProps
|
|
325
|
+
} = t0;
|
|
382
326
|
let drawerProps;
|
|
383
327
|
let onClose;
|
|
384
328
|
let onOpen;
|
|
385
|
-
if ($[
|
|
329
|
+
if ($[0] !== drawerControls) {
|
|
386
330
|
({
|
|
387
331
|
onOpen,
|
|
388
332
|
onClose,
|
|
389
333
|
...drawerProps
|
|
390
334
|
} = drawerControls);
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
335
|
+
$[0] = drawerControls;
|
|
336
|
+
$[1] = drawerProps;
|
|
337
|
+
$[2] = onClose;
|
|
338
|
+
$[3] = onOpen;
|
|
395
339
|
} else {
|
|
396
|
-
drawerProps = $[
|
|
397
|
-
onClose = $[
|
|
398
|
-
onOpen = $[
|
|
340
|
+
drawerProps = $[1];
|
|
341
|
+
onClose = $[2];
|
|
342
|
+
onOpen = $[3];
|
|
399
343
|
}
|
|
400
344
|
const {
|
|
401
345
|
isConnected
|
|
402
346
|
} = useAccount();
|
|
347
|
+
const orderProps = orderPropsFromForm ? addPreWrapToOrderProps({
|
|
348
|
+
orderProps: orderPropsFromForm,
|
|
349
|
+
priceMode: "delta"
|
|
350
|
+
}).orderProps : void 0;
|
|
403
351
|
const disabled = !isConnected || !orderProps || !deltaPrice;
|
|
404
|
-
let t1;
|
|
405
|
-
if ($[11] !== deltaPrice) {
|
|
406
|
-
t1 = {
|
|
407
|
-
deltaPrice
|
|
408
|
-
};
|
|
409
|
-
$[11] = deltaPrice;
|
|
410
|
-
$[12] = t1;
|
|
411
|
-
} else {
|
|
412
|
-
t1 = $[12];
|
|
413
|
-
}
|
|
414
352
|
const {
|
|
415
353
|
step,
|
|
416
354
|
startDeltaSwap,
|
|
@@ -424,201 +362,146 @@ function DeltaSwapDrawerButton(t0) {
|
|
|
424
362
|
error,
|
|
425
363
|
erroredStep,
|
|
426
364
|
tradeFlowType
|
|
427
|
-
} = useDeltaSwapStep(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
365
|
+
} = useDeltaSwapStep({
|
|
366
|
+
deltaPrice,
|
|
367
|
+
preWrapETH: orderProps?.preWrapETH
|
|
368
|
+
});
|
|
369
|
+
let t1;
|
|
370
|
+
if ($[4] !== usedPrice) {
|
|
371
|
+
t1 = (orderProps_0) => usedPrice ? formatUnits(BigInt(usedPrice.srcAmount), orderProps_0.fromToken.decimals) : orderProps_0.fromAmount;
|
|
372
|
+
$[4] = usedPrice;
|
|
373
|
+
$[5] = t1;
|
|
433
374
|
} else {
|
|
434
|
-
|
|
375
|
+
t1 = $[5];
|
|
435
376
|
}
|
|
436
|
-
const getFromAmount =
|
|
437
|
-
let
|
|
438
|
-
if ($[
|
|
439
|
-
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
377
|
+
const getFromAmount = t1;
|
|
378
|
+
let t2;
|
|
379
|
+
if ($[6] !== usedPrice) {
|
|
380
|
+
t2 = (orderProps_1) => usedPrice ? formatUnits(BigInt(usedPrice.receivedDestAmount), orderProps_1.toToken.decimals) : orderProps_1.toAmount;
|
|
381
|
+
$[6] = usedPrice;
|
|
382
|
+
$[7] = t2;
|
|
442
383
|
} else {
|
|
443
|
-
|
|
384
|
+
t2 = $[7];
|
|
444
385
|
}
|
|
445
|
-
const getToAmount =
|
|
446
|
-
let
|
|
447
|
-
if ($[
|
|
448
|
-
|
|
386
|
+
const getToAmount = t2;
|
|
387
|
+
let t3;
|
|
388
|
+
if ($[8] !== onClose || $[9] !== reset) {
|
|
389
|
+
t3 = () => {
|
|
449
390
|
onClose();
|
|
450
391
|
reset();
|
|
451
392
|
};
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
} else {
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
const onDismiss =
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
onOpen();
|
|
484
|
-
startDeltaSwap({
|
|
485
|
-
onTxSent: handleTxSent,
|
|
486
|
-
onOrderSent: addDeltaOrderToast
|
|
487
|
-
});
|
|
488
|
-
} : buttonProps.onClick;
|
|
489
|
-
$[34] = buttonProps.onClick;
|
|
490
|
-
$[35] = onOpen;
|
|
491
|
-
$[36] = orderProps;
|
|
492
|
-
$[37] = startDeltaSwap;
|
|
493
|
-
$[38] = t6;
|
|
494
|
-
} else {
|
|
495
|
-
t6 = $[38];
|
|
496
|
-
}
|
|
497
|
-
const onClick = t6;
|
|
498
|
-
let t7;
|
|
499
|
-
if ($[39] !== buttonProps.className) {
|
|
500
|
-
t7 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
501
|
-
$[39] = buttonProps.className;
|
|
502
|
-
$[40] = t7;
|
|
393
|
+
$[8] = onClose;
|
|
394
|
+
$[9] = reset;
|
|
395
|
+
$[10] = t3;
|
|
396
|
+
} else {
|
|
397
|
+
t3 = $[10];
|
|
398
|
+
}
|
|
399
|
+
const onDismiss = t3;
|
|
400
|
+
const content = orderProps ? /* @__PURE__ */ jsx(DeltaOrderTradeOverview, { fromToken: orderProps.fromToken, toToken: orderProps.toToken, fromAmount: getFromAmount(orderProps), toAmount: getToAmount(orderProps), onDismiss, onCancelFlow: cancelFlow, onRetry: retryFlow, activeStep: step, isFlowCancellable, explorerLink, result, error, erroredStep, tradeFlowType }) : null;
|
|
401
|
+
const onClick = orderProps ? () => {
|
|
402
|
+
onOpen();
|
|
403
|
+
startDeltaSwap({
|
|
404
|
+
onTxSent: handleTxSent,
|
|
405
|
+
onOrderSent: addDeltaOrderToast
|
|
406
|
+
});
|
|
407
|
+
} : buttonProps.onClick;
|
|
408
|
+
const T0 = Button;
|
|
409
|
+
const t4 = "cta";
|
|
410
|
+
const t5 = "lg";
|
|
411
|
+
const t6 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
412
|
+
const t7 = buttonProps.disabled || disabled;
|
|
413
|
+
const t8 = labelOverride || "Swap";
|
|
414
|
+
let t9;
|
|
415
|
+
if ($[11] !== T0 || $[12] !== buttonProps || $[13] !== onClick || $[14] !== t6 || $[15] !== t7 || $[16] !== t8) {
|
|
416
|
+
t9 = /* @__PURE__ */ jsx(T0, { variant: t4, radius: t5, ...buttonProps, className: t6, onClick, disabled: t7, children: t8 });
|
|
417
|
+
$[11] = T0;
|
|
418
|
+
$[12] = buttonProps;
|
|
419
|
+
$[13] = onClick;
|
|
420
|
+
$[14] = t6;
|
|
421
|
+
$[15] = t7;
|
|
422
|
+
$[16] = t8;
|
|
423
|
+
$[17] = t9;
|
|
503
424
|
} else {
|
|
504
|
-
|
|
425
|
+
t9 = $[17];
|
|
505
426
|
}
|
|
506
|
-
const t8 = buttonProps.disabled || disabled;
|
|
507
|
-
const t9 = labelOverride || "Swap";
|
|
508
427
|
let t10;
|
|
509
|
-
if ($[
|
|
510
|
-
t10 =
|
|
511
|
-
$[41] = buttonProps;
|
|
512
|
-
$[42] = onClick;
|
|
513
|
-
$[43] = t7;
|
|
514
|
-
$[44] = t8;
|
|
515
|
-
$[45] = t9;
|
|
516
|
-
$[46] = t10;
|
|
517
|
-
} else {
|
|
518
|
-
t10 = $[46];
|
|
519
|
-
}
|
|
520
|
-
let t11;
|
|
521
|
-
if ($[47] !== cancelFlow || $[48] !== isFlowCancellable) {
|
|
522
|
-
t11 = () => {
|
|
428
|
+
if ($[18] !== cancelFlow || $[19] !== isFlowCancellable) {
|
|
429
|
+
t10 = () => {
|
|
523
430
|
if (isFlowCancellable) {
|
|
524
431
|
cancelFlow();
|
|
525
432
|
}
|
|
526
433
|
};
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
434
|
+
$[18] = cancelFlow;
|
|
435
|
+
$[19] = isFlowCancellable;
|
|
436
|
+
$[20] = t10;
|
|
530
437
|
} else {
|
|
531
|
-
|
|
438
|
+
t10 = $[20];
|
|
532
439
|
}
|
|
533
|
-
let
|
|
534
|
-
if ($[
|
|
535
|
-
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
440
|
+
let t11;
|
|
441
|
+
if ($[21] !== content || $[22] !== drawerContainer || $[23] !== drawerProps || $[24] !== t10) {
|
|
442
|
+
t11 = /* @__PURE__ */ jsx(ControlledDrawer, { ...drawerProps, container: drawerContainer, onClose: t10, children: content });
|
|
443
|
+
$[21] = content;
|
|
444
|
+
$[22] = drawerContainer;
|
|
445
|
+
$[23] = drawerProps;
|
|
446
|
+
$[24] = t10;
|
|
447
|
+
$[25] = t11;
|
|
541
448
|
} else {
|
|
542
|
-
|
|
449
|
+
t11 = $[25];
|
|
543
450
|
}
|
|
544
|
-
let
|
|
545
|
-
if ($[
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
451
|
+
let t12;
|
|
452
|
+
if ($[26] !== t11 || $[27] !== t9) {
|
|
453
|
+
t12 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
454
|
+
t9,
|
|
455
|
+
t11
|
|
549
456
|
] });
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
457
|
+
$[26] = t11;
|
|
458
|
+
$[27] = t9;
|
|
459
|
+
$[28] = t12;
|
|
553
460
|
} else {
|
|
554
|
-
|
|
461
|
+
t12 = $[28];
|
|
555
462
|
}
|
|
556
|
-
return
|
|
463
|
+
return t12;
|
|
557
464
|
}
|
|
558
465
|
function LimitOrderDrawerButton(t0) {
|
|
559
|
-
const $ = distExports.c(
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
orderProps,
|
|
569
|
-
drawerContainer,
|
|
570
|
-
limitPrice,
|
|
571
|
-
labelOverride,
|
|
572
|
-
drawerControls,
|
|
573
|
-
...buttonProps
|
|
574
|
-
} = t0);
|
|
575
|
-
$[0] = t0;
|
|
576
|
-
$[1] = buttonProps;
|
|
577
|
-
$[2] = drawerContainer;
|
|
578
|
-
$[3] = drawerControls;
|
|
579
|
-
$[4] = labelOverride;
|
|
580
|
-
$[5] = limitPrice;
|
|
581
|
-
$[6] = orderProps;
|
|
582
|
-
} else {
|
|
583
|
-
buttonProps = $[1];
|
|
584
|
-
drawerContainer = $[2];
|
|
585
|
-
drawerControls = $[3];
|
|
586
|
-
labelOverride = $[4];
|
|
587
|
-
limitPrice = $[5];
|
|
588
|
-
orderProps = $[6];
|
|
589
|
-
}
|
|
466
|
+
const $ = distExports.c(25);
|
|
467
|
+
const {
|
|
468
|
+
orderProps: orderPropsFromForm,
|
|
469
|
+
drawerContainer,
|
|
470
|
+
limitPrice: limitPriceFromForm,
|
|
471
|
+
labelOverride,
|
|
472
|
+
drawerControls,
|
|
473
|
+
...buttonProps
|
|
474
|
+
} = t0;
|
|
590
475
|
let drawerProps;
|
|
591
476
|
let onClose;
|
|
592
477
|
let onOpen;
|
|
593
|
-
if ($[
|
|
478
|
+
if ($[0] !== drawerControls) {
|
|
594
479
|
({
|
|
595
480
|
onOpen,
|
|
596
481
|
onClose,
|
|
597
482
|
...drawerProps
|
|
598
483
|
} = drawerControls);
|
|
599
|
-
$[
|
|
600
|
-
$[
|
|
601
|
-
$[
|
|
602
|
-
$[
|
|
484
|
+
$[0] = drawerControls;
|
|
485
|
+
$[1] = drawerProps;
|
|
486
|
+
$[2] = onClose;
|
|
487
|
+
$[3] = onOpen;
|
|
603
488
|
} else {
|
|
604
|
-
drawerProps = $[
|
|
605
|
-
onClose = $[
|
|
606
|
-
onOpen = $[
|
|
489
|
+
drawerProps = $[1];
|
|
490
|
+
onClose = $[2];
|
|
491
|
+
onOpen = $[3];
|
|
607
492
|
}
|
|
608
493
|
const {
|
|
609
494
|
isConnected
|
|
610
495
|
} = useAccount();
|
|
496
|
+
const {
|
|
497
|
+
orderProps,
|
|
498
|
+
userDefinedPrice: limitPrice
|
|
499
|
+
} = orderPropsFromForm ? addPreWrapToOrderProps({
|
|
500
|
+
orderProps: orderPropsFromForm,
|
|
501
|
+
priceMode: "userInputOrder",
|
|
502
|
+
userDefinedPrice: limitPriceFromForm
|
|
503
|
+
}) : {};
|
|
611
504
|
const disabled = !isConnected || !orderProps || !limitPrice;
|
|
612
|
-
let t1;
|
|
613
|
-
if ($[11] !== limitPrice) {
|
|
614
|
-
t1 = {
|
|
615
|
-
limitPrice
|
|
616
|
-
};
|
|
617
|
-
$[11] = limitPrice;
|
|
618
|
-
$[12] = t1;
|
|
619
|
-
} else {
|
|
620
|
-
t1 = $[12];
|
|
621
|
-
}
|
|
622
505
|
const {
|
|
623
506
|
step,
|
|
624
507
|
orderCancellationStep,
|
|
@@ -634,138 +517,89 @@ function LimitOrderDrawerButton(t0) {
|
|
|
634
517
|
error,
|
|
635
518
|
erroredStep,
|
|
636
519
|
tradeFlowType
|
|
637
|
-
} = useLimitOrderStep(
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
const getFromAmount = t2;
|
|
647
|
-
let t3;
|
|
648
|
-
if ($[15] !== limitPrice) {
|
|
649
|
-
t3 = (orderProps_1) => limitPrice ? formatUnits(BigInt(limitPrice.destAmount), orderProps_1.toToken.decimals) : orderProps_1.toAmount;
|
|
650
|
-
$[15] = limitPrice;
|
|
651
|
-
$[16] = t3;
|
|
652
|
-
} else {
|
|
653
|
-
t3 = $[16];
|
|
654
|
-
}
|
|
655
|
-
const getToAmount = t3;
|
|
656
|
-
let t4;
|
|
657
|
-
if ($[17] !== onClose || $[18] !== reset) {
|
|
658
|
-
t4 = () => {
|
|
520
|
+
} = useLimitOrderStep({
|
|
521
|
+
limitPrice,
|
|
522
|
+
preWrapETH: orderProps?.preWrapETH
|
|
523
|
+
});
|
|
524
|
+
const getFromAmount = (orderProps_0) => limitPrice ? formatUnits(BigInt(limitPrice.srcAmount), orderProps_0.fromToken.decimals) : orderProps_0.fromAmount;
|
|
525
|
+
const getToAmount = (orderProps_1) => limitPrice ? formatUnits(BigInt(limitPrice.destAmount), orderProps_1.toToken.decimals) : orderProps_1.toAmount;
|
|
526
|
+
let t1;
|
|
527
|
+
if ($[4] !== onClose || $[5] !== reset) {
|
|
528
|
+
t1 = () => {
|
|
659
529
|
onClose();
|
|
660
530
|
reset();
|
|
661
531
|
};
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
532
|
+
$[4] = onClose;
|
|
533
|
+
$[5] = reset;
|
|
534
|
+
$[6] = t1;
|
|
665
535
|
} else {
|
|
666
|
-
|
|
536
|
+
t1 = $[6];
|
|
667
537
|
}
|
|
668
|
-
const onDismiss =
|
|
538
|
+
const onDismiss = t1;
|
|
669
539
|
const onCancelOrder = isOrderCancellable ? cancelLimitOrder : void 0;
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
$[30] = orderProps;
|
|
684
|
-
$[31] = result;
|
|
685
|
-
$[32] = retryFlow;
|
|
686
|
-
$[33] = step;
|
|
687
|
-
$[34] = tradeFlowType;
|
|
688
|
-
$[35] = t5;
|
|
689
|
-
} else {
|
|
690
|
-
t5 = $[35];
|
|
691
|
-
}
|
|
692
|
-
const content = t5;
|
|
693
|
-
let t6;
|
|
694
|
-
if ($[36] !== buttonProps.onClick || $[37] !== onOpen || $[38] !== orderProps || $[39] !== startLimitOrder) {
|
|
695
|
-
t6 = orderProps ? () => {
|
|
696
|
-
onOpen();
|
|
697
|
-
startLimitOrder({
|
|
698
|
-
onTxSent: handleTxSent
|
|
699
|
-
});
|
|
700
|
-
} : buttonProps.onClick;
|
|
701
|
-
$[36] = buttonProps.onClick;
|
|
702
|
-
$[37] = onOpen;
|
|
703
|
-
$[38] = orderProps;
|
|
704
|
-
$[39] = startLimitOrder;
|
|
705
|
-
$[40] = t6;
|
|
706
|
-
} else {
|
|
707
|
-
t6 = $[40];
|
|
708
|
-
}
|
|
709
|
-
const onClick = t6;
|
|
540
|
+
const content = orderProps ? /* @__PURE__ */ jsx(LimitOrderTradeOverview, { fromToken: orderProps.fromToken, toToken: orderProps.toToken, fromAmount: getFromAmount(orderProps), toAmount: getToAmount(orderProps), onDismiss, onCancelFlow: cancelFlow, onRetry: retryFlow, onCancelOrder, activeStep: step, orderCancellationStep, isFlowCancellable, explorerLink, result, error, erroredStep, tradeFlowType }) : null;
|
|
541
|
+
const onClick = orderProps ? () => {
|
|
542
|
+
onOpen();
|
|
543
|
+
startLimitOrder({
|
|
544
|
+
onTxSent: handleTxSent
|
|
545
|
+
});
|
|
546
|
+
} : buttonProps.onClick;
|
|
547
|
+
const T0 = Button;
|
|
548
|
+
const t2 = "cta";
|
|
549
|
+
const t3 = "lg";
|
|
550
|
+
const t4 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
551
|
+
const t5 = buttonProps.disabled || disabled;
|
|
552
|
+
const t6 = labelOverride || "Review Order";
|
|
710
553
|
let t7;
|
|
711
|
-
if ($[
|
|
712
|
-
t7 =
|
|
713
|
-
$[
|
|
714
|
-
$[
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
$[46] = t8;
|
|
727
|
-
$[47] = t9;
|
|
728
|
-
$[48] = t10;
|
|
729
|
-
} else {
|
|
730
|
-
t10 = $[48];
|
|
731
|
-
}
|
|
732
|
-
let t11;
|
|
733
|
-
if ($[49] !== cancelFlow || $[50] !== isFlowCancellable) {
|
|
734
|
-
t11 = () => {
|
|
554
|
+
if ($[7] !== T0 || $[8] !== buttonProps || $[9] !== onClick || $[10] !== t4 || $[11] !== t5 || $[12] !== t6) {
|
|
555
|
+
t7 = /* @__PURE__ */ jsx(T0, { variant: t2, radius: t3, ...buttonProps, className: t4, onClick, disabled: t5, children: t6 });
|
|
556
|
+
$[7] = T0;
|
|
557
|
+
$[8] = buttonProps;
|
|
558
|
+
$[9] = onClick;
|
|
559
|
+
$[10] = t4;
|
|
560
|
+
$[11] = t5;
|
|
561
|
+
$[12] = t6;
|
|
562
|
+
$[13] = t7;
|
|
563
|
+
} else {
|
|
564
|
+
t7 = $[13];
|
|
565
|
+
}
|
|
566
|
+
let t8;
|
|
567
|
+
if ($[14] !== cancelFlow || $[15] !== isFlowCancellable) {
|
|
568
|
+
t8 = () => {
|
|
735
569
|
if (isFlowCancellable) {
|
|
736
570
|
cancelFlow();
|
|
737
571
|
}
|
|
738
572
|
};
|
|
739
|
-
$[
|
|
740
|
-
$[
|
|
741
|
-
$[
|
|
573
|
+
$[14] = cancelFlow;
|
|
574
|
+
$[15] = isFlowCancellable;
|
|
575
|
+
$[16] = t8;
|
|
742
576
|
} else {
|
|
743
|
-
|
|
577
|
+
t8 = $[16];
|
|
744
578
|
}
|
|
745
|
-
let
|
|
746
|
-
if ($[
|
|
747
|
-
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
579
|
+
let t9;
|
|
580
|
+
if ($[17] !== content || $[18] !== drawerContainer || $[19] !== drawerProps || $[20] !== t8) {
|
|
581
|
+
t9 = /* @__PURE__ */ jsx(ControlledDrawer, { ...drawerProps, container: drawerContainer, onClose: t8, children: content });
|
|
582
|
+
$[17] = content;
|
|
583
|
+
$[18] = drawerContainer;
|
|
584
|
+
$[19] = drawerProps;
|
|
585
|
+
$[20] = t8;
|
|
586
|
+
$[21] = t9;
|
|
753
587
|
} else {
|
|
754
|
-
|
|
588
|
+
t9 = $[21];
|
|
755
589
|
}
|
|
756
|
-
let
|
|
757
|
-
if ($[
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
590
|
+
let t10;
|
|
591
|
+
if ($[22] !== t7 || $[23] !== t9) {
|
|
592
|
+
t10 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
593
|
+
t7,
|
|
594
|
+
t9
|
|
761
595
|
] });
|
|
762
|
-
$[
|
|
763
|
-
$[
|
|
764
|
-
$[
|
|
596
|
+
$[22] = t7;
|
|
597
|
+
$[23] = t9;
|
|
598
|
+
$[24] = t10;
|
|
765
599
|
} else {
|
|
766
|
-
|
|
600
|
+
t10 = $[24];
|
|
767
601
|
}
|
|
768
|
-
return
|
|
602
|
+
return t10;
|
|
769
603
|
}
|
|
770
604
|
function LimitOrderTradeFlowButton(t0) {
|
|
771
605
|
const $ = distExports.c(18);
|
|
@@ -862,69 +696,45 @@ function LimitOrderTradeFlowButton(t0) {
|
|
|
862
696
|
return t5;
|
|
863
697
|
}
|
|
864
698
|
function OtcOrderDrawerButton(t0) {
|
|
865
|
-
const $ = distExports.c(
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
orderProps,
|
|
875
|
-
drawerContainer,
|
|
876
|
-
otcPrice,
|
|
877
|
-
labelOverride,
|
|
878
|
-
drawerControls,
|
|
879
|
-
...buttonProps
|
|
880
|
-
} = t0);
|
|
881
|
-
$[0] = t0;
|
|
882
|
-
$[1] = buttonProps;
|
|
883
|
-
$[2] = drawerContainer;
|
|
884
|
-
$[3] = drawerControls;
|
|
885
|
-
$[4] = labelOverride;
|
|
886
|
-
$[5] = orderProps;
|
|
887
|
-
$[6] = otcPrice;
|
|
888
|
-
} else {
|
|
889
|
-
buttonProps = $[1];
|
|
890
|
-
drawerContainer = $[2];
|
|
891
|
-
drawerControls = $[3];
|
|
892
|
-
labelOverride = $[4];
|
|
893
|
-
orderProps = $[5];
|
|
894
|
-
otcPrice = $[6];
|
|
895
|
-
}
|
|
699
|
+
const $ = distExports.c(25);
|
|
700
|
+
const {
|
|
701
|
+
orderProps: orderPropsFromForm,
|
|
702
|
+
drawerContainer,
|
|
703
|
+
otcPrice: otcPriceFromForm,
|
|
704
|
+
labelOverride,
|
|
705
|
+
drawerControls,
|
|
706
|
+
...buttonProps
|
|
707
|
+
} = t0;
|
|
896
708
|
let drawerProps;
|
|
897
709
|
let onClose;
|
|
898
710
|
let onOpen;
|
|
899
|
-
if ($[
|
|
711
|
+
if ($[0] !== drawerControls) {
|
|
900
712
|
({
|
|
901
713
|
onOpen,
|
|
902
714
|
onClose,
|
|
903
715
|
...drawerProps
|
|
904
716
|
} = drawerControls);
|
|
905
|
-
$[
|
|
906
|
-
$[
|
|
907
|
-
$[
|
|
908
|
-
$[
|
|
717
|
+
$[0] = drawerControls;
|
|
718
|
+
$[1] = drawerProps;
|
|
719
|
+
$[2] = onClose;
|
|
720
|
+
$[3] = onOpen;
|
|
909
721
|
} else {
|
|
910
|
-
drawerProps = $[
|
|
911
|
-
onClose = $[
|
|
912
|
-
onOpen = $[
|
|
722
|
+
drawerProps = $[1];
|
|
723
|
+
onClose = $[2];
|
|
724
|
+
onOpen = $[3];
|
|
913
725
|
}
|
|
914
726
|
const {
|
|
915
727
|
isConnected
|
|
916
728
|
} = useAccount();
|
|
729
|
+
const {
|
|
730
|
+
orderProps,
|
|
731
|
+
userDefinedPrice: otcPrice
|
|
732
|
+
} = orderPropsFromForm ? addPreWrapToOrderProps({
|
|
733
|
+
orderProps: orderPropsFromForm,
|
|
734
|
+
priceMode: "userInputOrder",
|
|
735
|
+
userDefinedPrice: otcPriceFromForm
|
|
736
|
+
}) : {};
|
|
917
737
|
const disabled = !isConnected || !orderProps || !otcPrice;
|
|
918
|
-
let t1;
|
|
919
|
-
if ($[11] !== otcPrice) {
|
|
920
|
-
t1 = {
|
|
921
|
-
otcPrice
|
|
922
|
-
};
|
|
923
|
-
$[11] = otcPrice;
|
|
924
|
-
$[12] = t1;
|
|
925
|
-
} else {
|
|
926
|
-
t1 = $[12];
|
|
927
|
-
}
|
|
928
738
|
const {
|
|
929
739
|
step,
|
|
930
740
|
orderCancellationStep,
|
|
@@ -939,137 +749,89 @@ function OtcOrderDrawerButton(t0) {
|
|
|
939
749
|
error,
|
|
940
750
|
erroredStep,
|
|
941
751
|
tradeFlowType
|
|
942
|
-
} = useOtcOrderStep(
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const getFromAmount = t2;
|
|
952
|
-
let t3;
|
|
953
|
-
if ($[15] !== otcPrice) {
|
|
954
|
-
t3 = (orderProps_1) => otcPrice ? formatUnits(BigInt(otcPrice.destAmount), orderProps_1.toToken.decimals) : orderProps_1.toAmount;
|
|
955
|
-
$[15] = otcPrice;
|
|
956
|
-
$[16] = t3;
|
|
957
|
-
} else {
|
|
958
|
-
t3 = $[16];
|
|
959
|
-
}
|
|
960
|
-
const getToAmount = t3;
|
|
961
|
-
let t4;
|
|
962
|
-
if ($[17] !== onClose || $[18] !== reset) {
|
|
963
|
-
t4 = () => {
|
|
752
|
+
} = useOtcOrderStep({
|
|
753
|
+
otcPrice,
|
|
754
|
+
preWrapETH: orderProps?.preWrapETH
|
|
755
|
+
});
|
|
756
|
+
const getFromAmount = (orderProps_0) => otcPrice ? formatUnits(BigInt(otcPrice.srcAmount), orderProps_0.fromToken.decimals) : orderProps_0.fromAmount;
|
|
757
|
+
const getToAmount = (orderProps_1) => otcPrice ? formatUnits(BigInt(otcPrice.destAmount), orderProps_1.toToken.decimals) : orderProps_1.toAmount;
|
|
758
|
+
let t1;
|
|
759
|
+
if ($[4] !== onClose || $[5] !== reset) {
|
|
760
|
+
t1 = () => {
|
|
964
761
|
onClose();
|
|
965
762
|
reset();
|
|
966
763
|
};
|
|
967
|
-
$[
|
|
968
|
-
$[
|
|
969
|
-
$[
|
|
764
|
+
$[4] = onClose;
|
|
765
|
+
$[5] = reset;
|
|
766
|
+
$[6] = t1;
|
|
970
767
|
} else {
|
|
971
|
-
|
|
768
|
+
t1 = $[6];
|
|
972
769
|
}
|
|
973
|
-
const onDismiss =
|
|
770
|
+
const onDismiss = t1;
|
|
974
771
|
const onCancelOrder = isOrderCancellable ? cancelOtcOrder : void 0;
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
$[30] = result;
|
|
989
|
-
$[31] = retryFlow;
|
|
990
|
-
$[32] = step;
|
|
991
|
-
$[33] = tradeFlowType;
|
|
992
|
-
$[34] = t5;
|
|
993
|
-
} else {
|
|
994
|
-
t5 = $[34];
|
|
995
|
-
}
|
|
996
|
-
const content = t5;
|
|
997
|
-
let t6;
|
|
998
|
-
if ($[35] !== buttonProps.onClick || $[36] !== onOpen || $[37] !== orderProps || $[38] !== startOtcOrder) {
|
|
999
|
-
t6 = orderProps ? () => {
|
|
1000
|
-
onOpen();
|
|
1001
|
-
startOtcOrder({
|
|
1002
|
-
onTxSent: handleTxSent
|
|
1003
|
-
});
|
|
1004
|
-
} : buttonProps.onClick;
|
|
1005
|
-
$[35] = buttonProps.onClick;
|
|
1006
|
-
$[36] = onOpen;
|
|
1007
|
-
$[37] = orderProps;
|
|
1008
|
-
$[38] = startOtcOrder;
|
|
1009
|
-
$[39] = t6;
|
|
1010
|
-
} else {
|
|
1011
|
-
t6 = $[39];
|
|
1012
|
-
}
|
|
1013
|
-
const onClick = t6;
|
|
772
|
+
const content = orderProps ? /* @__PURE__ */ jsx(OtcOrderTradeOverview, { fromToken: orderProps.fromToken, toToken: orderProps.toToken, fromAmount: getFromAmount(orderProps), toAmount: getToAmount(orderProps), onDismiss, onCancelFlow: cancelFlow, onRetry: retryFlow, onCancelOrder, activeStep: step, orderCancellationStep, isFlowCancellable, result, error, erroredStep, tradeFlowType }) : null;
|
|
773
|
+
const onClick = orderProps ? () => {
|
|
774
|
+
onOpen();
|
|
775
|
+
startOtcOrder({
|
|
776
|
+
onTxSent: handleTxSent
|
|
777
|
+
});
|
|
778
|
+
} : buttonProps.onClick;
|
|
779
|
+
const T0 = Button;
|
|
780
|
+
const t2 = "cta";
|
|
781
|
+
const t3 = "lg";
|
|
782
|
+
const t4 = cn("w-full mt-4 h-[48px] text-md", buttonProps.className);
|
|
783
|
+
const t5 = buttonProps.disabled || disabled;
|
|
784
|
+
const t6 = labelOverride || "Review Order";
|
|
1014
785
|
let t7;
|
|
1015
|
-
if ($[
|
|
1016
|
-
t7 =
|
|
1017
|
-
$[
|
|
1018
|
-
$[
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
$[45] = t8;
|
|
1031
|
-
$[46] = t9;
|
|
1032
|
-
$[47] = t10;
|
|
1033
|
-
} else {
|
|
1034
|
-
t10 = $[47];
|
|
1035
|
-
}
|
|
1036
|
-
let t11;
|
|
1037
|
-
if ($[48] !== cancelFlow || $[49] !== isFlowCancellable) {
|
|
1038
|
-
t11 = () => {
|
|
786
|
+
if ($[7] !== T0 || $[8] !== buttonProps || $[9] !== onClick || $[10] !== t4 || $[11] !== t5 || $[12] !== t6) {
|
|
787
|
+
t7 = /* @__PURE__ */ jsx(T0, { variant: t2, radius: t3, ...buttonProps, className: t4, onClick, disabled: t5, children: t6 });
|
|
788
|
+
$[7] = T0;
|
|
789
|
+
$[8] = buttonProps;
|
|
790
|
+
$[9] = onClick;
|
|
791
|
+
$[10] = t4;
|
|
792
|
+
$[11] = t5;
|
|
793
|
+
$[12] = t6;
|
|
794
|
+
$[13] = t7;
|
|
795
|
+
} else {
|
|
796
|
+
t7 = $[13];
|
|
797
|
+
}
|
|
798
|
+
let t8;
|
|
799
|
+
if ($[14] !== cancelFlow || $[15] !== isFlowCancellable) {
|
|
800
|
+
t8 = () => {
|
|
1039
801
|
if (isFlowCancellable) {
|
|
1040
802
|
cancelFlow();
|
|
1041
803
|
}
|
|
1042
804
|
};
|
|
1043
|
-
$[
|
|
1044
|
-
$[
|
|
1045
|
-
$[
|
|
805
|
+
$[14] = cancelFlow;
|
|
806
|
+
$[15] = isFlowCancellable;
|
|
807
|
+
$[16] = t8;
|
|
1046
808
|
} else {
|
|
1047
|
-
|
|
809
|
+
t8 = $[16];
|
|
1048
810
|
}
|
|
1049
|
-
let
|
|
1050
|
-
if ($[
|
|
1051
|
-
|
|
1052
|
-
$[
|
|
1053
|
-
$[
|
|
1054
|
-
$[
|
|
1055
|
-
$[
|
|
1056
|
-
$[
|
|
811
|
+
let t9;
|
|
812
|
+
if ($[17] !== content || $[18] !== drawerContainer || $[19] !== drawerProps || $[20] !== t8) {
|
|
813
|
+
t9 = /* @__PURE__ */ jsx(ControlledDrawer, { ...drawerProps, container: drawerContainer, onClose: t8, children: content });
|
|
814
|
+
$[17] = content;
|
|
815
|
+
$[18] = drawerContainer;
|
|
816
|
+
$[19] = drawerProps;
|
|
817
|
+
$[20] = t8;
|
|
818
|
+
$[21] = t9;
|
|
1057
819
|
} else {
|
|
1058
|
-
|
|
820
|
+
t9 = $[21];
|
|
1059
821
|
}
|
|
1060
|
-
let
|
|
1061
|
-
if ($[
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
822
|
+
let t10;
|
|
823
|
+
if ($[22] !== t7 || $[23] !== t9) {
|
|
824
|
+
t10 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
825
|
+
t7,
|
|
826
|
+
t9
|
|
1065
827
|
] });
|
|
1066
|
-
$[
|
|
1067
|
-
$[
|
|
1068
|
-
$[
|
|
828
|
+
$[22] = t7;
|
|
829
|
+
$[23] = t9;
|
|
830
|
+
$[24] = t10;
|
|
1069
831
|
} else {
|
|
1070
|
-
|
|
832
|
+
t10 = $[24];
|
|
1071
833
|
}
|
|
1072
|
-
return
|
|
834
|
+
return t10;
|
|
1073
835
|
}
|
|
1074
836
|
function OtcOrderTradeFlowButton(t0) {
|
|
1075
837
|
const $ = distExports.c(18);
|
|
@@ -1165,6 +927,37 @@ function OtcOrderTradeFlowButton(t0) {
|
|
|
1165
927
|
}
|
|
1166
928
|
return t5;
|
|
1167
929
|
}
|
|
930
|
+
function addPreWrapToOrderProps({
|
|
931
|
+
orderProps,
|
|
932
|
+
priceMode,
|
|
933
|
+
userDefinedPrice
|
|
934
|
+
}) {
|
|
935
|
+
const {
|
|
936
|
+
fromToken
|
|
937
|
+
} = orderProps;
|
|
938
|
+
if ((priceMode === "delta" || priceMode === "userInputOrder") && isETH(fromToken)) {
|
|
939
|
+
const fromTokenWeth = wrappedNativeTokensByChainId[fromToken.network];
|
|
940
|
+
const newOrderProps = {
|
|
941
|
+
...orderProps,
|
|
942
|
+
fromToken: fromTokenWeth,
|
|
943
|
+
// use WETH instead as fromToken
|
|
944
|
+
preWrapETH: true
|
|
945
|
+
// and indicate that ETH should be preWrapped
|
|
946
|
+
};
|
|
947
|
+
const newUserDefinedPrice = userDefinedPrice ? {
|
|
948
|
+
...userDefinedPrice,
|
|
949
|
+
srcTokenAddress: fromTokenWeth.address
|
|
950
|
+
} : void 0;
|
|
951
|
+
return {
|
|
952
|
+
orderProps: newOrderProps,
|
|
953
|
+
userDefinedPrice: newUserDefinedPrice
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
return {
|
|
957
|
+
orderProps,
|
|
958
|
+
userDefinedPrice
|
|
959
|
+
};
|
|
960
|
+
}
|
|
1168
961
|
|
|
1169
962
|
export { LimitOrderTradeFlowButton, OtcOrderTradeFlowButton, SwapTradeFlowButton };
|
|
1170
963
|
//# sourceMappingURL=TradeFlowButton.js.map
|