@multiversx/sdk-dapp-liquidity 2.3.0 → 2.4.0-alpha.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/BridgeHistory-BU-L_w0l.js +2 -0
- package/BridgeHistory-CInRkJ6T.mjs +275 -0
- package/ToggleDirection-BLDXxUlN.mjs +16 -0
- package/ToggleDirection-CZ9-ZD7Y.js +2 -0
- package/all-networks-De_MBUh1.js +2 -0
- package/all-networks-hdZt5Hcc.mjs +4 -0
- package/api/checkAccount.d.ts +1 -2
- package/api/checkAccount.js +1 -1
- package/api/checkAccount.mjs +10 -20
- package/api/confirmRate.d.ts +2 -3
- package/api/confirmRate.js +1 -1
- package/api/confirmRate.mjs +16 -23
- package/api/getChains.d.ts +1 -2
- package/api/getChains.js +1 -1
- package/api/getChains.mjs +10 -16
- package/api/getRate.d.ts +1 -2
- package/api/getRate.js +1 -1
- package/api/getRate.mjs +16 -23
- package/api/getTokens.d.ts +1 -2
- package/api/getTokens.js +1 -1
- package/api/getTokens.mjs +10 -20
- package/api/getTokensBalances.d.ts +1 -2
- package/api/getTokensBalances.js +1 -1
- package/api/getTokensBalances.mjs +10 -20
- package/api/getTransactions.d.ts +2 -3
- package/api/getTransactions.js +1 -1
- package/api/getTransactions.mjs +19 -31
- package/api/index.js +1 -1
- package/api/index.mjs +9 -18
- package/api/sendTransactions.d.ts +3 -4
- package/api/sendTransactions.js +1 -1
- package/api/sendTransactions.mjs +19 -31
- package/api/tests/confirmRate.spec.js +1 -1
- package/api/tests/confirmRate.spec.mjs +98 -112
- package/api/tests/getChains.spec.js +1 -1
- package/api/tests/getChains.spec.mjs +38 -36
- package/api/tests/getRate.spec.js +1 -1
- package/api/tests/getRate.spec.mjs +73 -69
- package/api/tests/getTokens.spec.js +1 -1
- package/api/tests/getTokens.spec.mjs +58 -58
- package/api/tests/getTransactions.spec.js +1 -1
- package/api/tests/getTransactions.spec.mjs +84 -74
- package/api/tests/sendTransactions.spec.js +1 -1
- package/api/tests/sendTransactions.spec.mjs +74 -84
- package/chains-Bmeag21l.js +2 -0
- package/chains-DQACurVn.mjs +33 -0
- package/chunk-oiTVcehM.js +2 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +8 -4
- package/default-CqGeN438.js +2 -0
- package/default-DuNFRYAj.mjs +4 -0
- package/dto/Chain.dto.d.ts +0 -1
- package/dto/Chain.dto.js +0 -1
- package/dto/Chain.dto.mjs +0 -1
- package/dto/CheckAccount.dto.js +0 -1
- package/dto/CheckAccount.dto.mjs +0 -1
- package/dto/ConfirmRate.dto.d.ts +0 -1
- package/dto/ConfirmRate.dto.js +0 -1
- package/dto/ConfirmRate.dto.mjs +0 -1
- package/dto/Token.dto.js +0 -1
- package/dto/Token.dto.mjs +0 -1
- package/dto/TokenBalance.dto.js +0 -1
- package/dto/TokenBalance.dto.mjs +0 -1
- package/dto/Transaction.dto.d.ts +0 -1
- package/dto/Transaction.dto.js +0 -1
- package/dto/Transaction.dto.mjs +0 -1
- package/dto/index.js +0 -1
- package/dto/index.mjs +0 -1
- package/helpers/assertConfirmRateData.js +1 -1
- package/helpers/assertConfirmRateData.mjs +11 -28
- package/helpers/assertRateConfirmationMatchesIntent.d.ts +0 -1
- package/helpers/assertRateConfirmationMatchesIntent.js +1 -1
- package/helpers/assertRateConfirmationMatchesIntent.mjs +9 -18
- package/helpers/base64Utils.js +1 -1
- package/helpers/base64Utils.mjs +15 -18
- package/helpers/decodeLoginToken.js +1 -1
- package/helpers/decodeLoginToken.mjs +19 -21
- package/helpers/decodeToken.js +1 -1
- package/helpers/decodeToken.mjs +22 -27
- package/helpers/getApiURL.js +1 -1
- package/helpers/getApiURL.mjs +5 -5
- package/helpers/getBridgeURL.js +1 -1
- package/helpers/getBridgeURL.mjs +4 -4
- package/helpers/getDisplayName.d.ts +0 -1
- package/helpers/getDisplayName.js +1 -1
- package/helpers/getDisplayName.mjs +5 -5
- package/helpers/getMvxApiURL.js +1 -1
- package/helpers/getMvxApiURL.mjs +5 -5
- package/helpers/getMvxChainId.js +1 -1
- package/helpers/getMvxChainId.mjs +5 -5
- package/helpers/getMvxExplorerAddress.js +1 -1
- package/helpers/getMvxExplorerAddress.mjs +4 -4
- package/helpers/index.js +1 -1
- package/helpers/index.mjs +12 -27
- package/helpers/isValidAddressForChainType.d.ts +0 -1
- package/helpers/isValidAddressForChainType.js +1 -1
- package/helpers/isValidAddressForChainType.mjs +37 -48
- package/helpers/safeImageUrl.js +1 -1
- package/helpers/safeImageUrl.mjs +14 -12
- package/helpers/serializeTransaction.d.ts +0 -1
- package/helpers/serializeTransaction.js +1 -1
- package/helpers/serializeTransaction.mjs +5 -5
- package/helpers/tests/assertConfirmRateData.spec.js +1 -1
- package/helpers/tests/assertConfirmRateData.spec.mjs +86 -74
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +1 -1
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +61 -49
- package/helpers/tests/base64Utils.spec.js +1 -1
- package/helpers/tests/base64Utils.spec.mjs +15 -13
- package/helpers/tests/decodeLoginToken.spec.js +1 -1
- package/helpers/tests/decodeLoginToken.spec.mjs +20 -19
- package/helpers/tests/decodeToken.spec.js +1 -1
- package/helpers/tests/decodeToken.spec.mjs +18 -19
- package/helpers/tests/isValidAddressForChainType.spec.js +1 -1
- package/helpers/tests/isValidAddressForChainType.spec.mjs +59 -134
- package/helpers/tests/safeImageUrl.spec.js +1 -1
- package/helpers/tests/safeImageUrl.spec.mjs +30 -30
- package/helpers/tests/serializeTransaction.spec.js +1 -1
- package/helpers/tests/serializeTransaction.spec.mjs +35 -21
- package/index.js +1 -1
- package/index.mjs +91 -200
- package/package.json +23 -32
- package/react.esm-JNqTldrP.mjs +8927 -0
- package/react.esm-kvI07ZPd.js +59 -0
- package/reactjs/adapters/SuiAdapter.d.ts +2 -2
- package/reactjs/adapters/SuiAdapter.js +1 -1
- package/reactjs/adapters/SuiAdapter.mjs +254 -323
- package/reactjs/components/AccountAddress/AccountAddress.d.ts +1 -1
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -1
- package/reactjs/components/AccountAddress/AccountAddress.mjs +20 -30
- package/reactjs/components/AccountAddress/index.js +1 -1
- package/reactjs/components/AccountAddress/index.mjs +2 -4
- package/reactjs/components/AmountCard/AmountCard.d.ts +1 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -1
- package/reactjs/components/AmountCard/AmountCard.mjs +13 -31
- package/reactjs/components/AmountCard/index.js +1 -1
- package/reactjs/components/AmountCard/index.mjs +2 -4
- package/reactjs/components/AmountInput/AmountInput.d.ts +1 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -1
- package/reactjs/components/AmountInput/AmountInput.mjs +48 -66
- package/reactjs/components/AmountInput/index.js +1 -1
- package/reactjs/components/AmountInput/index.mjs +2 -4
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +1 -1
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -1
- package/reactjs/components/BridgeForm/BridgeForm.mjs +53 -81
- package/reactjs/components/BridgeForm/Deposit.d.ts +1 -1
- package/reactjs/components/BridgeForm/Deposit.js +1 -1
- package/reactjs/components/BridgeForm/Deposit.mjs +457 -573
- package/reactjs/components/BridgeForm/Transfer.d.ts +1 -1
- package/reactjs/components/BridgeForm/Transfer.js +1 -1
- package/reactjs/components/BridgeForm/Transfer.mjs +358 -470
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.d.ts +0 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +52 -54
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.d.ts +0 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +35 -46
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.d.ts +1 -2
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +131 -197
- package/reactjs/components/BridgeForm/index.js +1 -1
- package/reactjs/components/BridgeForm/index.mjs +1 -3
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.d.ts +3 -4
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -1
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +26 -43
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +1 -1
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -1
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +2 -353
- package/reactjs/components/BridgeHistory/index.js +1 -1
- package/reactjs/components/BridgeHistory/index.mjs +2 -4
- package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +1 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -1
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +125 -134
- package/reactjs/components/Connect/BridgeConnectButton.d.ts +1 -2
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -1
- package/reactjs/components/Connect/BridgeConnectButton.mjs +42 -44
- package/reactjs/components/Connect/ChainSelectConnect.d.ts +1 -2
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -1
- package/reactjs/components/Connect/ChainSelectConnect.mjs +100 -129
- package/reactjs/components/Connect/CustomConnectButton.d.ts +2 -3
- package/reactjs/components/Connect/CustomConnectButton.js +1 -1
- package/reactjs/components/Connect/CustomConnectButton.mjs +23 -35
- package/reactjs/components/Connect/MvxAccountDisplay.d.ts +1 -1
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -1
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +74 -94
- package/reactjs/components/Connect/MvxConnectButton.d.ts +1 -1
- package/reactjs/components/Connect/MvxConnectButton.js +1 -1
- package/reactjs/components/Connect/MvxConnectButton.mjs +27 -38
- package/reactjs/components/Connect/SwitchChainButton.d.ts +2 -3
- package/reactjs/components/Connect/SwitchChainButton.js +1 -1
- package/reactjs/components/Connect/SwitchChainButton.mjs +20 -30
- package/reactjs/components/Connect/index.js +1 -1
- package/reactjs/components/Connect/index.mjs +6 -14
- package/reactjs/components/CopyButton/CopyButton.d.ts +2 -1
- package/reactjs/components/CopyButton/CopyButton.js +1 -1
- package/reactjs/components/CopyButton/CopyButton.mjs +35 -42
- package/reactjs/components/CopyButton/index.js +1 -1
- package/reactjs/components/CopyButton/index.mjs +2 -4
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -1
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -24
- package/reactjs/components/CopyButton/utils/index.js +1 -1
- package/reactjs/components/CopyButton/utils/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/DisplayAmount.d.ts +2 -3
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -1
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +74 -82
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.d.ts +1 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +22 -31
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.js +0 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.mjs +0 -1
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.d.ts +1 -2
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -1
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +46 -52
- package/reactjs/components/DisplayAmount/components/index.js +0 -1
- package/reactjs/components/DisplayAmount/components/index.mjs +0 -1
- package/reactjs/components/DisplayAmount/index.js +1 -1
- package/reactjs/components/DisplayAmount/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/utils/index.js +1 -1
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -1
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +14 -16
- package/reactjs/components/Error/Error.d.ts +1 -2
- package/reactjs/components/Error/Error.js +1 -1
- package/reactjs/components/Error/Error.mjs +44 -66
- package/reactjs/components/Error/index.js +1 -1
- package/reactjs/components/Error/index.mjs +1 -3
- package/reactjs/components/SmallLoader/SmallLoader.d.ts +1 -1
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -1
- package/reactjs/components/SmallLoader/SmallLoader.mjs +12 -15
- package/reactjs/components/SmallLoader/index.js +1 -1
- package/reactjs/components/SmallLoader/index.mjs +2 -4
- package/reactjs/components/ToggleDirection/ToggleDirection.d.ts +1 -1
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -1
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +2 -24
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +1 -2
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -1
- package/reactjs/components/TokenSelector/TokenSelector.mjs +94 -151
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +75 -83
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +40 -51
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +16 -12
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +4 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +29 -41
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.js +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.mjs +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.js +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.mjs +0 -1
- package/reactjs/components/TokenSelector/components/SelectContainer.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +32 -37
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +78 -110
- package/reactjs/components/TokenSelector/components/SelectedOption.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +26 -26
- package/reactjs/components/TokenSelector/components/TokenIcon.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +54 -74
- package/reactjs/components/TokenSelector/components/TokenItem.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +53 -66
- package/reactjs/components/TokenSelector/components/TokenList.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenList.mjs +13 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +15 -23
- package/reactjs/components/TokenSelector/index.js +1 -1
- package/reactjs/components/TokenSelector/index.mjs +2 -4
- package/reactjs/components/TransactionToast/TransactionToast.d.ts +1 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -1
- package/reactjs/components/TransactionToast/TransactionToast.mjs +43 -51
- package/reactjs/components/TransactionToast/TransactionToastContainer.d.ts +1 -2
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -1
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +15 -18
- package/reactjs/components/TransactionToast/index.js +1 -1
- package/reactjs/components/TransactionToast/index.mjs +3 -6
- package/reactjs/components/TrimAddress/TrimAddress.d.ts +1 -1
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -1
- package/reactjs/components/TrimAddress/TrimAddress.mjs +13 -22
- package/reactjs/components/TrimAddress/index.js +1 -1
- package/reactjs/components/TrimAddress/index.mjs +1 -3
- package/reactjs/components/base/MxButton/MxButton.d.ts +1 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -1
- package/reactjs/components/base/MxButton/MxButton.mjs +43 -70
- package/reactjs/components/base/MxButton/index.js +1 -1
- package/reactjs/components/base/MxButton/index.mjs +2 -4
- package/reactjs/components/base/MxCard/MxCard.d.ts +0 -1
- package/reactjs/components/base/MxCard/MxCard.js +1 -1
- package/reactjs/components/base/MxCard/MxCard.mjs +33 -54
- package/reactjs/components/base/MxCard/index.js +1 -1
- package/reactjs/components/base/MxCard/index.mjs +2 -4
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +1 -1
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -1
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +9 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -1
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -4
- package/reactjs/components/base/MxLink/MxLink.d.ts +0 -1
- package/reactjs/components/base/MxLink/MxLink.js +1 -1
- package/reactjs/components/base/MxLink/MxLink.mjs +42 -68
- package/reactjs/components/base/MxLink/index.js +1 -1
- package/reactjs/components/base/MxLink/index.mjs +2 -4
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -1
- package/reactjs/components/base/MxSearch/MxSearch.mjs +35 -65
- package/reactjs/components/base/MxSearch/index.js +1 -1
- package/reactjs/components/base/MxSearch/index.mjs +2 -4
- package/reactjs/components/base/MxSlideover/MxSlideover.d.ts +1 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -1
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +70 -76
- package/reactjs/components/base/MxSlideover/index.js +1 -1
- package/reactjs/components/base/MxSlideover/index.mjs +2 -4
- package/reactjs/components/base/MxTooltip/MxTooltip.d.ts +2 -3
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -1
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +79 -119
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.d.ts +0 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +23 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.d.ts +1 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +13 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +1 -3
- package/reactjs/components/base/MxTooltip/components/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/index.mjs +5 -6
- package/reactjs/components/base/MxTooltip/index.js +1 -1
- package/reactjs/components/base/MxTooltip/index.mjs +2 -4
- package/reactjs/components/base/index.js +1 -1
- package/reactjs/components/base/index.mjs +12 -13
- package/reactjs/components/index.js +1 -1
- package/reactjs/components/index.mjs +40 -53
- package/reactjs/constants/chains.js +1 -1
- package/reactjs/constants/chains.mjs +2 -35
- package/reactjs/constants/index.js +1 -1
- package/reactjs/constants/index.mjs +5 -12
- package/reactjs/context/Web3AppProvider.d.ts +6 -7
- package/reactjs/context/Web3AppProvider.js +1 -1
- package/reactjs/context/Web3AppProvider.mjs +41 -40
- package/reactjs/context/queryClient.d.ts +0 -1
- package/reactjs/context/queryClient.js +1 -1
- package/reactjs/context/queryClient.mjs +6 -6
- package/reactjs/context/useWeb3App.js +1 -1
- package/reactjs/context/useWeb3App.mjs +9 -10
- package/reactjs/helpers/index.js +1 -1
- package/reactjs/helpers/index.mjs +2 -6
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -1
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +22 -23
- package/reactjs/hooks/index.js +1 -1
- package/reactjs/hooks/index.mjs +16 -35
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +1 -1
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +43 -50
- package/reactjs/hooks/tests/useSignTransaction.spec.js +1 -1
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +123 -150
- package/reactjs/hooks/useAccount.js +1 -1
- package/reactjs/hooks/useAccount.mjs +11 -11
- package/reactjs/hooks/useBalances.d.ts +0 -1
- package/reactjs/hooks/useBalances.js +1 -1
- package/reactjs/hooks/useBalances.mjs +31 -39
- package/reactjs/hooks/useBridgeApiChainId.js +1 -1
- package/reactjs/hooks/useBridgeApiChainId.mjs +8 -11
- package/reactjs/hooks/useBridgeFormik.d.ts +4 -5
- package/reactjs/hooks/useBridgeFormik.js +1 -1
- package/reactjs/hooks/useBridgeFormik.mjs +117 -143
- package/reactjs/hooks/useDebounce.js +1 -1
- package/reactjs/hooks/useDebounce.mjs +10 -10
- package/reactjs/hooks/useDisconnectOnChainTypeChange.d.ts +0 -1
- package/reactjs/hooks/useDisconnectOnChainTypeChange.js +1 -1
- package/reactjs/hooks/useDisconnectOnChainTypeChange.mjs +12 -12
- package/reactjs/hooks/useFetchBridgeData.d.ts +2 -2
- package/reactjs/hooks/useFetchBridgeData.js +1 -1
- package/reactjs/hooks/useFetchBridgeData.mjs +2 -44
- package/reactjs/hooks/useFetchTokens.d.ts +1 -1
- package/reactjs/hooks/useFetchTokens.js +1 -1
- package/reactjs/hooks/useFetchTokens.mjs +2 -92
- package/reactjs/hooks/useGenericSignMessage.js +1 -1
- package/reactjs/hooks/useGenericSignMessage.mjs +37 -54
- package/reactjs/hooks/useGetChainId.js +1 -1
- package/reactjs/hooks/useGetChainId.mjs +9 -9
- package/reactjs/hooks/useNamespaceAddress.d.ts +0 -1
- package/reactjs/hooks/useNamespaceAddress.js +1 -1
- package/reactjs/hooks/useNamespaceAddress.mjs +12 -15
- package/reactjs/hooks/useResolveTokenChain.d.ts +0 -1
- package/reactjs/hooks/useResolveTokenChain.js +1 -1
- package/reactjs/hooks/useResolveTokenChain.mjs +13 -15
- package/reactjs/hooks/useSendTransactions.d.ts +0 -1
- package/reactjs/hooks/useSendTransactions.js +1 -1
- package/reactjs/hooks/useSendTransactions.mjs +11 -20
- package/reactjs/hooks/useSignTransaction.d.ts +509 -0
- package/reactjs/hooks/useSignTransaction.js +1 -1
- package/reactjs/hooks/useSignTransaction.mjs +59 -85
- package/reactjs/hooks/useSuiConnect.js +1 -1
- package/reactjs/hooks/useSuiConnect.mjs +68 -67
- package/reactjs/hooks/validation/index.js +1 -1
- package/reactjs/hooks/validation/index.mjs +5 -10
- package/reactjs/hooks/validation/useAmountSchema.js +1 -1
- package/reactjs/hooks/validation/useAmountSchema.mjs +9 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -1
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -8
- package/reactjs/hooks/validation/useTestHasEnoughFunds.d.ts +0 -1
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -1
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -27
- package/reactjs/hooks/validation/useTestIsConnected.d.ts +0 -1
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -1
- package/reactjs/hooks/validation/useTestIsConnected.mjs +15 -20
- package/reactjs/index.d.ts +0 -1
- package/reactjs/index.js +1 -1
- package/reactjs/index.mjs +70 -157
- package/reactjs/init/index.js +1 -1
- package/reactjs/init/index.mjs +2 -5
- package/reactjs/init/init.d.ts +2 -3
- package/reactjs/init/init.js +1 -1
- package/reactjs/init/init.mjs +113 -112
- package/reactjs/init/isMobileInjectedDappBrowser.js +1 -1
- package/reactjs/init/isMobileInjectedDappBrowser.mjs +6 -7
- package/reactjs/queries/index.js +1 -1
- package/reactjs/queries/index.mjs +7 -17
- package/reactjs/queries/useCheckAccount.query.d.ts +1 -2
- package/reactjs/queries/useCheckAccount.query.js +1 -1
- package/reactjs/queries/useCheckAccount.query.mjs +35 -34
- package/reactjs/queries/useGetAllTokens.query.d.ts +1 -2
- package/reactjs/queries/useGetAllTokens.query.js +1 -1
- package/reactjs/queries/useGetAllTokens.query.mjs +24 -30
- package/reactjs/queries/useGetChains.query.d.ts +1 -2
- package/reactjs/queries/useGetChains.query.js +1 -1
- package/reactjs/queries/useGetChains.query.mjs +28 -31
- package/reactjs/queries/useGetHistory.query.d.ts +2 -3
- package/reactjs/queries/useGetHistory.query.js +1 -1
- package/reactjs/queries/useGetHistory.query.mjs +50 -64
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +3 -4
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -1
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +44 -56
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +3 -4
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -1
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +2 -75
- package/reactjs/queries/useGetRate.mutation.d.ts +0 -1
- package/reactjs/queries/useGetRate.mutation.js +1 -1
- package/reactjs/queries/useGetRate.mutation.mjs +12 -14
- package/reactjs/reexports.d.ts +2 -3
- package/reactjs/reexports.js +1 -1
- package/reactjs/reexports.mjs +3 -15
- package/reactjs/utils/delay.js +1 -1
- package/reactjs/utils/delay.mjs +5 -5
- package/reactjs/utils/formatAmount.js +1 -1
- package/reactjs/utils/formatAmount.mjs +11 -22
- package/reactjs/utils/getCleanStringAmount.js +1 -1
- package/reactjs/utils/getCleanStringAmount.mjs +11 -8
- package/reactjs/utils/getCompletePathname.js +1 -1
- package/reactjs/utils/getCompletePathname.mjs +5 -5
- package/reactjs/utils/getInitialTokens.js +1 -1
- package/reactjs/utils/getInitialTokens.mjs +10 -10
- package/reactjs/utils/hasEnoughFunds.js +1 -1
- package/reactjs/utils/hasEnoughFunds.mjs +9 -15
- package/reactjs/utils/index.js +1 -1
- package/reactjs/utils/index.mjs +12 -25
- package/reactjs/utils/isStringFloat.js +1 -1
- package/reactjs/utils/isStringFloat.mjs +10 -13
- package/reactjs/utils/mxClsx.d.ts +0 -1
- package/reactjs/utils/mxClsx.js +1 -1
- package/reactjs/utils/mxClsx.mjs +5 -5
- package/reactjs/utils/pipe.js +1 -1
- package/reactjs/utils/pipe.mjs +13 -20
- package/reactjs/utils/removeCommas.js +1 -1
- package/reactjs/utils/removeCommas.mjs +4 -4
- package/reactjs/utils/roundAmount.js +1 -1
- package/reactjs/utils/roundAmount.mjs +15 -19
- package/reactjs/utils/testNumber.js +1 -1
- package/reactjs/utils/testNumber.mjs +4 -4
- package/store/inMemoryStore.js +1 -1
- package/store/inMemoryStore.mjs +30 -34
- package/style.css +2 -1
- package/types/batchTransactions.d.ts +0 -1
- package/types/batchTransactions.js +0 -1
- package/types/batchTransactions.mjs +0 -1
- package/types/chainType.js +1 -1
- package/types/chainType.mjs +6 -4
- package/types/errors.js +1 -1
- package/types/errors.mjs +15 -19
- package/types/index.js +0 -1
- package/types/index.mjs +0 -1
- package/types/providerType.js +1 -1
- package/types/providerType.mjs +6 -4
- package/types/rate.d.ts +0 -1
- package/types/rate.js +0 -1
- package/types/rate.mjs +0 -1
- package/types/token.d.ts +0 -1
- package/types/token.js +0 -1
- package/types/token.mjs +0 -1
- package/types/transaction.d.ts +3 -4
- package/types/transaction.js +0 -1
- package/types/transaction.mjs +0 -1
- package/types/utxo.js +0 -1
- package/types/utxo.mjs +0 -1
- package/useFetchBridgeData-B5xt9GbW.js +2 -0
- package/useFetchBridgeData-C_hZjzd_.mjs +142 -0
- package/all-networks--dfVLHLJ.js +0 -2
- package/all-networks-Czd8zS1n.mjs +0 -4
- package/default-D0Jk5ROI.mjs +0 -4
- package/default-DbU6vPaB.js +0 -2
- package/react.esm-B0AMOHxa.js +0 -73
- package/react.esm-BxvJJ86Q.mjs +0 -9949
|
@@ -1,574 +1,458 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import "
|
|
15
|
-
import {
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import "../
|
|
38
|
-
import "
|
|
39
|
-
import "
|
|
40
|
-
import "@fortawesome/
|
|
41
|
-
import "@
|
|
42
|
-
import "
|
|
43
|
-
import "react
|
|
44
|
-
import "
|
|
45
|
-
import
|
|
46
|
-
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
username: Xe,
|
|
457
|
-
accountExplorerUrl: `${qe.mvxExplorerAddress}/accounts/${c}`,
|
|
458
|
-
showTag: !0,
|
|
459
|
-
onDisconnect: Ye,
|
|
460
|
-
onConnect: ue
|
|
461
|
-
}
|
|
462
|
-
)
|
|
463
|
-
] }),
|
|
464
|
-
se && /* @__PURE__ */ n("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: se }),
|
|
465
|
-
le && /* @__PURE__ */ n("div", { className: "liq-text-red-400 liq-text-xs liq-mt-1", children: le }),
|
|
466
|
-
/* @__PURE__ */ l("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
|
|
467
|
-
/* @__PURE__ */ n(
|
|
468
|
-
Oe,
|
|
469
|
-
{
|
|
470
|
-
inputName: "secondAmount",
|
|
471
|
-
inputValue: b.values.secondAmount,
|
|
472
|
-
amountError: wi,
|
|
473
|
-
disabled: !1,
|
|
474
|
-
onInputDebounceChange: B,
|
|
475
|
-
onInputChange: De,
|
|
476
|
-
onBlur: z
|
|
477
|
-
}
|
|
478
|
-
),
|
|
479
|
-
/* @__PURE__ */ n(
|
|
480
|
-
We,
|
|
481
|
-
{
|
|
482
|
-
name: "secondToken",
|
|
483
|
-
disabled: S,
|
|
484
|
-
omitDisableClass: !0,
|
|
485
|
-
options: pi,
|
|
486
|
-
areOptionsLoading: T,
|
|
487
|
-
isMvxSelector: qi,
|
|
488
|
-
color: "neutral-850",
|
|
489
|
-
onChange: hi,
|
|
490
|
-
onBlur: z,
|
|
491
|
-
selectedOption: o
|
|
492
|
-
}
|
|
493
|
-
)
|
|
494
|
-
] })
|
|
495
|
-
]
|
|
496
|
-
}
|
|
497
|
-
),
|
|
498
|
-
/* @__PURE__ */ l("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
|
|
499
|
-
!c && /* @__PURE__ */ n(
|
|
500
|
-
tt,
|
|
501
|
-
{
|
|
502
|
-
mvxAccountAddress: c,
|
|
503
|
-
icon: Q(s == null ? void 0 : s.pngUrl),
|
|
504
|
-
onClick: ue
|
|
505
|
-
}
|
|
506
|
-
),
|
|
507
|
-
c && !Ae && /* @__PURE__ */ n(
|
|
508
|
-
it,
|
|
509
|
-
{
|
|
510
|
-
className: "liq-w-full liq-rounded-xl liq-bg-neutral-850/50 liq-px-8 liq-py-3 liq-font-semibold liq-text-primary-200 liq-transition-colors liq-duration-200 hover:enabled:liq-bg-primary-700/80 disabled:liq-opacity-50",
|
|
511
|
-
disabled: S,
|
|
512
|
-
activeChain: a
|
|
513
|
-
}
|
|
514
|
-
),
|
|
515
|
-
c && Ae && /* @__PURE__ */ l(
|
|
516
|
-
Ti,
|
|
517
|
-
{
|
|
518
|
-
type: "submit",
|
|
519
|
-
variant: "neutral-850",
|
|
520
|
-
className: "liq-w-full disabled:liq-bg-neutral-850/50 liq-py-3 hover:enabled:liq-bg-primary !liq-text-primary-200",
|
|
521
|
-
disabled: !ie || S || !c || !q || Ci || j,
|
|
522
|
-
children: [
|
|
523
|
-
ie && !j && /* @__PURE__ */ l("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
524
|
-
/* @__PURE__ */ n("div", { children: "Deposit on " }),
|
|
525
|
-
/* @__PURE__ */ n(
|
|
526
|
-
"img",
|
|
527
|
-
{
|
|
528
|
-
src: Q(s == null ? void 0 : s.pngUrl),
|
|
529
|
-
alt: "",
|
|
530
|
-
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
531
|
-
}
|
|
532
|
-
),
|
|
533
|
-
/* @__PURE__ */ n("div", { children: "MultiversX" })
|
|
534
|
-
] }),
|
|
535
|
-
!ie && !j && /* @__PURE__ */ n("span", { className: "liq-text-neutral-100", children: "Enter amount" }),
|
|
536
|
-
j && /* @__PURE__ */ l("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
537
|
-
/* @__PURE__ */ n(
|
|
538
|
-
Mi,
|
|
539
|
-
{
|
|
540
|
-
icon: Ei,
|
|
541
|
-
spin: !0,
|
|
542
|
-
className: "liq-mx-1 liq-flex liq-items-center"
|
|
543
|
-
}
|
|
544
|
-
),
|
|
545
|
-
/* @__PURE__ */ n("div", { children: "Depositing on" }),
|
|
546
|
-
/* @__PURE__ */ n(
|
|
547
|
-
"img",
|
|
548
|
-
{
|
|
549
|
-
src: Q(s == null ? void 0 : s.pngUrl),
|
|
550
|
-
alt: "",
|
|
551
|
-
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
552
|
-
}
|
|
553
|
-
),
|
|
554
|
-
/* @__PURE__ */ n("div", { children: "MultiversX" })
|
|
555
|
-
] })
|
|
556
|
-
]
|
|
557
|
-
}
|
|
558
|
-
)
|
|
559
|
-
] }),
|
|
560
|
-
q && Y > 0 && /* @__PURE__ */ n("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ l("div", { children: [
|
|
561
|
-
"You will be asked to sign ",
|
|
562
|
-
Y,
|
|
563
|
-
" ",
|
|
564
|
-
Y > 1 ? "transactions" : "transaction",
|
|
565
|
-
" ",
|
|
566
|
-
"on your wallet"
|
|
567
|
-
] }) })
|
|
568
|
-
]
|
|
569
|
-
}
|
|
570
|
-
) });
|
|
571
|
-
};
|
|
572
|
-
export {
|
|
573
|
-
an as Deposit
|
|
1
|
+
import { MVX_CHAIN_IDS as e } from "../../../constants/index.mjs";
|
|
2
|
+
import { getApiURL as t } from "../../../helpers/getApiURL.mjs";
|
|
3
|
+
import { safeImageUrl as n } from "../../../helpers/safeImageUrl.mjs";
|
|
4
|
+
import { ChainType as r } from "../../../types/chainType.mjs";
|
|
5
|
+
import "../../../helpers/index.mjs";
|
|
6
|
+
import { mxClsx as i } from "../../utils/mxClsx.mjs";
|
|
7
|
+
import { MxButton as a } from "../base/MxButton/MxButton.mjs";
|
|
8
|
+
import "../base/index.mjs";
|
|
9
|
+
import { AmountCard as o } from "../AmountCard/AmountCard.mjs";
|
|
10
|
+
import "../AmountCard/index.mjs";
|
|
11
|
+
import { AmountInput as s } from "../AmountInput/AmountInput.mjs";
|
|
12
|
+
import "../AmountInput/index.mjs";
|
|
13
|
+
import { sameBridgeApiChainId as c, toBridgeApiChainId as ee } from "../../helpers/resolveBridgeApiChainId.mjs";
|
|
14
|
+
import { resolveSigningChainType as te } from "./utils/bridgeFormHelpers.mjs";
|
|
15
|
+
import { useBridgeTokenSelection as ne } from "./hooks/useBridgeTokenSelection.mjs";
|
|
16
|
+
import { useWeb3App as re } from "../../context/useWeb3App.mjs";
|
|
17
|
+
import { useAccount as ie } from "../../hooks/useAccount.mjs";
|
|
18
|
+
import { useBridgeApiChainId as ae } from "../../hooks/useBridgeApiChainId.mjs";
|
|
19
|
+
import { BridgeFormikValuesEnum as l, useBridgeFormik as oe } from "../../hooks/useBridgeFormik.mjs";
|
|
20
|
+
import { useDisconnectOnChainTypeChange as se } from "../../hooks/useDisconnectOnChainTypeChange.mjs";
|
|
21
|
+
import { useGetChainId as ce } from "../../hooks/useGetChainId.mjs";
|
|
22
|
+
import { useSendTransactions as le } from "../../hooks/useSendTransactions.mjs";
|
|
23
|
+
import { useSignTransaction as ue } from "../../hooks/useSignTransaction.mjs";
|
|
24
|
+
import { t as de } from "../../../useFetchBridgeData-C_hZjzd_.mjs";
|
|
25
|
+
import { useNamespaceAddress as fe } from "../../hooks/useNamespaceAddress.mjs";
|
|
26
|
+
import { useInvalidateHistoryQuery as pe } from "../../queries/useGetHistory.query.mjs";
|
|
27
|
+
import { useGetRateMutation as me } from "../../queries/useGetRate.mutation.mjs";
|
|
28
|
+
import { t as he } from "../../../BridgeHistory-CInRkJ6T.mjs";
|
|
29
|
+
import "../BridgeHistory/index.mjs";
|
|
30
|
+
import { BridgeConnectButton as ge } from "../Connect/BridgeConnectButton.mjs";
|
|
31
|
+
import { MvxConnectButton as _e } from "../Connect/MvxConnectButton.mjs";
|
|
32
|
+
import { BridgeAccountDisplay as ve } from "../Connect/BridgeAccountDisplay.mjs";
|
|
33
|
+
import { MvxAccountDisplay as ye } from "../Connect/MvxAccountDisplay.mjs";
|
|
34
|
+
import "../Connect/index.mjs";
|
|
35
|
+
import { t as be } from "../../../ToggleDirection-BLDXxUlN.mjs";
|
|
36
|
+
import { TokenSelector as xe } from "../TokenSelector/TokenSelector.mjs";
|
|
37
|
+
import "../TokenSelector/index.mjs";
|
|
38
|
+
import { Fragment as Se, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
39
|
+
import { useCallback as f, useEffect as p, useMemo as m, useRef as Ce, useState as h } from "react";
|
|
40
|
+
import { FontAwesomeIcon as we } from "@fortawesome/react-fontawesome";
|
|
41
|
+
import { faSpinner as Te } from "@fortawesome/free-solid-svg-icons/faSpinner";
|
|
42
|
+
import { formatAmount as Ee } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
|
|
43
|
+
import { useAppKitNetwork as De } from "@reown/appkit/react";
|
|
44
|
+
import { waitForTransactionReceipt as Oe } from "@wagmi/core";
|
|
45
|
+
import ke from "lodash/debounce";
|
|
46
|
+
import { toast as g } from "react-toastify";
|
|
47
|
+
//#region src/reactjs/components/BridgeForm/Deposit.tsx
|
|
48
|
+
var _, v = ({ mvxChainId: v, mvxAddress: y, username: Ae, callbackRoute: je = "/", firstTokenIdentifier: Me, secondTokenIdentifier: Ne, firstTokenAmount: b, secondTokenAmount: x, refetchTrigger: Pe, showHistory: Fe, forcedDestinationTokenSymbol: Ie, onSuccessfullySentTransaction: Le, onFailedSentTransaction: Re, onHistoryClose: ze, onMvxConnect: Be, onMvxDisconnect: Ve, onNavigate: He, onChangeDirection: Ue }) => {
|
|
49
|
+
let We = Ce(null), Ge = Ce(void 0), [S, Ke] = h(!1), [C, w] = h(!1), [qe, Je] = h(1), [T, E] = h(0), Ye = ie(), { switchNetwork: Xe } = De(), Ze = pe(), { config: Qe, options: $e, supportedChains: D, nativeAuthToken: O, bridgeOnly: et } = re(), k = ce(), tt = ae(), { evmTokensWithBalances: nt, mvxTokensWithBalances: rt, isTokensLoading: it, isLoadingEvmTokensBalances: at, isLoadingMvxTokensBalances: ot, chains: A = [], isChainsLoading: st } = de({
|
|
50
|
+
refetchTrigger: Pe,
|
|
51
|
+
mvxAddress: y,
|
|
52
|
+
mvxApiURL: $e.mvxApiURL
|
|
53
|
+
}), j = it || at || ot || st, ct = m(() => D.find((e) => c(e.id, k)), [k, D]), M = m(() => A.find((e) => e.chainId.toString() === v.toString()), [k, A]), { evm: lt, solana: ut, bitcoin: dt, sui: ft } = ue(), pt = le(), { mutate: mt, data: N, isPending: P, error: ht } = me(), F = ht?.response?.status === 400 ? ht?.response?.data.message : void 0, { firstToken: I, secondToken: L, fromOptions: R, toOptions: gt, selectedChainOption: z, onChangeFirstSelect: B, onChangeSecondSelect: _t, handleChangeDirection: vt } = ne({
|
|
54
|
+
chains: A,
|
|
55
|
+
activeChain: ct,
|
|
56
|
+
sdkChains: D,
|
|
57
|
+
switchNetwork: f((e) => {
|
|
58
|
+
let t = D.find((t) => c(t.id, e.id));
|
|
59
|
+
t && Xe(t);
|
|
60
|
+
}, [D, Xe]),
|
|
61
|
+
fromTokens: nt,
|
|
62
|
+
toTokens: rt,
|
|
63
|
+
firstTokenIdentifier: Me,
|
|
64
|
+
secondTokenIdentifier: Ne,
|
|
65
|
+
forcedDestinationTokenSymbol: Ie,
|
|
66
|
+
isTokensLoading: j,
|
|
67
|
+
callbackRoute: je,
|
|
68
|
+
onNavigate: He
|
|
69
|
+
}), yt = m(() => I ? e.includes(I.chainId.toString()) : !1, [I?.chainId]), bt = m(() => L ? e.includes(L.chainId.toString()) : !1, [L?.chainId]), [V, xt] = h(b ?? ""), [H, U] = h(x ?? ""), W = m(() => I ? A.find((e) => c(e.chainId, I.chainId)) ?? z : z, [
|
|
70
|
+
I?.chainId,
|
|
71
|
+
A,
|
|
72
|
+
z
|
|
73
|
+
]), G = m(() => ee(I?.chainId) ?? tt, [I?.chainId, tt]);
|
|
74
|
+
se(W?.chainType);
|
|
75
|
+
let K = fe(W?.chainType), St = K, Ct = Ye.isConnected && !!K, q = V !== "" && H !== "", wt = f(ke(async (e) => {
|
|
76
|
+
!e || !Number(e) || !K || !I?.address || !L?.address || !z || !G || mt({
|
|
77
|
+
nativeAuthToken: O ?? "",
|
|
78
|
+
body: {
|
|
79
|
+
tokenIn: I.address,
|
|
80
|
+
amountIn: e,
|
|
81
|
+
fromChainId: G,
|
|
82
|
+
tokenOut: L.address,
|
|
83
|
+
toChainId: v
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}, 500), [
|
|
87
|
+
K,
|
|
88
|
+
G,
|
|
89
|
+
I?.address,
|
|
90
|
+
L?.address,
|
|
91
|
+
z,
|
|
92
|
+
v,
|
|
93
|
+
O,
|
|
94
|
+
mt
|
|
95
|
+
]), J = f((e) => {
|
|
96
|
+
xt(() => e);
|
|
97
|
+
}, []), Y = f((e) => {
|
|
98
|
+
U(() => e);
|
|
99
|
+
}, []), Tt = f(() => {
|
|
100
|
+
ze?.();
|
|
101
|
+
}, [ze]), Et = f(() => {
|
|
102
|
+
let e = Ee({
|
|
103
|
+
decimals: I?.decimals,
|
|
104
|
+
input: I?.balance ?? "0",
|
|
105
|
+
addCommas: !1,
|
|
106
|
+
digits: 4
|
|
107
|
+
});
|
|
108
|
+
X.setFieldValue("firstAmount", e), J(e);
|
|
109
|
+
}, [
|
|
110
|
+
I?.balance,
|
|
111
|
+
I?.decimals,
|
|
112
|
+
J
|
|
113
|
+
]), Dt = f(async (e) => {
|
|
114
|
+
J(""), Y(""), Ze(), Ze(), Le?.(e);
|
|
115
|
+
}, [
|
|
116
|
+
J,
|
|
117
|
+
Y,
|
|
118
|
+
Le
|
|
119
|
+
]), Ot = () => {
|
|
120
|
+
vt(), Ue();
|
|
121
|
+
};
|
|
122
|
+
p(() => {
|
|
123
|
+
let e = Ge.current;
|
|
124
|
+
if (Ge.current = z?.chainId, e && z?.chainId !== I?.chainId) {
|
|
125
|
+
let e = R?.find((e) => e.chainId.toString() === z?.chainId);
|
|
126
|
+
if (!e) return;
|
|
127
|
+
B(e);
|
|
128
|
+
}
|
|
129
|
+
}, [
|
|
130
|
+
z?.chainId,
|
|
131
|
+
I?.chainId,
|
|
132
|
+
R,
|
|
133
|
+
B
|
|
134
|
+
]);
|
|
135
|
+
let kt = f(async ({ transactions: e, provider: n }) => {
|
|
136
|
+
let i = [];
|
|
137
|
+
w(!0), E(() => e.length);
|
|
138
|
+
try {
|
|
139
|
+
let a = -1;
|
|
140
|
+
for (let t of e) {
|
|
141
|
+
++a;
|
|
142
|
+
try {
|
|
143
|
+
switch (te(t, W)) {
|
|
144
|
+
case r.evm: {
|
|
145
|
+
let n = await lt.signTransaction({
|
|
146
|
+
...t,
|
|
147
|
+
value: BigInt(t.value),
|
|
148
|
+
gas: BigInt(t.gasLimit),
|
|
149
|
+
account: St
|
|
150
|
+
});
|
|
151
|
+
if (!n || (i.push({
|
|
152
|
+
...t,
|
|
153
|
+
txHash: n
|
|
154
|
+
}), a === e.length - 1 || !n)) break;
|
|
155
|
+
let r = await Oe(Qe, {
|
|
156
|
+
confirmations: 1,
|
|
157
|
+
hash: n
|
|
158
|
+
});
|
|
159
|
+
console.info({
|
|
160
|
+
transactionReceipt: r,
|
|
161
|
+
hash: n
|
|
162
|
+
});
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case r.sol:
|
|
166
|
+
if (!t.instructions || !t.feePayer) break;
|
|
167
|
+
let n = await ut.signTransaction({
|
|
168
|
+
feePayer: t.feePayer,
|
|
169
|
+
instructions: t.instructions,
|
|
170
|
+
recentBlockhash: t.recentBlockhash
|
|
171
|
+
});
|
|
172
|
+
if (!n) break;
|
|
173
|
+
i.push({
|
|
174
|
+
...t,
|
|
175
|
+
txHash: n
|
|
176
|
+
});
|
|
177
|
+
break;
|
|
178
|
+
case r.btc:
|
|
179
|
+
if (!t.bitcoinParams) {
|
|
180
|
+
console.error("No bitcoin params");
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
let o = await dt.signTransaction(t.bitcoinParams);
|
|
184
|
+
i.push({
|
|
185
|
+
...t,
|
|
186
|
+
txHash: o
|
|
187
|
+
});
|
|
188
|
+
break;
|
|
189
|
+
case r.sui: {
|
|
190
|
+
let e = t.suiParams?.transactionBytes, n = t.suiParams?.sender;
|
|
191
|
+
if (!e || !n) {
|
|
192
|
+
console.error("No Sui transaction bytes or sender address");
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
let r = await ft.signTransaction({
|
|
196
|
+
transaction: e,
|
|
197
|
+
address: n
|
|
198
|
+
});
|
|
199
|
+
if (!r) break;
|
|
200
|
+
i.push({
|
|
201
|
+
...t,
|
|
202
|
+
suiParams: {
|
|
203
|
+
...t.suiParams,
|
|
204
|
+
signature: r
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
default:
|
|
210
|
+
g.error("Provider not supported"), w(!1);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
E(() => e.length - 1 - a);
|
|
214
|
+
} catch {
|
|
215
|
+
g.dismiss(), g.error("Transaction aborted"), Re?.("Transaction aborted"), w(!1);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
let { data: o } = await pt({
|
|
220
|
+
transactions: i,
|
|
221
|
+
provider: n,
|
|
222
|
+
url: t() ?? "",
|
|
223
|
+
token: O ?? ""
|
|
224
|
+
}), s = o.transactions?.map((e) => e.txHash).filter((e) => !!e) ?? [], c = i.map((e) => e.txHash).filter((e) => !!e);
|
|
225
|
+
Dt(s.length > 0 ? s : c.length > 0 ? c : o.batchId ? [o.batchId] : []), w(!1);
|
|
226
|
+
} catch (e) {
|
|
227
|
+
console.error(e), g.dismiss(), g.error("Transaction cancelled"), Re?.("Transaction cancelled"), w(!1), E(0), It(), J(""), Y("");
|
|
228
|
+
}
|
|
229
|
+
}, [
|
|
230
|
+
W,
|
|
231
|
+
St,
|
|
232
|
+
Qe,
|
|
233
|
+
J,
|
|
234
|
+
Y,
|
|
235
|
+
O,
|
|
236
|
+
Dt,
|
|
237
|
+
pt,
|
|
238
|
+
dt.signTransaction,
|
|
239
|
+
lt.signTransaction,
|
|
240
|
+
ut.signTransaction,
|
|
241
|
+
ft.signTransaction
|
|
242
|
+
]), { formik: X, firstAmountError: At, secondAmountError: jt, fromChainError: Mt, senderAddressError: Nt, receiverAddressError: Z, confirmRateError: Q, handleBlur: $, handleChange: Pt, handleSubmit: Ft, resetSwapForm: It } = oe({
|
|
243
|
+
isMvxConnected: !!y,
|
|
244
|
+
rate: N,
|
|
245
|
+
sender: K ?? "",
|
|
246
|
+
receiver: y ?? "",
|
|
247
|
+
firstToken: I,
|
|
248
|
+
firstAmount: V,
|
|
249
|
+
fromChainId: G,
|
|
250
|
+
toChainId: v,
|
|
251
|
+
secondToken: L,
|
|
252
|
+
secondAmount: H,
|
|
253
|
+
setForceRefetchRate: Je,
|
|
254
|
+
senderChainType: W?.chainType,
|
|
255
|
+
receiverChainType: r.mvx,
|
|
256
|
+
onSubmit: kt
|
|
257
|
+
}), Lt = !!(At || jt || Mt || F || Nt || Z || Q), Rt = m(() => V === "" ? void 0 : F ?? At, [
|
|
258
|
+
At,
|
|
259
|
+
V,
|
|
260
|
+
F
|
|
261
|
+
]), zt = m(() => H === "" ? void 0 : Mt ?? jt, [
|
|
262
|
+
Mt,
|
|
263
|
+
jt,
|
|
264
|
+
H
|
|
265
|
+
]);
|
|
266
|
+
return p(() => (V || U(""), wt(V), _ && clearInterval(_), _ = setInterval(() => {
|
|
267
|
+
wt(V);
|
|
268
|
+
}, 50 * 1e3), () => clearInterval(_)), [
|
|
269
|
+
V,
|
|
270
|
+
qe,
|
|
271
|
+
wt
|
|
272
|
+
]), p(() => {
|
|
273
|
+
N?.amountOut && (X.setFieldValue(l.secondAmount, N.amountOut), U(N.amountOut));
|
|
274
|
+
}, [N?.amountOut]), p(() => {
|
|
275
|
+
F && (X.setFieldValue(l.secondAmount, "0"), U("0"));
|
|
276
|
+
}, [F]), p(() => {
|
|
277
|
+
b && (X.setFieldValue(l.firstAmount, b), J(b));
|
|
278
|
+
}, []), p(() => {
|
|
279
|
+
x && (X.setFieldValue(l.secondAmount, x), Y(x));
|
|
280
|
+
}, [x]), /* @__PURE__ */ u(Se, { children: /* @__PURE__ */ d("form", {
|
|
281
|
+
ref: We,
|
|
282
|
+
noValidate: !0,
|
|
283
|
+
className: "liq-flex liq-flex-col liq-gap-1 liq-relative",
|
|
284
|
+
autoComplete: "off",
|
|
285
|
+
onSubmit: Ft,
|
|
286
|
+
children: [
|
|
287
|
+
Fe && /* @__PURE__ */ u(he, {
|
|
288
|
+
mvxAddress: y,
|
|
289
|
+
onClose: Tt
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ d(o, {
|
|
292
|
+
className: i("liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6", {
|
|
293
|
+
"liq-pointer-events-none": S,
|
|
294
|
+
"focus-within:liq-outline-neutral-700/75 hover:liq-outline-neutral-700/55 hover:focus-within:liq-outline-neutral-700/80": !S
|
|
295
|
+
}),
|
|
296
|
+
children: [
|
|
297
|
+
/* @__PURE__ */ d("div", {
|
|
298
|
+
className: "liq-flex liq-items-center liq-gap-1",
|
|
299
|
+
children: [/* @__PURE__ */ u("span", { children: "From" }), /* @__PURE__ */ u(ve, {
|
|
300
|
+
disabled: P,
|
|
301
|
+
activeChain: W
|
|
302
|
+
})]
|
|
303
|
+
}),
|
|
304
|
+
Nt && /* @__PURE__ */ u("div", {
|
|
305
|
+
className: "liq-text-red-400 liq-text-xs liq-mt-1",
|
|
306
|
+
children: Nt
|
|
307
|
+
}),
|
|
308
|
+
/* @__PURE__ */ d("div", {
|
|
309
|
+
className: "liq-flex liq-justify-between liq-gap-1",
|
|
310
|
+
children: [/* @__PURE__ */ u(s, {
|
|
311
|
+
inputName: "firstAmount",
|
|
312
|
+
inputValue: X.values.firstAmount,
|
|
313
|
+
amountError: Rt,
|
|
314
|
+
disabled: !1,
|
|
315
|
+
onInputDebounceChange: J,
|
|
316
|
+
onInputChange: Pt,
|
|
317
|
+
onBlur: $
|
|
318
|
+
}), /* @__PURE__ */ u(xe, {
|
|
319
|
+
name: "firstToken",
|
|
320
|
+
disabled: P,
|
|
321
|
+
options: R,
|
|
322
|
+
areOptionsLoading: j,
|
|
323
|
+
isMvxSelector: yt,
|
|
324
|
+
isDestination: !1,
|
|
325
|
+
color: "neutral-850",
|
|
326
|
+
onChange: B,
|
|
327
|
+
onBlur: $,
|
|
328
|
+
onMaxBtnClick: Et,
|
|
329
|
+
selectedOption: I,
|
|
330
|
+
onTokenSelectorDisplay: (e) => Ke(e)
|
|
331
|
+
})]
|
|
332
|
+
})
|
|
333
|
+
]
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ u("div", {
|
|
336
|
+
className: "liq-absolute liq-left-[6%] liq-top-[40%] -liq-mt-1 liq-z-10",
|
|
337
|
+
children: et && /* @__PURE__ */ u(be, { onChangeDirection: Ot })
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ d(o, {
|
|
340
|
+
className: i("liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6", { "liq-pointer-events-none": S }),
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ d("div", {
|
|
343
|
+
className: "liq-flex liq-items-center liq-gap-1",
|
|
344
|
+
children: [/* @__PURE__ */ u("span", { children: "To" }), /* @__PURE__ */ u(ye, {
|
|
345
|
+
accountAddress: y,
|
|
346
|
+
chainIcon: n(M?.pngUrl),
|
|
347
|
+
username: Ae,
|
|
348
|
+
accountExplorerUrl: `${$e.mvxExplorerAddress}/accounts/${y}`,
|
|
349
|
+
showTag: !0,
|
|
350
|
+
onDisconnect: Ve,
|
|
351
|
+
onConnect: Be
|
|
352
|
+
})]
|
|
353
|
+
}),
|
|
354
|
+
Z && /* @__PURE__ */ u("div", {
|
|
355
|
+
className: "liq-text-red-400 liq-text-xs liq-mt-1",
|
|
356
|
+
children: Z
|
|
357
|
+
}),
|
|
358
|
+
Q && /* @__PURE__ */ u("div", {
|
|
359
|
+
className: "liq-text-red-400 liq-text-xs liq-mt-1",
|
|
360
|
+
children: Q
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ d("div", {
|
|
363
|
+
className: "liq-flex liq-justify-between liq-gap-1",
|
|
364
|
+
children: [/* @__PURE__ */ u(s, {
|
|
365
|
+
inputName: "secondAmount",
|
|
366
|
+
inputValue: X.values.secondAmount,
|
|
367
|
+
amountError: zt,
|
|
368
|
+
disabled: !1,
|
|
369
|
+
onInputDebounceChange: Y,
|
|
370
|
+
onInputChange: Pt,
|
|
371
|
+
onBlur: $
|
|
372
|
+
}), /* @__PURE__ */ u(xe, {
|
|
373
|
+
name: "secondToken",
|
|
374
|
+
disabled: P,
|
|
375
|
+
omitDisableClass: !0,
|
|
376
|
+
options: gt,
|
|
377
|
+
areOptionsLoading: j,
|
|
378
|
+
isMvxSelector: bt,
|
|
379
|
+
color: "neutral-850",
|
|
380
|
+
onChange: _t,
|
|
381
|
+
onBlur: $,
|
|
382
|
+
selectedOption: L
|
|
383
|
+
})]
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ d("div", {
|
|
388
|
+
className: "liq-flex liq-items-center liq-justify-center",
|
|
389
|
+
children: [
|
|
390
|
+
!y && /* @__PURE__ */ u(_e, {
|
|
391
|
+
mvxAccountAddress: y,
|
|
392
|
+
icon: n(M?.pngUrl),
|
|
393
|
+
onClick: Be
|
|
394
|
+
}),
|
|
395
|
+
y && !Ct && /* @__PURE__ */ u(ge, {
|
|
396
|
+
className: "liq-w-full liq-rounded-xl liq-bg-neutral-850/50 liq-px-8 liq-py-3 liq-font-semibold liq-text-primary-200 liq-transition-colors liq-duration-200 hover:enabled:liq-bg-primary-700/80 disabled:liq-opacity-50",
|
|
397
|
+
disabled: P,
|
|
398
|
+
activeChain: W
|
|
399
|
+
}),
|
|
400
|
+
y && Ct && /* @__PURE__ */ d(a, {
|
|
401
|
+
type: "submit",
|
|
402
|
+
variant: "neutral-850",
|
|
403
|
+
className: "liq-w-full disabled:liq-bg-neutral-850/50 liq-py-3 hover:enabled:liq-bg-primary !liq-text-primary-200",
|
|
404
|
+
disabled: !q || P || !y || !K || Lt || C,
|
|
405
|
+
children: [
|
|
406
|
+
q && !C && /* @__PURE__ */ d("div", {
|
|
407
|
+
className: "liq-flex liq-justify-center liq-items-center liq-gap-2",
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ u("div", { children: "Deposit on " }),
|
|
410
|
+
/* @__PURE__ */ u("img", {
|
|
411
|
+
src: n(M?.pngUrl),
|
|
412
|
+
alt: "",
|
|
413
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
414
|
+
}),
|
|
415
|
+
/* @__PURE__ */ u("div", { children: "MultiversX" })
|
|
416
|
+
]
|
|
417
|
+
}),
|
|
418
|
+
!q && !C && /* @__PURE__ */ u("span", {
|
|
419
|
+
className: "liq-text-neutral-100",
|
|
420
|
+
children: "Enter amount"
|
|
421
|
+
}),
|
|
422
|
+
C && /* @__PURE__ */ d("div", {
|
|
423
|
+
className: "liq-flex liq-justify-center liq-items-center liq-gap-2",
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ u(we, {
|
|
426
|
+
icon: Te,
|
|
427
|
+
spin: !0,
|
|
428
|
+
className: "liq-mx-1 liq-flex liq-items-center"
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ u("div", { children: "Depositing on" }),
|
|
431
|
+
/* @__PURE__ */ u("img", {
|
|
432
|
+
src: n(M?.pngUrl),
|
|
433
|
+
alt: "",
|
|
434
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ u("div", { children: "MultiversX" })
|
|
437
|
+
]
|
|
438
|
+
})
|
|
439
|
+
]
|
|
440
|
+
})
|
|
441
|
+
]
|
|
442
|
+
}),
|
|
443
|
+
K && T > 0 && /* @__PURE__ */ u("div", {
|
|
444
|
+
className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm",
|
|
445
|
+
children: /* @__PURE__ */ d("div", { children: [
|
|
446
|
+
"You will be asked to sign ",
|
|
447
|
+
T,
|
|
448
|
+
" ",
|
|
449
|
+
T > 1 ? "transactions" : "transaction",
|
|
450
|
+
" ",
|
|
451
|
+
"on your wallet"
|
|
452
|
+
] })
|
|
453
|
+
})
|
|
454
|
+
]
|
|
455
|
+
}) });
|
|
574
456
|
};
|
|
457
|
+
//#endregion
|
|
458
|
+
export { v as Deposit };
|