@multiversx/sdk-dapp-liquidity 0.2.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -0
- package/all-networks-EJIVYZ_i.mjs +4 -0
- package/all-networks-NYACMyeN.js +4 -0
- package/api/confirmRate.d.ts +11 -0
- package/api/confirmRate.js +30 -0
- package/api/confirmRate.mjs +29 -0
- package/api/getChains.d.ts +6 -0
- package/api/getChains.js +12 -0
- package/api/getChains.mjs +11 -0
- package/api/getRate.d.ts +10 -0
- package/api/getRate.js +28 -0
- package/api/getRate.mjs +27 -0
- package/api/getTokens.d.ts +7 -0
- package/api/getTokens.js +14 -0
- package/api/getTokens.mjs +13 -0
- package/api/getTokensBalances.d.ts +8 -0
- package/api/getTokensBalances.js +17 -0
- package/api/getTokensBalances.mjs +16 -0
- package/api/getTransactions.d.ts +7 -0
- package/api/getTransactions.js +14 -0
- package/api/getTransactions.mjs +13 -0
- package/api/index.d.ts +7 -0
- package/api/index.js +17 -0
- package/api/index.mjs +16 -0
- package/api/sendTransactions.d.ts +11 -0
- package/api/sendTransactions.js +29 -0
- package/api/sendTransactions.mjs +28 -0
- package/api/tests/confirmRate.spec.d.ts +1 -0
- package/api/tests/confirmRate.spec.js +124 -0
- package/api/tests/confirmRate.spec.mjs +122 -0
- package/api/tests/getChains.spec.d.ts +1 -0
- package/api/tests/getChains.spec.js +37 -0
- package/api/tests/getChains.spec.mjs +35 -0
- package/api/tests/getRate.spec.d.ts +1 -0
- package/api/tests/getRate.spec.js +83 -0
- package/api/tests/getRate.spec.mjs +81 -0
- package/api/tests/getTokens.spec.d.ts +1 -0
- package/api/tests/getTokens.spec.js +60 -0
- package/api/tests/getTokens.spec.mjs +58 -0
- package/api/tests/getTransactions.spec.d.ts +1 -0
- package/api/tests/getTransactions.spec.js +89 -0
- package/api/tests/getTransactions.spec.mjs +87 -0
- package/api/tests/sendTransactions.spec.d.ts +1 -0
- package/api/tests/sendTransactions.spec.js +83 -0
- package/api/tests/sendTransactions.spec.mjs +81 -0
- package/bignumber-B8vjg9qn.js +1334 -0
- package/bignumber-CKZkoo0g.mjs +1334 -0
- package/constants/index.d.ts +1 -0
- package/constants/index.js +5 -0
- package/constants/index.mjs +4 -0
- package/default-BYtXv70Z.mjs +4 -0
- package/default-H3AbmzFV.js +4 -0
- package/dto/Chain.dto.d.ts +16 -0
- package/dto/Chain.dto.js +2 -0
- package/dto/Chain.dto.mjs +1 -0
- package/dto/ConfirmRate.dto.d.ts +11 -0
- package/dto/ConfirmRate.dto.js +2 -0
- package/dto/ConfirmRate.dto.mjs +1 -0
- package/dto/Token.dto.d.ts +14 -0
- package/dto/Token.dto.js +2 -0
- package/dto/Token.dto.mjs +1 -0
- package/dto/TokenBalance.dto.d.ts +4 -0
- package/dto/TokenBalance.dto.js +2 -0
- package/dto/TokenBalance.dto.mjs +1 -0
- package/dto/Transaction.dto.d.ts +14 -0
- package/dto/Transaction.dto.js +2 -0
- package/dto/Transaction.dto.mjs +1 -0
- package/dto/index.d.ts +5 -0
- package/dto/index.js +2 -0
- package/dto/index.mjs +1 -0
- package/helpers/base64Utils.d.ts +3 -0
- package/helpers/base64Utils.js +32 -0
- package/helpers/base64Utils.mjs +31 -0
- package/helpers/decodeLoginToken.d.ts +9 -0
- package/helpers/decodeLoginToken.js +28 -0
- package/helpers/decodeLoginToken.mjs +27 -0
- package/helpers/decodeToken.d.ts +11 -0
- package/helpers/decodeToken.js +40 -0
- package/helpers/decodeToken.mjs +39 -0
- package/helpers/getApiURL.d.ts +1 -0
- package/helpers/getApiURL.js +8 -0
- package/helpers/getApiURL.mjs +7 -0
- package/helpers/getBridgeURL.d.ts +1 -0
- package/helpers/getBridgeURL.js +8 -0
- package/helpers/getBridgeURL.mjs +7 -0
- package/helpers/getMvxApiURL.d.ts +1 -0
- package/helpers/getMvxApiURL.js +8 -0
- package/helpers/getMvxApiURL.mjs +7 -0
- package/helpers/getMvxChainId.d.ts +1 -0
- package/helpers/getMvxChainId.js +8 -0
- package/helpers/getMvxChainId.mjs +7 -0
- package/helpers/getMvxExplorerAddress.d.ts +1 -0
- package/helpers/getMvxExplorerAddress.js +8 -0
- package/helpers/getMvxExplorerAddress.mjs +7 -0
- package/helpers/index.d.ts +9 -0
- package/helpers/index.js +23 -0
- package/helpers/index.mjs +22 -0
- package/helpers/serializeTransaction.d.ts +3 -0
- package/helpers/serializeTransaction.js +9 -0
- package/helpers/serializeTransaction.mjs +8 -0
- package/helpers/tests/base64Utils.spec.d.ts +1 -0
- package/helpers/tests/base64Utils.spec.js +30 -0
- package/helpers/tests/base64Utils.spec.mjs +28 -0
- package/helpers/tests/decodeLoginToken.spec.d.ts +1 -0
- package/helpers/tests/decodeLoginToken.spec.js +35 -0
- package/helpers/tests/decodeLoginToken.spec.mjs +33 -0
- package/helpers/tests/decodeToken.spec.d.ts +1 -0
- package/helpers/tests/decodeToken.spec.js +28 -0
- package/helpers/tests/decodeToken.spec.mjs +26 -0
- package/index-B9WqxUXM.mjs +91 -0
- package/index-BXwpbIDQ.mjs +107 -0
- package/index-CnudU77V.js +329 -0
- package/index-DSnomXRI.mjs +68025 -0
- package/index-DZHiA1sX.js +107 -0
- package/index-cvy2-uZ_.js +67946 -0
- package/index.d.ts +6 -0
- package/index.js +189 -0
- package/index.mjs +185 -0
- package/package.json +107 -0
- package/react-B9sQBOh0.mjs +3040 -0
- package/react-BaXyw3AO.js +3040 -0
- package/react-CNXJSTCv.js +38 -0
- package/react-CSQpf1zk.mjs +38 -0
- package/reactjs/components/AccountAddress/AccountAddress.d.ts +6 -0
- package/reactjs/components/AccountAddress/AccountAddress.js +25 -0
- package/reactjs/components/AccountAddress/AccountAddress.mjs +24 -0
- package/reactjs/components/AccountAddress/index.d.ts +1 -0
- package/reactjs/components/AccountAddress/index.js +5 -0
- package/reactjs/components/AccountAddress/index.mjs +4 -0
- package/reactjs/components/AmountCard/AmountCard.d.ts +6 -0
- package/reactjs/components/AmountCard/AmountCard.js +33 -0
- package/reactjs/components/AmountCard/AmountCard.mjs +32 -0
- package/reactjs/components/AmountCard/index.d.ts +1 -0
- package/reactjs/components/AmountCard/index.js +5 -0
- package/reactjs/components/AmountCard/index.mjs +4 -0
- package/reactjs/components/AmountInput/AmountInput.d.ts +13 -0
- package/reactjs/components/AmountInput/AmountInput.js +61 -0
- package/reactjs/components/AmountInput/AmountInput.mjs +60 -0
- package/reactjs/components/AmountInput/index.d.ts +1 -0
- package/reactjs/components/AmountInput/index.js +5 -0
- package/reactjs/components/AmountInput/index.mjs +4 -0
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +16 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +680 -0
- package/reactjs/components/BridgeForm/BridgeForm.mjs +679 -0
- package/reactjs/components/BridgeForm/index.d.ts +1 -0
- package/reactjs/components/BridgeForm/index.js +5 -0
- package/reactjs/components/BridgeForm/index.mjs +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +4 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.js +233 -0
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +232 -0
- package/reactjs/components/BridgeHistory/index.d.ts +1 -0
- package/reactjs/components/BridgeHistory/index.js +5 -0
- package/reactjs/components/BridgeHistory/index.mjs +4 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +6 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.js +85 -0
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +84 -0
- package/reactjs/components/Connect/BridgeConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/BridgeConnectButton.js +26 -0
- package/reactjs/components/Connect/BridgeConnectButton.mjs +25 -0
- package/reactjs/components/Connect/CustomConnectButton.d.ts +7 -0
- package/reactjs/components/Connect/CustomConnectButton.js +42 -0
- package/reactjs/components/Connect/CustomConnectButton.mjs +41 -0
- package/reactjs/components/Connect/MvxAccountDisplay.d.ts +9 -0
- package/reactjs/components/Connect/MvxAccountDisplay.js +75 -0
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +74 -0
- package/reactjs/components/Connect/MvxConnectButton.d.ts +11 -0
- package/reactjs/components/Connect/MvxConnectButton.js +43 -0
- package/reactjs/components/Connect/MvxConnectButton.mjs +42 -0
- package/reactjs/components/Connect/SwitchChainButton.d.ts +7 -0
- package/reactjs/components/Connect/SwitchChainButton.js +33 -0
- package/reactjs/components/Connect/SwitchChainButton.mjs +32 -0
- package/reactjs/components/Connect/index.d.ts +6 -0
- package/reactjs/components/Connect/index.js +15 -0
- package/reactjs/components/Connect/index.mjs +14 -0
- package/reactjs/components/CopyButton/CopyButton.d.ts +6 -0
- package/reactjs/components/CopyButton/CopyButton.js +42 -0
- package/reactjs/components/CopyButton/CopyButton.mjs +41 -0
- package/reactjs/components/CopyButton/index.d.ts +1 -0
- package/reactjs/components/CopyButton/index.js +5 -0
- package/reactjs/components/CopyButton/index.mjs +4 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.d.ts +1 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +38 -0
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +37 -0
- package/reactjs/components/CopyButton/utils/index.d.ts +1 -0
- package/reactjs/components/CopyButton/utils/index.js +5 -0
- package/reactjs/components/CopyButton/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.d.ts +21 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.js +91 -0
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +90 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.d.ts +7 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +40 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +39 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.d.ts +0 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.d.ts +14 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +62 -0
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +61 -0
- package/reactjs/components/DisplayAmount/components/index.d.ts +0 -0
- package/reactjs/components/DisplayAmount/components/index.js +2 -0
- package/reactjs/components/DisplayAmount/components/index.mjs +1 -0
- package/reactjs/components/DisplayAmount/index.d.ts +1 -0
- package/reactjs/components/DisplayAmount/index.js +5 -0
- package/reactjs/components/DisplayAmount/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/index.d.ts +1 -0
- package/reactjs/components/DisplayAmount/utils/index.js +5 -0
- package/reactjs/components/DisplayAmount/utils/index.mjs +4 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.d.ts +1 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +22 -0
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +21 -0
- package/reactjs/components/SmallLoader/SmallLoader.d.ts +4 -0
- package/reactjs/components/SmallLoader/SmallLoader.js +22 -0
- package/reactjs/components/SmallLoader/SmallLoader.mjs +21 -0
- package/reactjs/components/SmallLoader/index.d.ts +1 -0
- package/reactjs/components/SmallLoader/index.js +5 -0
- package/reactjs/components/SmallLoader/index.mjs +4 -0
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +16 -0
- package/reactjs/components/TokenSelector/TokenSelector.js +158 -0
- package/reactjs/components/TokenSelector/TokenSelector.mjs +157 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +86 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +85 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +11 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +45 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +44 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.d.ts +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +19 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +18 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.d.ts +3 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +7 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +6 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.d.ts +4 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +33 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +32 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.js +2 -0
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.mjs +1 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.js +41 -0
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +40 -0
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +10 -0
- package/reactjs/components/TokenSelector/components/SelectContent.js +93 -0
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +92 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.d.ts +5 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.js +29 -0
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +28 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.d.ts +8 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.js +82 -0
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +81 -0
- package/reactjs/components/TokenSelector/components/TokenItem.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenItem.js +69 -0
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +68 -0
- package/reactjs/components/TokenSelector/components/TokenList.d.ts +7 -0
- package/reactjs/components/TokenSelector/components/TokenList.js +21 -0
- package/reactjs/components/TokenSelector/components/TokenList.mjs +20 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.d.ts +9 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +26 -0
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +25 -0
- package/reactjs/components/TokenSelector/index.d.ts +1 -0
- package/reactjs/components/TokenSelector/index.js +5 -0
- package/reactjs/components/TokenSelector/index.mjs +4 -0
- package/reactjs/components/TransactionToast/TransactionToast.d.ts +9 -0
- package/reactjs/components/TransactionToast/TransactionToast.js +54 -0
- package/reactjs/components/TransactionToast/TransactionToast.mjs +53 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.d.ts +3 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +21 -0
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +20 -0
- package/reactjs/components/TransactionToast/index.d.ts +2 -0
- package/reactjs/components/TransactionToast/index.js +7 -0
- package/reactjs/components/TransactionToast/index.mjs +6 -0
- package/reactjs/components/TrimAddress/TrimAddress.d.ts +8 -0
- package/reactjs/components/TrimAddress/TrimAddress.js +26 -0
- package/reactjs/components/TrimAddress/TrimAddress.mjs +25 -0
- package/reactjs/components/TrimAddress/index.d.ts +1 -0
- package/reactjs/components/TrimAddress/index.js +5 -0
- package/reactjs/components/TrimAddress/index.mjs +4 -0
- package/reactjs/components/base/MxButton/MxButton.d.ts +13 -0
- package/reactjs/components/base/MxButton/MxButton.js +72 -0
- package/reactjs/components/base/MxButton/MxButton.mjs +71 -0
- package/reactjs/components/base/MxButton/index.d.ts +1 -0
- package/reactjs/components/base/MxButton/index.js +5 -0
- package/reactjs/components/base/MxButton/index.mjs +4 -0
- package/reactjs/components/base/MxCard/MxCard.d.ts +10 -0
- package/reactjs/components/base/MxCard/MxCard.js +55 -0
- package/reactjs/components/base/MxCard/MxCard.mjs +54 -0
- package/reactjs/components/base/MxCard/index.d.ts +1 -0
- package/reactjs/components/base/MxCard/index.js +5 -0
- package/reactjs/components/base/MxCard/index.mjs +4 -0
- package/reactjs/components/base/MxLink/MxLink.d.ts +10 -0
- package/reactjs/components/base/MxLink/MxLink.js +71 -0
- package/reactjs/components/base/MxLink/MxLink.mjs +70 -0
- package/reactjs/components/base/MxLink/index.d.ts +1 -0
- package/reactjs/components/base/MxLink/index.js +5 -0
- package/reactjs/components/base/MxLink/index.mjs +4 -0
- package/reactjs/components/base/MxSearch/MxSearch.d.ts +10 -0
- package/reactjs/components/base/MxSearch/MxSearch.js +70 -0
- package/reactjs/components/base/MxSearch/MxSearch.mjs +69 -0
- package/reactjs/components/base/MxSearch/index.d.ts +1 -0
- package/reactjs/components/base/MxSearch/index.js +5 -0
- package/reactjs/components/base/MxSearch/index.mjs +4 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.d.ts +10 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.js +79 -0
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +78 -0
- package/reactjs/components/base/MxSlideover/index.d.ts +1 -0
- package/reactjs/components/base/MxSlideover/index.js +5 -0
- package/reactjs/components/base/MxSlideover/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.d.ts +23 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.js +163 -0
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +162 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.d.ts +11 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +34 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +33 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.d.ts +13 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +28 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +27 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +5 -0
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +4 -0
- package/reactjs/components/base/MxTooltip/components/index.d.ts +2 -0
- package/reactjs/components/base/MxTooltip/components/index.js +7 -0
- package/reactjs/components/base/MxTooltip/components/index.mjs +6 -0
- package/reactjs/components/base/MxTooltip/index.d.ts +1 -0
- package/reactjs/components/base/MxTooltip/index.js +5 -0
- package/reactjs/components/base/MxTooltip/index.mjs +4 -0
- package/reactjs/components/base/index.d.ts +6 -0
- package/reactjs/components/base/index.js +15 -0
- package/reactjs/components/base/index.mjs +14 -0
- package/reactjs/components/index.d.ts +13 -0
- package/reactjs/components/index.js +51 -0
- package/reactjs/components/index.mjs +50 -0
- package/reactjs/constants/chains.d.ts +35 -0
- package/reactjs/constants/chains.js +38 -0
- package/reactjs/constants/chains.mjs +37 -0
- package/reactjs/constants/index.d.ts +3 -0
- package/reactjs/constants/index.js +12 -0
- package/reactjs/constants/index.mjs +11 -0
- package/reactjs/context/Web3AppProvider.d.ts +12 -0
- package/reactjs/context/Web3AppProvider.js +29 -0
- package/reactjs/context/Web3AppProvider.mjs +28 -0
- package/reactjs/context/queryClient.d.ts +3 -0
- package/reactjs/context/queryClient.js +12 -0
- package/reactjs/context/queryClient.mjs +11 -0
- package/reactjs/context/useWeb3App.d.ts +1 -0
- package/reactjs/context/useWeb3App.js +13 -0
- package/reactjs/context/useWeb3App.mjs +12 -0
- package/reactjs/hooks/index.d.ts +11 -0
- package/reactjs/hooks/index.js +32 -0
- package/reactjs/hooks/index.mjs +31 -0
- package/reactjs/hooks/useAccount.d.ts +77 -0
- package/reactjs/hooks/useAccount.js +18 -0
- package/reactjs/hooks/useAccount.mjs +17 -0
- package/reactjs/hooks/useBalances.d.ts +10 -0
- package/reactjs/hooks/useBalances.js +7 -0
- package/reactjs/hooks/useBalances.mjs +6 -0
- package/reactjs/hooks/useBridgeFormik.d.ts +98 -0
- package/reactjs/hooks/useBridgeFormik.js +182 -0
- package/reactjs/hooks/useBridgeFormik.mjs +181 -0
- package/reactjs/hooks/useDebounce.d.ts +1 -0
- package/reactjs/hooks/useDebounce.js +14 -0
- package/reactjs/hooks/useDebounce.mjs +13 -0
- package/reactjs/hooks/useFetchBridgeData.d.ts +45 -0
- package/reactjs/hooks/useFetchBridgeData.js +44 -0
- package/reactjs/hooks/useFetchBridgeData.mjs +43 -0
- package/reactjs/hooks/useFetchTokens.d.ts +42 -0
- package/reactjs/hooks/useFetchTokens.js +105 -0
- package/reactjs/hooks/useFetchTokens.mjs +104 -0
- package/reactjs/hooks/useGetChainId.d.ts +1 -0
- package/reactjs/hooks/useGetChainId.js +12 -0
- package/reactjs/hooks/useGetChainId.mjs +11 -0
- package/reactjs/hooks/useResolveTokenChain.d.ts +9 -0
- package/reactjs/hooks/useResolveTokenChain.js +21 -0
- package/reactjs/hooks/useResolveTokenChain.mjs +20 -0
- package/reactjs/hooks/useSendTransactions.d.ts +3 -0
- package/reactjs/hooks/useSendTransactions.js +19 -0
- package/reactjs/hooks/useSendTransactions.mjs +18 -0
- package/reactjs/hooks/useSignTransaction.d.ts +69 -0
- package/reactjs/hooks/useSignTransaction.js +17 -0
- package/reactjs/hooks/useSignTransaction.mjs +16 -0
- package/reactjs/hooks/validation/index.d.ts +4 -0
- package/reactjs/hooks/validation/index.js +11 -0
- package/reactjs/hooks/validation/index.mjs +10 -0
- package/reactjs/hooks/validation/useAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useAmountSchema.js +31 -0
- package/reactjs/hooks/validation/useAmountSchema.mjs +13 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.d.ts +2 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.js +27 -0
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +9 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.d.ts +3 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +38 -0
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +37 -0
- package/reactjs/hooks/validation/useTestIsConnected.d.ts +3 -0
- package/reactjs/hooks/validation/useTestIsConnected.js +21 -0
- package/reactjs/hooks/validation/useTestIsConnected.mjs +20 -0
- package/reactjs/index.d.ts +10 -0
- package/reactjs/index.js +153 -0
- package/reactjs/index.mjs +149 -0
- package/reactjs/init/index.d.ts +1 -0
- package/reactjs/init/index.js +5 -0
- package/reactjs/init/index.mjs +4 -0
- package/reactjs/init/init.d.ts +48 -0
- package/reactjs/init/init.js +53 -0
- package/reactjs/init/init.mjs +35 -0
- package/reactjs/init/tests/init.spec.d.ts +1 -0
- package/reactjs/init/tests/init.spec.js +108 -0
- package/reactjs/init/tests/init.spec.mjs +106 -0
- package/reactjs/queries/index.d.ts +7 -0
- package/reactjs/queries/index.js +20 -0
- package/reactjs/queries/index.mjs +19 -0
- package/reactjs/queries/useGetAllTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetAllTokens.query.js +31 -0
- package/reactjs/queries/useGetAllTokens.query.mjs +30 -0
- package/reactjs/queries/useGetChains.query.d.ts +3 -0
- package/reactjs/queries/useGetChains.query.js +31 -0
- package/reactjs/queries/useGetChains.query.mjs +30 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.d.ts +22 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.js +78 -0
- package/reactjs/queries/useGetEvmTokensBalances.query.mjs +77 -0
- package/reactjs/queries/useGetHistory.query.d.ts +4 -0
- package/reactjs/queries/useGetHistory.query.js +47 -0
- package/reactjs/queries/useGetHistory.query.mjs +46 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +23 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.js +60 -0
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +59 -0
- package/reactjs/queries/useGetRate.mutation.d.ts +6 -0
- package/reactjs/queries/useGetRate.mutation.js +19 -0
- package/reactjs/queries/useGetRate.mutation.mjs +18 -0
- package/reactjs/queries/useGetTokens.query.d.ts +3 -0
- package/reactjs/queries/useGetTokens.query.js +34 -0
- package/reactjs/queries/useGetTokens.query.mjs +33 -0
- package/reactjs/reexports.d.ts +6 -0
- package/reactjs/reexports.js +21 -0
- package/reactjs/reexports.mjs +17 -0
- package/reactjs/utils/delay.d.ts +1 -0
- package/reactjs/utils/delay.js +7 -0
- package/reactjs/utils/delay.mjs +6 -0
- package/reactjs/utils/formatAmount.d.ts +7 -0
- package/reactjs/utils/formatAmount.js +24 -0
- package/reactjs/utils/formatAmount.mjs +23 -0
- package/reactjs/utils/getCleanStringAmount.d.ts +4 -0
- package/reactjs/utils/getCleanStringAmount.js +12 -0
- package/reactjs/utils/getCleanStringAmount.mjs +11 -0
- package/reactjs/utils/getCompletePathname.d.ts +1 -0
- package/reactjs/utils/getCompletePathname.js +6 -0
- package/reactjs/utils/getCompletePathname.mjs +5 -0
- package/reactjs/utils/getInitialTokens.d.ts +8 -0
- package/reactjs/utils/getInitialTokens.js +13 -0
- package/reactjs/utils/getInitialTokens.mjs +12 -0
- package/reactjs/utils/hasEnoughFunds.d.ts +5 -0
- package/reactjs/utils/hasEnoughFunds.js +20 -0
- package/reactjs/utils/hasEnoughFunds.mjs +19 -0
- package/reactjs/utils/index.d.ts +12 -0
- package/reactjs/utils/index.js +27 -0
- package/reactjs/utils/index.mjs +26 -0
- package/reactjs/utils/isStringFloat.d.ts +1 -0
- package/reactjs/utils/isStringFloat.js +22 -0
- package/reactjs/utils/isStringFloat.mjs +21 -0
- package/reactjs/utils/mxClsx.d.ts +3 -0
- package/reactjs/utils/mxClsx.js +21 -0
- package/reactjs/utils/mxClsx.mjs +20 -0
- package/reactjs/utils/pipe.d.ts +7 -0
- package/reactjs/utils/pipe.js +26 -0
- package/reactjs/utils/pipe.mjs +25 -0
- package/reactjs/utils/removeCommas.d.ts +1 -0
- package/reactjs/utils/removeCommas.js +7 -0
- package/reactjs/utils/removeCommas.mjs +6 -0
- package/reactjs/utils/roundAmount.d.ts +1 -0
- package/reactjs/utils/roundAmount.js +41 -0
- package/reactjs/utils/roundAmount.mjs +40 -0
- package/reactjs/utils/testNumber.d.ts +1 -0
- package/reactjs/utils/testNumber.js +5 -0
- package/reactjs/utils/testNumber.mjs +4 -0
- package/store/inMemoryStore.d.ts +12 -0
- package/store/inMemoryStore.js +40 -0
- package/store/inMemoryStore.mjs +39 -0
- package/types/batchTransactions.d.ts +6 -0
- package/types/batchTransactions.js +2 -0
- package/types/batchTransactions.mjs +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +2 -0
- package/types/index.mjs +1 -0
- package/types/rate.d.ts +11 -0
- package/types/rate.js +2 -0
- package/types/rate.mjs +1 -0
- package/types/token.d.ts +12 -0
- package/types/token.js +2 -0
- package/types/token.mjs +1 -0
- package/types/transaction.d.ts +14 -0
- package/types/transaction.js +2 -0
- package/types/transaction.mjs +1 -0
- package/useBalances-Bxtc4GNK.js +199 -0
- package/useBalances-DA3zEruz.mjs +199 -0
- package/w3m-modal-DCcF1qEB.js +356 -0
- package/w3m-modal-DK3G5GJp.mjs +356 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const faCircleCheck = require("@fortawesome/free-solid-svg-icons/faCircleCheck");
|
|
6
|
+
const faCircleXmark = require("@fortawesome/free-solid-svg-icons/faCircleXmark");
|
|
7
|
+
const faClock = require("@fortawesome/free-solid-svg-icons/faClock");
|
|
8
|
+
const faClose = require("@fortawesome/free-solid-svg-icons/faClose");
|
|
9
|
+
const reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
10
|
+
const require$$0 = require("react");
|
|
11
|
+
const constants_index = require("../../../constants/index.js");
|
|
12
|
+
const reactjs_context_useWeb3App = require("../../context/useWeb3App.js");
|
|
13
|
+
const reactjs_hooks_useFetchBridgeData = require("../../hooks/useFetchBridgeData.js");
|
|
14
|
+
const reactjs_queries_useGetHistory_query = require("../../queries/useGetHistory.query.js");
|
|
15
|
+
const reactjs_utils_formatAmount = require("../../utils/formatAmount.js");
|
|
16
|
+
const reactjs_utils_mxClsx = require("../../utils/mxClsx.js");
|
|
17
|
+
const reactjs_components_base_MxButton_MxButton = require("../base/MxButton/MxButton.js");
|
|
18
|
+
const reactjs_components_base_MxCard_MxCard = require("../base/MxCard/MxCard.js");
|
|
19
|
+
const reactjs_components_base_MxLink_MxLink = require("../base/MxLink/MxLink.js");
|
|
20
|
+
const ArrowUpRight = "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";
|
|
21
|
+
const BridgeHistory = ({
|
|
22
|
+
mvxAddress,
|
|
23
|
+
onClose
|
|
24
|
+
}) => {
|
|
25
|
+
const { options } = reactjs_context_useWeb3App.useWeb3App();
|
|
26
|
+
const { data, isLoading, isError } = reactjs_queries_useGetHistory_query.useGetHistoryQuery();
|
|
27
|
+
const resolveTransactionIcon = require$$0.useCallback((transaction) => {
|
|
28
|
+
switch (transaction.status) {
|
|
29
|
+
case "success":
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
reactFontawesome.FontAwesomeIcon,
|
|
32
|
+
{
|
|
33
|
+
icon: faCircleCheck.faCircleCheck,
|
|
34
|
+
size: "lg",
|
|
35
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400"
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
case "failed":
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
|
+
reactFontawesome.FontAwesomeIcon,
|
|
41
|
+
{
|
|
42
|
+
icon: faCircleXmark.faCircleXmark,
|
|
43
|
+
size: "lg",
|
|
44
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400"
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
default:
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
49
|
+
reactFontawesome.FontAwesomeIcon,
|
|
50
|
+
{
|
|
51
|
+
icon: faClock.faClock,
|
|
52
|
+
size: "lg",
|
|
53
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400"
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}, []);
|
|
58
|
+
const transactions = require$$0.useMemo(
|
|
59
|
+
() => data == null ? void 0 : data.map((transaction) => {
|
|
60
|
+
return {
|
|
61
|
+
...transaction,
|
|
62
|
+
tokenDestination: transaction.tokenOut.toLowerCase(),
|
|
63
|
+
tokenSource: transaction.tokenIn.toLowerCase(),
|
|
64
|
+
sender: transaction.sender.toLowerCase(),
|
|
65
|
+
statusIcon: resolveTransactionIcon(transaction)
|
|
66
|
+
};
|
|
67
|
+
}),
|
|
68
|
+
[data, resolveTransactionIcon]
|
|
69
|
+
);
|
|
70
|
+
const {
|
|
71
|
+
evmTokensWithBalances,
|
|
72
|
+
mvxTokensWithBalances,
|
|
73
|
+
chains,
|
|
74
|
+
isTokensLoading: tokensLoading,
|
|
75
|
+
isChainsLoading
|
|
76
|
+
} = reactjs_hooks_useFetchBridgeData.useFetchBridgeData({
|
|
77
|
+
mvxAddress,
|
|
78
|
+
mvxApiURL: options.mvxApiURL
|
|
79
|
+
});
|
|
80
|
+
const tokensMap = require$$0.useMemo(() => {
|
|
81
|
+
return [
|
|
82
|
+
...evmTokensWithBalances ?? [],
|
|
83
|
+
...mvxTokensWithBalances ?? []
|
|
84
|
+
].reduce(
|
|
85
|
+
(acc, token) => {
|
|
86
|
+
acc[token.address.toLowerCase()] = token;
|
|
87
|
+
return acc;
|
|
88
|
+
},
|
|
89
|
+
{}
|
|
90
|
+
);
|
|
91
|
+
}, [evmTokensWithBalances, mvxTokensWithBalances]);
|
|
92
|
+
const chainsMap = require$$0.useMemo(() => {
|
|
93
|
+
return (chains ?? []).reduce(
|
|
94
|
+
(acc, chain) => {
|
|
95
|
+
acc[chain.chainId.toString()] = chain;
|
|
96
|
+
return acc;
|
|
97
|
+
},
|
|
98
|
+
{}
|
|
99
|
+
);
|
|
100
|
+
}, [chains]);
|
|
101
|
+
const className = reactjs_utils_mxClsx.mxClsx(
|
|
102
|
+
"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",
|
|
103
|
+
{
|
|
104
|
+
"!liq-disabled !liq-animate-pulse": isLoading || tokensLoading || isChainsLoading
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
if (isLoading && !transactions) {
|
|
108
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_base_MxCard_MxCard.MxCard, { className: reactjs_utils_mxClsx.mxClsx("liq-flex", className) });
|
|
109
|
+
}
|
|
110
|
+
if (isError && !transactions) {
|
|
111
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_base_MxCard_MxCard.MxCard, { className: reactjs_utils_mxClsx.mxClsx("liq-flex liq-flex-col liq-gap-1", className), children: "Something went wrong. Please try again later." });
|
|
112
|
+
}
|
|
113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactjs_components_base_MxCard_MxCard.MxCard, { className: reactjs_utils_mxClsx.mxClsx("liq-flex liq-flex-col liq-gap-1", className), children: [
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
className: "liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5",
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg", children: "History" }),
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
+
reactjs_components_base_MxButton_MxButton.MxButton,
|
|
122
|
+
{
|
|
123
|
+
btnSize: "md",
|
|
124
|
+
className: "liq-border-none !liq-p-0 !liq-mr-2",
|
|
125
|
+
variant: "link-neutral-500",
|
|
126
|
+
onClick: onClose,
|
|
127
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: faClose.faClose, size: "xl" })
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll", children: [
|
|
134
|
+
(transactions == null ? void 0 : transactions.length) === 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
135
|
+
reactjs_components_base_MxCard_MxCard.MxCard,
|
|
136
|
+
{
|
|
137
|
+
cardSize: "lg",
|
|
138
|
+
variant: "transparent",
|
|
139
|
+
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",
|
|
140
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8", children: [
|
|
141
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
+
reactFontawesome.FontAwesomeIcon,
|
|
143
|
+
{
|
|
144
|
+
icon: faClock.faClock,
|
|
145
|
+
size: "6x",
|
|
146
|
+
className: "liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]"
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: reactjs_utils_mxClsx.mxClsx("liq-flex liq-flex-col liq-items-center"), children: [
|
|
150
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-text-xl", children: "No deposit yet" }),
|
|
151
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-text-neutral-400", children: "Your deposit history will appear here" })
|
|
152
|
+
] })
|
|
153
|
+
] })
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
transactions && (transactions == null ? void 0 : transactions.length) > 0 && transactions.map((transaction, index) => {
|
|
157
|
+
var _a, _b, _c, _d, _e, _f;
|
|
158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
159
|
+
reactjs_components_base_MxCard_MxCard.MxCard,
|
|
160
|
+
{
|
|
161
|
+
cardSize: "lg",
|
|
162
|
+
variant: "neutral-750",
|
|
163
|
+
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",
|
|
164
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-align-center liq-flex liq-justify-between liq-gap-1", children: [
|
|
165
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
className: reactjs_utils_mxClsx.mxClsx("liq-flex liq-items-center liq-gap-1", {
|
|
169
|
+
"liq-text-yellow-200": transaction.status === "pending",
|
|
170
|
+
"liq-text-green-200": transaction.status === "success",
|
|
171
|
+
"liq-text-red-200": transaction.status === "failed"
|
|
172
|
+
}),
|
|
173
|
+
children: [
|
|
174
|
+
transaction.statusIcon,
|
|
175
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: constants_index.MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? "Deposit" : "Transfer" }),
|
|
176
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
177
|
+
"img",
|
|
178
|
+
{
|
|
179
|
+
src: constants_index.MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? (_a = tokensMap[transaction.tokenDestination]) == null ? void 0 : _a.svgUrl : (_b = tokensMap[transaction.tokenSource]) == null ? void 0 : _b.svgUrl,
|
|
180
|
+
alt: "",
|
|
181
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem]"
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-whitespace-nowrap liq-overflow-hidden liq-text-ellipsis", children: reactjs_utils_formatAmount.formatAmount({
|
|
185
|
+
decimals: constants_index.MVX_CHAIN_IDS.includes(
|
|
186
|
+
Number(transaction.toChainId)
|
|
187
|
+
) ? (_c = tokensMap[transaction.tokenSource]) == null ? void 0 : _c.decimals : (_d = tokensMap[transaction.tokenDestination]) == null ? void 0 : _d.decimals,
|
|
188
|
+
amount: transaction.amountIn,
|
|
189
|
+
addCommas: false,
|
|
190
|
+
digits: 2
|
|
191
|
+
}) }),
|
|
192
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-whitespace-nowrap", children: (_e = tokensMap[transaction.tokenSource]) == null ? void 0 : _e.symbol }),
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: constants_index.MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? "from" : "to" }),
|
|
194
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
195
|
+
"img",
|
|
196
|
+
{
|
|
197
|
+
src: ((_f = chainsMap[constants_index.MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? transaction.fromChainId.toString() : transaction.toChainId.toString()]) == null ? void 0 : _f.svgUrl) ?? "",
|
|
198
|
+
alt: "",
|
|
199
|
+
className: "liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-p-1"
|
|
200
|
+
}
|
|
201
|
+
)
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
206
|
+
reactjs_components_base_MxLink_MxLink.MxLink,
|
|
207
|
+
{
|
|
208
|
+
to: `${options.bridgeURL}/status/${transaction.txHash}`,
|
|
209
|
+
target: "_blank",
|
|
210
|
+
showExternalIcon: false,
|
|
211
|
+
className: "liq-flex",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-sm:liq-hidden", children: "View" }),
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
215
|
+
"img",
|
|
216
|
+
{
|
|
217
|
+
src: ArrowUpRight,
|
|
218
|
+
alt: "",
|
|
219
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200"
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
) })
|
|
225
|
+
] })
|
|
226
|
+
},
|
|
227
|
+
`${transaction.txHash}-${index}`
|
|
228
|
+
);
|
|
229
|
+
})
|
|
230
|
+
] })
|
|
231
|
+
] });
|
|
232
|
+
};
|
|
233
|
+
exports.BridgeHistory = BridgeHistory;
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { faCircleCheck } from "@fortawesome/free-solid-svg-icons/faCircleCheck";
|
|
3
|
+
import { faCircleXmark } from "@fortawesome/free-solid-svg-icons/faCircleXmark";
|
|
4
|
+
import { faClock } from "@fortawesome/free-solid-svg-icons/faClock";
|
|
5
|
+
import { faClose } from "@fortawesome/free-solid-svg-icons/faClose";
|
|
6
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { useCallback, useMemo } from "react";
|
|
8
|
+
import { MVX_CHAIN_IDS } from "../../../constants/index.mjs";
|
|
9
|
+
import { useWeb3App } from "../../context/useWeb3App.mjs";
|
|
10
|
+
import { useFetchBridgeData } from "../../hooks/useFetchBridgeData.mjs";
|
|
11
|
+
import { useGetHistoryQuery } from "../../queries/useGetHistory.query.mjs";
|
|
12
|
+
import { formatAmount } from "../../utils/formatAmount.mjs";
|
|
13
|
+
import { mxClsx } from "../../utils/mxClsx.mjs";
|
|
14
|
+
import { MxButton } from "../base/MxButton/MxButton.mjs";
|
|
15
|
+
import { MxCard } from "../base/MxCard/MxCard.mjs";
|
|
16
|
+
import { MxLink } from "../base/MxLink/MxLink.mjs";
|
|
17
|
+
const ArrowUpRight = "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";
|
|
18
|
+
const BridgeHistory = ({
|
|
19
|
+
mvxAddress,
|
|
20
|
+
onClose
|
|
21
|
+
}) => {
|
|
22
|
+
const { options } = useWeb3App();
|
|
23
|
+
const { data, isLoading, isError } = useGetHistoryQuery();
|
|
24
|
+
const resolveTransactionIcon = useCallback((transaction) => {
|
|
25
|
+
switch (transaction.status) {
|
|
26
|
+
case "success":
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
FontAwesomeIcon,
|
|
29
|
+
{
|
|
30
|
+
icon: faCircleCheck,
|
|
31
|
+
size: "lg",
|
|
32
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400"
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
case "failed":
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
FontAwesomeIcon,
|
|
38
|
+
{
|
|
39
|
+
icon: faCircleXmark,
|
|
40
|
+
size: "lg",
|
|
41
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400"
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
default:
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
FontAwesomeIcon,
|
|
47
|
+
{
|
|
48
|
+
icon: faClock,
|
|
49
|
+
size: "lg",
|
|
50
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400"
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}, []);
|
|
55
|
+
const transactions = useMemo(
|
|
56
|
+
() => data == null ? void 0 : data.map((transaction) => {
|
|
57
|
+
return {
|
|
58
|
+
...transaction,
|
|
59
|
+
tokenDestination: transaction.tokenOut.toLowerCase(),
|
|
60
|
+
tokenSource: transaction.tokenIn.toLowerCase(),
|
|
61
|
+
sender: transaction.sender.toLowerCase(),
|
|
62
|
+
statusIcon: resolveTransactionIcon(transaction)
|
|
63
|
+
};
|
|
64
|
+
}),
|
|
65
|
+
[data, resolveTransactionIcon]
|
|
66
|
+
);
|
|
67
|
+
const {
|
|
68
|
+
evmTokensWithBalances,
|
|
69
|
+
mvxTokensWithBalances,
|
|
70
|
+
chains,
|
|
71
|
+
isTokensLoading: tokensLoading,
|
|
72
|
+
isChainsLoading
|
|
73
|
+
} = useFetchBridgeData({
|
|
74
|
+
mvxAddress,
|
|
75
|
+
mvxApiURL: options.mvxApiURL
|
|
76
|
+
});
|
|
77
|
+
const tokensMap = useMemo(() => {
|
|
78
|
+
return [
|
|
79
|
+
...evmTokensWithBalances ?? [],
|
|
80
|
+
...mvxTokensWithBalances ?? []
|
|
81
|
+
].reduce(
|
|
82
|
+
(acc, token) => {
|
|
83
|
+
acc[token.address.toLowerCase()] = token;
|
|
84
|
+
return acc;
|
|
85
|
+
},
|
|
86
|
+
{}
|
|
87
|
+
);
|
|
88
|
+
}, [evmTokensWithBalances, mvxTokensWithBalances]);
|
|
89
|
+
const chainsMap = useMemo(() => {
|
|
90
|
+
return (chains ?? []).reduce(
|
|
91
|
+
(acc, chain) => {
|
|
92
|
+
acc[chain.chainId.toString()] = chain;
|
|
93
|
+
return acc;
|
|
94
|
+
},
|
|
95
|
+
{}
|
|
96
|
+
);
|
|
97
|
+
}, [chains]);
|
|
98
|
+
const className = mxClsx(
|
|
99
|
+
"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",
|
|
100
|
+
{
|
|
101
|
+
"!liq-disabled !liq-animate-pulse": isLoading || tokensLoading || isChainsLoading
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
if (isLoading && !transactions) {
|
|
105
|
+
return /* @__PURE__ */ jsx(MxCard, { className: mxClsx("liq-flex", className) });
|
|
106
|
+
}
|
|
107
|
+
if (isError && !transactions) {
|
|
108
|
+
return /* @__PURE__ */ jsx(MxCard, { className: mxClsx("liq-flex liq-flex-col liq-gap-1", className), children: "Something went wrong. Please try again later." });
|
|
109
|
+
}
|
|
110
|
+
return /* @__PURE__ */ jsxs(MxCard, { className: mxClsx("liq-flex liq-flex-col liq-gap-1", className), children: [
|
|
111
|
+
/* @__PURE__ */ jsxs(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: "liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5",
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsx("div", { className: "liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg", children: "History" }),
|
|
117
|
+
/* @__PURE__ */ jsx(
|
|
118
|
+
MxButton,
|
|
119
|
+
{
|
|
120
|
+
btnSize: "md",
|
|
121
|
+
className: "liq-border-none !liq-p-0 !liq-mr-2",
|
|
122
|
+
variant: "link-neutral-500",
|
|
123
|
+
onClick: onClose,
|
|
124
|
+
children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faClose, size: "xl" })
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ jsxs("div", { className: "scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll", children: [
|
|
131
|
+
(transactions == null ? void 0 : transactions.length) === 0 && /* @__PURE__ */ jsx(
|
|
132
|
+
MxCard,
|
|
133
|
+
{
|
|
134
|
+
cardSize: "lg",
|
|
135
|
+
variant: "transparent",
|
|
136
|
+
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",
|
|
137
|
+
children: /* @__PURE__ */ jsxs("div", { className: "liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8", children: [
|
|
138
|
+
/* @__PURE__ */ jsx("div", { className: "liq-flex liq-items-center liq-justify-center", children: /* @__PURE__ */ jsx(
|
|
139
|
+
FontAwesomeIcon,
|
|
140
|
+
{
|
|
141
|
+
icon: faClock,
|
|
142
|
+
size: "6x",
|
|
143
|
+
className: "liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]"
|
|
144
|
+
}
|
|
145
|
+
) }),
|
|
146
|
+
/* @__PURE__ */ jsxs("div", { className: mxClsx("liq-flex liq-flex-col liq-items-center"), children: [
|
|
147
|
+
/* @__PURE__ */ jsx("div", { className: "liq-text-xl", children: "No deposit yet" }),
|
|
148
|
+
/* @__PURE__ */ jsx("div", { className: "liq-text-neutral-400", children: "Your deposit history will appear here" })
|
|
149
|
+
] })
|
|
150
|
+
] })
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
transactions && (transactions == null ? void 0 : transactions.length) > 0 && transactions.map((transaction, index) => {
|
|
154
|
+
var _a, _b, _c, _d, _e, _f;
|
|
155
|
+
return /* @__PURE__ */ jsx(
|
|
156
|
+
MxCard,
|
|
157
|
+
{
|
|
158
|
+
cardSize: "lg",
|
|
159
|
+
variant: "neutral-750",
|
|
160
|
+
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",
|
|
161
|
+
children: /* @__PURE__ */ jsxs("div", { className: "liq-align-center liq-flex liq-justify-between liq-gap-1", children: [
|
|
162
|
+
/* @__PURE__ */ jsxs(
|
|
163
|
+
"div",
|
|
164
|
+
{
|
|
165
|
+
className: mxClsx("liq-flex liq-items-center liq-gap-1", {
|
|
166
|
+
"liq-text-yellow-200": transaction.status === "pending",
|
|
167
|
+
"liq-text-green-200": transaction.status === "success",
|
|
168
|
+
"liq-text-red-200": transaction.status === "failed"
|
|
169
|
+
}),
|
|
170
|
+
children: [
|
|
171
|
+
transaction.statusIcon,
|
|
172
|
+
/* @__PURE__ */ jsx("span", { children: MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? "Deposit" : "Transfer" }),
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
"img",
|
|
175
|
+
{
|
|
176
|
+
src: MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? (_a = tokensMap[transaction.tokenDestination]) == null ? void 0 : _a.svgUrl : (_b = tokensMap[transaction.tokenSource]) == null ? void 0 : _b.svgUrl,
|
|
177
|
+
alt: "",
|
|
178
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem]"
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ jsx("span", { className: "liq-whitespace-nowrap liq-overflow-hidden liq-text-ellipsis", children: formatAmount({
|
|
182
|
+
decimals: MVX_CHAIN_IDS.includes(
|
|
183
|
+
Number(transaction.toChainId)
|
|
184
|
+
) ? (_c = tokensMap[transaction.tokenSource]) == null ? void 0 : _c.decimals : (_d = tokensMap[transaction.tokenDestination]) == null ? void 0 : _d.decimals,
|
|
185
|
+
amount: transaction.amountIn,
|
|
186
|
+
addCommas: false,
|
|
187
|
+
digits: 2
|
|
188
|
+
}) }),
|
|
189
|
+
/* @__PURE__ */ jsx("span", { className: "liq-whitespace-nowrap", children: (_e = tokensMap[transaction.tokenSource]) == null ? void 0 : _e.symbol }),
|
|
190
|
+
/* @__PURE__ */ jsx("span", { children: MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? "from" : "to" }),
|
|
191
|
+
/* @__PURE__ */ jsx(
|
|
192
|
+
"img",
|
|
193
|
+
{
|
|
194
|
+
src: ((_f = chainsMap[MVX_CHAIN_IDS.includes(Number(transaction.toChainId)) ? transaction.fromChainId.toString() : transaction.toChainId.toString()]) == null ? void 0 : _f.svgUrl) ?? "",
|
|
195
|
+
alt: "",
|
|
196
|
+
className: "liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-p-1"
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ jsx("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsxs(
|
|
203
|
+
MxLink,
|
|
204
|
+
{
|
|
205
|
+
to: `${options.bridgeURL}/status/${transaction.txHash}`,
|
|
206
|
+
target: "_blank",
|
|
207
|
+
showExternalIcon: false,
|
|
208
|
+
className: "liq-flex",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ jsx("div", { className: "max-sm:liq-hidden", children: "View" }),
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
"img",
|
|
213
|
+
{
|
|
214
|
+
src: ArrowUpRight,
|
|
215
|
+
alt: "",
|
|
216
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200"
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
]
|
|
220
|
+
}
|
|
221
|
+
) })
|
|
222
|
+
] })
|
|
223
|
+
},
|
|
224
|
+
`${transaction.txHash}-${index}`
|
|
225
|
+
);
|
|
226
|
+
})
|
|
227
|
+
] })
|
|
228
|
+
] });
|
|
229
|
+
};
|
|
230
|
+
export {
|
|
231
|
+
BridgeHistory
|
|
232
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BridgeHistory';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const reactjs_components_BridgeHistory_BridgeHistory = require("./BridgeHistory.js");
|
|
5
|
+
exports.BridgeHistory = reactjs_components_BridgeHistory_BridgeHistory.BridgeHistory;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
+
const faPowerOff = require("@fortawesome/free-solid-svg-icons/faPowerOff");
|
|
6
|
+
const reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
7
|
+
require("../../../index-cvy2-uZ_.js");
|
|
8
|
+
const react = require("../../../react-CNXJSTCv.js");
|
|
9
|
+
require("viem");
|
|
10
|
+
require("viem/chains");
|
|
11
|
+
require("react");
|
|
12
|
+
const reactjs_components_Connect_SwitchChainButton = require("./SwitchChainButton.js");
|
|
13
|
+
const reactjs_hooks_useAccount = require("../../hooks/useAccount.js");
|
|
14
|
+
require("tailwind-merge");
|
|
15
|
+
require("../base/MxCard/MxCard.js");
|
|
16
|
+
const reactjs_components_base_MxLink_MxLink = require("../base/MxLink/MxLink.js");
|
|
17
|
+
require("../base/MxSearch/MxSearch.js");
|
|
18
|
+
require("@fortawesome/free-solid-svg-icons/faClose");
|
|
19
|
+
require("@headlessui/react");
|
|
20
|
+
require("react-dom");
|
|
21
|
+
require("react-popper");
|
|
22
|
+
require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");
|
|
23
|
+
const reactjs_components_CopyButton_CopyButton = require("../CopyButton/CopyButton.js");
|
|
24
|
+
const reactjs_components_TrimAddress_TrimAddress = require("../TrimAddress/TrimAddress.js");
|
|
25
|
+
const BridgeAccountDisplay = ({
|
|
26
|
+
activeChain,
|
|
27
|
+
disabled
|
|
28
|
+
}) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const account = reactjs_hooks_useAccount.useAccount();
|
|
31
|
+
const { disconnect } = react.useDisconnect();
|
|
32
|
+
const handleDisconnect = async (e) => {
|
|
33
|
+
try {
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
await disconnect();
|
|
36
|
+
} catch (error) {
|
|
37
|
+
console.error("Failed to disconnect:", error);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
41
|
+
account.address && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: activeChain == null ? void 0 : activeChain.svgUrl, alt: "", className: "liq-w-6" }),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-truncate liq-text-gray-400", children: activeChain == null ? void 0 : activeChain.networkName }),
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-ml-[-5px]", children: ":" }),
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center liq-justify-between", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1", children: [
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
reactjs_components_base_MxLink_MxLink.MxLink,
|
|
48
|
+
{
|
|
49
|
+
to: `${(_a = activeChain == null ? void 0 : activeChain.blockExplorerUrls) == null ? void 0 : _a[0]}/address/${account.address}`,
|
|
50
|
+
target: "_blank",
|
|
51
|
+
showExternalIcon: false,
|
|
52
|
+
className: "!liq-relative",
|
|
53
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]", children: /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_TrimAddress_TrimAddress.TrimAddress, { address: account.address }) })
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactjs_components_CopyButton_CopyButton.CopyButton, { text: account.address, className: "liq-text-sm" })
|
|
57
|
+
] }) }),
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
+
"button",
|
|
60
|
+
{
|
|
61
|
+
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",
|
|
62
|
+
onClick: handleDisconnect,
|
|
63
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: faPowerOff.faPowerOff })
|
|
64
|
+
}
|
|
65
|
+
) })
|
|
66
|
+
] }),
|
|
67
|
+
!account.address && /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
+
reactjs_components_Connect_SwitchChainButton.SwitchChainButton,
|
|
69
|
+
{
|
|
70
|
+
disabled,
|
|
71
|
+
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",
|
|
72
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-justify-center liq-gap-2", children: [
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
74
|
+
" ",
|
|
75
|
+
account.isConnecting ? "Connecting..." : "Connect",
|
|
76
|
+
" "
|
|
77
|
+
] }),
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: activeChain == null ? void 0 : activeChain.svgUrl, alt: "", className: "liq-w-4" }),
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-truncate md:liq-text-clip", children: activeChain == null ? void 0 : activeChain.networkName })
|
|
80
|
+
] }) })
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] });
|
|
84
|
+
};
|
|
85
|
+
exports.BridgeAccountDisplay = BridgeAccountDisplay;
|