@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,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../constants/index.js"),t=require("../../../../types/chainType.js"),n=require("../../../utils/getCompletePathname.js");var r=({firstTokenId:t,secondTokenId:r,callbackRoute:i,isTokensLoading:a,onNavigate:o})=>{if(a)return;let s=n.getCompletePathname(),c=new URLSearchParams(e.safeWindow.location.search);t&&c.set(`firstToken`,t),r&&c.set(`secondToken`,r);let l=`${i}?${c.toString()}`;s!==l&&(e.safeWindow.history?.replaceState?.(null,``,l),o?.(l,{replace:!0}))};function i(e,n){return e.suiParams?.transactionBytes&&e.suiParams?.sender?t.ChainType.sui:e.instructions&&e.feePayer?t.ChainType.sol:e.bitcoinParams?t.ChainType.btc:e.to&&e.data!==void 0?t.ChainType.evm:n?.chainType}var a=(e,t,n)=>{if(n){let e=t?.find(e=>e.symbol.toLowerCase()===n.toLowerCase());return e?[e]:[]}if(!e?.availableTokens)return[];let r=[];for(let n of e.availableTokens){let e=t?.find(e=>e.address.toLowerCase()===n.address.toLowerCase());e&&r.push(e)}return r},o=(e,t)=>e.find(e=>e.symbol.toLowerCase().includes(`usdc`))??t?.find(e=>e.symbol.toLowerCase().includes(`usdc`));exports.getAvailableTokens=a,exports.getDefaultReceivingToken=o,exports.resolveSigningChainType=i,exports.updateUrlParams=r;
|
|
@@ -1,46 +1,29 @@
|
|
|
1
|
+
import { safeWindow as e } from "../../../constants/index.mjs";
|
|
1
2
|
import { ChainType as t } from "../../../../types/chainType.mjs";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}) => {
|
|
11
|
-
var n, m;
|
|
12
|
-
if (i)
|
|
13
|
-
return;
|
|
14
|
-
const o = w(), f = new URLSearchParams(c.location.search);
|
|
15
|
-
e && f.set("firstToken", e), r && f.set("secondToken", r);
|
|
16
|
-
const d = `${s}?${f.toString()}`;
|
|
17
|
-
o !== d && ((m = (n = c.history) == null ? void 0 : n.replaceState) == null || m.call(n, null, "", d), u == null || u(d, { replace: !0 }));
|
|
3
|
+
import { getCompletePathname as n } from "../../../utils/getCompletePathname.mjs";
|
|
4
|
+
//#region src/reactjs/components/BridgeForm/utils/bridgeFormHelpers.ts
|
|
5
|
+
var r = ({ firstTokenId: t, secondTokenId: r, callbackRoute: i, isTokensLoading: a, onNavigate: o }) => {
|
|
6
|
+
if (a) return;
|
|
7
|
+
let s = n(), c = new URLSearchParams(e.location.search);
|
|
8
|
+
t && c.set("firstToken", t), r && c.set("secondToken", r);
|
|
9
|
+
let l = `${i}?${c.toString()}`;
|
|
10
|
+
s !== l && (e.history?.replaceState?.(null, "", l), o?.(l, { replace: !0 }));
|
|
18
11
|
};
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
return (s = e.suiParams) != null && s.transactionBytes && ((i = e.suiParams) != null && i.sender) ? t.sui : e.instructions && e.feePayer ? t.sol : e.bitcoinParams ? t.btc : e.to && e.data !== void 0 ? t.evm : r == null ? void 0 : r.chainType;
|
|
12
|
+
function i(e, n) {
|
|
13
|
+
return e.suiParams?.transactionBytes && e.suiParams?.sender ? t.sui : e.instructions && e.feePayer ? t.sol : e.bitcoinParams ? t.btc : e.to && e.data !== void 0 ? t.evm : n?.chainType;
|
|
22
14
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
return i;
|
|
40
|
-
}, C = (e, r) => e.find((s) => s.symbol.toLowerCase().includes("usdc")) ?? (r == null ? void 0 : r.find((s) => s.symbol.toLowerCase().includes("usdc")));
|
|
41
|
-
export {
|
|
42
|
-
h as getAvailableTokens,
|
|
43
|
-
C as getDefaultReceivingToken,
|
|
44
|
-
L as resolveSigningChainType,
|
|
45
|
-
p as updateUrlParams
|
|
46
|
-
};
|
|
15
|
+
var a = (e, t, n) => {
|
|
16
|
+
if (n) {
|
|
17
|
+
let e = t?.find((e) => e.symbol.toLowerCase() === n.toLowerCase());
|
|
18
|
+
return e ? [e] : [];
|
|
19
|
+
}
|
|
20
|
+
if (!e?.availableTokens) return [];
|
|
21
|
+
let r = [];
|
|
22
|
+
for (let n of e.availableTokens) {
|
|
23
|
+
let e = t?.find((e) => e.address.toLowerCase() === n.address.toLowerCase());
|
|
24
|
+
e && r.push(e);
|
|
25
|
+
}
|
|
26
|
+
return r;
|
|
27
|
+
}, o = (e, t) => e.find((e) => e.symbol.toLowerCase().includes("usdc")) ?? t?.find((e) => e.symbol.toLowerCase().includes("usdc"));
|
|
28
|
+
//#endregion
|
|
29
|
+
export { a as getAvailableTokens, o as getDefaultReceivingToken, i as resolveSigningChainType, r as updateUrlParams };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),G=require("@fortawesome/free-solid-svg-icons/faArrowDownShortWide"),X=require("@fortawesome/free-solid-svg-icons/faArrowUpShortWide"),Q=require("@fortawesome/free-solid-svg-icons/faCircleCheck"),E=require("@fortawesome/free-solid-svg-icons/faCircleXmark"),z=require("@fortawesome/free-solid-svg-icons/faClock"),Y=require("@fortawesome/free-solid-svg-icons/faClose"),t=require("@fortawesome/react-fontawesome"),o=require("react");require("yup");require("@multiversx/sdk-dapp-utils/out/helpers/parseAmount");require("bignumber.js");const Z=require("../../hooks/useAccount.js");require("@reown/appkit/react");require("axios");const J=require("../../context/useWeb3App.js");require("formik");require("@solana/web3.js");require("bitcoinjs-lib");require("viem");const K=require("../../../types/providerType.js"),ee=require("../../hooks/useFetchBridgeData.js"),le=require("../../../constants/index.js");require("@tanstack/react-query");require("../../constants/index.js");require("@reown/appkit-adapter-solana/react");require("wagmi");require("@reown/appkit-controllers");const a=require("../../../helpers/safeImageUrl.js"),W=require("../../queries/useGetHistory.query.js"),u=require("../../utils/formatAmount.js"),n=require("../../utils/mxClsx.js"),ie=require("../base/MxButton/MxButton.js"),c=require("../base/MxCard/MxCard.js");require("../base/MxLink/MxLink.js");require("../base/MxSearch/MxSearch.js");require("@headlessui/react");const x=require("../base/MxTooltip/MxTooltip.js"),se="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%206V13C15%2013.5625%2014.5312%2014%2014%2014C13.4375%2014%2013%2013.5625%2013%2013V8.4375L6.6875%2014.7188C6.3125%2015.125%205.65625%2015.125%205.28125%2014.7188C4.875%2014.3438%204.875%2013.6875%205.28125%2013.3125L11.5625%207H7C6.4375%207%206%206.5625%206%206C6%205.46875%206.4375%205%207%205H14C14.5312%205%2015%205.46875%2015%206Z'%20fill='%23CDD0DB'/%3e%3c/svg%3e",re=({mvxAddress:h,onClose:R})=>{const{options:g,bridgeOnly:j}=J.useWeb3App(),O=Z.useAccount(),{data:w,isLoading:N,isError:P}=W.useGetHistoryQuery({address:h}),{data:p}=W.useGetHistoryQuery({address:O.address??""}),q=o.useMemo(()=>{const l=w??[],r=j&&p?p:[];return[...l,...r].sort((m,d)=>d.depositTimestamp-m.depositTimestamp)},[j,p,w]),b=o.useCallback(l=>{switch(l.status){case"success":return e.jsx(t.FontAwesomeIcon,{icon:Q.faCircleCheck,size:"lg",className:"liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400"});case"failed":return e.jsx(t.FontAwesomeIcon,{icon:E.faCircleXmark,size:"lg",className:"liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400"});default:return e.jsx(t.FontAwesomeIcon,{icon:z.faClock,size:"lg",className:"liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400"})}},[]),s=o.useMemo(()=>q==null?void 0:q.map(l=>({...l,tokenDestination:l.tokenOut.toLowerCase(),tokenSource:l.tokenIn.toLowerCase(),sender:l.sender.toLowerCase(),statusIcon:b(l)})),[q,b]),{evmTokensWithBalances:C,mvxTokensWithBalances:v,chains:y,isTokensLoading:V,isChainsLoading:$}=ee.useFetchBridgeData({mvxAddress:h,mvxApiURL:g.mvxApiURL}),i=o.useMemo(()=>[...C??[],...v??[]].reduce((l,r)=>(l[r.address.toLowerCase()]=r,l),{}),[C,v]),k=o.useMemo(()=>(y??[]).reduce((l,r)=>(l[r.chainId.toString()]=r,l),{}),[y]),f=n.mxClsx("liq-flex liq-flex-col liq-absolute liq-left-0 liq-top-0 liq-order-1 liq-mx-auto liq-w-full liq-gap-1 liq-pt-12 lg:liq-order-2 lg:liq-max-w-[27.5rem] !liq-min-h-[26rem] !liq-h-[26rem] !lg:liq-pt-0 !liq-bg-neutral-850 !liq-z-[16] !liq-p-2 !liq-pointer-events-auto",{"!liq-disabled !liq-animate-pulse":N||V||$});return N&&!s?e.jsx(c.MxCard,{className:n.mxClsx("liq-flex",f)}):P&&!s?e.jsx(c.MxCard,{className:n.mxClsx("liq-flex liq-flex-col liq-gap-1",f),children:"Something went wrong. Please try again later."}):e.jsxs(c.MxCard,{className:n.mxClsx("liq-flex liq-flex-col liq-gap-1",f),children:[e.jsxs("div",{className:"liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5",children:[e.jsx("div",{className:"liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg",children:"History"}),e.jsx(ie.MxButton,{btnSize:"md",className:"liq-border-none !liq-p-0 !liq-mr-2",variant:"link-neutral-500",onClick:R,children:e.jsx(t.FontAwesomeIcon,{icon:Y.faClose,size:"xl"})})]}),e.jsxs("div",{className:"scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll",children:[(s==null?void 0:s.length)===0&&e.jsx(c.MxCard,{cardSize:"lg",variant:"transparent",className:"liq-align-center liq-flex liq-h-full liq-flex-col liq-justify-center liq-gap-4 liq-border-0 !liq-pb-8 !liq-pt-6 !sm:liq-pb-6 !lg:liq-p-4",children:e.jsxs("div",{className:"liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8",children:[e.jsx("div",{className:"liq-flex liq-items-center liq-justify-center",children:e.jsx(t.FontAwesomeIcon,{icon:z.faClock,size:"6x",className:"liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]"})}),e.jsxs("div",{className:n.mxClsx("liq-flex liq-flex-col liq-items-center"),children:[e.jsx("div",{className:"liq-text-xl",children:"No transactions"}),e.jsx("div",{className:"liq-text-neutral-400",children:"Your transactions history will appear here"})]})]})}),s&&(s==null?void 0:s.length)>0&&s.map((l,r)=>{var m,d,_,I,M,A,T,S,U,D,L,B,F,H;return e.jsx(c.MxCard,{cardSize:"lg",variant:"neutral-750",className:"liq-flex liq-flex-col liq-gap-4 !liq-outline liq-outline-transparent !liq-p-4 liq-border liq-border-neutral-750 liq-bg-neutral-850 hover:!liq-bg-neutral-700 !liq-rounded-lg",children:e.jsxs("div",{className:"liq-align-center liq-flex liq-justify-between liq-gap-1",children:[e.jsxs("div",{className:n.mxClsx("liq-flex liq-items-center liq-gap-1",{"liq-text-yellow-200":l.status==="pending","liq-text-green-200":l.status==="success","liq-text-red-200":l.status==="failed"}),children:[e.jsx(x.MxTooltip,{placement:"top",buttonText:l.statusIcon,children:new Date(l.depositTimestamp*1e3).toLocaleString()}),le.MVX_CHAIN_IDS.includes(l.toChainId)?e.jsxs(e.Fragment,{children:[e.jsx(x.MxTooltip,{placement:"top",buttonText:e.jsx(t.FontAwesomeIcon,{icon:G.faArrowDownShortWide,className:"liq-mx-1 liq-flex liq-items-center"}),children:"Deposit"}),e.jsx("span",{className:"liq-text-wrap",children:u.formatAmount({decimals:(m=i[l.tokenDestination])==null?void 0:m.decimals,amount:l.amountOut,addCommas:!1,digits:2})}),e.jsx("span",{className:"liq-whitespace-nowrap",children:(d=i[l.tokenDestination])==null?void 0:d.symbol}),e.jsx("img",{src:a.safeImageUrl((_=i[l.tokenDestination])==null?void 0:_.pngUrl),alt:"",className:"liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"}),e.jsx("span",{className:"liq-whitespace-nowrap",children:"from"}),e.jsx("span",{className:"liq-text-wrap",children:u.formatAmount({decimals:(I=i[l.tokenSource])==null?void 0:I.decimals,amount:l.amountIn,addCommas:!1,digits:2})}),e.jsx("span",{className:"liq-whitespace-nowrap",children:(M=i[l.tokenSource])==null?void 0:M.symbol}),e.jsxs("div",{className:"liq-flex liq-items-center liq-relative",children:[e.jsx("div",{className:"liq-flex-shrink-0 liq-overflow-hidden liq-rounded-full liq-h-8 liq-w-8 liq-flex liq-items-center liq-justify-center",children:e.jsx("div",{className:"liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center",children:e.jsx("img",{src:a.safeImageUrl((A=i[l.tokenSource])==null?void 0:A.pngUrl),alt:"",className:"liq-asset-icon liq-sm liq-p-0"})})}),e.jsx("img",{src:a.safeImageUrl((T=k[l.fromChainId])==null?void 0:T.pngUrl),alt:"",className:"liq-absolute liq-left-3 liq-bottom-[-2px] liq-chain-icon liq-sm liq-w-5 liq-h-5 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(x.MxTooltip,{placement:"top",buttonText:e.jsx(t.FontAwesomeIcon,{icon:X.faArrowUpShortWide,className:"liq-mx-1 liq-flex liq-items-center"}),children:"Transfer"}),e.jsx("span",{className:"liq-text-wrap",children:u.formatAmount({decimals:(S=i[l.tokenSource])==null?void 0:S.decimals,amount:l.amountIn,addCommas:!1,digits:2})}),e.jsx("span",{className:"liq-whitespace-nowrap",children:(U=i[l.tokenSource])==null?void 0:U.symbol}),e.jsx("img",{src:a.safeImageUrl((D=i[l.tokenSource])==null?void 0:D.pngUrl),alt:"",className:"liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"}),e.jsx("span",{className:"liq-whitespace-nowrap",children:"to"}),e.jsx("span",{className:"liq-text-wrap",children:u.formatAmount({decimals:(L=i[l.tokenDestination])==null?void 0:L.decimals,amount:l.amountOut,addCommas:!1,digits:2})}),e.jsx("span",{className:"liq-whitespace-nowrap",children:(B=i[l.tokenDestination])==null?void 0:B.symbol}),e.jsxs("div",{className:"liq-flex liq-items-center liq-relative",children:[e.jsx("div",{className:"liq-flex-shrink-0 liq-overflow-hidden liq-rounded-full liq-h-8 liq-w-8 liq-flex liq-items-center liq-justify-center",children:e.jsx("div",{className:"liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center",children:e.jsx("img",{src:a.safeImageUrl((F=i[l.tokenDestination])==null?void 0:F.pngUrl),alt:"",className:"liq-asset-icon liq-sm liq-p-0"})})}),e.jsx("img",{src:a.safeImageUrl((H=k[l.toChainId])==null?void 0:H.pngUrl),alt:"",className:"liq-absolute liq-left-3 liq-bottom-[-2px] liq-chain-icon liq-sm liq-w-5 liq-h-5 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"})]})]})]}),l.provider===K.ProviderType.MultiversxBridge&&e.jsx("a",{href:`${g.bridgeURL}/status/${l.txHash}`,target:"_blank",rel:"noopener noreferrer",className:"liq-flex",children:e.jsx("div",{className:"liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1",children:e.jsx(x.MxTooltip,{placement:"top",buttonText:e.jsx("img",{src:se,alt:"",className:"liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200"}),shouldStopPropagation:!1,children:"View"})})})]})},`${l.txHash}-${r}`)})]})]})};exports.BridgeHistory=re;
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../BridgeHistory-BU-L_w0l.js");exports.BridgeHistory=e.t;
|
|
@@ -1,353 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { faArrowUpShortWide as Q } from "@fortawesome/free-solid-svg-icons/faArrowUpShortWide";
|
|
4
|
-
import { faCircleCheck as Y } from "@fortawesome/free-solid-svg-icons/faCircleCheck";
|
|
5
|
-
import { faCircleXmark as Z } from "@fortawesome/free-solid-svg-icons/faCircleXmark";
|
|
6
|
-
import { faClock as V } from "@fortawesome/free-solid-svg-icons/faClock";
|
|
7
|
-
import { faClose as J } from "@fortawesome/free-solid-svg-icons/faClose";
|
|
8
|
-
import { FontAwesomeIcon as o } from "@fortawesome/react-fontawesome";
|
|
9
|
-
import { useMemo as p, useCallback as K } from "react";
|
|
10
|
-
import "yup";
|
|
11
|
-
import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
|
|
12
|
-
import "bignumber.js";
|
|
13
|
-
import { useAccount as ee } from "../../hooks/useAccount.mjs";
|
|
14
|
-
import "@reown/appkit/react";
|
|
15
|
-
import "axios";
|
|
16
|
-
import { useWeb3App as le } from "../../context/useWeb3App.mjs";
|
|
17
|
-
import "formik";
|
|
18
|
-
import "@solana/web3.js";
|
|
19
|
-
import "bitcoinjs-lib";
|
|
20
|
-
import "viem";
|
|
21
|
-
import { ProviderType as ie } from "../../../types/providerType.mjs";
|
|
22
|
-
import { useFetchBridgeData as te } from "../../hooks/useFetchBridgeData.mjs";
|
|
23
|
-
import { MVX_CHAIN_IDS as re } from "../../../constants/index.mjs";
|
|
24
|
-
import "@tanstack/react-query";
|
|
25
|
-
import "../../constants/index.mjs";
|
|
26
|
-
import "@reown/appkit-adapter-solana/react";
|
|
27
|
-
import "wagmi";
|
|
28
|
-
import "@reown/appkit-controllers";
|
|
29
|
-
import { safeImageUrl as a } from "../../../helpers/safeImageUrl.mjs";
|
|
30
|
-
import { useGetHistoryQuery as $ } from "../../queries/useGetHistory.query.mjs";
|
|
31
|
-
import { formatAmount as u } from "../../utils/formatAmount.mjs";
|
|
32
|
-
import { mxClsx as n } from "../../utils/mxClsx.mjs";
|
|
33
|
-
import { MxButton as se } from "../base/MxButton/MxButton.mjs";
|
|
34
|
-
import { MxCard as m } from "../base/MxCard/MxCard.mjs";
|
|
35
|
-
import "../base/MxLink/MxLink.mjs";
|
|
36
|
-
import "../base/MxSearch/MxSearch.mjs";
|
|
37
|
-
import "@headlessui/react";
|
|
38
|
-
import { MxTooltip as f } from "../base/MxTooltip/MxTooltip.mjs";
|
|
39
|
-
const oe = "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15%206V13C15%2013.5625%2014.5312%2014%2014%2014C13.4375%2014%2013%2013.5625%2013%2013V8.4375L6.6875%2014.7188C6.3125%2015.125%205.65625%2015.125%205.28125%2014.7188C4.875%2014.3438%204.875%2013.6875%205.28125%2013.3125L11.5625%207H7C6.4375%207%206%206.5625%206%206C6%205.46875%206.4375%205%207%205H14C14.5312%205%2015%205.46875%2015%206Z'%20fill='%23CDD0DB'/%3e%3c/svg%3e", _e = ({
|
|
40
|
-
mvxAddress: g,
|
|
41
|
-
onClose: F
|
|
42
|
-
}) => {
|
|
43
|
-
const { options: w, bridgeOnly: N } = le(), P = ee(), {
|
|
44
|
-
data: b,
|
|
45
|
-
isLoading: v,
|
|
46
|
-
isError: _
|
|
47
|
-
} = $({
|
|
48
|
-
address: g
|
|
49
|
-
}), { data: h } = $({
|
|
50
|
-
address: P.address ?? ""
|
|
51
|
-
}), q = p(() => {
|
|
52
|
-
const e = b ?? [], s = N && h ? h : [];
|
|
53
|
-
return [...e, ...s].sort(
|
|
54
|
-
(c, d) => d.depositTimestamp - c.depositTimestamp
|
|
55
|
-
);
|
|
56
|
-
}, [N, h, b]), y = K((e) => {
|
|
57
|
-
switch (e.status) {
|
|
58
|
-
case "success":
|
|
59
|
-
return /* @__PURE__ */ l(
|
|
60
|
-
o,
|
|
61
|
-
{
|
|
62
|
-
icon: Y,
|
|
63
|
-
size: "lg",
|
|
64
|
-
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400"
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
case "failed":
|
|
68
|
-
return /* @__PURE__ */ l(
|
|
69
|
-
o,
|
|
70
|
-
{
|
|
71
|
-
icon: Z,
|
|
72
|
-
size: "lg",
|
|
73
|
-
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400"
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
default:
|
|
77
|
-
return /* @__PURE__ */ l(
|
|
78
|
-
o,
|
|
79
|
-
{
|
|
80
|
-
icon: V,
|
|
81
|
-
size: "lg",
|
|
82
|
-
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400"
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}, []), r = p(
|
|
87
|
-
() => q == null ? void 0 : q.map((e) => ({
|
|
88
|
-
...e,
|
|
89
|
-
tokenDestination: e.tokenOut.toLowerCase(),
|
|
90
|
-
tokenSource: e.tokenIn.toLowerCase(),
|
|
91
|
-
sender: e.sender.toLowerCase(),
|
|
92
|
-
statusIcon: y(e)
|
|
93
|
-
})),
|
|
94
|
-
[q, y]
|
|
95
|
-
), {
|
|
96
|
-
evmTokensWithBalances: C,
|
|
97
|
-
mvxTokensWithBalances: k,
|
|
98
|
-
chains: S,
|
|
99
|
-
isTokensLoading: X,
|
|
100
|
-
isChainsLoading: E
|
|
101
|
-
} = te({
|
|
102
|
-
mvxAddress: g,
|
|
103
|
-
mvxApiURL: w.mvxApiURL
|
|
104
|
-
}), i = p(() => [
|
|
105
|
-
...C ?? [],
|
|
106
|
-
...k ?? []
|
|
107
|
-
].reduce(
|
|
108
|
-
(e, s) => (e[s.address.toLowerCase()] = s, e),
|
|
109
|
-
{}
|
|
110
|
-
), [C, k]), T = p(() => (S ?? []).reduce(
|
|
111
|
-
(e, s) => (e[s.chainId.toString()] = s, e),
|
|
112
|
-
{}
|
|
113
|
-
), [S]), x = n(
|
|
114
|
-
"liq-flex liq-flex-col liq-absolute liq-left-0 liq-top-0 liq-order-1 liq-mx-auto liq-w-full liq-gap-1 liq-pt-12 lg:liq-order-2 lg:liq-max-w-[27.5rem] !liq-min-h-[26rem] !liq-h-[26rem] !lg:liq-pt-0 !liq-bg-neutral-850 !liq-z-[16] !liq-p-2 !liq-pointer-events-auto",
|
|
115
|
-
{
|
|
116
|
-
"!liq-disabled !liq-animate-pulse": v || X || E
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
return v && !r ? /* @__PURE__ */ l(m, { className: n("liq-flex", x) }) : _ && !r ? /* @__PURE__ */ l(m, { className: n("liq-flex liq-flex-col liq-gap-1", x), children: "Something went wrong. Please try again later." }) : /* @__PURE__ */ t(m, { className: n("liq-flex liq-flex-col liq-gap-1", x), children: [
|
|
120
|
-
/* @__PURE__ */ t(
|
|
121
|
-
"div",
|
|
122
|
-
{
|
|
123
|
-
className: "liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5",
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ l("div", { className: "liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg", children: "History" }),
|
|
126
|
-
/* @__PURE__ */ l(
|
|
127
|
-
se,
|
|
128
|
-
{
|
|
129
|
-
btnSize: "md",
|
|
130
|
-
className: "liq-border-none !liq-p-0 !liq-mr-2",
|
|
131
|
-
variant: "link-neutral-500",
|
|
132
|
-
onClick: F,
|
|
133
|
-
children: /* @__PURE__ */ l(o, { icon: J, size: "xl" })
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
]
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
/* @__PURE__ */ t("div", { className: "scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll", children: [
|
|
140
|
-
(r == null ? void 0 : r.length) === 0 && /* @__PURE__ */ l(
|
|
141
|
-
m,
|
|
142
|
-
{
|
|
143
|
-
cardSize: "lg",
|
|
144
|
-
variant: "transparent",
|
|
145
|
-
className: "liq-align-center liq-flex liq-h-full liq-flex-col liq-justify-center liq-gap-4 liq-border-0 !liq-pb-8 !liq-pt-6 !sm:liq-pb-6 !lg:liq-p-4",
|
|
146
|
-
children: /* @__PURE__ */ t("div", { className: "liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8", children: [
|
|
147
|
-
/* @__PURE__ */ l("div", { className: "liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ l(
|
|
148
|
-
o,
|
|
149
|
-
{
|
|
150
|
-
icon: V,
|
|
151
|
-
size: "6x",
|
|
152
|
-
className: "liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]"
|
|
153
|
-
}
|
|
154
|
-
) }),
|
|
155
|
-
/* @__PURE__ */ t("div", { className: n("liq-flex liq-flex-col liq-items-center"), children: [
|
|
156
|
-
/* @__PURE__ */ l("div", { className: "liq-text-xl", children: "No transactions" }),
|
|
157
|
-
/* @__PURE__ */ l("div", { className: "liq-text-neutral-400", children: "Your transactions history will appear here" })
|
|
158
|
-
] })
|
|
159
|
-
] })
|
|
160
|
-
}
|
|
161
|
-
),
|
|
162
|
-
r && (r == null ? void 0 : r.length) > 0 && r.map((e, s) => {
|
|
163
|
-
var c, d, j, D, I, L, U, A, z, M, B, H, W, O;
|
|
164
|
-
return /* @__PURE__ */ l(
|
|
165
|
-
m,
|
|
166
|
-
{
|
|
167
|
-
cardSize: "lg",
|
|
168
|
-
variant: "neutral-750",
|
|
169
|
-
className: "liq-flex liq-flex-col liq-gap-4 !liq-outline liq-outline-transparent !liq-p-4 liq-border liq-border-neutral-750 liq-bg-neutral-850 hover:!liq-bg-neutral-700 !liq-rounded-lg",
|
|
170
|
-
children: /* @__PURE__ */ t("div", { className: "liq-align-center liq-flex liq-justify-between liq-gap-1", children: [
|
|
171
|
-
/* @__PURE__ */ t(
|
|
172
|
-
"div",
|
|
173
|
-
{
|
|
174
|
-
className: n("liq-flex liq-items-center liq-gap-1", {
|
|
175
|
-
"liq-text-yellow-200": e.status === "pending",
|
|
176
|
-
"liq-text-green-200": e.status === "success",
|
|
177
|
-
"liq-text-red-200": e.status === "failed"
|
|
178
|
-
}),
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ l(
|
|
181
|
-
f,
|
|
182
|
-
{
|
|
183
|
-
placement: "top",
|
|
184
|
-
buttonText: e.statusIcon,
|
|
185
|
-
children: new Date(
|
|
186
|
-
e.depositTimestamp * 1e3
|
|
187
|
-
).toLocaleString()
|
|
188
|
-
}
|
|
189
|
-
),
|
|
190
|
-
re.includes(e.toChainId) ? /* @__PURE__ */ t(R, { children: [
|
|
191
|
-
/* @__PURE__ */ l(
|
|
192
|
-
f,
|
|
193
|
-
{
|
|
194
|
-
placement: "top",
|
|
195
|
-
buttonText: /* @__PURE__ */ l(
|
|
196
|
-
o,
|
|
197
|
-
{
|
|
198
|
-
icon: G,
|
|
199
|
-
className: "liq-mx-1 liq-flex liq-items-center"
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
children: "Deposit"
|
|
203
|
-
}
|
|
204
|
-
),
|
|
205
|
-
/* @__PURE__ */ l("span", { className: "liq-text-wrap", children: u({
|
|
206
|
-
decimals: (c = i[e.tokenDestination]) == null ? void 0 : c.decimals,
|
|
207
|
-
amount: e.amountOut,
|
|
208
|
-
addCommas: !1,
|
|
209
|
-
digits: 2
|
|
210
|
-
}) }),
|
|
211
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: (d = i[e.tokenDestination]) == null ? void 0 : d.symbol }),
|
|
212
|
-
/* @__PURE__ */ l(
|
|
213
|
-
"img",
|
|
214
|
-
{
|
|
215
|
-
src: a(
|
|
216
|
-
(j = i[e.tokenDestination]) == null ? void 0 : j.pngUrl
|
|
217
|
-
),
|
|
218
|
-
alt: "",
|
|
219
|
-
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: "from" }),
|
|
223
|
-
/* @__PURE__ */ l("span", { className: "liq-text-wrap", children: u({
|
|
224
|
-
decimals: (D = i[e.tokenSource]) == null ? void 0 : D.decimals,
|
|
225
|
-
amount: e.amountIn,
|
|
226
|
-
addCommas: !1,
|
|
227
|
-
digits: 2
|
|
228
|
-
}) }),
|
|
229
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: (I = i[e.tokenSource]) == null ? void 0 : I.symbol }),
|
|
230
|
-
/* @__PURE__ */ t("div", { className: "liq-flex liq-items-center liq-relative", children: [
|
|
231
|
-
/* @__PURE__ */ l("div", { className: "liq-flex-shrink-0 liq-overflow-hidden liq-rounded-full liq-h-8 liq-w-8 liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ l("div", { className: "liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ l(
|
|
232
|
-
"img",
|
|
233
|
-
{
|
|
234
|
-
src: a(
|
|
235
|
-
(L = i[e.tokenSource]) == null ? void 0 : L.pngUrl
|
|
236
|
-
),
|
|
237
|
-
alt: "",
|
|
238
|
-
className: "liq-asset-icon liq-sm liq-p-0"
|
|
239
|
-
}
|
|
240
|
-
) }) }),
|
|
241
|
-
/* @__PURE__ */ l(
|
|
242
|
-
"img",
|
|
243
|
-
{
|
|
244
|
-
src: a(
|
|
245
|
-
(U = T[e.fromChainId]) == null ? void 0 : U.pngUrl
|
|
246
|
-
),
|
|
247
|
-
alt: "",
|
|
248
|
-
className: "liq-absolute liq-left-3 liq-bottom-[-2px] liq-chain-icon liq-sm liq-w-5 liq-h-5 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"
|
|
249
|
-
}
|
|
250
|
-
)
|
|
251
|
-
] })
|
|
252
|
-
] }) : /* @__PURE__ */ t(R, { children: [
|
|
253
|
-
/* @__PURE__ */ l(
|
|
254
|
-
f,
|
|
255
|
-
{
|
|
256
|
-
placement: "top",
|
|
257
|
-
buttonText: /* @__PURE__ */ l(
|
|
258
|
-
o,
|
|
259
|
-
{
|
|
260
|
-
icon: Q,
|
|
261
|
-
className: "liq-mx-1 liq-flex liq-items-center"
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
children: "Transfer"
|
|
265
|
-
}
|
|
266
|
-
),
|
|
267
|
-
/* @__PURE__ */ l("span", { className: "liq-text-wrap", children: u({
|
|
268
|
-
decimals: (A = i[e.tokenSource]) == null ? void 0 : A.decimals,
|
|
269
|
-
amount: e.amountIn,
|
|
270
|
-
addCommas: !1,
|
|
271
|
-
digits: 2
|
|
272
|
-
}) }),
|
|
273
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: (z = i[e.tokenSource]) == null ? void 0 : z.symbol }),
|
|
274
|
-
/* @__PURE__ */ l(
|
|
275
|
-
"img",
|
|
276
|
-
{
|
|
277
|
-
src: a(
|
|
278
|
-
(M = i[e.tokenSource]) == null ? void 0 : M.pngUrl
|
|
279
|
-
),
|
|
280
|
-
alt: "",
|
|
281
|
-
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: "to" }),
|
|
285
|
-
/* @__PURE__ */ l("span", { className: "liq-text-wrap", children: u({
|
|
286
|
-
decimals: (B = i[e.tokenDestination]) == null ? void 0 : B.decimals,
|
|
287
|
-
amount: e.amountOut,
|
|
288
|
-
addCommas: !1,
|
|
289
|
-
digits: 2
|
|
290
|
-
}) }),
|
|
291
|
-
/* @__PURE__ */ l("span", { className: "liq-whitespace-nowrap", children: (H = i[e.tokenDestination]) == null ? void 0 : H.symbol }),
|
|
292
|
-
/* @__PURE__ */ t("div", { className: "liq-flex liq-items-center liq-relative", children: [
|
|
293
|
-
/* @__PURE__ */ l("div", { className: "liq-flex-shrink-0 liq-overflow-hidden liq-rounded-full liq-h-8 liq-w-8 liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ l("div", { className: "liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ l(
|
|
294
|
-
"img",
|
|
295
|
-
{
|
|
296
|
-
src: a(
|
|
297
|
-
(W = i[e.tokenDestination]) == null ? void 0 : W.pngUrl
|
|
298
|
-
),
|
|
299
|
-
alt: "",
|
|
300
|
-
className: "liq-asset-icon liq-sm liq-p-0"
|
|
301
|
-
}
|
|
302
|
-
) }) }),
|
|
303
|
-
/* @__PURE__ */ l(
|
|
304
|
-
"img",
|
|
305
|
-
{
|
|
306
|
-
src: a(
|
|
307
|
-
(O = T[e.toChainId]) == null ? void 0 : O.pngUrl
|
|
308
|
-
),
|
|
309
|
-
alt: "",
|
|
310
|
-
className: "liq-absolute liq-left-3 liq-bottom-[-2px] liq-chain-icon liq-sm liq-w-5 liq-h-5 liq-border-[3px] liq-border-neutral-850 liq-rounded-lg"
|
|
311
|
-
}
|
|
312
|
-
)
|
|
313
|
-
] })
|
|
314
|
-
] })
|
|
315
|
-
]
|
|
316
|
-
}
|
|
317
|
-
),
|
|
318
|
-
e.provider === ie.MultiversxBridge && /* @__PURE__ */ l(
|
|
319
|
-
"a",
|
|
320
|
-
{
|
|
321
|
-
href: `${w.bridgeURL}/status/${e.txHash}`,
|
|
322
|
-
target: "_blank",
|
|
323
|
-
rel: "noopener noreferrer",
|
|
324
|
-
className: "liq-flex",
|
|
325
|
-
children: /* @__PURE__ */ l("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ l(
|
|
326
|
-
f,
|
|
327
|
-
{
|
|
328
|
-
placement: "top",
|
|
329
|
-
buttonText: /* @__PURE__ */ l(
|
|
330
|
-
"img",
|
|
331
|
-
{
|
|
332
|
-
src: oe,
|
|
333
|
-
alt: "",
|
|
334
|
-
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200"
|
|
335
|
-
}
|
|
336
|
-
),
|
|
337
|
-
shouldStopPropagation: !1,
|
|
338
|
-
children: "View"
|
|
339
|
-
}
|
|
340
|
-
) })
|
|
341
|
-
}
|
|
342
|
-
)
|
|
343
|
-
] })
|
|
344
|
-
},
|
|
345
|
-
`${e.txHash}-${s}`
|
|
346
|
-
);
|
|
347
|
-
})
|
|
348
|
-
] })
|
|
349
|
-
] });
|
|
350
|
-
};
|
|
351
|
-
export {
|
|
352
|
-
_e as BridgeHistory
|
|
353
|
-
};
|
|
1
|
+
import { t as e } from "../../../BridgeHistory-CInRkJ6T.mjs";
|
|
2
|
+
export { e as BridgeHistory };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../BridgeHistory-BU-L_w0l.js");exports.BridgeHistory=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../helpers/getDisplayName.js"),t=require("../../../types/chainType.js"),n=require("../TrimAddress/TrimAddress.js");require("../TrimAddress/index.js");const r=require("../base/MxLink/MxLink.js");require("../base/index.js");const i=require("../../hooks/useAccount.js"),a=require("../../hooks/useSuiConnect.js"),o=require("../../hooks/useNamespaceAddress.js"),s=require("./SwitchChainButton.js"),c=require("../CopyButton/CopyButton.js");require("../CopyButton/index.js");let l=require("react/jsx-runtime"),u=require("@fortawesome/react-fontawesome"),d=require("@reown/appkit/react"),f=require("@fortawesome/free-solid-svg-icons/faPowerOff");var p=({activeChain:p,disabled:m})=>{let h=i.useAccount(),{disconnect:g}=(0,d.useDisconnect)(),_=a.useSuiConnect(),v=o.useNamespaceAddress(p?.chainType),y=p?.chainType===t.ChainType.sui,b=p?.chainType===t.ChainType.evm||p?.chainType===t.ChainType.sui?v:v??h.address;return b?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`img`,{src:p?.pngUrl,alt:``,className:`liq-w-6 liq-h-6 liq-rounded-lg`}),(0,l.jsx)(`span`,{className:`liq-truncate liq-text-gray-400`,children:e.getDisplayName(p)}),(0,l.jsx)(`span`,{className:`liq-ml-[-5px]`,children:`:`}),(0,l.jsx)(`div`,{className:`liq-flex liq-items-center liq-justify-between`,children:(0,l.jsxs)(`div`,{className:`liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1`,children:[(0,l.jsx)(r.MxLink,{to:`${p?.blockExplorerUrls?.[0]}/address/${b}`,target:`_blank`,showExternalIcon:!1,className:`!liq-relative`,children:(0,l.jsx)(`div`,{className:`liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]`,children:(0,l.jsx)(n.TrimAddress,{address:b,"data-testid":`evm-address`})})}),(0,l.jsx)(c.CopyButton,{text:b,className:`liq-text-sm`,"data-testid":`evm-copy-button`})]})}),(0,l.jsx)(`div`,{className:`liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1`,children:(0,l.jsx)(`button`,{className:`focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50`,onClick:async e=>{try{e.preventDefault(),y?await _.disconnect():await g()}catch(e){console.error(`Failed to disconnect:`,e)}},"data-testid":`evm-disconnect-button`,children:(0,l.jsx)(u.FontAwesomeIcon,{icon:f.faPowerOff})})})]}):y?(0,l.jsxs)(`div`,{className:`liq-flex liq-max-w-full liq-items-center liq-gap-2`,children:[(0,l.jsx)(`button`,{disabled:m||_.isConnecting,onClick:()=>_.connect(),className:`liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2`,children:(0,l.jsx)(`div`,{className:`liq-flex liq-items-center`,children:(0,l.jsxs)(`div`,{className:`liq-flex liq-justify-center liq-items-center liq-gap-2`,children:[(0,l.jsx)(`div`,{children:_.isConnecting?`Connecting...`:`Connect`}),(0,l.jsx)(`img`,{src:p?.pngUrl,alt:``,className:`liq-w-4 liq-h-4 liq-rounded-sm`}),(0,l.jsx)(`div`,{className:`liq-truncate md:liq-text-clip`,children:e.getDisplayName(p)})]})})}),_.isConnecting&&(0,l.jsx)(`button`,{type:`button`,onClick:()=>void _.cancelPendingConnection(),className:`liq-shrink-0 liq-rounded-lg liq-px-2 liq-py-1 liq-text-xs liq-font-medium liq-text-neutral-400 hover:liq-text-white`,children:`Cancel`})]}):(0,l.jsx)(s.SwitchChainButton,{disabled:m,chainType:p?.chainType,className:`liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2`,children:(0,l.jsx)(`div`,{className:`liq-flex liq-items-center`,children:(0,l.jsxs)(`div`,{className:`liq-flex liq-justify-center liq-items-center liq-gap-2`,children:[(0,l.jsx)(`div`,{children:h.isConnecting?`Connecting...`:`Connect`}),(0,l.jsx)(`img`,{src:p?.pngUrl,alt:``,className:`liq-w-4 liq-h-4 liq-rounded-sm`}),(0,l.jsx)(`div`,{className:`liq-truncate md:liq-text-clip`,children:e.getDisplayName(p)})]})})})};exports.BridgeAccountDisplay=p;
|