@multiversx/sdk-dapp-liquidity 2.3.0-alpha.6 → 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 -40
- 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 -4
- 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.d.ts +2 -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,152 +1,95 @@
|
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
onBlur: I,
|
|
95
|
-
onClick: j,
|
|
96
|
-
disabled: s,
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ l(G, { value: i }),
|
|
99
|
-
!s && /* @__PURE__ */ l(
|
|
100
|
-
p,
|
|
101
|
-
{
|
|
102
|
-
icon: F,
|
|
103
|
-
className: "liq-text-neutral-200 group-hover:liq-text-neutral-50"
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
g && /* @__PURE__ */ l(
|
|
107
|
-
"img",
|
|
108
|
-
{
|
|
109
|
-
src: g,
|
|
110
|
-
alt: "",
|
|
111
|
-
className: "liq-absolute liq-left-6 liq-bottom-[2px] liq-chain-icon liq-sm liq-w-6 liq-h-6 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
/* @__PURE__ */ l("div", { className: "liq-flex liq-items-center liq-gap-3", children: /* @__PURE__ */ n("div", { className: "liq-flex liq-items-center liq-gap-3", children: [
|
|
118
|
-
/* @__PURE__ */ n("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
|
|
119
|
-
/* @__PURE__ */ l(
|
|
120
|
-
p,
|
|
121
|
-
{
|
|
122
|
-
icon: V,
|
|
123
|
-
className: "liq-text-neutral-300"
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
/* @__PURE__ */ l(
|
|
127
|
-
W,
|
|
128
|
-
{
|
|
129
|
-
"data-testid": `${m}-balance`,
|
|
130
|
-
decimals: i == null ? void 0 : i.decimals,
|
|
131
|
-
amount: (i == null ? void 0 : i.balance) ?? "0",
|
|
132
|
-
className: "liq-font-medium liq-text-neutral-100"
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
] }),
|
|
136
|
-
h && /* @__PURE__ */ l(
|
|
137
|
-
R,
|
|
138
|
-
{
|
|
139
|
-
btnSize: "xs",
|
|
140
|
-
variant: "neutral-800",
|
|
141
|
-
disabled: f,
|
|
142
|
-
onClick: h,
|
|
143
|
-
children: /* @__PURE__ */ l("span", { className: "liq-text-neutral-300", children: "MAX" })
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
] }) })
|
|
147
|
-
] })
|
|
148
|
-
] });
|
|
149
|
-
};
|
|
150
|
-
export {
|
|
151
|
-
rl as TokenSelector
|
|
1
|
+
import { MVX_CHAIN_IDS as e } from "../../../constants/index.mjs";
|
|
2
|
+
import { mxClsx as t } from "../../utils/mxClsx.mjs";
|
|
3
|
+
import { MxButton as n } from "../base/MxButton/MxButton.mjs";
|
|
4
|
+
import "../base/MxButton/index.mjs";
|
|
5
|
+
import { useGetChainsQuery as r } from "../../queries/useGetChains.query.mjs";
|
|
6
|
+
import { useResolveTokenChain as i } from "../../hooks/useResolveTokenChain.mjs";
|
|
7
|
+
import { SelectContainer as a } from "./components/SelectContainer.mjs";
|
|
8
|
+
import { SelectContent as o } from "./components/SelectContent.mjs";
|
|
9
|
+
import { SelectedOption as s } from "./components/SelectedOption.mjs";
|
|
10
|
+
import { DisplayAmount as c } from "../DisplayAmount/DisplayAmount.mjs";
|
|
11
|
+
import "../DisplayAmount/index.mjs";
|
|
12
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect as f, useMemo as p, useState as m } from "react";
|
|
14
|
+
import { FontAwesomeIcon as h } from "@fortawesome/react-fontawesome";
|
|
15
|
+
import { faChevronDown as g } from "@fortawesome/free-solid-svg-icons/faChevronDown";
|
|
16
|
+
import { faWallet as _ } from "@fortawesome/free-solid-svg-icons/faWallet";
|
|
17
|
+
//#region src/reactjs/components/TokenSelector/TokenSelector.tsx
|
|
18
|
+
var v = ({ name: v, options: y = [], selectedOption: b, areOptionsLoading: x = !1, className: S = "", disabled: C = !1, isMvxSelector: w = !1, omitDisableClass: T = !1, isDestination: E = !1, color: D = "neutral-750", onBlur: O, onChange: k, onMaxBtnClick: A, onTokenSelectorDisplay: j }) => {
|
|
19
|
+
let [M, N] = m(!1), { data: P, isLoading: F } = r(), { chainIcon: I } = i({ token: b }), L = p(() => w ? P?.filter((t) => e.includes(t.chainId.toString())) ?? [] : P?.filter((t) => !e.includes(t.chainId.toString())) ?? [], [P, w]), R = p(() => w && E, [w, E]), z = C || R, B = () => N(!0), V = (x || F) && !b;
|
|
20
|
+
return f(() => {
|
|
21
|
+
j?.(M);
|
|
22
|
+
}, [M]), V ? /* @__PURE__ */ u("div", { className: t("liq-h-12 liq-w-40 liq-animate-pulse", {
|
|
23
|
+
"liq-rounded-xl": !0,
|
|
24
|
+
"liq-rounded-e-lg liq-rounded-s-3xl": !0
|
|
25
|
+
}, {
|
|
26
|
+
"liq-bg-neutral-100 liq-bg-opacity-[0.1] hover:liq-bg-opacity-[0.25]": D === "neutral-750",
|
|
27
|
+
"liq-bg-neutral-100 liq-bg-opacity-[0.05] hover:liq-bg-opacity-[0.15]": D === "neutral-850"
|
|
28
|
+
}, S) }) : /* @__PURE__ */ d(l, { children: [M && /* @__PURE__ */ u(a, {
|
|
29
|
+
onClose: () => N(!1),
|
|
30
|
+
children: /* @__PURE__ */ u(o, {
|
|
31
|
+
onSelect: (e) => {
|
|
32
|
+
k(e), N(!1);
|
|
33
|
+
},
|
|
34
|
+
tokens: y,
|
|
35
|
+
chains: L,
|
|
36
|
+
isMvxSelector: w,
|
|
37
|
+
areChainsLoading: F,
|
|
38
|
+
selectedToken: b
|
|
39
|
+
})
|
|
40
|
+
}), !M && /* @__PURE__ */ d("div", {
|
|
41
|
+
className: "liq-flex liq-flex-col liq-items-end liq-justify-between liq-gap-4",
|
|
42
|
+
children: [/* @__PURE__ */ d("button", {
|
|
43
|
+
name: v,
|
|
44
|
+
type: "button",
|
|
45
|
+
role: "combobox",
|
|
46
|
+
className: t("focus-primary liq-group liq-flex liq-cursor-pointer liq-items-center liq-gap-2 liq-transition-colors liq-duration-200 liq-relative", { "liq-rounded-e-lg liq-rounded-s-3xl liq-px-1 liq-py-1 liq-pr-3": !0 }, {
|
|
47
|
+
"liq-bg-neutral-750/50 hover:enabled:liq-bg-neutral-750": D === "neutral-750",
|
|
48
|
+
"liq-bg-neutral-900/50 liq-outline liq-outline-1 liq-outline-neutral-700/20 hover:enabled:liq-bg-neutral-600/50 hover:enabled:liq-outline-neutral-600": D === "neutral-850"
|
|
49
|
+
}, { "disabled:!liq-opacity-70": z && !T }, { "!liq-cursor-not-allowed !liq-bg-transparent !liq-outline-transparent": z }, S),
|
|
50
|
+
onBlur: O,
|
|
51
|
+
onClick: B,
|
|
52
|
+
disabled: z,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ u(s, { value: b }),
|
|
55
|
+
!z && /* @__PURE__ */ u(h, {
|
|
56
|
+
icon: g,
|
|
57
|
+
className: "liq-text-neutral-200 group-hover:liq-text-neutral-50"
|
|
58
|
+
}),
|
|
59
|
+
I && /* @__PURE__ */ u("img", {
|
|
60
|
+
src: I,
|
|
61
|
+
alt: "",
|
|
62
|
+
className: "liq-absolute liq-left-6 liq-bottom-[2px] liq-chain-icon liq-sm liq-w-6 liq-h-6 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
}), /* @__PURE__ */ u("div", {
|
|
66
|
+
className: "liq-flex liq-items-center liq-gap-3",
|
|
67
|
+
children: /* @__PURE__ */ d("div", {
|
|
68
|
+
className: "liq-flex liq-items-center liq-gap-3",
|
|
69
|
+
children: [/* @__PURE__ */ d("div", {
|
|
70
|
+
className: "liq-flex liq-items-center liq-gap-1",
|
|
71
|
+
children: [/* @__PURE__ */ u(h, {
|
|
72
|
+
icon: _,
|
|
73
|
+
className: "liq-text-neutral-300"
|
|
74
|
+
}), /* @__PURE__ */ u(c, {
|
|
75
|
+
"data-testid": `${v}-balance`,
|
|
76
|
+
decimals: b?.decimals,
|
|
77
|
+
amount: b?.balance ?? "0",
|
|
78
|
+
className: "liq-font-medium liq-text-neutral-100"
|
|
79
|
+
})]
|
|
80
|
+
}), A && /* @__PURE__ */ u(n, {
|
|
81
|
+
btnSize: "xs",
|
|
82
|
+
variant: "neutral-800",
|
|
83
|
+
disabled: C,
|
|
84
|
+
onClick: A,
|
|
85
|
+
children: /* @__PURE__ */ u("span", {
|
|
86
|
+
className: "liq-text-neutral-300",
|
|
87
|
+
children: "MAX"
|
|
88
|
+
})
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
})]
|
|
92
|
+
})] });
|
|
152
93
|
};
|
|
94
|
+
//#endregion
|
|
95
|
+
export { v as TokenSelector };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ChainDTO } from '../../../../../dto/Chain.dto';
|
|
2
|
-
|
|
3
2
|
export declare const ChainSelect: ({ isLoading, selectedChainId, ignoreAllChains, onChange, chains }: {
|
|
4
3
|
isLoading?: boolean;
|
|
5
4
|
selectedChainId?: string;
|
|
6
5
|
ignoreAllChains?: boolean;
|
|
7
6
|
onChange?: (chainId: string) => void;
|
|
8
7
|
chains: ChainDTO[];
|
|
9
|
-
}) => import("react
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../../chunk-oiTVcehM.js");require("../../../../../chains-Bmeag21l.js"),require("../../../../constants/index.js");const t=require("../../../../../helpers/getDisplayName.js"),n=require("./components/FormatChainOptionLabel.js"),r=require("./components/IndicatorSeparator.js"),i=require("./components/SelectedChainOption.js");let a=require("react/jsx-runtime"),o=require("react"),s=require("react-select");s=e.n(s);var c=({isLoading:e,selectedChainId:c,ignoreAllChains:l=!1,onChange:u,chains:d})=>{let f=(0,o.useMemo)(()=>{let e=d.map(e=>({label:e.networkName,value:e.chainId.toString(),chain:{id:e.chainId.toString(),name:t.getDisplayName(e),networkName:e.networkName,svgUrl:e.svgUrl,pngUrl:e.pngUrl}}));return l||e.unshift({label:`All`,value:`-1`,chain:{id:`-1`,name:`all`,networkName:`All`,svgUrl:`https://cdn.multiversx.com/liquidity-sdk/all-networks.svg`,pngUrl:`https://cdn.multiversx.com/liquidity-sdk/all-networks.svg`}}),e},[d]);return(0,a.jsx)(`div`,{className:`styled-chain-select`,"data-testid":`chainDropdown`,children:(0,a.jsx)(s.default,{className:`basic-single`,classNamePrefix:`styled-chain-select`,maxMenuHeight:260,value:(0,o.useMemo)(()=>f.find(e=>e.value.toString()===c?.toString())??f?.[0],[f,c]),isLoading:e,styles:{indicatorSeparator:r.IndicatorSeparator,control:e=>({...e,width:`max-content`,minWidth:`100%`,maxWidth:`10rem`}),menu:e=>({...e,zIndex:9999,width:`max-content`,minWidth:`100%`,right:0})},isSearchable:!0,name:`chain`,options:f,onChange:e=>{e?.chain?.id&&u?.(e.chain?.id.toString())},isMulti:!1,formatOptionLabel:n.FormatChainOptionLabel,components:{Input:()=>null,SingleValue:i.SelectedChainOption}})})};exports.ChainSelect=c;
|
|
@@ -1,85 +1,77 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useMemo as e } from "react";
|
|
3
|
-
import f from "react-select";
|
|
4
|
-
import { getDisplayName as d } from "../../../../../helpers/getDisplayName.mjs";
|
|
5
|
-
import { FormatChainOptionLabel as g } from "./components/FormatChainOptionLabel.mjs";
|
|
6
|
-
import { IndicatorSeparator as v } from "./components/IndicatorSeparator.mjs";
|
|
7
|
-
import { SelectedChainOption as S } from "./components/SelectedChainOption.mjs";
|
|
1
|
+
import "../../../../../chains-DQACurVn.mjs";
|
|
8
2
|
import "../../../../constants/index.mjs";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
export {
|
|
84
|
-
W as ChainSelect
|
|
3
|
+
import { getDisplayName as e } from "../../../../../helpers/getDisplayName.mjs";
|
|
4
|
+
import { FormatChainOptionLabel as t } from "./components/FormatChainOptionLabel.mjs";
|
|
5
|
+
import { IndicatorSeparator as n } from "./components/IndicatorSeparator.mjs";
|
|
6
|
+
import { SelectedChainOption as r } from "./components/SelectedChainOption.mjs";
|
|
7
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
8
|
+
import { useMemo as a } from "react";
|
|
9
|
+
import o from "react-select";
|
|
10
|
+
//#region src/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.tsx
|
|
11
|
+
var s = ({ isLoading: s, selectedChainId: c, ignoreAllChains: l = !1, onChange: u, chains: d }) => {
|
|
12
|
+
let f = a(() => {
|
|
13
|
+
let t = d.map((t) => ({
|
|
14
|
+
label: t.networkName,
|
|
15
|
+
value: t.chainId.toString(),
|
|
16
|
+
chain: {
|
|
17
|
+
id: t.chainId.toString(),
|
|
18
|
+
name: e(t),
|
|
19
|
+
networkName: t.networkName,
|
|
20
|
+
svgUrl: t.svgUrl,
|
|
21
|
+
pngUrl: t.pngUrl
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
return l || t.unshift({
|
|
25
|
+
label: "All",
|
|
26
|
+
value: "-1",
|
|
27
|
+
chain: {
|
|
28
|
+
id: "-1",
|
|
29
|
+
name: "all",
|
|
30
|
+
networkName: "All",
|
|
31
|
+
svgUrl: "https://cdn.multiversx.com/liquidity-sdk/all-networks.svg",
|
|
32
|
+
pngUrl: "https://cdn.multiversx.com/liquidity-sdk/all-networks.svg"
|
|
33
|
+
}
|
|
34
|
+
}), t;
|
|
35
|
+
}, [d]);
|
|
36
|
+
return /* @__PURE__ */ i("div", {
|
|
37
|
+
className: "styled-chain-select",
|
|
38
|
+
"data-testid": "chainDropdown",
|
|
39
|
+
children: /* @__PURE__ */ i(o, {
|
|
40
|
+
className: "basic-single",
|
|
41
|
+
classNamePrefix: "styled-chain-select",
|
|
42
|
+
maxMenuHeight: 260,
|
|
43
|
+
value: a(() => f.find((e) => e.value.toString() === c?.toString()) ?? f?.[0], [f, c]),
|
|
44
|
+
isLoading: s,
|
|
45
|
+
styles: {
|
|
46
|
+
indicatorSeparator: n,
|
|
47
|
+
control: (e) => ({
|
|
48
|
+
...e,
|
|
49
|
+
width: "max-content",
|
|
50
|
+
minWidth: "100%",
|
|
51
|
+
maxWidth: "10rem"
|
|
52
|
+
}),
|
|
53
|
+
menu: (e) => ({
|
|
54
|
+
...e,
|
|
55
|
+
zIndex: 9999,
|
|
56
|
+
width: "max-content",
|
|
57
|
+
minWidth: "100%",
|
|
58
|
+
right: 0
|
|
59
|
+
})
|
|
60
|
+
},
|
|
61
|
+
isSearchable: !0,
|
|
62
|
+
name: "chain",
|
|
63
|
+
options: f,
|
|
64
|
+
onChange: (e) => {
|
|
65
|
+
e?.chain?.id && u?.(e.chain?.id.toString());
|
|
66
|
+
},
|
|
67
|
+
isMulti: !1,
|
|
68
|
+
formatOptionLabel: t,
|
|
69
|
+
components: {
|
|
70
|
+
Input: () => null,
|
|
71
|
+
SingleValue: r
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
});
|
|
85
75
|
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { s as ChainSelect };
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export interface ChainOptionLabelType {
|
|
|
9
9
|
pngUrl?: string;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
export declare const ChainOptionLabel: ({ chain, inDropdown }: ChainOptionLabelType) => import("react
|
|
12
|
+
export declare const ChainOptionLabel: ({ chain, inDropdown }: ChainOptionLabelType) => import("react").JSX.Element;
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../../../../chains-Bmeag21l.js");require("../../../../../constants/index.js");const t=require("../../../../../../helpers/safeImageUrl.js"),n=require("../../../../../utils/mxClsx.js");require("../../../../../utils/index.js");const r=require("../../../../../../all-networks-De_MBUh1.js");let i=require("react/jsx-runtime");var a=({chain:a,inDropdown:o=!1})=>(0,i.jsx)(`div`,{className:`chain-element liq-flex liq-items-center liq-justify-between`,children:(0,i.jsxs)(`div`,{className:`liq-flex liq-flex-row liq-items-center`,children:[(0,i.jsx)(`div`,{className:`chain-image liq-mr-2 ${o?`in-dropdown`:`hidden md:flex`}`,children:(0,i.jsx)(`div`,{className:`liq-h-6 liq-w-6 liq-flex-shrink-0 liq-overflow-hidden`,children:a.pngUrl?(0,i.jsx)(`img`,{src:t.safeImageUrl(a.pngUrl,e.r[a.name]),alt:``,loading:`lazy`,className:n.mxClsx(`liq-h-full liq-w-full`,{"liq-rounded-lg":a.id!==`-1`})}):(0,i.jsx)(`img`,{src:r.t,alt:``,className:`liq-h-full liq-w-full`})})}),(0,i.jsx)(`div`,{className:`liq-flex liq-flex-col`,children:(0,i.jsx)(`div`,{className:`liq-flex liq-items-center`,children:(0,i.jsx)(`div`,{className:`chain-name liq-flex liq-items-center liq-gap-2 liq-whitespace-nowrap`,children:a.networkName})})})]})});exports.ChainOptionLabel=a;
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs
CHANGED
|
@@ -1,52 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
|
|
3
|
-
import "@multiversx/sdk-dapp-utils/out/helpers/stringIsInteger";
|
|
4
|
-
import "bignumber.js";
|
|
1
|
+
import { r as e } from "../../../../../../chains-DQACurVn.mjs";
|
|
5
2
|
import "../../../../../constants/index.mjs";
|
|
6
|
-
import "
|
|
7
|
-
import { mxClsx as
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
) }) })
|
|
47
|
-
] })
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
export {
|
|
51
|
-
v as ChainOptionLabel
|
|
52
|
-
};
|
|
3
|
+
import { safeImageUrl as t } from "../../../../../../helpers/safeImageUrl.mjs";
|
|
4
|
+
import { mxClsx as n } from "../../../../../utils/mxClsx.mjs";
|
|
5
|
+
import "../../../../../utils/index.mjs";
|
|
6
|
+
import { t as r } from "../../../../../../all-networks-hdZt5Hcc.mjs";
|
|
7
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
//#region src/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.tsx
|
|
9
|
+
var o = ({ chain: o, inDropdown: s = !1 }) => /* @__PURE__ */ i("div", {
|
|
10
|
+
className: "chain-element liq-flex liq-items-center liq-justify-between",
|
|
11
|
+
children: /* @__PURE__ */ a("div", {
|
|
12
|
+
className: "liq-flex liq-flex-row liq-items-center",
|
|
13
|
+
children: [/* @__PURE__ */ i("div", {
|
|
14
|
+
className: `chain-image liq-mr-2 ${s ? "in-dropdown" : "hidden md:flex"}`,
|
|
15
|
+
children: /* @__PURE__ */ i("div", {
|
|
16
|
+
className: "liq-h-6 liq-w-6 liq-flex-shrink-0 liq-overflow-hidden",
|
|
17
|
+
children: o.pngUrl ? /* @__PURE__ */ i("img", {
|
|
18
|
+
src: t(o.pngUrl, e[o.name]),
|
|
19
|
+
alt: "",
|
|
20
|
+
loading: "lazy",
|
|
21
|
+
className: n("liq-h-full liq-w-full", { "liq-rounded-lg": o.id !== "-1" })
|
|
22
|
+
}) : /* @__PURE__ */ i("img", {
|
|
23
|
+
src: r,
|
|
24
|
+
alt: "",
|
|
25
|
+
className: "liq-h-full liq-w-full"
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
}), /* @__PURE__ */ i("div", {
|
|
29
|
+
className: "liq-flex liq-flex-col",
|
|
30
|
+
children: /* @__PURE__ */ i("div", {
|
|
31
|
+
className: "liq-flex liq-items-center",
|
|
32
|
+
children: /* @__PURE__ */ i("div", {
|
|
33
|
+
className: "chain-name liq-flex liq-items-center liq-gap-2 liq-whitespace-nowrap",
|
|
34
|
+
children: o.networkName
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
})]
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
//#endregion
|
|
41
|
+
export { o as ChainOptionLabel };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ChainSelectOptionType } from '../types/chainSelectOption';
|
|
2
1
|
import { FormatOptionLabelContext } from 'react-select';
|
|
3
|
-
|
|
2
|
+
import { ChainSelectOptionType } from '../types/chainSelectOption';
|
|
4
3
|
export declare const FormatChainOptionLabel: (option: ChainSelectOptionType, { context }: {
|
|
5
4
|
context: FormatOptionLabelContext;
|
|
6
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element;
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./ChainOptionLabel.js"),t=require("../../../../SmallLoader/SmallLoader.js");require("../../../../SmallLoader/index.js");let n=require("react/jsx-runtime");var r=(r,{context:i})=>{let{chain:a}=r,o={chain:a,inDropdown:i===`menu`};return r.value===`loader`?(0,n.jsx)(`div`,{className:`liq-flex liq-justify-center liq-py-5`,children:(0,n.jsx)(t.SmallLoader,{show:!0})}):(0,n.jsx)(e.ChainOptionLabel,{...o})};exports.FormatChainOptionLabel=r;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { ChainOptionLabel as e } from "./ChainOptionLabel.mjs";
|
|
2
|
+
import { SmallLoader as t } from "../../../../SmallLoader/SmallLoader.mjs";
|
|
3
|
+
import "../../../../SmallLoader/index.mjs";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region src/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.tsx
|
|
6
|
+
var r = (r, { context: i }) => {
|
|
7
|
+
let { chain: a } = r, o = {
|
|
8
|
+
chain: a,
|
|
9
|
+
inDropdown: i === "menu"
|
|
10
|
+
};
|
|
11
|
+
return r.value === "loader" ? /* @__PURE__ */ n("div", {
|
|
12
|
+
className: "liq-flex liq-justify-center liq-py-5",
|
|
13
|
+
children: /* @__PURE__ */ n(t, { show: !0 })
|
|
14
|
+
}) : /* @__PURE__ */ n(e, { ...o });
|
|
13
15
|
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as FormatChainOptionLabel };
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=()=>({display:`none`});exports.IndicatorSeparator=e;
|
package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
//#region src/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.tsx
|
|
2
|
+
var e = () => ({ display: "none" });
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as IndicatorSeparator };
|