@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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const e=require("./constants/index.js"),t=require("./helpers/safeImageUrl.js"),n=require("./reactjs/utils/mxClsx.js"),r=require("./reactjs/components/base/MxButton/MxButton.js");require("./reactjs/components/base/MxButton/index.js");const i=require("./reactjs/components/base/MxCard/MxCard.js");require("./reactjs/components/base/MxCard/index.js");const a=require("./reactjs/components/base/MxTooltip/MxTooltip.js");require("./reactjs/components/base/index.js");const o=require("./reactjs/context/useWeb3App.js"),s=require("./reactjs/hooks/useAccount.js"),c=require("./types/providerType.js"),l=require("./useFetchBridgeData-B5xt9GbW.js"),u=require("./reactjs/queries/useGetHistory.query.js"),d=require("./reactjs/utils/formatAmount.js");let f=require("react/jsx-runtime"),p=require("react"),m=require("@fortawesome/react-fontawesome"),h=require("@fortawesome/free-solid-svg-icons/faClose"),g=require("@fortawesome/free-solid-svg-icons/faArrowDownShortWide"),_=require("@fortawesome/free-solid-svg-icons/faArrowUpShortWide"),v=require("@fortawesome/free-solid-svg-icons/faCircleCheck"),y=require("@fortawesome/free-solid-svg-icons/faCircleXmark"),b=require("@fortawesome/free-solid-svg-icons/faClock");var x=({mvxAddress:x,onClose:S})=>{let{options:C,bridgeOnly:w}=o.useWeb3App(),T=s.useAccount(),{data:E,isLoading:D,isError:O}=u.useGetHistoryQuery({address:x}),{data:k}=u.useGetHistoryQuery({address:T.address??``}),A=(0,p.useMemo)(()=>{let e=E??[],t=w&&k?k:[];return[...e,...t].sort((e,t)=>t.depositTimestamp-e.depositTimestamp)},[w,k,E]),j=(0,p.useCallback)(e=>{switch(e.status){case`success`:return(0,f.jsx)(m.FontAwesomeIcon,{icon:v.faCircleCheck,size:`lg`,className:`liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400`});case`failed`:return(0,f.jsx)(m.FontAwesomeIcon,{icon:y.faCircleXmark,size:`lg`,className:`liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400`});default:return(0,f.jsx)(m.FontAwesomeIcon,{icon:b.faClock,size:`lg`,className:`liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400`})}},[]),M=(0,p.useMemo)(()=>A?.map(e=>({...e,tokenDestination:e.tokenOut.toLowerCase(),tokenSource:e.tokenIn.toLowerCase(),sender:e.sender.toLowerCase(),statusIcon:j(e)})),[A,j]),{evmTokensWithBalances:N,mvxTokensWithBalances:P,chains:F,isTokensLoading:I,isChainsLoading:L}=l.t({mvxAddress:x,mvxApiURL:C.mvxApiURL}),R=(0,p.useMemo)(()=>[...N??[],...P??[]].reduce((e,t)=>(e[t.address.toLowerCase()]=t,e),{}),[N,P]),z=(0,p.useMemo)(()=>(F??[]).reduce((e,t)=>(e[t.chainId.toString()]=t,e),{}),[F]),B=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":D||I||L});return D&&!M?(0,f.jsx)(i.MxCard,{className:n.mxClsx(`liq-flex`,B)}):O&&!M?(0,f.jsx)(i.MxCard,{className:n.mxClsx(`liq-flex liq-flex-col liq-gap-1`,B),children:`Something went wrong. Please try again later.`}):(0,f.jsxs)(i.MxCard,{className:n.mxClsx(`liq-flex liq-flex-col liq-gap-1`,B),children:[(0,f.jsxs)(`div`,{className:`liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5`,children:[(0,f.jsx)(`div`,{className:`liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg`,children:`History`}),(0,f.jsx)(r.MxButton,{btnSize:`md`,className:`liq-border-none !liq-p-0 !liq-mr-2`,variant:`link-neutral-500`,onClick:S,children:(0,f.jsx)(m.FontAwesomeIcon,{icon:h.faClose,size:`xl`})})]}),(0,f.jsxs)(`div`,{className:`scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll`,children:[M?.length===0&&(0,f.jsx)(i.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:(0,f.jsxs)(`div`,{className:`liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8`,children:[(0,f.jsx)(`div`,{className:`liq-flex liq-items-center liq-justify-center`,children:(0,f.jsx)(m.FontAwesomeIcon,{icon:b.faClock,size:`6x`,className:`liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]`})}),(0,f.jsxs)(`div`,{className:n.mxClsx(`liq-flex liq-flex-col liq-items-center`),children:[(0,f.jsx)(`div`,{className:`liq-text-xl`,children:`No transactions`}),(0,f.jsx)(`div`,{className:`liq-text-neutral-400`,children:`Your transactions history will appear here`})]})]})}),M&&M?.length>0&&M.map((r,o)=>(0,f.jsx)(i.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:(0,f.jsxs)(`div`,{className:`liq-align-center liq-flex liq-justify-between liq-gap-1`,children:[(0,f.jsxs)(`div`,{className:n.mxClsx(`liq-flex liq-items-center liq-gap-1`,{"liq-text-yellow-200":r.status===`pending`,"liq-text-green-200":r.status===`success`,"liq-text-red-200":r.status===`failed`}),children:[(0,f.jsx)(a.MxTooltip,{placement:`top`,buttonText:r.statusIcon,children:new Date(r.depositTimestamp*1e3).toLocaleString()}),e.MVX_CHAIN_IDS.includes(r.toChainId)?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.MxTooltip,{placement:`top`,buttonText:(0,f.jsx)(m.FontAwesomeIcon,{icon:g.faArrowDownShortWide,className:`liq-mx-1 liq-flex liq-items-center`}),children:`Deposit`}),(0,f.jsx)(`span`,{className:`liq-text-wrap`,children:d.formatAmount({decimals:R[r.tokenDestination]?.decimals,amount:r.amountOut,addCommas:!1,digits:2})}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:R[r.tokenDestination]?.symbol}),(0,f.jsx)(`img`,{src:t.safeImageUrl(R[r.tokenDestination]?.pngUrl),alt:``,className:`liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg`}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:`from`}),(0,f.jsx)(`span`,{className:`liq-text-wrap`,children:d.formatAmount({decimals:R[r.tokenSource]?.decimals,amount:r.amountIn,addCommas:!1,digits:2})}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:R[r.tokenSource]?.symbol}),(0,f.jsxs)(`div`,{className:`liq-flex liq-items-center liq-relative`,children:[(0,f.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:(0,f.jsx)(`div`,{className:`liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center`,children:(0,f.jsx)(`img`,{src:t.safeImageUrl(R[r.tokenSource]?.pngUrl),alt:``,className:`liq-asset-icon liq-sm liq-p-0`})})}),(0,f.jsx)(`img`,{src:t.safeImageUrl(z[r.fromChainId]?.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`})]})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.MxTooltip,{placement:`top`,buttonText:(0,f.jsx)(m.FontAwesomeIcon,{icon:_.faArrowUpShortWide,className:`liq-mx-1 liq-flex liq-items-center`}),children:`Transfer`}),(0,f.jsx)(`span`,{className:`liq-text-wrap`,children:d.formatAmount({decimals:R[r.tokenSource]?.decimals,amount:r.amountIn,addCommas:!1,digits:2})}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:R[r.tokenSource]?.symbol}),(0,f.jsx)(`img`,{src:t.safeImageUrl(R[r.tokenSource]?.pngUrl),alt:``,className:`liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg`}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:`to`}),(0,f.jsx)(`span`,{className:`liq-text-wrap`,children:d.formatAmount({decimals:R[r.tokenDestination]?.decimals,amount:r.amountOut,addCommas:!1,digits:2})}),(0,f.jsx)(`span`,{className:`liq-whitespace-nowrap`,children:R[r.tokenDestination]?.symbol}),(0,f.jsxs)(`div`,{className:`liq-flex liq-items-center liq-relative`,children:[(0,f.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:(0,f.jsx)(`div`,{className:`liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center`,children:(0,f.jsx)(`img`,{src:t.safeImageUrl(R[r.tokenDestination]?.pngUrl),alt:``,className:`liq-asset-icon liq-sm liq-p-0`})})}),(0,f.jsx)(`img`,{src:t.safeImageUrl(z[r.toChainId]?.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`})]})]})]}),r.provider===c.ProviderType.MultiversxBridge&&(0,f.jsx)(`a`,{href:`${C.bridgeURL}/status/${r.txHash}`,target:`_blank`,rel:`noopener noreferrer`,className:`liq-flex`,children:(0,f.jsx)(`div`,{className:`liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1`,children:(0,f.jsx)(a.MxTooltip,{placement:`top`,buttonText:(0,f.jsx)(`img`,{src:`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`,alt:``,className:`liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200`}),shouldStopPropagation:!1,children:`View`})})})]})},`${r.txHash}-${o}`))]})]})};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return x}});
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { MVX_CHAIN_IDS as e } from "./constants/index.mjs";
|
|
2
|
+
import { safeImageUrl as t } from "./helpers/safeImageUrl.mjs";
|
|
3
|
+
import { mxClsx as n } from "./reactjs/utils/mxClsx.mjs";
|
|
4
|
+
import { MxButton as r } from "./reactjs/components/base/MxButton/MxButton.mjs";
|
|
5
|
+
import "./reactjs/components/base/MxButton/index.mjs";
|
|
6
|
+
import { MxCard as i } from "./reactjs/components/base/MxCard/MxCard.mjs";
|
|
7
|
+
import "./reactjs/components/base/MxCard/index.mjs";
|
|
8
|
+
import { MxTooltip as a } from "./reactjs/components/base/MxTooltip/MxTooltip.mjs";
|
|
9
|
+
import "./reactjs/components/base/index.mjs";
|
|
10
|
+
import { useWeb3App as o } from "./reactjs/context/useWeb3App.mjs";
|
|
11
|
+
import { useAccount as s } from "./reactjs/hooks/useAccount.mjs";
|
|
12
|
+
import { ProviderType as c } from "./types/providerType.mjs";
|
|
13
|
+
import { t as l } from "./useFetchBridgeData-C_hZjzd_.mjs";
|
|
14
|
+
import { useGetHistoryQuery as u } from "./reactjs/queries/useGetHistory.query.mjs";
|
|
15
|
+
import { formatAmount as d } from "./reactjs/utils/formatAmount.mjs";
|
|
16
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
17
|
+
import { useCallback as h, useMemo as g } from "react";
|
|
18
|
+
import { FontAwesomeIcon as _ } from "@fortawesome/react-fontawesome";
|
|
19
|
+
import { faClose as v } from "@fortawesome/free-solid-svg-icons/faClose";
|
|
20
|
+
import { faArrowDownShortWide as y } from "@fortawesome/free-solid-svg-icons/faArrowDownShortWide";
|
|
21
|
+
import { faArrowUpShortWide as b } from "@fortawesome/free-solid-svg-icons/faArrowUpShortWide";
|
|
22
|
+
import { faCircleCheck as x } from "@fortawesome/free-solid-svg-icons/faCircleCheck";
|
|
23
|
+
import { faCircleXmark as S } from "@fortawesome/free-solid-svg-icons/faCircleXmark";
|
|
24
|
+
import { faClock as C } from "@fortawesome/free-solid-svg-icons/faClock";
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/reactjs/components/BridgeHistory/BridgeHistory.tsx
|
|
27
|
+
var w = ({ mvxAddress: w, onClose: T }) => {
|
|
28
|
+
let { options: E, bridgeOnly: D } = o(), O = s(), { data: k, isLoading: A, isError: j } = u({ address: w }), { data: M } = u({ address: O.address ?? "" }), N = g(() => {
|
|
29
|
+
let e = k ?? [], t = D && M ? M : [];
|
|
30
|
+
return [...e, ...t].sort((e, t) => t.depositTimestamp - e.depositTimestamp);
|
|
31
|
+
}, [
|
|
32
|
+
D,
|
|
33
|
+
M,
|
|
34
|
+
k
|
|
35
|
+
]), P = h((e) => {
|
|
36
|
+
switch (e.status) {
|
|
37
|
+
case "success": return /* @__PURE__ */ p(_, {
|
|
38
|
+
icon: x,
|
|
39
|
+
size: "lg",
|
|
40
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-green-400"
|
|
41
|
+
});
|
|
42
|
+
case "failed": return /* @__PURE__ */ p(_, {
|
|
43
|
+
icon: S,
|
|
44
|
+
size: "lg",
|
|
45
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-red-400"
|
|
46
|
+
});
|
|
47
|
+
default: return /* @__PURE__ */ p(_, {
|
|
48
|
+
icon: C,
|
|
49
|
+
size: "lg",
|
|
50
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-yellow-400"
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, []), F = g(() => N?.map((e) => ({
|
|
54
|
+
...e,
|
|
55
|
+
tokenDestination: e.tokenOut.toLowerCase(),
|
|
56
|
+
tokenSource: e.tokenIn.toLowerCase(),
|
|
57
|
+
sender: e.sender.toLowerCase(),
|
|
58
|
+
statusIcon: P(e)
|
|
59
|
+
})), [N, P]), { evmTokensWithBalances: I, mvxTokensWithBalances: L, chains: R, isTokensLoading: z, isChainsLoading: B } = l({
|
|
60
|
+
mvxAddress: w,
|
|
61
|
+
mvxApiURL: E.mvxApiURL
|
|
62
|
+
}), V = g(() => [...I ?? [], ...L ?? []].reduce((e, t) => (e[t.address.toLowerCase()] = t, e), {}), [I, L]), H = g(() => (R ?? []).reduce((e, t) => (e[t.chainId.toString()] = t, e), {}), [R]), U = n("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": A || z || B });
|
|
63
|
+
return A && !F ? /* @__PURE__ */ p(i, { className: n("liq-flex", U) }) : j && !F ? /* @__PURE__ */ p(i, {
|
|
64
|
+
className: n("liq-flex liq-flex-col liq-gap-1", U),
|
|
65
|
+
children: "Something went wrong. Please try again later."
|
|
66
|
+
}) : /* @__PURE__ */ m(i, {
|
|
67
|
+
className: n("liq-flex liq-flex-col liq-gap-1", U),
|
|
68
|
+
children: [/* @__PURE__ */ m("div", {
|
|
69
|
+
className: "liq-flex liq-items-center liq-justify-between liq-py-1 liq-mt-0.5",
|
|
70
|
+
children: [/* @__PURE__ */ p("div", {
|
|
71
|
+
className: "liq-flex liq-flex-1 liq-items-center liq-justify-center liq-text-center liq-text-lg",
|
|
72
|
+
children: "History"
|
|
73
|
+
}), /* @__PURE__ */ p(r, {
|
|
74
|
+
btnSize: "md",
|
|
75
|
+
className: "liq-border-none !liq-p-0 !liq-mr-2",
|
|
76
|
+
variant: "link-neutral-500",
|
|
77
|
+
onClick: T,
|
|
78
|
+
children: /* @__PURE__ */ p(_, {
|
|
79
|
+
icon: v,
|
|
80
|
+
size: "xl"
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
}), /* @__PURE__ */ m("div", {
|
|
84
|
+
className: "scrollbar-thin liq-flex liq-flex-1 liq-flex-col liq-gap-1 liq-overflow-y-scroll",
|
|
85
|
+
children: [F?.length === 0 && /* @__PURE__ */ p(i, {
|
|
86
|
+
cardSize: "lg",
|
|
87
|
+
variant: "transparent",
|
|
88
|
+
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",
|
|
89
|
+
children: /* @__PURE__ */ m("div", {
|
|
90
|
+
className: "liq-align-center liq-flex liq-flex-col liq-justify-center liq-gap-8",
|
|
91
|
+
children: [/* @__PURE__ */ p("div", {
|
|
92
|
+
className: "liq-flex liq-items-center liq-justify-center",
|
|
93
|
+
children: /* @__PURE__ */ p(_, {
|
|
94
|
+
icon: C,
|
|
95
|
+
size: "6x",
|
|
96
|
+
className: "liq-rounded-full liq-bg-primary-400 liq-text-[#2b617a]"
|
|
97
|
+
})
|
|
98
|
+
}), /* @__PURE__ */ m("div", {
|
|
99
|
+
className: n("liq-flex liq-flex-col liq-items-center"),
|
|
100
|
+
children: [/* @__PURE__ */ p("div", {
|
|
101
|
+
className: "liq-text-xl",
|
|
102
|
+
children: "No transactions"
|
|
103
|
+
}), /* @__PURE__ */ p("div", {
|
|
104
|
+
className: "liq-text-neutral-400",
|
|
105
|
+
children: "Your transactions history will appear here"
|
|
106
|
+
})]
|
|
107
|
+
})]
|
|
108
|
+
})
|
|
109
|
+
}), F && F?.length > 0 && F.map((r, o) => /* @__PURE__ */ p(i, {
|
|
110
|
+
cardSize: "lg",
|
|
111
|
+
variant: "neutral-750",
|
|
112
|
+
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",
|
|
113
|
+
children: /* @__PURE__ */ m("div", {
|
|
114
|
+
className: "liq-align-center liq-flex liq-justify-between liq-gap-1",
|
|
115
|
+
children: [/* @__PURE__ */ m("div", {
|
|
116
|
+
className: n("liq-flex liq-items-center liq-gap-1", {
|
|
117
|
+
"liq-text-yellow-200": r.status === "pending",
|
|
118
|
+
"liq-text-green-200": r.status === "success",
|
|
119
|
+
"liq-text-red-200": r.status === "failed"
|
|
120
|
+
}),
|
|
121
|
+
children: [/* @__PURE__ */ p(a, {
|
|
122
|
+
placement: "top",
|
|
123
|
+
buttonText: r.statusIcon,
|
|
124
|
+
children: (/* @__PURE__ */ new Date(r.depositTimestamp * 1e3)).toLocaleString()
|
|
125
|
+
}), e.includes(r.toChainId) ? /* @__PURE__ */ m(f, { children: [
|
|
126
|
+
/* @__PURE__ */ p(a, {
|
|
127
|
+
placement: "top",
|
|
128
|
+
buttonText: /* @__PURE__ */ p(_, {
|
|
129
|
+
icon: y,
|
|
130
|
+
className: "liq-mx-1 liq-flex liq-items-center"
|
|
131
|
+
}),
|
|
132
|
+
children: "Deposit"
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ p("span", {
|
|
135
|
+
className: "liq-text-wrap",
|
|
136
|
+
children: d({
|
|
137
|
+
decimals: V[r.tokenDestination]?.decimals,
|
|
138
|
+
amount: r.amountOut,
|
|
139
|
+
addCommas: !1,
|
|
140
|
+
digits: 2
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ p("span", {
|
|
144
|
+
className: "liq-whitespace-nowrap",
|
|
145
|
+
children: V[r.tokenDestination]?.symbol
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ p("img", {
|
|
148
|
+
src: t(V[r.tokenDestination]?.pngUrl),
|
|
149
|
+
alt: "",
|
|
150
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ p("span", {
|
|
153
|
+
className: "liq-whitespace-nowrap",
|
|
154
|
+
children: "from"
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ p("span", {
|
|
157
|
+
className: "liq-text-wrap",
|
|
158
|
+
children: d({
|
|
159
|
+
decimals: V[r.tokenSource]?.decimals,
|
|
160
|
+
amount: r.amountIn,
|
|
161
|
+
addCommas: !1,
|
|
162
|
+
digits: 2
|
|
163
|
+
})
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ p("span", {
|
|
166
|
+
className: "liq-whitespace-nowrap",
|
|
167
|
+
children: V[r.tokenSource]?.symbol
|
|
168
|
+
}),
|
|
169
|
+
/* @__PURE__ */ m("div", {
|
|
170
|
+
className: "liq-flex liq-items-center liq-relative",
|
|
171
|
+
children: [/* @__PURE__ */ p("div", {
|
|
172
|
+
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",
|
|
173
|
+
children: /* @__PURE__ */ p("div", {
|
|
174
|
+
className: "liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center",
|
|
175
|
+
children: /* @__PURE__ */ p("img", {
|
|
176
|
+
src: t(V[r.tokenSource]?.pngUrl),
|
|
177
|
+
alt: "",
|
|
178
|
+
className: "liq-asset-icon liq-sm liq-p-0"
|
|
179
|
+
})
|
|
180
|
+
})
|
|
181
|
+
}), /* @__PURE__ */ p("img", {
|
|
182
|
+
src: t(H[r.fromChainId]?.pngUrl),
|
|
183
|
+
alt: "",
|
|
184
|
+
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"
|
|
185
|
+
})]
|
|
186
|
+
})
|
|
187
|
+
] }) : /* @__PURE__ */ m(f, { children: [
|
|
188
|
+
/* @__PURE__ */ p(a, {
|
|
189
|
+
placement: "top",
|
|
190
|
+
buttonText: /* @__PURE__ */ p(_, {
|
|
191
|
+
icon: b,
|
|
192
|
+
className: "liq-mx-1 liq-flex liq-items-center"
|
|
193
|
+
}),
|
|
194
|
+
children: "Transfer"
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ p("span", {
|
|
197
|
+
className: "liq-text-wrap",
|
|
198
|
+
children: d({
|
|
199
|
+
decimals: V[r.tokenSource]?.decimals,
|
|
200
|
+
amount: r.amountIn,
|
|
201
|
+
addCommas: !1,
|
|
202
|
+
digits: 2
|
|
203
|
+
})
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ p("span", {
|
|
206
|
+
className: "liq-whitespace-nowrap",
|
|
207
|
+
children: V[r.tokenSource]?.symbol
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ p("img", {
|
|
210
|
+
src: t(V[r.tokenSource]?.pngUrl),
|
|
211
|
+
alt: "",
|
|
212
|
+
className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ p("span", {
|
|
215
|
+
className: "liq-whitespace-nowrap",
|
|
216
|
+
children: "to"
|
|
217
|
+
}),
|
|
218
|
+
/* @__PURE__ */ p("span", {
|
|
219
|
+
className: "liq-text-wrap",
|
|
220
|
+
children: d({
|
|
221
|
+
decimals: V[r.tokenDestination]?.decimals,
|
|
222
|
+
amount: r.amountOut,
|
|
223
|
+
addCommas: !1,
|
|
224
|
+
digits: 2
|
|
225
|
+
})
|
|
226
|
+
}),
|
|
227
|
+
/* @__PURE__ */ p("span", {
|
|
228
|
+
className: "liq-whitespace-nowrap",
|
|
229
|
+
children: V[r.tokenDestination]?.symbol
|
|
230
|
+
}),
|
|
231
|
+
/* @__PURE__ */ m("div", {
|
|
232
|
+
className: "liq-flex liq-items-center liq-relative",
|
|
233
|
+
children: [/* @__PURE__ */ p("div", {
|
|
234
|
+
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",
|
|
235
|
+
children: /* @__PURE__ */ p("div", {
|
|
236
|
+
className: "liq-h-6 liq-w-6 liq-flex liq-items-center liq-justify-center",
|
|
237
|
+
children: /* @__PURE__ */ p("img", {
|
|
238
|
+
src: t(V[r.tokenDestination]?.pngUrl),
|
|
239
|
+
alt: "",
|
|
240
|
+
className: "liq-asset-icon liq-sm liq-p-0"
|
|
241
|
+
})
|
|
242
|
+
})
|
|
243
|
+
}), /* @__PURE__ */ p("img", {
|
|
244
|
+
src: t(H[r.toChainId]?.pngUrl),
|
|
245
|
+
alt: "",
|
|
246
|
+
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"
|
|
247
|
+
})]
|
|
248
|
+
})
|
|
249
|
+
] })]
|
|
250
|
+
}), r.provider === c.MultiversxBridge && /* @__PURE__ */ p("a", {
|
|
251
|
+
href: `${E.bridgeURL}/status/${r.txHash}`,
|
|
252
|
+
target: "_blank",
|
|
253
|
+
rel: "noopener noreferrer",
|
|
254
|
+
className: "liq-flex",
|
|
255
|
+
children: /* @__PURE__ */ p("div", {
|
|
256
|
+
className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1",
|
|
257
|
+
children: /* @__PURE__ */ p(a, {
|
|
258
|
+
placement: "top",
|
|
259
|
+
buttonText: /* @__PURE__ */ p("img", {
|
|
260
|
+
src: "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",
|
|
261
|
+
alt: "",
|
|
262
|
+
className: "liq-flex liq-items-center liq-justify-center liq-rounded-full liq-text-neutral-200"
|
|
263
|
+
}),
|
|
264
|
+
shouldStopPropagation: !1,
|
|
265
|
+
children: "View"
|
|
266
|
+
})
|
|
267
|
+
})
|
|
268
|
+
})]
|
|
269
|
+
})
|
|
270
|
+
}, `${r.txHash}-${o}`))]
|
|
271
|
+
})]
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
//#endregion
|
|
275
|
+
export { w as t };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
//#region src/reactjs/assets/hug.svg
|
|
3
|
+
var t = "data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='23'%20height='23'%20rx='11.5'%20fill='%2314151A'/%3e%3ccircle%20cx='11.5'%20cy='7'%20r='1'%20fill='%23737373'/%3e%3ccircle%20cx='11.5'%20cy='10'%20r='1'%20fill='%23737373'/%3e%3cpath%20d='M11.4297%2016.1641L8.89844%2013.6328C8.86328%2013.5977%208.86328%2013.5391%208.89844%2013.5039C8.93359%2013.4688%208.99219%2013.4688%209.02734%2013.5039L11.5%2015.9648L13.9609%2013.5039C13.9961%2013.4688%2014.0547%2013.4688%2014.0898%2013.5039C14.125%2013.5391%2014.125%2013.5977%2014.0898%2013.6328L11.5586%2016.1641C11.5234%2016.1992%2011.4648%2016.1992%2011.4297%2016.1641Z'%20fill='%23737373'/%3e%3cpath%20d='M9.02734%2013.5039L8.67379%2013.8575L8.67463%2013.8583L9.02734%2013.5039ZM11.5%2015.9648L11.1473%2016.3192L11.5008%2016.6711L11.8536%2016.3184L11.5%2015.9648ZM11.7832%2015.8105L9.25199%2013.2793L8.54488%2013.9864L11.0761%2016.5176L11.7832%2015.8105ZM9.25199%2013.2793C9.4121%2013.4394%209.4121%2013.6974%209.25199%2013.8575L8.54488%2013.1504C8.31447%2013.3808%208.31447%2013.7559%208.54488%2013.9864L9.25199%2013.2793ZM9.25199%2013.8575C9.09189%2014.0176%208.8339%2014.0176%208.67379%2013.8575L9.3809%2013.1504C9.15048%2012.9199%208.7753%2012.9199%208.54488%2013.1504L9.25199%2013.8575ZM8.67463%2013.8583L11.1473%2016.3192L11.8527%2015.6105L9.38006%2013.1495L8.67463%2013.8583ZM11.8536%2016.3184L14.3145%2013.8575L13.6074%2013.1504L11.1464%2015.6113L11.8536%2016.3184ZM14.3145%2013.8575C14.1544%2014.0176%2013.8964%2014.0176%2013.7363%2013.8575L14.4434%2013.1504C14.213%2012.9199%2013.8378%2012.9199%2013.6074%2013.1504L14.3145%2013.8575ZM13.7363%2013.8575C13.5762%2013.6974%2013.5762%2013.4394%2013.7363%2013.2793L14.4434%2013.9864C14.6738%2013.7559%2014.6738%2013.3808%2014.4434%2013.1504L13.7363%2013.8575ZM13.7363%2013.2793L11.205%2015.8105L11.9121%2016.5176L14.4434%2013.9864L13.7363%2013.2793ZM11.205%2015.8105C11.3651%2015.6504%2011.6231%2015.6504%2011.7832%2015.8105L11.0761%2016.5176C11.3066%2016.748%2011.6817%2016.748%2011.9121%2016.5176L11.205%2015.8105Z'%20fill='%23737373'/%3e%3c/svg%3e", n = ({ onChangeDirection: n }) => /* @__PURE__ */ e("button", {
|
|
4
|
+
className: "liq-inline-block",
|
|
5
|
+
onClick: (e) => {
|
|
6
|
+
e.preventDefault(), e.stopPropagation(), n();
|
|
7
|
+
},
|
|
8
|
+
"data-testid": "toggle-button",
|
|
9
|
+
children: /* @__PURE__ */ e("img", {
|
|
10
|
+
src: t,
|
|
11
|
+
alt: "",
|
|
12
|
+
className: "liq-h-6 liq-w-6 liq-text-neutral-100 liq-mx-auto liq-my-2"
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { n as t };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
let e=require("react/jsx-runtime");var t=`data:image/svg+xml,%3csvg%20width='23'%20height='23'%20viewBox='0%200%2023%2023'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='23'%20height='23'%20rx='11.5'%20fill='%2314151A'/%3e%3ccircle%20cx='11.5'%20cy='7'%20r='1'%20fill='%23737373'/%3e%3ccircle%20cx='11.5'%20cy='10'%20r='1'%20fill='%23737373'/%3e%3cpath%20d='M11.4297%2016.1641L8.89844%2013.6328C8.86328%2013.5977%208.86328%2013.5391%208.89844%2013.5039C8.93359%2013.4688%208.99219%2013.4688%209.02734%2013.5039L11.5%2015.9648L13.9609%2013.5039C13.9961%2013.4688%2014.0547%2013.4688%2014.0898%2013.5039C14.125%2013.5391%2014.125%2013.5977%2014.0898%2013.6328L11.5586%2016.1641C11.5234%2016.1992%2011.4648%2016.1992%2011.4297%2016.1641Z'%20fill='%23737373'/%3e%3cpath%20d='M9.02734%2013.5039L8.67379%2013.8575L8.67463%2013.8583L9.02734%2013.5039ZM11.5%2015.9648L11.1473%2016.3192L11.5008%2016.6711L11.8536%2016.3184L11.5%2015.9648ZM11.7832%2015.8105L9.25199%2013.2793L8.54488%2013.9864L11.0761%2016.5176L11.7832%2015.8105ZM9.25199%2013.2793C9.4121%2013.4394%209.4121%2013.6974%209.25199%2013.8575L8.54488%2013.1504C8.31447%2013.3808%208.31447%2013.7559%208.54488%2013.9864L9.25199%2013.2793ZM9.25199%2013.8575C9.09189%2014.0176%208.8339%2014.0176%208.67379%2013.8575L9.3809%2013.1504C9.15048%2012.9199%208.7753%2012.9199%208.54488%2013.1504L9.25199%2013.8575ZM8.67463%2013.8583L11.1473%2016.3192L11.8527%2015.6105L9.38006%2013.1495L8.67463%2013.8583ZM11.8536%2016.3184L14.3145%2013.8575L13.6074%2013.1504L11.1464%2015.6113L11.8536%2016.3184ZM14.3145%2013.8575C14.1544%2014.0176%2013.8964%2014.0176%2013.7363%2013.8575L14.4434%2013.1504C14.213%2012.9199%2013.8378%2012.9199%2013.6074%2013.1504L14.3145%2013.8575ZM13.7363%2013.8575C13.5762%2013.6974%2013.5762%2013.4394%2013.7363%2013.2793L14.4434%2013.9864C14.6738%2013.7559%2014.6738%2013.3808%2014.4434%2013.1504L13.7363%2013.8575ZM13.7363%2013.2793L11.205%2015.8105L11.9121%2016.5176L14.4434%2013.9864L13.7363%2013.2793ZM11.205%2015.8105C11.3651%2015.6504%2011.6231%2015.6504%2011.7832%2015.8105L11.0761%2016.5176C11.3066%2016.748%2011.6817%2016.748%2011.9121%2016.5176L11.205%2015.8105Z'%20fill='%23737373'/%3e%3c/svg%3e`,n=({onChangeDirection:n})=>(0,e.jsx)(`button`,{className:`liq-inline-block`,onClick:e=>{e.preventDefault(),e.stopPropagation(),n()},"data-testid":`toggle-button`,children:(0,e.jsx)(`img`,{src:t,alt:``,className:`liq-h-6 liq-w-6 liq-text-neutral-100 liq-mx-auto liq-my-2`})});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var e=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e`;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/reactjs/assets/all-networks.svg
|
|
2
|
+
var e = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_800_5975)'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='%23627EEA'/%3e%3cg%20clip-path='url(%23clip1_800_5975)'%3e%3cpath%20d='M8%2016C12.4183%2016%2016%2012.4183%2016%208C16%203.58172%2012.4183%200%208%200C3.58172%200%200%203.58172%200%208C0%2012.4183%203.58172%2016%208%2016Z'%20fill='%23627EEA'/%3e%3cpath%20d='M8.24902%202V6.435L11.9975%208.11L8.24902%202Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%202L4.5%208.11L8.249%206.435V2Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.9841V13.9976L12%208.80811L8.24902%2010.9841Z'%20fill='white'%20fill-opacity='0.602'/%3e%3cpath%20d='M8.249%2013.9976V10.9836L4.5%208.80811L8.249%2013.9976Z'%20fill='white'/%3e%3cpath%20d='M8.24902%2010.2865L11.9975%208.11004L8.24902%206.43604V10.2865Z'%20fill='white'%20fill-opacity='0.2'/%3e%3cpath%20d='M4.5%208.11004L8.249%2010.2865V6.43604L4.5%208.11004Z'%20fill='white'%20fill-opacity='0.602'/%3e%3c/g%3e%3c/g%3e%3crect%20x='8'%20y='8'%20width='16'%20height='16'%20rx='4'%20fill='%23F0B90B'/%3e%3cpath%20d='M12.703%2015.9785L11.3515%2017.3252L10%2015.9785L11.3515%2014.6319L12.703%2015.9785ZM16%2012.6933L18.3168%2015.0166L19.6683%2013.67L17.3515%2011.3466L16%2010L14.6485%2011.3466L12.3168%2013.67L13.6683%2015.0166L16%2012.6933ZM20.6485%2014.6319L19.297%2015.9785L20.6485%2017.3252C21.1763%2016.7993%2021.4722%2016.5044%2022%2015.9785L20.6485%2014.6319ZM16%2019.2489L13.6832%2016.9404L12.3168%2018.2871L14.6337%2020.5956L15.9852%2021.9422L17.3366%2020.5956L19.6683%2018.2871L18.3168%2016.9404L16%2019.2489ZM16%2017.3252L17.3515%2015.9785L16%2014.6319L14.6485%2015.9785L16%2017.3252Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_800_5975'%3e%3crect%20width='16'%20height='16'%20rx='4'%20fill='white'/%3e%3c/clipPath%3e%3cclipPath%20id='clip1_800_5975'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as t };
|
package/api/checkAccount.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CheckAccountDto } from '../dto/CheckAccount.dto';
|
|
2
1
|
import { AxiosResponse } from 'axios';
|
|
3
|
-
|
|
2
|
+
import { CheckAccountDto } from '../dto/CheckAccount.dto';
|
|
4
3
|
export declare function checkAccount({ url, walletAddress, chainId, nativeAuthToken }: {
|
|
5
4
|
url: string;
|
|
6
5
|
walletAddress: string;
|
package/api/checkAccount.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js");let t=require("axios");t=e.n(t);async function n({url:e,walletAddress:n,chainId:r,nativeAuthToken:i}){let a={baseURL:e,headers:{Authorization:`Bearer ${i}`}};return await t.default.get(`/user/checkAccount?walletAddress=${n}&chainId=${r}`,a)}exports.checkAccount=n;
|
package/api/checkAccount.mjs
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
baseURL: c,
|
|
10
|
-
headers: {
|
|
11
|
-
Authorization: `Bearer ${o}`
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
return await a.get(
|
|
15
|
-
`/user/checkAccount?walletAddress=${e}&chainId=${t}`,
|
|
16
|
-
r
|
|
17
|
-
);
|
|
1
|
+
import e from "axios";
|
|
2
|
+
//#region src/api/checkAccount.ts
|
|
3
|
+
async function t({ url: t, walletAddress: n, chainId: r, nativeAuthToken: i }) {
|
|
4
|
+
let a = {
|
|
5
|
+
baseURL: t,
|
|
6
|
+
headers: { Authorization: `Bearer ${i}` }
|
|
7
|
+
};
|
|
8
|
+
return await e.get(`/user/checkAccount?walletAddress=${n}&chainId=${r}`, a);
|
|
18
9
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as checkAccount };
|
package/api/confirmRate.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ServerTransaction } from '../types/transaction';
|
|
2
|
-
import { ConfirmRateDto } from '../dto/ConfirmRate.dto';
|
|
3
1
|
import { AxiosResponse } from 'axios';
|
|
4
|
-
|
|
2
|
+
import { ConfirmRateDto } from '../dto/ConfirmRate.dto';
|
|
3
|
+
import { ServerTransaction } from '../types/transaction';
|
|
5
4
|
type ConfirmRateProps = {
|
|
6
5
|
url: string;
|
|
7
6
|
nativeAuthToken: string;
|
package/api/confirmRate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js"),t=require("../helpers/decodeToken.js");let n=require("axios");n=e.n(n);async function r({url:e,nativeAuthToken:r,body:i}){let a={baseURL:e,headers:{Authorization:`Bearer ${r}`}};r||delete a.headers?.Authorization;let o=await t.decodeToken(r);return a.headers.set&&a.headers.set({...a.headers,origin:o?.origin??``}),await n.default.post(`/rate/confirm`,i,a)}exports.confirmRate=r;
|
package/api/confirmRate.mjs
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
e || (o = r.headers) == null || delete o.Authorization;
|
|
16
|
-
const i = await n(e);
|
|
17
|
-
return r.headers.set && r.headers.set({
|
|
18
|
-
...r.headers,
|
|
19
|
-
origin: (i == null ? void 0 : i.origin) ?? ""
|
|
20
|
-
}), await s.post("/rate/confirm", t, r);
|
|
1
|
+
import { decodeToken as e } from "../helpers/decodeToken.mjs";
|
|
2
|
+
import t from "axios";
|
|
3
|
+
//#region src/api/confirmRate.ts
|
|
4
|
+
async function n({ url: n, nativeAuthToken: r, body: i }) {
|
|
5
|
+
let a = {
|
|
6
|
+
baseURL: n,
|
|
7
|
+
headers: { Authorization: `Bearer ${r}` }
|
|
8
|
+
};
|
|
9
|
+
r || delete a.headers?.Authorization;
|
|
10
|
+
let o = await e(r);
|
|
11
|
+
return a.headers.set && a.headers.set({
|
|
12
|
+
...a.headers,
|
|
13
|
+
origin: o?.origin ?? ""
|
|
14
|
+
}), await t.post("/rate/confirm", i, a);
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as confirmRate };
|
package/api/getChains.d.ts
CHANGED
package/api/getChains.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js");let t=require("axios");t=e.n(t);async function n({url:e,nativeAuthToken:n,bridgeOnly:r}){let i={baseURL:e,headers:{Authorization:`Bearer ${n}`}};return t.default.get(`/chains?isBridge=${r}`,i)}exports.getChains=n;
|
package/api/getChains.mjs
CHANGED
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
headers: {
|
|
10
|
-
Authorization: `Bearer ${i}`
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
return o.get(`/chains?isBridge=${r}`, n);
|
|
1
|
+
import e from "axios";
|
|
2
|
+
//#region src/api/getChains.ts
|
|
3
|
+
async function t({ url: t, nativeAuthToken: n, bridgeOnly: r }) {
|
|
4
|
+
let i = {
|
|
5
|
+
baseURL: t,
|
|
6
|
+
headers: { Authorization: `Bearer ${n}` }
|
|
7
|
+
};
|
|
8
|
+
return e.get(`/chains?isBridge=${r}`, i);
|
|
14
9
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as getChains };
|
package/api/getRate.d.ts
CHANGED
package/api/getRate.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js"),t=require("../helpers/decodeToken.js");let n=require("axios");n=e.n(n);async function r({url:e,nativeAuthToken:r,body:i}){let a={baseURL:e,headers:{Authorization:`Bearer ${r}`}};r||delete a.headers?.Authorization;let o=await t.decodeToken(r);return a.headers={...a.headers,origin:o?.origin},await n.default.post(`/rate`,i,a)}exports.getRate=r;
|
package/api/getRate.mjs
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
e || (a = r.headers) == null || delete a.Authorization;
|
|
16
|
-
const o = await n(e);
|
|
17
|
-
return r.headers = {
|
|
18
|
-
...r.headers,
|
|
19
|
-
origin: o == null ? void 0 : o.origin
|
|
20
|
-
}, await s.post("/rate", t, r);
|
|
1
|
+
import { decodeToken as e } from "../helpers/decodeToken.mjs";
|
|
2
|
+
import t from "axios";
|
|
3
|
+
//#region src/api/getRate.ts
|
|
4
|
+
async function n({ url: n, nativeAuthToken: r, body: i }) {
|
|
5
|
+
let a = {
|
|
6
|
+
baseURL: n,
|
|
7
|
+
headers: { Authorization: `Bearer ${r}` }
|
|
8
|
+
};
|
|
9
|
+
r || delete a.headers?.Authorization;
|
|
10
|
+
let o = await e(r);
|
|
11
|
+
return a.headers = {
|
|
12
|
+
...a.headers,
|
|
13
|
+
origin: o?.origin
|
|
14
|
+
}, await t.post("/rate", i, a);
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { n as getRate };
|
package/api/getTokens.d.ts
CHANGED
package/api/getTokens.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js");let t=require("axios");t=e.n(t);async function n({url:e,chainId:n,nativeAuthToken:r,bridgeOnly:i}){let a={baseURL:e,headers:{Authorization:`Bearer ${r}`}},o=n?`/tokens/${n}`:`/tokens`;return await t.default.get(`${o}?isBridge=${i}`,a)}exports.getTokens=n;
|
package/api/getTokens.mjs
CHANGED
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
baseURL: o,
|
|
10
|
-
headers: {
|
|
11
|
-
Authorization: `Bearer ${t}`
|
|
12
|
-
}
|
|
13
|
-
}, s = e ? `/tokens/${e}` : "/tokens";
|
|
14
|
-
return await i.get(
|
|
15
|
-
`${s}?isBridge=${n}`,
|
|
16
|
-
r
|
|
17
|
-
);
|
|
1
|
+
import e from "axios";
|
|
2
|
+
//#region src/api/getTokens.ts
|
|
3
|
+
async function t({ url: t, chainId: n, nativeAuthToken: r, bridgeOnly: i }) {
|
|
4
|
+
let a = {
|
|
5
|
+
baseURL: t,
|
|
6
|
+
headers: { Authorization: `Bearer ${r}` }
|
|
7
|
+
}, o = n ? `/tokens/${n}` : "/tokens";
|
|
8
|
+
return await e.get(`${o}?isBridge=${i}`, a);
|
|
18
9
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { t as getTokens };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TokenBalanceDTO } from '../dto/TokenBalance.dto';
|
|
2
1
|
import { AxiosResponse } from 'axios';
|
|
3
|
-
|
|
2
|
+
import { TokenBalanceDTO } from '../dto/TokenBalance.dto';
|
|
4
3
|
export declare function getTokensBalances({ url, userAddress, chainId, nativeAuthToken }: {
|
|
5
4
|
url: string;
|
|
6
5
|
userAddress: string;
|
package/api/getTokensBalances.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../chunk-oiTVcehM.js");let t=require("axios");t=e.n(t);async function n({url:e,userAddress:n,chainId:r,nativeAuthToken:i}){let a={baseURL:e,headers:{Authorization:`Bearer ${i}`}};return await t.default.get(`/tokens/balances/${n}/${r}`,a)}exports.getTokensBalances=n;
|