@layerswap/widget 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Models/LayerSwapSettings.js +0 -1
- package/dist/esm/Models/Theme.js +39 -0
- package/dist/esm/components/Buttons/submitButton.js +2 -1
- package/dist/esm/components/Common/ConnectWalletButton.js +9 -3
- package/dist/esm/components/Common/CountDownTimer.js +0 -1
- package/dist/esm/components/Common/WarningMessage.js +4 -2
- package/dist/esm/components/Common/guideLink.js +4 -6
- package/dist/esm/components/ErrorFallback.js +11 -11
- package/dist/esm/components/HeaderWithMenu.js +1 -1
- package/dist/esm/components/Icons/Wallets/Xverse.js +3 -0
- package/dist/esm/components/Icons/Wallets/index.js +1 -0
- package/dist/esm/components/Input/Address/AddressPicker/index.js +15 -12
- package/dist/esm/components/Input/Amount/Balance.js +1 -1
- package/dist/esm/components/Input/Amount/ExchangeReceiveAmount.js +8 -0
- package/dist/esm/components/Input/Amount/MinMax.js +1 -1
- package/dist/esm/components/Input/Amount/PriceImpact.js +5 -38
- package/dist/esm/components/Input/Amount/ReceiveAmount.js +2 -2
- package/dist/esm/components/Input/Amount/index.js +3 -3
- package/dist/esm/components/Input/DestinationPicker.js +2 -2
- package/dist/esm/components/Input/RoutePicker/Content.js +2 -2
- package/dist/esm/components/Input/RoutePicker/RouterPickerWalletConnect.js +5 -5
- package/dist/esm/components/Input/RoutePicker/Routes.js +18 -18
- package/dist/esm/components/Input/RoutePicker/Rows/CollapsableHeader.js +2 -2
- package/dist/esm/components/Input/RoutePicker/Rows/CollapsibleRow.js +3 -3
- package/dist/esm/components/Input/RoutePicker/Rows/StickyHeader.js +2 -2
- package/dist/esm/components/Input/RoutePicker/Rows/SuggestionsHeader.js +55 -0
- package/dist/esm/components/Input/RoutePicker/Rows/TitleRow.js +11 -0
- package/dist/esm/components/Input/RoutePicker/Rows/index.js +5 -6
- package/dist/esm/components/Input/RoutePicker/index.js +2 -2
- package/dist/esm/components/Input/SourceWalletPicker.js +6 -4
- package/dist/esm/components/Menu/index.js +1 -1
- package/dist/esm/components/Pages/Campaigns/Details/Leaderboard.js +2 -2
- package/dist/esm/components/Pages/Campaigns/Details/Rewards.js +2 -2
- package/dist/esm/components/Pages/Campaigns/Details/index.js +2 -3
- package/dist/esm/components/Pages/Campaigns/index.js +3 -4
- package/dist/esm/components/Pages/Swap/Form/ExchangeForm.js +21 -19
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/Rate.js +5 -4
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/Refuel.js +2 -2
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/SwapQuote/DetailedEstimates.js +51 -14
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/SwapQuote/SummaryRow.js +1 -1
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/SwapQuote/index.js +3 -3
- package/dist/esm/components/Pages/Swap/Form/FeeDetails/index.js +8 -9
- package/dist/esm/components/Pages/Swap/Form/Form.js +27 -3
- package/dist/esm/components/Pages/Swap/Form/FormWrapper.js +6 -8
- package/dist/esm/components/Pages/Swap/Form/NetworkForm.js +11 -21
- package/dist/esm/components/Pages/Swap/Form/SecondaryComponents/ReserveGasNote.js +8 -6
- package/dist/esm/components/Pages/Swap/Withdraw/Failed.js +12 -8
- package/dist/esm/components/Pages/Swap/Withdraw/ManualWithdraw.js +28 -9
- package/dist/esm/components/Pages/Swap/Withdraw/NotFound.js +15 -4
- package/dist/esm/components/Pages/Swap/Withdraw/Processing/Processing.js +36 -41
- package/dist/esm/components/Pages/Swap/Withdraw/Summary/Summary.js +1 -1
- package/dist/esm/components/Pages/Swap/Withdraw/Summary/index.js +2 -2
- package/dist/esm/components/Pages/Swap/Withdraw/SwapDetails.js +9 -7
- package/dist/esm/components/Pages/Swap/Withdraw/Wallet/Common/actionMessage.js +43 -0
- package/dist/esm/components/Pages/Swap/Withdraw/Wallet/Common/buttons.js +118 -71
- package/dist/esm/components/Pages/Swap/Withdraw/Wallet/index.js +56 -65
- package/dist/esm/components/Pages/Swap/Withdraw/WalletTransferButton.js +2 -2
- package/dist/esm/components/Pages/Swap/Withdraw/WalletTransferContent.js +2 -2
- package/dist/esm/components/Pages/Swap/Withdraw/Withdraw.js +3 -3
- package/dist/esm/components/Pages/Swap/Withdraw/index.js +5 -4
- package/dist/esm/components/Pages/Swap/Withdraw/messages/TransactionMessages.js +14 -15
- package/dist/esm/components/Pages/SwapHistory/History.js +1 -1
- package/dist/esm/components/Pages/SwapHistory/index.js +4 -4
- package/dist/esm/components/Wallet/WalletComponents/WalletsList.js +1 -1
- package/dist/esm/components/Wallet/WalletModal/Connector.js +2 -2
- package/dist/esm/components/Wallet/WalletModal/ConnectorsList.js +5 -1
- package/dist/esm/components/Wallet/WalletModal/index.js +3 -1
- package/dist/esm/components/Wallet/WalletProviders/index.js +4 -2
- package/dist/esm/components/Widget/Content.js +2 -2
- package/dist/esm/components/Widget/Footer.js +1 -1
- package/dist/esm/components/Widget/Index.js +1 -1
- package/dist/esm/components/WidgetLoading.js +9 -2
- package/dist/esm/context/ErrorProvider.js +14 -0
- package/dist/esm/context/LayerswapProvider.js +6 -5
- package/dist/esm/context/callbackProvider.js +54 -52
- package/dist/esm/context/resolverContext.js +7 -2
- package/dist/esm/context/swap.js +10 -13
- package/dist/esm/context/{balanceAccounts.js → swapAccounts.js} +17 -17
- package/dist/esm/context/validationContext.js +1 -1
- package/dist/esm/context/walletProviders.js +7 -1
- package/dist/esm/context/withdrawalContext.js +2 -2
- package/dist/esm/exports/internal.js +4 -3
- package/dist/esm/helpers/filterSourceNetworks.js +23 -0
- package/dist/esm/helpers/getSettings/getSettings.js +18 -13
- package/dist/esm/helpers/routes.js +4 -1
- package/dist/esm/hooks/useAllWithdrawalBalances.js +6 -5
- package/dist/esm/hooks/useFormRoutes.js +16 -8
- package/dist/esm/hooks/useFormValidation.js +5 -4
- package/dist/esm/hooks/useRouteValidation.js +1 -1
- package/dist/esm/hooks/useSwrSwaps.js +1 -1
- package/dist/esm/hooks/useTransfer.js +9 -0
- package/dist/esm/hooks/useWallet.js +7 -7
- package/dist/esm/lib/AppSettings.js +27 -16
- package/dist/esm/lib/ErrorHandler.js +6 -0
- package/dist/esm/lib/apiClients/layerSwapApiClient.js +12 -35
- package/dist/esm/lib/balances/balanceResolver.js +9 -13
- package/dist/esm/lib/fees.js +50 -0
- package/dist/esm/lib/resolvers/resolverService.js +10 -1
- package/dist/esm/lib/transfers/index.js +1 -0
- package/dist/esm/lib/transfers/transferResolver.js +14 -0
- package/dist/esm/stores/balanceStore.js +0 -1
- package/dist/esm/stores/logStore.js +11 -0
- package/dist/esm/types/balance.js +8 -9
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/logEvents.js +1 -0
- package/dist/index.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/Models/Balance.d.ts +1 -1
- package/dist/types/Models/LayerSwapSettings.d.ts +7 -0
- package/dist/types/Models/LayerSwapSettings.d.ts.map +1 -1
- package/dist/types/Models/Theme.d.ts.map +1 -1
- package/dist/types/components/Buttons/submitButton.d.ts +1 -1
- package/dist/types/components/Buttons/submitButton.d.ts.map +1 -1
- package/dist/types/components/Common/ConnectWalletButton.d.ts +1 -1
- package/dist/types/components/Common/ConnectWalletButton.d.ts.map +1 -1
- package/dist/types/components/Common/CountDownTimer.d.ts.map +1 -1
- package/dist/types/components/Common/WarningMessage.d.ts.map +1 -1
- package/dist/types/components/Common/guideLink.d.ts.map +1 -1
- package/dist/types/components/ErrorFallback.d.ts.map +1 -1
- package/dist/types/components/HeaderWithMenu.d.ts.map +1 -1
- package/dist/types/components/Icons/Wallets/Xverse.d.ts +4 -0
- package/dist/types/components/Icons/Wallets/Xverse.d.ts.map +1 -0
- package/dist/types/components/Icons/Wallets/index.d.ts +1 -0
- package/dist/types/components/Icons/Wallets/index.d.ts.map +1 -1
- package/dist/types/components/Input/Address/AddressNote.d.ts +2 -2
- package/dist/types/components/Input/Address/AddressPicker/AddressBook.d.ts +3 -3
- package/dist/types/components/Input/Address/AddressPicker/AddressButton.d.ts +3 -3
- package/dist/types/components/Input/Address/AddressPicker/AddressWithIcon.d.ts +2 -2
- package/dist/types/components/Input/Address/AddressPicker/ConnectedWallets.d.ts +2 -2
- package/dist/types/components/Input/Address/AddressPicker/ManualAddressInput.d.ts +4 -4
- package/dist/types/components/Input/Address/AddressPicker/index.d.ts +4 -4
- package/dist/types/components/Input/Address/AddressPicker/index.d.ts.map +1 -1
- package/dist/types/components/Input/Address/index.d.ts +1 -1
- package/dist/types/components/Input/Amount/Balance.d.ts +1 -1
- package/dist/types/components/Input/Amount/Balance.d.ts.map +1 -1
- package/dist/types/components/Input/Amount/ExchangeReceiveAmount.d.ts +11 -0
- package/dist/types/components/Input/Amount/ExchangeReceiveAmount.d.ts.map +1 -0
- package/dist/types/components/Input/Amount/MinMax.d.ts +1 -1
- package/dist/types/components/Input/Amount/PriceImpact.d.ts +2 -6
- package/dist/types/components/Input/Amount/PriceImpact.d.ts.map +1 -1
- package/dist/types/components/Input/Amount/ReceiveAmount.d.ts +2 -3
- package/dist/types/components/Input/Amount/ReceiveAmount.d.ts.map +1 -1
- package/dist/types/components/Input/Amount/helpers.d.ts +2 -2
- package/dist/types/components/Input/Amount/index.d.ts +1 -1
- package/dist/types/components/Input/CexPicker.d.ts +1 -1
- package/dist/types/components/Input/DestinationPicker.d.ts +1 -1
- package/dist/types/components/Input/DestinationPicker.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/Content.d.ts +5 -5
- package/dist/types/components/Input/RoutePicker/Content.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/RouterPickerWalletConnect.d.ts +1 -1
- package/dist/types/components/Input/RoutePicker/Routes.d.ts +4 -8
- package/dist/types/components/Input/RoutePicker/Routes.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/Rows/CollapsableHeader.d.ts +3 -4
- package/dist/types/components/Input/RoutePicker/Rows/CollapsableHeader.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/Rows/CollapsibleRow.d.ts +6 -5
- package/dist/types/components/Input/RoutePicker/Rows/CollapsibleRow.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/Rows/StickyHeader.d.ts +3 -4
- package/dist/types/components/Input/RoutePicker/Rows/StickyHeader.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/Rows/SuggestionsHeader.d.ts +7 -0
- package/dist/types/components/Input/RoutePicker/Rows/SuggestionsHeader.d.ts.map +1 -0
- package/dist/types/components/Input/RoutePicker/Rows/TitleRow.d.ts +7 -0
- package/dist/types/components/Input/RoutePicker/Rows/TitleRow.d.ts.map +1 -0
- package/dist/types/components/Input/RoutePicker/Rows/index.d.ts +5 -5
- package/dist/types/components/Input/RoutePicker/Rows/index.d.ts.map +1 -1
- package/dist/types/components/Input/RoutePicker/index.d.ts +1 -1
- package/dist/types/components/Input/RoutePicker/index.d.ts.map +1 -1
- package/dist/types/components/Input/SourcePicker.d.ts +1 -1
- package/dist/types/components/Input/SourceWalletPicker.d.ts.map +1 -1
- package/dist/types/components/Pages/Campaigns/Details/Leaderboard.d.ts +1 -1
- package/dist/types/components/Pages/Campaigns/Details/Rewards.d.ts +1 -1
- package/dist/types/components/Pages/Campaigns/Details/index.d.ts +1 -2
- package/dist/types/components/Pages/Campaigns/Details/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Campaigns/index.d.ts +2 -3
- package/dist/types/components/Pages/Campaigns/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/ExchangeForm.d.ts +3 -1
- package/dist/types/components/Pages/Swap/Form/ExchangeForm.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/Rate.d.ts +7 -6
- package/dist/types/components/Pages/Swap/Form/FeeDetails/Rate.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/ReceiveAmounts.d.ts +2 -2
- package/dist/types/components/Pages/Swap/Form/FeeDetails/Refuel.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/RefuelModal.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/Slippage.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/DetailedEstimates.d.ts +3 -2
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/DetailedEstimates.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/SummaryRow.d.ts +4 -4
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/index.d.ts +4 -4
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/FeeDetails/SwapQuote/utils.d.ts +2 -2
- package/dist/types/components/Pages/Swap/Form/FeeDetails/index.d.ts +7 -4
- package/dist/types/components/Pages/Swap/Form/FeeDetails/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/Form.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/FormWrapper.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/FormWrapper.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/NetworkForm.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/NetworkForm.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/SecondaryComponents/FormButton.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/SecondaryComponents/ReserveGasNote.d.ts +2 -2
- package/dist/types/components/Pages/Swap/Form/SecondaryComponents/ReserveGasNote.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Form/SecondaryComponents/validationError/ErrorDisplay.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Form/SwapFormValues.d.ts +2 -2
- package/dist/types/components/Pages/Swap/Withdraw/Failed.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/ManualWithdraw.d.ts +4 -3
- package/dist/types/components/Pages/Swap/Withdraw/ManualWithdraw.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/NotFound.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Processing/Processing.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Processing/Processing.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/QuoteUpdate.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Summary/Summary.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/SwapDetails.d.ts +2 -1
- package/dist/types/components/Pages/Swap/Withdraw/SwapDetails.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/SwapQuoteDetails.d.ts +3 -3
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/actionMessage.d.ts +6 -0
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/actionMessage.d.ts.map +1 -0
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/buttons.d.ts +4 -3
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/buttons.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/sharedTypes.d.ts +2 -1
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/Common/sharedTypes.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/index.d.ts +2 -1
- package/dist/types/components/Pages/Swap/Withdraw/Wallet/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/WalletTransferButton.d.ts +2 -1
- package/dist/types/components/Pages/Swap/Withdraw/WalletTransferButton.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/WalletTransferContent.d.ts +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/Withdraw.d.ts +2 -1
- package/dist/types/components/Pages/Swap/Withdraw/Withdraw.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/index.d.ts +1 -2
- package/dist/types/components/Pages/Swap/Withdraw/index.d.ts.map +1 -1
- package/dist/types/components/Pages/Swap/Withdraw/messages/TransactionMessages.d.ts +3 -4
- package/dist/types/components/Pages/Swap/Withdraw/messages/TransactionMessages.d.ts.map +1 -1
- package/dist/types/components/Pages/SwapHistory/HistorySummary.d.ts +2 -2
- package/dist/types/components/Pages/SwapHistory/StatusIcons.d.ts +1 -1
- package/dist/types/components/Pages/SwapHistory/SwapDetailsComponent.d.ts +1 -1
- package/dist/types/components/Pages/SwapHistory/index.d.ts +3 -1
- package/dist/types/components/Pages/SwapHistory/index.d.ts.map +1 -1
- package/dist/types/components/Wallet/WalletComponents/WalletsList.d.ts +3 -3
- package/dist/types/components/Wallet/WalletComponents/WalletsList.d.ts.map +1 -1
- package/dist/types/components/Wallet/WalletModal/Connector.d.ts +2 -1
- package/dist/types/components/Wallet/WalletModal/Connector.d.ts.map +1 -1
- package/dist/types/components/Wallet/WalletModal/ConnectorsList.d.ts +1 -1
- package/dist/types/components/Wallet/WalletModal/ConnectorsList.d.ts.map +1 -1
- package/dist/types/components/Wallet/WalletModal/index.d.ts +1 -1
- package/dist/types/components/Wallet/WalletModal/index.d.ts.map +1 -1
- package/dist/types/components/Wallet/WalletProviders/index.d.ts +3 -1
- package/dist/types/components/Wallet/WalletProviders/index.d.ts.map +1 -1
- package/dist/types/components/Widget/Content.d.ts +2 -1
- package/dist/types/components/Widget/Content.d.ts.map +1 -1
- package/dist/types/components/Widget/Footer.d.ts +2 -1
- package/dist/types/components/Widget/Footer.d.ts.map +1 -1
- package/dist/types/components/Widget/Index.d.ts +3 -2
- package/dist/types/components/Widget/Index.d.ts.map +1 -1
- package/dist/types/components/WidgetLoading.d.ts.map +1 -1
- package/dist/types/components/shadcn/command.d.ts +9 -52
- package/dist/types/components/shadcn/command.d.ts.map +1 -1
- package/dist/types/context/ErrorProvider.d.ts +3 -0
- package/dist/types/context/ErrorProvider.d.ts.map +1 -0
- package/dist/types/context/LayerswapProvider.d.ts +22 -4
- package/dist/types/context/LayerswapProvider.d.ts.map +1 -1
- package/dist/types/context/callbackProvider.d.ts +6 -10
- package/dist/types/context/callbackProvider.d.ts.map +1 -1
- package/dist/types/context/resolverContext.d.ts.map +1 -1
- package/dist/types/context/swap.d.ts +7 -7
- package/dist/types/context/swap.d.ts.map +1 -1
- package/dist/types/context/{balanceAccounts.d.ts → swapAccounts.d.ts} +9 -9
- package/dist/types/context/swapAccounts.d.ts.map +1 -0
- package/dist/types/context/walletProviders.d.ts.map +1 -1
- package/dist/types/context/withdrawalContext.d.ts +2 -0
- package/dist/types/context/withdrawalContext.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +9 -7
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/helpers/accountSelectHelper.d.ts +1 -1
- package/dist/types/helpers/balanceHelper.d.ts +2 -2
- package/dist/types/helpers/filterSourceNetworks.d.ts +4 -0
- package/dist/types/helpers/filterSourceNetworks.d.ts.map +1 -0
- package/dist/types/helpers/getSettings/getSettings.d.ts +1 -1
- package/dist/types/helpers/getSettings/getSettings.d.ts.map +1 -1
- package/dist/types/helpers/routes.d.ts +1 -1
- package/dist/types/helpers/routes.d.ts.map +1 -1
- package/dist/types/helpers/tokenHelper.d.ts +2 -2
- package/dist/types/hooks/useAllWithdrawalBalances.d.ts +2 -1
- package/dist/types/hooks/useAllWithdrawalBalances.d.ts.map +1 -1
- package/dist/types/hooks/useFee.d.ts +1 -1
- package/dist/types/hooks/useFormRoutes.d.ts +2 -3
- package/dist/types/hooks/useFormRoutes.d.ts.map +1 -1
- package/dist/types/hooks/useFormValidation.d.ts +2 -1
- package/dist/types/hooks/useFormValidation.d.ts.map +1 -1
- package/dist/types/hooks/useSwapHistoryData.d.ts +2 -2
- package/dist/types/hooks/useTransfer.d.ts +5 -0
- package/dist/types/hooks/useTransfer.d.ts.map +1 -0
- package/dist/types/hooks/useWallet.d.ts +3 -3
- package/dist/types/hooks/useWallet.d.ts.map +1 -1
- package/dist/types/lib/AppSettings.d.ts +25 -16
- package/dist/types/lib/AppSettings.d.ts.map +1 -1
- package/dist/types/lib/ErrorHandler.d.ts +3 -0
- package/dist/types/lib/ErrorHandler.d.ts.map +1 -0
- package/dist/types/lib/apiClients/layerSwapApiClient.d.ts +1 -9
- package/dist/types/lib/apiClients/layerSwapApiClient.d.ts.map +1 -1
- package/dist/types/lib/balances/balanceResolver.d.ts +3 -3
- package/dist/types/lib/balances/balanceResolver.d.ts.map +1 -1
- package/dist/types/lib/balances/helpers.d.ts +1 -1
- package/dist/types/lib/balances/useBalance.d.ts +1 -1
- package/dist/types/lib/fees.d.ts +16 -0
- package/dist/types/lib/fees.d.ts.map +1 -1
- package/dist/types/lib/gases/gasResolver.d.ts +2 -2
- package/dist/types/lib/gases/useSWRGas.d.ts +3 -3
- package/dist/types/lib/generateSwapInitialValues.d.ts +1 -1
- package/dist/types/lib/nft/nftBalanceResolver.d.ts +1 -1
- package/dist/types/lib/resolvers/resolverService.d.ts +8 -5
- package/dist/types/lib/resolvers/resolverService.d.ts.map +1 -1
- package/dist/types/lib/sorting.d.ts +1 -1
- package/dist/types/lib/transfers/index.d.ts +2 -0
- package/dist/types/lib/transfers/index.d.ts.map +1 -0
- package/dist/types/lib/transfers/transferResolver.d.ts +7 -0
- package/dist/types/lib/transfers/transferResolver.d.ts.map +1 -0
- package/dist/types/stores/balanceStore.d.ts.map +1 -1
- package/dist/types/stores/logStore.d.ts +8 -0
- package/dist/types/stores/logStore.d.ts.map +1 -0
- package/dist/types/stores/walletStore.d.ts +1 -1
- package/dist/types/types/balance.d.ts +2 -2
- package/dist/types/types/balance.d.ts.map +1 -1
- package/dist/types/types/gas.d.ts +2 -2
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/logEvents.d.ts +41 -0
- package/dist/types/types/logEvents.d.ts.map +1 -0
- package/dist/types/types/nft.d.ts +1 -1
- package/dist/types/types/transfer.d.ts +7 -2
- package/dist/types/types/transfer.d.ts.map +1 -1
- package/dist/types/types/wallet.d.ts +23 -5
- package/dist/types/types/wallet.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/esm/helpers/querryHelper.js +0 -13
- package/dist/esm/lib/logError.js +0 -17
- package/dist/types/context/balanceAccounts.d.ts.map +0 -1
- package/dist/types/helpers/querryHelper.d.ts +0 -3
- package/dist/types/helpers/querryHelper.d.ts.map +0 -1
- package/dist/types/lib/logError.d.ts +0 -3
- package/dist/types/lib/logError.d.ts.map +0 -1
|
@@ -9,8 +9,10 @@ import { SwapStatus } from '../../../../Models/SwapStatus';
|
|
|
9
9
|
import { useSwapTransactionStore } from '../../../../stores/swapTransactionStore';
|
|
10
10
|
import SubmitButton from '../../../../components/Buttons/submitButton';
|
|
11
11
|
import ManualWithdraw from './ManualWithdraw';
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { useCallbacks } from "../../../../context/callbackProvider";
|
|
13
|
+
const SwapDetails = ({ type, onWalletWithdrawalSuccess, onCancelWithdrawal, partner }) => {
|
|
14
|
+
const { swapDetails, swapBasicData, refuel, depositActionsResponse, quote, quoteIsLoading } = useSwapDataState();
|
|
15
|
+
const { onBackClick } = useCallbacks();
|
|
14
16
|
const swapStatus = swapDetails?.status || SwapStatus.UserTransferPending;
|
|
15
17
|
const storedWalletTransactions = useSwapTransactionStore();
|
|
16
18
|
const swapInputTransaction = swapDetails?.transactions?.find(t => t.type === TransactionType.Input);
|
|
@@ -20,18 +22,18 @@ const SwapDetails = ({ type, onWalletWithdrawalSuccess, partner }) => {
|
|
|
20
22
|
}, [swapDetails?.id, storedWalletTransactions]);
|
|
21
23
|
if (!swapBasicData)
|
|
22
24
|
return _jsx(_Fragment, { children: _jsx("div", { className: "w-full h-[430px]", children: _jsx("div", { className: "animate-pulse flex space-x-4", children: _jsxs("div", { className: "flex-1 space-y-6 py-1", children: [_jsx("div", { className: "h-32 bg-secondary-700 rounded-lg" }), _jsx("div", { className: "h-40 bg-secondary-700 rounded-lg" }), _jsx("div", { className: "h-12 bg-secondary-700 rounded-lg" })] }) }) }) });
|
|
23
|
-
return (_jsx(Container, { type: type, children: ((swapStatus === SwapStatus.UserTransferPending
|
|
25
|
+
return (_jsx(Container, { type: type, goBack: onBackClick, children: ((swapStatus === SwapStatus.UserTransferPending
|
|
24
26
|
&& !(swapInputTransaction || storedWalletTransaction))) ?
|
|
25
27
|
(swapBasicData?.use_deposit_address === true
|
|
26
|
-
? _jsx(ManualWithdraw, { swapBasicData: swapBasicData,
|
|
27
|
-
: _jsx(Withdraw, { type: type, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, partner: partner }))
|
|
28
|
+
? _jsx(ManualWithdraw, { swapBasicData: swapBasicData, depositActions: depositActionsResponse, refuel: refuel, partner: partner, type: type, quote: quote, isQuoteLoading: quoteIsLoading })
|
|
29
|
+
: _jsx(Withdraw, { type: type, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, onCancelWithdrawal: onCancelWithdrawal, partner: partner }))
|
|
28
30
|
:
|
|
29
31
|
_jsxs("div", { className: 'space-y-3 w-full h-full', children: [_jsx(Processing, {}), storedWalletTransaction?.status == BackendTransactionStatus.Failed &&
|
|
30
32
|
_jsx(SubmitButton, { isDisabled: false, isSubmitting: false, onClick: removeStoredTransaction, children: "Try again" })] }) }));
|
|
31
33
|
};
|
|
32
|
-
const Container = ({ type, children }) => {
|
|
34
|
+
const Container = ({ type, children, goBack }) => {
|
|
33
35
|
if (type === "widget")
|
|
34
|
-
return _jsx(Widget, { children: _jsx(_Fragment, { children: children }) });
|
|
36
|
+
return _jsx(Widget, { goBack: goBack, children: _jsx(_Fragment, { children: children }) });
|
|
35
37
|
else
|
|
36
38
|
return _jsx("div", { className: "w-full flex flex-col justify-between h-full space-y-3 text-secondary-text", children: children });
|
|
37
39
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { ActionMessages, ActionMessageType } from "../../messages/TransactionMessages";
|
|
4
|
+
import { ErrorHandler } from "../../../../../../lib/ErrorHandler";
|
|
5
|
+
export const ActionMessage = ({ error, isLoading }) => {
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (error && (error?.name === ActionMessageType.UnexpectedErrorMessage
|
|
8
|
+
|| !Object.values(ActionMessageType).includes(error.name))) {
|
|
9
|
+
ErrorHandler({
|
|
10
|
+
type: "SwapWithdrawalError",
|
|
11
|
+
message: error.message,
|
|
12
|
+
name: error.name,
|
|
13
|
+
stack: error.stack,
|
|
14
|
+
cause: error.cause
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}, [error]);
|
|
18
|
+
if (isLoading) {
|
|
19
|
+
return _jsx(ActionMessages.ConfirmActionMessage, {});
|
|
20
|
+
}
|
|
21
|
+
else if (error?.name === ActionMessageType.TransactionRejected) {
|
|
22
|
+
return _jsx(ActionMessages.TransactionRejectedMessage, {});
|
|
23
|
+
}
|
|
24
|
+
else if (error?.name === ActionMessageType.TransactionFailed) {
|
|
25
|
+
return _jsx(ActionMessages.TransactionFailedMessage, {});
|
|
26
|
+
}
|
|
27
|
+
else if (error?.name === ActionMessageType.InsufficientFunds) {
|
|
28
|
+
return _jsx(ActionMessages.InsufficientFundsMessage, {});
|
|
29
|
+
}
|
|
30
|
+
else if (error?.name === ActionMessageType.WaletMismatch) {
|
|
31
|
+
return _jsx(ActionMessages.WaletMismatchMessage, { address: error?.message });
|
|
32
|
+
}
|
|
33
|
+
else if (error?.name === ActionMessageType.DifferentAccountsNotAllowedError) {
|
|
34
|
+
return _jsx(ActionMessages.DifferentAccountsNotAllowedError, { network: error?.message });
|
|
35
|
+
}
|
|
36
|
+
else if (error) {
|
|
37
|
+
if (!error.message)
|
|
38
|
+
return _jsx(ActionMessages.UnexpectedErrorMessage, { message: 'Something went wrong' });
|
|
39
|
+
return _jsx(ActionMessages.UnexpectedErrorMessage, { message: error.message });
|
|
40
|
+
}
|
|
41
|
+
else
|
|
42
|
+
return _jsx(_Fragment, {});
|
|
43
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback, useState } from "react";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
3
|
import WalletIcon from "../../../../../../components/Icons/WalletIcon";
|
|
4
4
|
import SubmitButton from "../../../../../../components/Buttons/submitButton";
|
|
5
5
|
import useWallet from "../../../../../../hooks/useWallet";
|
|
@@ -8,15 +8,19 @@ import toast from "react-hot-toast";
|
|
|
8
8
|
import { Loader2 } from "lucide-react";
|
|
9
9
|
import WalletMessage from "../../messages/Message";
|
|
10
10
|
import { useConnectModal } from "../../../../../../components/Wallet/WalletModal";
|
|
11
|
-
import { useInitialSettings } from "../../../../../../context/settings";
|
|
11
|
+
import { useInitialSettings, useSettingsState } from "../../../../../../context/settings";
|
|
12
12
|
import { useSwapTransactionStore } from "../../../../../../stores/swapTransactionStore";
|
|
13
|
-
import { BackendTransactionStatus } from "../../../../../../lib/apiClients/layerSwapApiClient";
|
|
13
|
+
import LayerSwapApiClient, { BackendTransactionStatus } from "../../../../../../lib/apiClients/layerSwapApiClient";
|
|
14
14
|
import sleep from "../../../../../../lib/wallets/utils/sleep";
|
|
15
15
|
import { isDiffByPercent } from "../../../../../../components/utils/numbers";
|
|
16
|
-
// import posthog from "posthog-js";
|
|
17
16
|
import { useWalletWithdrawalState } from "../../../../../../context/withdrawalContext";
|
|
18
|
-
import { useSelectedAccount } from "../../../../../../context/
|
|
19
|
-
import {
|
|
17
|
+
import { useSelectedAccount } from "../../../../../../context/swapAccounts";
|
|
18
|
+
import { ErrorHandler } from "../../../../../../lib/ErrorHandler";
|
|
19
|
+
import { resolvePriceImpactValues } from "../../../../../../lib/fees";
|
|
20
|
+
import InfoIcon from "../../../../../../components/Icons/InfoIcon";
|
|
21
|
+
import { addressFormat } from "../../../../../../lib/address/formatter";
|
|
22
|
+
import { useBalance } from "../../../../../../lib/balances/useBalance";
|
|
23
|
+
import KnownInternalNames from "../../../../../../lib/knownIds";
|
|
20
24
|
export const ConnectWalletButton = ({ ...props }) => {
|
|
21
25
|
const { swapBasicData } = useSwapDataState();
|
|
22
26
|
const { source_network } = swapBasicData || {};
|
|
@@ -83,20 +87,26 @@ export const ChangeNetworkButton = (props) => {
|
|
|
83
87
|
export const ButtonWrapper = ({ ...props }) => {
|
|
84
88
|
return _jsx(SubmitButton, { text_align: 'center', buttonStyle: 'filled', size: "medium", type: "button", className: "text-primary-text text-base", ...props, children: props.children });
|
|
85
89
|
};
|
|
86
|
-
export const SendTransactionButton = ({ error, onClick, swapData, refuel, ...props }) => {
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const { quote, quoteIsLoading, quoteError } = useSwapDataState();
|
|
90
|
+
export const SendTransactionButton = ({ error, clearError, onClick, swapData: swapBasicData, refuel, ...props }) => {
|
|
91
|
+
const { quote, quoteIsLoading, quoteError, swapId, swapDetails, depositActionsResponse } = useSwapDataState();
|
|
92
|
+
const { onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, onCancelWithdrawal } = useWalletWithdrawalState();
|
|
90
93
|
const { createSwap, setSwapId, setQuoteLoading } = useSwapDataUpdate();
|
|
91
94
|
const { setSwapTransaction } = useSwapTransactionStore();
|
|
92
95
|
const initialSettings = useInitialSettings();
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
const
|
|
96
|
-
const
|
|
96
|
+
const layerswapApiClient = new LayerSwapApiClient();
|
|
97
|
+
const selectedSourceAccount = useSelectedAccount("from", swapBasicData.source_network?.name);
|
|
98
|
+
const { networks } = useSettingsState();
|
|
99
|
+
const networkWithTokens = swapBasicData.source_network && networks.find(n => n.name === swapBasicData.source_network?.name);
|
|
100
|
+
const { balances } = useBalance(selectedSourceAccount?.address, networkWithTokens);
|
|
101
|
+
const { wallets } = useWallet(swapBasicData.source_network, 'withdrawal');
|
|
102
|
+
const [actionStateText, setActionStateText] = useState();
|
|
103
|
+
const [loading, setLoading] = useState(false);
|
|
104
|
+
const [showCriticalMarketPriceImpactButtons, setShowCriticalMarketPriceImpactButtons] = useState(false);
|
|
105
|
+
const priceImpactValues = useMemo(() => quote ? resolvePriceImpactValues(quote) : undefined, [quote]);
|
|
106
|
+
const criticalMarketPriceImpact = useMemo(() => priceImpactValues?.criticalMarketPriceImpact, [priceImpactValues]);
|
|
97
107
|
const handleClick = async () => {
|
|
98
108
|
try {
|
|
99
|
-
const selectedWallet = wallets.find(w => w.
|
|
109
|
+
const selectedWallet = selectedSourceAccount && wallets.find(w => w.addresses.some(a => addressFormat(a, swapBasicData.source_network) === addressFormat(selectedSourceAccount?.address, swapBasicData.source_network)));
|
|
100
110
|
if (!selectedSourceAccount) {
|
|
101
111
|
throw new Error('Selected source account is undefined');
|
|
102
112
|
}
|
|
@@ -104,71 +114,82 @@ export const SendTransactionButton = ({ error, onClick, swapData, refuel, ...pro
|
|
|
104
114
|
throw new Error('Wallet is not active');
|
|
105
115
|
}
|
|
106
116
|
setLoading(true);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
clearError?.();
|
|
118
|
+
let swapData = swapDetails;
|
|
119
|
+
let depositActions = depositActionsResponse;
|
|
120
|
+
if (!swapId || !swapDetails) {
|
|
121
|
+
setActionStateText("Preparing");
|
|
122
|
+
setSwapId(undefined);
|
|
123
|
+
const swapValues = {
|
|
124
|
+
amount: swapBasicData.requested_amount.toString(),
|
|
125
|
+
from: swapBasicData.source_network,
|
|
126
|
+
to: swapBasicData.destination_network,
|
|
127
|
+
fromAsset: swapBasicData.source_token,
|
|
128
|
+
toAsset: swapBasicData.destination_token,
|
|
129
|
+
refuel: refuel,
|
|
130
|
+
destination_address: swapBasicData.destination_address,
|
|
131
|
+
depositMethod: 'wallet',
|
|
132
|
+
};
|
|
133
|
+
const newSwapData = await createSwap(swapValues, initialSettings);
|
|
134
|
+
const newSwapId = newSwapData?.swap?.id;
|
|
135
|
+
if (!newSwapId) {
|
|
136
|
+
throw new Error('Swap ID is undefined');
|
|
137
|
+
}
|
|
138
|
+
setSwapId(newSwapId);
|
|
139
|
+
const priceImpactValues = newSwapData.quote ? resolvePriceImpactValues(newSwapData.quote) : undefined;
|
|
140
|
+
if (priceImpactValues?.criticalMarketPriceImpact) {
|
|
141
|
+
setShowCriticalMarketPriceImpactButtons(true);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (isDiffByPercent(quote?.receive_amount, newSwapData.quote.receive_amount, 2)) {
|
|
145
|
+
setActionStateText("Updating quotes");
|
|
146
|
+
setQuoteLoading(true);
|
|
147
|
+
await sleep(3500);
|
|
148
|
+
setQuoteLoading(false);
|
|
149
|
+
}
|
|
150
|
+
swapData = newSwapData.swap;
|
|
151
|
+
depositActions = newSwapData.deposit_actions;
|
|
123
152
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
setQuoteLoading(true);
|
|
127
|
-
await sleep(3500);
|
|
128
|
-
setQuoteLoading(false);
|
|
153
|
+
if (!depositActions?.length) {
|
|
154
|
+
throw new Error('No deposit actions');
|
|
129
155
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const depositAction = newSwapData?.deposit_actions && newSwapData?.deposit_actions[0];
|
|
133
|
-
if (!depositAction) {
|
|
134
|
-
throw new Error('No deposit action');
|
|
156
|
+
if (!swapData) {
|
|
157
|
+
throw new Error('No swap data');
|
|
135
158
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
const transferProps = {
|
|
140
|
-
network: swapData.source_network,
|
|
141
|
-
token: swapData.source_token,
|
|
142
|
-
selectedWallet: selectedWallet,
|
|
143
|
-
amount: depositAction?.amount,
|
|
144
|
-
callData: depositAction?.call_data,
|
|
145
|
-
depositAddress: depositAction?.to_address,
|
|
146
|
-
sequenceNumber: newSwapData.swap?.metadata.sequence_number,
|
|
147
|
-
swapId: swapId,
|
|
148
|
-
userDestinationAddress: newSwapData.swap?.destination_address
|
|
149
|
-
};
|
|
159
|
+
const transferProps = resolveTransactionData(swapData, swapBasicData, depositActions, balances, selectedWallet);
|
|
160
|
+
setActionStateText("Opening Wallet");
|
|
150
161
|
const hash = await onClick(transferProps);
|
|
151
162
|
if (hash) {
|
|
152
163
|
onWalletWithdrawalSuccess?.();
|
|
153
|
-
setSwapTransaction(
|
|
154
|
-
|
|
164
|
+
setSwapTransaction(swapData.id, BackendTransactionStatus.Pending, hash);
|
|
165
|
+
try {
|
|
166
|
+
await layerswapApiClient.SwapCatchup(swapData.id, hash);
|
|
167
|
+
}
|
|
168
|
+
catch (e) {
|
|
169
|
+
console.error('Error in SwapCatchup:', e);
|
|
170
|
+
const swapWithdrawalError = new Error(e);
|
|
171
|
+
swapWithdrawalError.name = `SwapCatchupError`;
|
|
172
|
+
swapWithdrawalError.cause = e;
|
|
173
|
+
ErrorHandler({
|
|
174
|
+
type: 'SwapWithdrawalError',
|
|
175
|
+
message: swapWithdrawalError.message,
|
|
176
|
+
name: swapWithdrawalError.name,
|
|
177
|
+
stack: swapWithdrawalError.stack,
|
|
178
|
+
cause: swapWithdrawalError.cause,
|
|
179
|
+
});
|
|
180
|
+
}
|
|
155
181
|
}
|
|
156
182
|
}
|
|
157
183
|
catch (e) {
|
|
158
184
|
setSwapId(undefined);
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// $layerswap_exception_type: "Swap Withdrawal Error",
|
|
168
|
-
// stack: swapWithdrawalError.stack,
|
|
169
|
-
// where: 'TransactionError',
|
|
170
|
-
// severity: 'error',
|
|
171
|
-
// });
|
|
185
|
+
const error = e;
|
|
186
|
+
ErrorHandler({
|
|
187
|
+
type: 'SwapWithdrawalError',
|
|
188
|
+
message: error.message,
|
|
189
|
+
name: error.name,
|
|
190
|
+
stack: error.stack,
|
|
191
|
+
cause: error.cause
|
|
192
|
+
});
|
|
172
193
|
}
|
|
173
194
|
finally {
|
|
174
195
|
setLoading(false);
|
|
@@ -176,5 +197,31 @@ export const SendTransactionButton = ({ error, onClick, swapData, refuel, ...pro
|
|
|
176
197
|
};
|
|
177
198
|
if (quoteIsLoading || loading)
|
|
178
199
|
return (_jsx(ButtonWrapper, { ...props, isSubmitting: true, isDisabled: true, children: actionStateText || "Preparing" }));
|
|
179
|
-
|
|
200
|
+
if (showCriticalMarketPriceImpactButtons) {
|
|
201
|
+
return (_jsxs(_Fragment, { children: [quote && priceImpactValues && _jsx("div", { className: "py-1", children: _jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "shrink-0", children: _jsx(InfoIcon, { className: "w-5 h-5 text-warning-foreground" }) }), _jsxs("div", { className: "flex flex-col gap-1.5 pr-4", children: [_jsx("p", { className: "text-white font-semibold leading-4 text-base mt-0.5", children: "Critical receiving amount" }), _jsxs("p", { className: "text-priamry-text text-base font-normal leading-[18px]", children: [_jsx("span", { children: "By continuing, you agree to receive as low as " }), _jsxs("span", { className: "text-warning-foreground text-nowrap", children: [quote.min_receive_amount, " ", quote.destination_token?.symbol, " ($ ", priceImpactValues.minReceiveAmountUSD, ")"] })] })] })] }) }), _jsx(ButtonWrapper, { ...props, onClick: handleClick, buttonStyle: "secondary", size: "small", isSubmitting: false, isDisabled: false, children: "Continue anyway" }), _jsx(ButtonWrapper, { ...props, size: "small", onClick: () => onCancelWithdrawal?.(), isSubmitting: false, isDisabled: false, children: "Cancel & try another route" })] }));
|
|
202
|
+
}
|
|
203
|
+
return (_jsxs(_Fragment, { children: [!!(!swapId && criticalMarketPriceImpact && quote?.destination_token && priceImpactValues && !error) && _jsx("div", { className: "py-1", children: _jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "shrink-0", children: _jsx(InfoIcon, { className: "w-5 h-5 text-warning-foreground" }) }), _jsxs("div", { className: "flex flex-col gap-1.5 pr-4", children: [_jsx("p", { className: "text-white font-medium leading-4 text-base mt-0.5", children: "Critical receiving amount" }), _jsxs("p", { className: "text-secondary-text text-sm leading-[18px]", children: [_jsx("span", { children: "The \u201Creceive at least\u201D amount is affected by high price impact. You will receive at least " }), _jsxs("span", { children: [quote.min_receive_amount, " ", quote.destination_token?.symbol, " ($ ", priceImpactValues.minReceiveAmountUSD, ") "] })] })] })] }) }), _jsx(ButtonWrapper, { ...props, isSubmitting: props.isSubmitting || loading || quoteIsLoading, onClick: handleClick, isDisabled: quoteIsLoading || !!quoteError, children: error ? 'Try again' : 'Swap now' })] }));
|
|
204
|
+
};
|
|
205
|
+
const resolveTransactionData = (swapDetails, swapBasicData, deposit_actions, balances, selectedWallet) => {
|
|
206
|
+
const depositAction = deposit_actions?.find(action => action.type === 'transfer'
|
|
207
|
+
|| ExceptionNetworks.includes(swapBasicData.source_network?.name) && action.type === 'manual_transfer');
|
|
208
|
+
if (!depositAction) {
|
|
209
|
+
throw new Error('No deposit action found');
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
amount: depositAction.amount,
|
|
213
|
+
callData: depositAction.call_data,
|
|
214
|
+
depositAddress: depositAction.to_address,
|
|
215
|
+
sequenceNumber: swapDetails.metadata.sequence_number,
|
|
216
|
+
swapId: swapDetails.id,
|
|
217
|
+
userDestinationAddress: swapBasicData.destination_address,
|
|
218
|
+
balances: balances,
|
|
219
|
+
network: swapBasicData.source_network,
|
|
220
|
+
token: swapBasicData.source_token,
|
|
221
|
+
selectedWallet: selectedWallet,
|
|
222
|
+
};
|
|
180
223
|
};
|
|
224
|
+
const ExceptionNetworks = [
|
|
225
|
+
KnownInternalNames.Networks.ImmutableXMainnet,
|
|
226
|
+
KnownInternalNames.Networks.ImmutableXSepolia
|
|
227
|
+
];
|
|
@@ -2,13 +2,15 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { useCallback, useEffect, useState } from "react";
|
|
3
3
|
import { WithdrawalProvider } from "../../../../../context/withdrawalContext";
|
|
4
4
|
import useWallet from "../../../../../hooks/useWallet";
|
|
5
|
-
import { useSelectedAccount } from "../../../../../context/
|
|
5
|
+
import { useSelectedAccount } from "../../../../../context/swapAccounts";
|
|
6
6
|
import { ChangeNetworkButton, ConnectWalletButton, SendTransactionButton } from "./Common/buttons";
|
|
7
|
-
import TransactionMessages, { TransactionMessageType } from "../messages/TransactionMessages";
|
|
8
7
|
import { useInitialSettings, useSettingsState } from "../../../../../context/settings";
|
|
9
8
|
import WalletIcon from "../../../../../components/Icons/WalletIcon";
|
|
10
9
|
import { useBalance } from "../../../../../lib/balances/useBalance";
|
|
11
|
-
|
|
10
|
+
import { ActionMessage } from "./Common/actionMessage";
|
|
11
|
+
import { ActionMessages } from "../messages/TransactionMessages";
|
|
12
|
+
import { useTransfer } from "../../../../../hooks/useTransfer";
|
|
13
|
+
export const WalletTransferAction = ({ swapData, swapId, refuel, onWalletWithdrawalSuccess, onCancelWithdrawal }) => {
|
|
12
14
|
const { source_network } = swapData;
|
|
13
15
|
const { provider, wallets } = useWallet(source_network, "withdrawal");
|
|
14
16
|
const selectedSourceAccount = useSelectedAccount("from", source_network?.name);
|
|
@@ -19,7 +21,7 @@ export const WalletTransferAction = ({ swapData, swapId, refuel, onWalletWithdra
|
|
|
19
21
|
}
|
|
20
22
|
}, [selectedSourceAccount?.address, source_network?.name]);
|
|
21
23
|
return _jsx(_Fragment, { children: swapData &&
|
|
22
|
-
_jsx(WithdrawalProvider, { onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, children: _jsx(WalletWithdrawal, { swapId: swapId, swapBasicData: swapData, refuel: refuel }) }) });
|
|
24
|
+
_jsx(WithdrawalProvider, { onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, onCancelWithdrawal: onCancelWithdrawal, children: _jsx(WalletWithdrawal, { swapId: swapId, swapBasicData: swapData, refuel: refuel }) }) });
|
|
23
25
|
};
|
|
24
26
|
export const WalletWithdrawal = ({ swapBasicData, refuel, swapId }) => {
|
|
25
27
|
const { source_network, destination_network, destination_address } = swapBasicData;
|
|
@@ -27,7 +29,7 @@ export const WalletWithdrawal = ({ swapBasicData, refuel, swapId }) => {
|
|
|
27
29
|
const { wallets, provider } = useWallet(source_network, "withdrawal");
|
|
28
30
|
const { sameAccountNetwork } = useInitialSettings();
|
|
29
31
|
const wallet = wallets.find(w => w.id === selectedSourceAccount?.id && w.withdrawalSupportedNetworks?.includes(source_network?.name));
|
|
30
|
-
const networkChainId =
|
|
32
|
+
const networkChainId = source_network?.chain_id ?? undefined;
|
|
31
33
|
const [savedTransactionHash, setSavedTransactionHash] = useState();
|
|
32
34
|
useEffect(() => {
|
|
33
35
|
if (!swapId)
|
|
@@ -54,16 +56,16 @@ export const WalletWithdrawal = ({ swapBasicData, refuel, swapId }) => {
|
|
|
54
56
|
if ((source_network?.name.toLowerCase() === sameAccountNetwork?.toLowerCase() || destination_network?.name.toLowerCase() === sameAccountNetwork?.toLowerCase())
|
|
55
57
|
&& (selectedSourceAccount?.address && destination_address && selectedSourceAccount?.address.toLowerCase() !== destination_address?.toLowerCase())) {
|
|
56
58
|
const network = source_network?.name.toLowerCase() === sameAccountNetwork?.toLowerCase() ? source_network : destination_network;
|
|
57
|
-
return _jsx(
|
|
59
|
+
return _jsx(ActionMessages.DifferentAccountsNotAllowedError, { network: network?.display_name });
|
|
58
60
|
}
|
|
59
61
|
if (!wallet) {
|
|
60
62
|
return _jsx(ConnectWalletButton, {});
|
|
61
63
|
}
|
|
62
|
-
else if (wallet.chainId && wallet.chainId
|
|
63
|
-
return _jsx(ChangeNetworkButton, { chainId: networkChainId, network: source_network });
|
|
64
|
+
else if (wallet.chainId && wallet.chainId != networkChainId && source_network) {
|
|
65
|
+
return _jsx(ChangeNetworkButton, { chainId: Number(networkChainId), network: source_network });
|
|
64
66
|
}
|
|
65
67
|
else {
|
|
66
|
-
return _jsx(TransferTokenButton, { swapData: swapBasicData, refuel: refuel, chainId: networkChainId, savedTransactionHash: savedTransactionHash });
|
|
68
|
+
return _jsx(TransferTokenButton, { swapData: swapBasicData, refuel: refuel, chainId: Number(networkChainId), savedTransactionHash: savedTransactionHash });
|
|
67
69
|
}
|
|
68
70
|
};
|
|
69
71
|
const TransferTokenButton = ({ savedTransactionHash, chainId, swapData, refuel }) => {
|
|
@@ -76,7 +78,8 @@ const TransferTokenButton = ({ savedTransactionHash, chainId, swapData, refuel }
|
|
|
76
78
|
const { provider, wallets } = useWallet(swapData.source_network, "withdrawal");
|
|
77
79
|
const { balances } = useBalance(selectedSourceAccount?.address, networkWithTokens);
|
|
78
80
|
const wallet = wallets.find(w => w.id === selectedSourceAccount?.id);
|
|
79
|
-
const
|
|
81
|
+
const { executeTransfer } = useTransfer();
|
|
82
|
+
const clickHandler = useCallback(async ({ amount, callData, depositAddress, swapId }) => {
|
|
80
83
|
setButtonClicked(true);
|
|
81
84
|
setError(undefined);
|
|
82
85
|
setLoading(true);
|
|
@@ -87,22 +90,47 @@ const TransferTokenButton = ({ savedTransactionHash, chainId, swapData, refuel }
|
|
|
87
90
|
throw new Error('Missing amount');
|
|
88
91
|
if (!wallet)
|
|
89
92
|
throw new Error('No selected account');
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
try {
|
|
94
|
+
const tx = await executeTransfer({
|
|
95
|
+
token: swapData.source_token,
|
|
96
|
+
amount,
|
|
97
|
+
depositAddress,
|
|
98
|
+
callData,
|
|
99
|
+
selectedWallet: wallet,
|
|
100
|
+
network: swapData.source_network,
|
|
101
|
+
balances: balances,
|
|
102
|
+
userDestinationAddress: swapData.destination_address,
|
|
103
|
+
swapId,
|
|
104
|
+
}, wallet);
|
|
105
|
+
if (!tx)
|
|
106
|
+
throw new Error('No transaction');
|
|
107
|
+
if (tx) {
|
|
108
|
+
return tx;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
if (typeof e === 'string' && e?.includes('No transfer provider found for network:')) {
|
|
113
|
+
if (!provider?.transfer)
|
|
114
|
+
throw new Error('No provider transfer');
|
|
115
|
+
const tx = await provider.transfer({
|
|
116
|
+
token: swapData.source_token,
|
|
117
|
+
amount,
|
|
118
|
+
depositAddress,
|
|
119
|
+
callData,
|
|
120
|
+
selectedWallet: wallet,
|
|
121
|
+
network: swapData.source_network,
|
|
122
|
+
balances: balances,
|
|
123
|
+
userDestinationAddress: swapData.destination_address,
|
|
124
|
+
}, wallet);
|
|
125
|
+
if (!tx)
|
|
126
|
+
throw new Error('No transaction');
|
|
127
|
+
if (tx) {
|
|
128
|
+
return tx;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
throw e;
|
|
133
|
+
}
|
|
106
134
|
}
|
|
107
135
|
}
|
|
108
136
|
catch (e) {
|
|
@@ -110,45 +138,8 @@ const TransferTokenButton = ({ savedTransactionHash, chainId, swapData, refuel }
|
|
|
110
138
|
setError(e);
|
|
111
139
|
throw e;
|
|
112
140
|
}
|
|
113
|
-
}, [
|
|
141
|
+
}, [executeTransfer, chainId, selectedSourceAccount?.address, wallet, swapData, balances]);
|
|
114
142
|
return _jsxs("div", { className: "w-full space-y-3 flex flex-col justify-between h-full text-primary-text", children: [buttonClicked &&
|
|
115
|
-
_jsx(
|
|
143
|
+
_jsx(ActionMessage, { error: error, isLoading: loading }), !loading &&
|
|
116
144
|
_jsx(SendTransactionButton, { onClick: clickHandler, icon: _jsx(WalletIcon, { className: "stroke-2 w-6 h-6" }), error: !!error && buttonClicked, swapData: swapData, refuel: refuel })] });
|
|
117
145
|
};
|
|
118
|
-
const TransactionMessage = ({ error, isLoading }) => {
|
|
119
|
-
if (isLoading) {
|
|
120
|
-
return _jsx(TransactionMessages.ConfirmTransactionMessage, {});
|
|
121
|
-
}
|
|
122
|
-
else if (error.name === TransactionMessageType.TransactionRejected) {
|
|
123
|
-
return _jsx(TransactionMessages.TransactionRejectedMessage, {});
|
|
124
|
-
}
|
|
125
|
-
else if (error.name === TransactionMessageType.TransactionFailed) {
|
|
126
|
-
return _jsx(TransactionMessages.TransactionFailedMessage, {});
|
|
127
|
-
}
|
|
128
|
-
else if (error.name === TransactionMessageType.InsufficientFunds) {
|
|
129
|
-
return _jsx(TransactionMessages.InsufficientFundsMessage, {});
|
|
130
|
-
}
|
|
131
|
-
else if (error.name === TransactionMessageType.WaletMismatch) {
|
|
132
|
-
return _jsx(TransactionMessages.WaletMismatchMessage, { address: error.message });
|
|
133
|
-
}
|
|
134
|
-
else if (error.name === TransactionMessageType.DifferentAccountsNotAllowedError) {
|
|
135
|
-
return _jsx(TransactionMessages.DifferentAccountsNotAllowedError, { network: error.message });
|
|
136
|
-
}
|
|
137
|
-
else if (error) {
|
|
138
|
-
const swapWithdrawalError = new Error(error.message);
|
|
139
|
-
swapWithdrawalError.name = `SwapWithdrawalError`;
|
|
140
|
-
swapWithdrawalError.cause = error;
|
|
141
|
-
// posthog.captureException('$exception', {
|
|
142
|
-
// name: swapWithdrawalError.name,
|
|
143
|
-
// message: swapWithdrawalError.message,
|
|
144
|
-
// $layerswap_exception_type: "Swap Withdrawal Error",
|
|
145
|
-
// stack: swapWithdrawalError.stack,
|
|
146
|
-
// cause: swapWithdrawalError.cause,
|
|
147
|
-
// where: 'swapWithdrawalError',
|
|
148
|
-
// severity: 'error',
|
|
149
|
-
// });
|
|
150
|
-
return _jsx(TransactionMessages.UnexpectedErrorMessage, { message: error.message });
|
|
151
|
-
}
|
|
152
|
-
else
|
|
153
|
-
return _jsx(_Fragment, {});
|
|
154
|
-
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { WalletTransferAction } from './Wallet';
|
|
3
|
-
const WalletTransferButton = ({ swapBasicData: swapData, swapId, refuel, balanceWarning, onWalletWithdrawalSuccess }) => {
|
|
4
|
-
return _jsx(_Fragment, { children: _jsx("div", { className: 'rounded-2xl bg-secondary-500 divide-y divide-secondary-300 p-3', children: _jsxs("div", { className: 'flex flex-col gap-2.5', children: [balanceWarning, _jsx(WalletTransferAction, { swapData: swapData, swapId: swapId, refuel: refuel, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess })] }) }) });
|
|
3
|
+
const WalletTransferButton = ({ swapBasicData: swapData, swapId, refuel, balanceWarning, onWalletWithdrawalSuccess, onCancelWithdrawal }) => {
|
|
4
|
+
return _jsx(_Fragment, { children: _jsx("div", { className: 'rounded-2xl bg-secondary-500 divide-y divide-secondary-300 p-3', children: _jsxs("div", { className: 'flex flex-col gap-2.5', children: [balanceWarning, _jsx(WalletTransferAction, { swapData: swapData, swapId: swapId, refuel: refuel, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, onCancelWithdrawal: onCancelWithdrawal })] }) }) });
|
|
5
5
|
};
|
|
6
6
|
export default WalletTransferButton;
|
|
@@ -7,7 +7,7 @@ import { truncateDecimals } from '../../../../components/utils/RoundDecimals';
|
|
|
7
7
|
import VaulDrawer from '../../../../components/Modal/vaulModal';
|
|
8
8
|
import { useSettingsState } from '../../../../context/settings';
|
|
9
9
|
import WalletsList from '../../../../components/Wallet/WalletComponents/WalletsList';
|
|
10
|
-
import { useSelectedAccount,
|
|
10
|
+
import { useSelectedAccount, useSelectSwapAccount } from '../../../../context/swapAccounts';
|
|
11
11
|
import { useBalance } from '../../../../lib/balances/useBalance';
|
|
12
12
|
const WalletTransferContent = ({ openModal, setOpenModal, swapData }) => {
|
|
13
13
|
const { networks } = useSettingsState();
|
|
@@ -16,7 +16,7 @@ const WalletTransferContent = ({ openModal, setOpenModal, swapData }) => {
|
|
|
16
16
|
const { provider } = useWallet(source_network, 'withdrawal');
|
|
17
17
|
const selectedSourceAccount = useSelectedAccount("from", source_network?.name);
|
|
18
18
|
const availableWallets = provider?.connectedWallets?.filter(c => !c.isNotAvailable) || [];
|
|
19
|
-
const selectSourceAccount =
|
|
19
|
+
const selectSourceAccount = useSelectSwapAccount("from");
|
|
20
20
|
const changeWallet = async (props) => {
|
|
21
21
|
selectSourceAccount({
|
|
22
22
|
id: props.walletId,
|
|
@@ -9,9 +9,9 @@ import { SwapQuoteDetails } from './SwapQuoteDetails';
|
|
|
9
9
|
import WalletTransferButton from './WalletTransferButton';
|
|
10
10
|
import { useBalance } from '../../../../lib/balances/useBalance';
|
|
11
11
|
import { useSettingsState } from '../../../../context/settings';
|
|
12
|
-
import { useSelectedAccount } from '../../../../context/
|
|
12
|
+
import { useSelectedAccount } from '../../../../context/swapAccounts';
|
|
13
13
|
import { ErrorDisplay } from '../../../../components/Pages/Swap/Form/SecondaryComponents/validationError/ErrorDisplay';
|
|
14
|
-
const Withdraw = ({ type, onWalletWithdrawalSuccess, partner }) => {
|
|
14
|
+
const Withdraw = ({ type, onWalletWithdrawalSuccess, onCancelWithdrawal, partner }) => {
|
|
15
15
|
const { swapBasicData, swapDetails, quote, refuel, quoteIsLoading, quoteError } = useSwapDataState();
|
|
16
16
|
const { appName, signature } = useInitialSettings();
|
|
17
17
|
const sourceIsImmutableX = swapBasicData?.source_network.name?.toUpperCase() === KnownInternalNames.Networks.ImmutableXMainnet?.toUpperCase()
|
|
@@ -30,7 +30,7 @@ const Withdraw = ({ type, onWalletWithdrawalSuccess, partner }) => {
|
|
|
30
30
|
&& Number(walletBalanceAmount) < Number(swapBasicData?.requested_amount);
|
|
31
31
|
if (swapBasicData?.use_deposit_address === false) {
|
|
32
32
|
withdraw = {
|
|
33
|
-
footer: _jsx(WalletTransferButton, { swapBasicData: swapBasicData, swapId: swapDetails?.id, refuel: !!refuel, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, balanceWarning: showInsufficientBalanceWarning ? _jsx(ErrorDisplay, { errorName: 'insufficientFunds' }) : null })
|
|
33
|
+
footer: _jsx(WalletTransferButton, { swapBasicData: swapBasicData, swapId: swapDetails?.id, refuel: !!refuel, onWalletWithdrawalSuccess: onWalletWithdrawalSuccess, balanceWarning: showInsufficientBalanceWarning ? _jsx(ErrorDisplay, { errorName: 'insufficientFunds' }) : null, onCancelWithdrawal: onCancelWithdrawal })
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
if (isImtblMarketplace) {
|
|
@@ -5,18 +5,19 @@ import { Widget } from "../../../Widget/Index";
|
|
|
5
5
|
import { SwapDataProvider, useSwapDataState, useSwapDataUpdate } from "../../../../context/swap";
|
|
6
6
|
import NotFound from "./NotFound";
|
|
7
7
|
import SwapDetails from "./SwapDetails";
|
|
8
|
-
import {
|
|
8
|
+
import { useCallbacks } from "../../../../context/callbackProvider";
|
|
9
9
|
const Comp = () => {
|
|
10
10
|
const { swapBasicData, swapApiError, swapId } = useSwapDataState();
|
|
11
11
|
const { mutateSwap } = useSwapDataUpdate();
|
|
12
|
+
const { onBackClick } = useCallbacks();
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
mutateSwap();
|
|
14
15
|
}, []);
|
|
15
16
|
if (!swapBasicData)
|
|
16
|
-
return _jsx(Widget, { children: _jsx("div", { className: `rounded-lg w-full overflow-hidden relative h-[548px]`, children: swapApiError &&
|
|
17
|
+
return _jsx(Widget, { goBack: onBackClick, children: _jsx("div", { className: `rounded-lg w-full overflow-hidden relative h-[548px]`, children: swapApiError &&
|
|
17
18
|
_jsx(NotFound, { swapId: swapId }) }) });
|
|
18
19
|
return (_jsx(SwapDetails, { type: "widget" }));
|
|
19
20
|
};
|
|
20
|
-
export const SwapWithdrawal = (
|
|
21
|
-
return (_jsx(
|
|
21
|
+
export const SwapWithdrawal = () => {
|
|
22
|
+
return (_jsx(SwapDataProvider, { children: _jsx(Comp, {}) }));
|
|
22
23
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import WalletMessage from "./Message";
|
|
3
3
|
import shortenAddress from "../../../../../components/utils/ShortenAddress";
|
|
4
|
-
const
|
|
4
|
+
const ConfirmActionMessage = () => {
|
|
5
5
|
return _jsx(WalletMessage, { status: "pending", header: 'Confirm in wallet', details: 'Please confirm the transaction in your wallet' });
|
|
6
6
|
};
|
|
7
7
|
const TransactionInProgressMessage = () => {
|
|
@@ -28,8 +28,8 @@ const SwapErrorMessage = ({ message }) => {
|
|
|
28
28
|
const UnexpectedErrorMessage = ({ message }) => {
|
|
29
29
|
return _jsx(WalletMessage, { status: "error", header: 'Unexpected error', details: message, showInModal: true });
|
|
30
30
|
};
|
|
31
|
-
const ActionMessages = {
|
|
32
|
-
|
|
31
|
+
export const ActionMessages = {
|
|
32
|
+
ConfirmActionMessage,
|
|
33
33
|
TransactionInProgressMessage,
|
|
34
34
|
InsufficientFundsMessage,
|
|
35
35
|
TransactionRejectedMessage,
|
|
@@ -39,15 +39,14 @@ const ActionMessages = {
|
|
|
39
39
|
UnexpectedErrorMessage,
|
|
40
40
|
DifferentAccountsNotAllowedError
|
|
41
41
|
};
|
|
42
|
-
export var
|
|
43
|
-
(function (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})(
|
|
53
|
-
export default ActionMessages;
|
|
42
|
+
export var ActionMessageType;
|
|
43
|
+
(function (ActionMessageType) {
|
|
44
|
+
ActionMessageType["ConfirmTransaction"] = "ConfirmTransaction";
|
|
45
|
+
ActionMessageType["TransactionInProgress"] = "TransactionInProgress";
|
|
46
|
+
ActionMessageType["InsufficientFunds"] = "InsufficientFunds";
|
|
47
|
+
ActionMessageType["TransactionRejected"] = "TransactionRejected";
|
|
48
|
+
ActionMessageType["WaletMismatch"] = "WaletMismatch";
|
|
49
|
+
ActionMessageType["TransactionFailed"] = "TransactionFailed";
|
|
50
|
+
ActionMessageType["UnexpectedErrorMessage"] = "UnexpectedErrorMessage";
|
|
51
|
+
ActionMessageType["DifferentAccountsNotAllowedError"] = "DifferentAccountsNotAllowedError";
|
|
52
|
+
})(ActionMessageType || (ActionMessageType = {}));
|