@multiversx/sdk-dapp-liquidity 2.3.0 → 2.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BridgeHistory-BU-L_w0l.js +2 -0
- package/BridgeHistory-CInRkJ6T.mjs +275 -0
- package/ToggleDirection-BLDXxUlN.mjs +16 -0
- package/ToggleDirection-CZ9-ZD7Y.js +2 -0
- package/all-networks-De_MBUh1.js +2 -0
- package/all-networks-hdZt5Hcc.mjs +4 -0
- package/api/checkAccount.d.ts +1 -2
- package/api/checkAccount.js +1 -1
- package/api/checkAccount.mjs +10 -20
- package/api/confirmRate.d.ts +2 -3
- package/api/confirmRate.js +1 -1
- package/api/confirmRate.mjs +16 -23
- package/api/getChains.d.ts +1 -2
- package/api/getChains.js +1 -1
- package/api/getChains.mjs +10 -16
- package/api/getRate.d.ts +1 -2
- package/api/getRate.js +1 -1
- package/api/getRate.mjs +16 -23
- package/api/getTokens.d.ts +1 -2
- package/api/getTokens.js +1 -1
- package/api/getTokens.mjs +10 -20
- package/api/getTokensBalances.d.ts +1 -2
- package/api/getTokensBalances.js +1 -1
- package/api/getTokensBalances.mjs +10 -20
- package/api/getTransactions.d.ts +2 -3
- package/api/getTransactions.js +1 -1
- package/api/getTransactions.mjs +19 -31
- package/api/index.js +1 -1
- package/api/index.mjs +9 -18
- package/api/sendTransactions.d.ts +3 -4
- package/api/sendTransactions.js +1 -1
- package/api/sendTransactions.mjs +19 -31
- package/api/tests/confirmRate.spec.js +1 -1
- package/api/tests/confirmRate.spec.mjs +98 -112
- package/api/tests/getChains.spec.js +1 -1
- package/api/tests/getChains.spec.mjs +38 -36
- package/api/tests/getRate.spec.js +1 -1
- package/api/tests/getRate.spec.mjs +73 -69
- package/api/tests/getTokens.spec.js +1 -1
- package/api/tests/getTokens.spec.mjs +58 -58
- package/api/tests/getTransactions.spec.js +1 -1
- package/api/tests/getTransactions.spec.mjs +84 -74
- package/api/tests/sendTransactions.spec.js +1 -1
- package/api/tests/sendTransactions.spec.mjs +74 -84
- package/chains-Bmeag21l.js +2 -0
- package/chains-DQACurVn.mjs +33 -0
- package/chunk-oiTVcehM.js +2 -0
- package/constants/index.js +1 -1
- package/constants/index.mjs +8 -4
- package/default-CqGeN438.js +2 -0
- package/default-DuNFRYAj.mjs +4 -0
- package/dto/Chain.dto.d.ts +0 -1
- package/dto/Chain.dto.js +0 -1
- package/dto/Chain.dto.mjs +0 -1
- package/dto/CheckAccount.dto.js +0 -1
- package/dto/CheckAccount.dto.mjs +0 -1
- package/dto/ConfirmRate.dto.d.ts +0 -1
- package/dto/ConfirmRate.dto.js +0 -1
- package/dto/ConfirmRate.dto.mjs +0 -1
- package/dto/Token.dto.js +0 -1
- package/dto/Token.dto.mjs +0 -1
- package/dto/TokenBalance.dto.js +0 -1
- package/dto/TokenBalance.dto.mjs +0 -1
- package/dto/Transaction.dto.d.ts +0 -1
- package/dto/Transaction.dto.js +0 -1
- package/dto/Transaction.dto.mjs +0 -1
- package/dto/index.js +0 -1
- package/dto/index.mjs +0 -1
- package/helpers/assertConfirmRateData.js +1 -1
- package/helpers/assertConfirmRateData.mjs +11 -28
- package/helpers/assertRateConfirmationMatchesIntent.d.ts +0 -1
- package/helpers/assertRateConfirmationMatchesIntent.js +1 -1
- package/helpers/assertRateConfirmationMatchesIntent.mjs +9 -18
- package/helpers/base64Utils.js +1 -1
- package/helpers/base64Utils.mjs +15 -18
- package/helpers/decodeLoginToken.js +1 -1
- package/helpers/decodeLoginToken.mjs +19 -21
- package/helpers/decodeToken.js +1 -1
- package/helpers/decodeToken.mjs +22 -27
- package/helpers/getApiURL.js +1 -1
- package/helpers/getApiURL.mjs +5 -5
- package/helpers/getBridgeURL.js +1 -1
- package/helpers/getBridgeURL.mjs +4 -4
- package/helpers/getDisplayName.d.ts +0 -1
- package/helpers/getDisplayName.js +1 -1
- package/helpers/getDisplayName.mjs +5 -5
- package/helpers/getMvxApiURL.js +1 -1
- package/helpers/getMvxApiURL.mjs +5 -5
- package/helpers/getMvxChainId.js +1 -1
- package/helpers/getMvxChainId.mjs +5 -5
- package/helpers/getMvxExplorerAddress.js +1 -1
- package/helpers/getMvxExplorerAddress.mjs +4 -4
- package/helpers/index.js +1 -1
- package/helpers/index.mjs +12 -27
- package/helpers/isValidAddressForChainType.d.ts +0 -1
- package/helpers/isValidAddressForChainType.js +1 -1
- package/helpers/isValidAddressForChainType.mjs +37 -48
- package/helpers/safeImageUrl.js +1 -1
- package/helpers/safeImageUrl.mjs +14 -12
- package/helpers/serializeTransaction.d.ts +0 -1
- package/helpers/serializeTransaction.js +1 -1
- package/helpers/serializeTransaction.mjs +5 -5
- package/helpers/tests/assertConfirmRateData.spec.js +1 -1
- package/helpers/tests/assertConfirmRateData.spec.mjs +86 -74
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +1 -1
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +61 -49
- package/helpers/tests/base64Utils.spec.js +1 -1
- package/helpers/tests/base64Utils.spec.mjs +15 -13
- package/helpers/tests/decodeLoginToken.spec.js +1 -1
- package/helpers/tests/decodeLoginToken.spec.mjs +20 -19
- package/helpers/tests/decodeToken.spec.js +1 -1
- package/helpers/tests/decodeToken.spec.mjs +18 -19
- package/helpers/tests/isValidAddressForChainType.spec.js +1 -1
- package/helpers/tests/isValidAddressForChainType.spec.mjs +59 -134
- package/helpers/tests/safeImageUrl.spec.js +1 -1
- package/helpers/tests/safeImageUrl.spec.mjs +30 -30
- package/helpers/tests/serializeTransaction.spec.js +1 -1
- package/helpers/tests/serializeTransaction.spec.mjs +35 -21
- package/index.js +1 -1
- package/index.mjs +91 -200
- package/package.json +23 -32
- package/react.esm-JNqTldrP.mjs +8927 -0
- package/react.esm-kvI07ZPd.js +59 -0
- package/reactjs/adapters/SuiAdapter.d.ts +2 -2
- package/reactjs/adapters/SuiAdapter.js +1 -1
- package/reactjs/adapters/SuiAdapter.mjs +254 -323
- package/reactjs/components/AccountAddress/AccountAddress.d.ts +1 -1
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -1
- package/reactjs/components/AccountAddress/AccountAddress.mjs +20 -30
- package/reactjs/components/AccountAddress/index.js +1 -1
- package/reactjs/components/AccountAddress/index.mjs +2 -4
- package/reactjs/components/AmountCard/AmountCard.d.ts +1 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -1
- package/reactjs/components/AmountCard/AmountCard.mjs +13 -31
- package/reactjs/components/AmountCard/index.js +1 -1
- package/reactjs/components/AmountCard/index.mjs +2 -4
- package/reactjs/components/AmountInput/AmountInput.d.ts +1 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -1
- package/reactjs/components/AmountInput/AmountInput.mjs +48 -66
- package/reactjs/components/AmountInput/index.js +1 -1
- package/reactjs/components/AmountInput/index.mjs +2 -4
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +1 -1
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -1
- package/reactjs/components/BridgeForm/BridgeForm.mjs +53 -81
- package/reactjs/components/BridgeForm/Deposit.d.ts +1 -1
- package/reactjs/components/BridgeForm/Deposit.js +1 -1
- package/reactjs/components/BridgeForm/Deposit.mjs +457 -573
- package/reactjs/components/BridgeForm/Transfer.d.ts +1 -1
- package/reactjs/components/BridgeForm/Transfer.js +1 -1
- package/reactjs/components/BridgeForm/Transfer.mjs +358 -470
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.d.ts +0 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +52 -54
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.d.ts +0 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +35 -46
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.d.ts +1 -2
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -1
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +131 -197
- package/reactjs/components/BridgeForm/index.js +1 -1
- package/reactjs/components/BridgeForm/index.mjs +1 -3
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.d.ts +3 -4
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -1
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +26 -43
- package/reactjs/components/BridgeHistory/BridgeHistory.d.ts +1 -1
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -1
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +2 -353
- package/reactjs/components/BridgeHistory/index.js +1 -1
- package/reactjs/components/BridgeHistory/index.mjs +2 -4
- package/reactjs/components/Connect/BridgeAccountDisplay.d.ts +1 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -1
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +125 -134
- package/reactjs/components/Connect/BridgeConnectButton.d.ts +1 -2
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -1
- package/reactjs/components/Connect/BridgeConnectButton.mjs +42 -44
- package/reactjs/components/Connect/ChainSelectConnect.d.ts +1 -2
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -1
- package/reactjs/components/Connect/ChainSelectConnect.mjs +100 -129
- package/reactjs/components/Connect/CustomConnectButton.d.ts +2 -3
- package/reactjs/components/Connect/CustomConnectButton.js +1 -1
- package/reactjs/components/Connect/CustomConnectButton.mjs +23 -35
- package/reactjs/components/Connect/MvxAccountDisplay.d.ts +1 -1
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -1
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +74 -94
- package/reactjs/components/Connect/MvxConnectButton.d.ts +1 -1
- package/reactjs/components/Connect/MvxConnectButton.js +1 -1
- package/reactjs/components/Connect/MvxConnectButton.mjs +27 -38
- package/reactjs/components/Connect/SwitchChainButton.d.ts +2 -3
- package/reactjs/components/Connect/SwitchChainButton.js +1 -1
- package/reactjs/components/Connect/SwitchChainButton.mjs +20 -30
- package/reactjs/components/Connect/index.js +1 -1
- package/reactjs/components/Connect/index.mjs +6 -14
- package/reactjs/components/CopyButton/CopyButton.d.ts +2 -1
- package/reactjs/components/CopyButton/CopyButton.js +1 -1
- package/reactjs/components/CopyButton/CopyButton.mjs +35 -42
- package/reactjs/components/CopyButton/index.js +1 -1
- package/reactjs/components/CopyButton/index.mjs +2 -4
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -1
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -24
- package/reactjs/components/CopyButton/utils/index.js +1 -1
- package/reactjs/components/CopyButton/utils/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/DisplayAmount.d.ts +2 -3
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -1
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +74 -82
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.d.ts +1 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +22 -31
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.js +0 -1
- package/reactjs/components/DisplayAmount/components/AnimateNumber/index.mjs +0 -1
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.d.ts +1 -2
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -1
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +46 -52
- package/reactjs/components/DisplayAmount/components/index.js +0 -1
- package/reactjs/components/DisplayAmount/components/index.mjs +0 -1
- package/reactjs/components/DisplayAmount/index.js +1 -1
- package/reactjs/components/DisplayAmount/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/utils/index.js +1 -1
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -4
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -1
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +14 -16
- package/reactjs/components/Error/Error.d.ts +1 -2
- package/reactjs/components/Error/Error.js +1 -1
- package/reactjs/components/Error/Error.mjs +44 -66
- package/reactjs/components/Error/index.js +1 -1
- package/reactjs/components/Error/index.mjs +1 -3
- package/reactjs/components/SmallLoader/SmallLoader.d.ts +1 -1
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -1
- package/reactjs/components/SmallLoader/SmallLoader.mjs +12 -15
- package/reactjs/components/SmallLoader/index.js +1 -1
- package/reactjs/components/SmallLoader/index.mjs +2 -4
- package/reactjs/components/ToggleDirection/ToggleDirection.d.ts +1 -1
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -1
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +2 -24
- package/reactjs/components/TokenSelector/TokenSelector.d.ts +1 -2
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -1
- package/reactjs/components/TokenSelector/TokenSelector.mjs +94 -151
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +75 -83
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.d.ts +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +40 -51
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +16 -12
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +4 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +29 -41
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.js +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/chainSelectOption.mjs +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.js +0 -1
- package/reactjs/components/TokenSelector/components/ChainSelect/types/partialChainOption.mjs +0 -1
- package/reactjs/components/TokenSelector/components/SelectContainer.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +32 -37
- package/reactjs/components/TokenSelector/components/SelectContent.d.ts +2 -3
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +78 -110
- package/reactjs/components/TokenSelector/components/SelectedOption.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -1
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +26 -26
- package/reactjs/components/TokenSelector/components/TokenIcon.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +54 -74
- package/reactjs/components/TokenSelector/components/TokenItem.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +53 -66
- package/reactjs/components/TokenSelector/components/TokenList.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenList.mjs +13 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.d.ts +1 -2
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -1
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +15 -23
- package/reactjs/components/TokenSelector/index.js +1 -1
- package/reactjs/components/TokenSelector/index.mjs +2 -4
- package/reactjs/components/TransactionToast/TransactionToast.d.ts +1 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -1
- package/reactjs/components/TransactionToast/TransactionToast.mjs +43 -51
- package/reactjs/components/TransactionToast/TransactionToastContainer.d.ts +1 -2
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -1
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +15 -18
- package/reactjs/components/TransactionToast/index.js +1 -1
- package/reactjs/components/TransactionToast/index.mjs +3 -6
- package/reactjs/components/TrimAddress/TrimAddress.d.ts +1 -1
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -1
- package/reactjs/components/TrimAddress/TrimAddress.mjs +13 -22
- package/reactjs/components/TrimAddress/index.js +1 -1
- package/reactjs/components/TrimAddress/index.mjs +1 -3
- package/reactjs/components/base/MxButton/MxButton.d.ts +1 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -1
- package/reactjs/components/base/MxButton/MxButton.mjs +43 -70
- package/reactjs/components/base/MxButton/index.js +1 -1
- package/reactjs/components/base/MxButton/index.mjs +2 -4
- package/reactjs/components/base/MxCard/MxCard.d.ts +0 -1
- package/reactjs/components/base/MxCard/MxCard.js +1 -1
- package/reactjs/components/base/MxCard/MxCard.mjs +33 -54
- package/reactjs/components/base/MxCard/index.js +1 -1
- package/reactjs/components/base/MxCard/index.mjs +2 -4
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.d.ts +1 -1
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -1
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +9 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -1
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -4
- package/reactjs/components/base/MxLink/MxLink.d.ts +0 -1
- package/reactjs/components/base/MxLink/MxLink.js +1 -1
- package/reactjs/components/base/MxLink/MxLink.mjs +42 -68
- package/reactjs/components/base/MxLink/index.js +1 -1
- package/reactjs/components/base/MxLink/index.mjs +2 -4
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -1
- package/reactjs/components/base/MxSearch/MxSearch.mjs +35 -65
- package/reactjs/components/base/MxSearch/index.js +1 -1
- package/reactjs/components/base/MxSearch/index.mjs +2 -4
- package/reactjs/components/base/MxSlideover/MxSlideover.d.ts +1 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -1
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +70 -76
- package/reactjs/components/base/MxSlideover/index.js +1 -1
- package/reactjs/components/base/MxSlideover/index.mjs +2 -4
- package/reactjs/components/base/MxTooltip/MxTooltip.d.ts +2 -3
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -1
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +79 -119
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.d.ts +0 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +23 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.d.ts +1 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +13 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +1 -3
- package/reactjs/components/base/MxTooltip/components/index.js +1 -1
- package/reactjs/components/base/MxTooltip/components/index.mjs +5 -6
- package/reactjs/components/base/MxTooltip/index.js +1 -1
- package/reactjs/components/base/MxTooltip/index.mjs +2 -4
- package/reactjs/components/base/index.js +1 -1
- package/reactjs/components/base/index.mjs +12 -13
- package/reactjs/components/index.js +1 -1
- package/reactjs/components/index.mjs +40 -53
- package/reactjs/constants/chains.js +1 -1
- package/reactjs/constants/chains.mjs +2 -35
- package/reactjs/constants/index.js +1 -1
- package/reactjs/constants/index.mjs +5 -12
- package/reactjs/context/Web3AppProvider.d.ts +6 -7
- package/reactjs/context/Web3AppProvider.js +1 -1
- package/reactjs/context/Web3AppProvider.mjs +41 -40
- package/reactjs/context/queryClient.d.ts +0 -1
- package/reactjs/context/queryClient.js +1 -1
- package/reactjs/context/queryClient.mjs +6 -6
- package/reactjs/context/useWeb3App.js +1 -1
- package/reactjs/context/useWeb3App.mjs +9 -10
- package/reactjs/helpers/index.js +1 -1
- package/reactjs/helpers/index.mjs +2 -6
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -1
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +22 -23
- package/reactjs/hooks/index.js +1 -1
- package/reactjs/hooks/index.mjs +16 -35
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +1 -1
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +43 -50
- package/reactjs/hooks/tests/useSignTransaction.spec.js +1 -1
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +123 -150
- package/reactjs/hooks/useAccount.js +1 -1
- package/reactjs/hooks/useAccount.mjs +11 -11
- package/reactjs/hooks/useBalances.d.ts +0 -1
- package/reactjs/hooks/useBalances.js +1 -1
- package/reactjs/hooks/useBalances.mjs +31 -39
- package/reactjs/hooks/useBridgeApiChainId.js +1 -1
- package/reactjs/hooks/useBridgeApiChainId.mjs +8 -11
- package/reactjs/hooks/useBridgeFormik.d.ts +4 -5
- package/reactjs/hooks/useBridgeFormik.js +1 -1
- package/reactjs/hooks/useBridgeFormik.mjs +117 -143
- package/reactjs/hooks/useDebounce.js +1 -1
- package/reactjs/hooks/useDebounce.mjs +10 -10
- package/reactjs/hooks/useDisconnectOnChainTypeChange.d.ts +0 -1
- package/reactjs/hooks/useDisconnectOnChainTypeChange.js +1 -1
- package/reactjs/hooks/useDisconnectOnChainTypeChange.mjs +12 -12
- package/reactjs/hooks/useFetchBridgeData.d.ts +2 -2
- package/reactjs/hooks/useFetchBridgeData.js +1 -1
- package/reactjs/hooks/useFetchBridgeData.mjs +2 -44
- package/reactjs/hooks/useFetchTokens.d.ts +1 -1
- package/reactjs/hooks/useFetchTokens.js +1 -1
- package/reactjs/hooks/useFetchTokens.mjs +2 -92
- package/reactjs/hooks/useGenericSignMessage.js +1 -1
- package/reactjs/hooks/useGenericSignMessage.mjs +37 -54
- package/reactjs/hooks/useGetChainId.js +1 -1
- package/reactjs/hooks/useGetChainId.mjs +9 -9
- package/reactjs/hooks/useNamespaceAddress.d.ts +0 -1
- package/reactjs/hooks/useNamespaceAddress.js +1 -1
- package/reactjs/hooks/useNamespaceAddress.mjs +12 -15
- package/reactjs/hooks/useResolveTokenChain.d.ts +0 -1
- package/reactjs/hooks/useResolveTokenChain.js +1 -1
- package/reactjs/hooks/useResolveTokenChain.mjs +13 -15
- package/reactjs/hooks/useSendTransactions.d.ts +0 -1
- package/reactjs/hooks/useSendTransactions.js +1 -1
- package/reactjs/hooks/useSendTransactions.mjs +11 -20
- package/reactjs/hooks/useSignTransaction.d.ts +509 -0
- package/reactjs/hooks/useSignTransaction.js +1 -1
- package/reactjs/hooks/useSignTransaction.mjs +59 -85
- package/reactjs/hooks/useSuiConnect.js +1 -1
- package/reactjs/hooks/useSuiConnect.mjs +68 -67
- package/reactjs/hooks/validation/index.js +1 -1
- package/reactjs/hooks/validation/index.mjs +5 -10
- package/reactjs/hooks/validation/useAmountSchema.js +1 -1
- package/reactjs/hooks/validation/useAmountSchema.mjs +9 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -1
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -8
- package/reactjs/hooks/validation/useTestHasEnoughFunds.d.ts +0 -1
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -1
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -27
- package/reactjs/hooks/validation/useTestIsConnected.d.ts +0 -1
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -1
- package/reactjs/hooks/validation/useTestIsConnected.mjs +15 -20
- package/reactjs/index.d.ts +0 -1
- package/reactjs/index.js +1 -1
- package/reactjs/index.mjs +70 -157
- package/reactjs/init/index.js +1 -1
- package/reactjs/init/index.mjs +2 -5
- package/reactjs/init/init.d.ts +2 -3
- package/reactjs/init/init.js +1 -1
- package/reactjs/init/init.mjs +113 -112
- package/reactjs/init/isMobileInjectedDappBrowser.js +1 -1
- package/reactjs/init/isMobileInjectedDappBrowser.mjs +6 -7
- package/reactjs/queries/index.js +1 -1
- package/reactjs/queries/index.mjs +7 -17
- package/reactjs/queries/useCheckAccount.query.d.ts +1 -2
- package/reactjs/queries/useCheckAccount.query.js +1 -1
- package/reactjs/queries/useCheckAccount.query.mjs +35 -34
- package/reactjs/queries/useGetAllTokens.query.d.ts +1 -2
- package/reactjs/queries/useGetAllTokens.query.js +1 -1
- package/reactjs/queries/useGetAllTokens.query.mjs +24 -30
- package/reactjs/queries/useGetChains.query.d.ts +1 -2
- package/reactjs/queries/useGetChains.query.js +1 -1
- package/reactjs/queries/useGetChains.query.mjs +28 -31
- package/reactjs/queries/useGetHistory.query.d.ts +2 -3
- package/reactjs/queries/useGetHistory.query.js +1 -1
- package/reactjs/queries/useGetHistory.query.mjs +50 -64
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +3 -4
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -1
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +44 -56
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +3 -4
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -1
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +2 -75
- package/reactjs/queries/useGetRate.mutation.d.ts +0 -1
- package/reactjs/queries/useGetRate.mutation.js +1 -1
- package/reactjs/queries/useGetRate.mutation.mjs +12 -14
- package/reactjs/reexports.d.ts +2 -3
- package/reactjs/reexports.js +1 -1
- package/reactjs/reexports.mjs +3 -15
- package/reactjs/utils/delay.js +1 -1
- package/reactjs/utils/delay.mjs +5 -5
- package/reactjs/utils/formatAmount.js +1 -1
- package/reactjs/utils/formatAmount.mjs +11 -22
- package/reactjs/utils/getCleanStringAmount.js +1 -1
- package/reactjs/utils/getCleanStringAmount.mjs +11 -8
- package/reactjs/utils/getCompletePathname.js +1 -1
- package/reactjs/utils/getCompletePathname.mjs +5 -5
- package/reactjs/utils/getInitialTokens.js +1 -1
- package/reactjs/utils/getInitialTokens.mjs +10 -10
- package/reactjs/utils/hasEnoughFunds.js +1 -1
- package/reactjs/utils/hasEnoughFunds.mjs +9 -15
- package/reactjs/utils/index.js +1 -1
- package/reactjs/utils/index.mjs +12 -25
- package/reactjs/utils/isStringFloat.js +1 -1
- package/reactjs/utils/isStringFloat.mjs +10 -13
- package/reactjs/utils/mxClsx.d.ts +0 -1
- package/reactjs/utils/mxClsx.js +1 -1
- package/reactjs/utils/mxClsx.mjs +5 -5
- package/reactjs/utils/pipe.js +1 -1
- package/reactjs/utils/pipe.mjs +13 -20
- package/reactjs/utils/removeCommas.js +1 -1
- package/reactjs/utils/removeCommas.mjs +4 -4
- package/reactjs/utils/roundAmount.js +1 -1
- package/reactjs/utils/roundAmount.mjs +15 -19
- package/reactjs/utils/testNumber.js +1 -1
- package/reactjs/utils/testNumber.mjs +4 -4
- package/store/inMemoryStore.js +1 -1
- package/store/inMemoryStore.mjs +30 -34
- package/style.css +2 -1
- package/types/batchTransactions.d.ts +0 -1
- package/types/batchTransactions.js +0 -1
- package/types/batchTransactions.mjs +0 -1
- package/types/chainType.js +1 -1
- package/types/chainType.mjs +6 -4
- package/types/errors.js +1 -1
- package/types/errors.mjs +15 -19
- package/types/index.js +0 -1
- package/types/index.mjs +0 -1
- package/types/providerType.js +1 -1
- package/types/providerType.mjs +6 -4
- package/types/rate.d.ts +0 -1
- package/types/rate.js +0 -1
- package/types/rate.mjs +0 -1
- package/types/token.d.ts +0 -1
- package/types/token.js +0 -1
- package/types/token.mjs +0 -1
- package/types/transaction.d.ts +3 -4
- package/types/transaction.js +0 -1
- package/types/transaction.mjs +0 -1
- package/types/utxo.js +0 -1
- package/types/utxo.mjs +0 -1
- package/useFetchBridgeData-B5xt9GbW.js +2 -0
- package/useFetchBridgeData-C_hZjzd_.mjs +142 -0
- package/all-networks--dfVLHLJ.js +0 -2
- package/all-networks-Czd8zS1n.mjs +0 -4
- package/default-D0Jk5ROI.mjs +0 -4
- package/default-DbU6vPaB.js +0 -2
- package/react.esm-B0AMOHxa.js +0 -73
- package/react.esm-BxvJJ86Q.mjs +0 -9949
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
w as useCheckAccountQuery
|
|
1
|
+
import { checkAccount as e } from "../../api/checkAccount.mjs";
|
|
2
|
+
import { getApiURL as t } from "../../helpers/getApiURL.mjs";
|
|
3
|
+
import { useWeb3App as n } from "../context/useWeb3App.mjs";
|
|
4
|
+
import { useBridgeApiChainId as r } from "../hooks/useBridgeApiChainId.mjs";
|
|
5
|
+
import { useAppKitAccount as i } from "@reown/appkit/react";
|
|
6
|
+
import { useQuery as a } from "@tanstack/react-query";
|
|
7
|
+
//#region src/reactjs/queries/useCheckAccount.query.ts
|
|
8
|
+
var o = () => {
|
|
9
|
+
let { address: o } = i(), s = r(), { nativeAuthToken: c } = n();
|
|
10
|
+
return a({
|
|
11
|
+
queryKey: [
|
|
12
|
+
"check-account",
|
|
13
|
+
o,
|
|
14
|
+
s
|
|
15
|
+
],
|
|
16
|
+
queryFn: async () => {
|
|
17
|
+
try {
|
|
18
|
+
let { data: n } = await e({
|
|
19
|
+
url: t(),
|
|
20
|
+
walletAddress: o ?? "",
|
|
21
|
+
chainId: s ?? "",
|
|
22
|
+
nativeAuthToken: c
|
|
23
|
+
});
|
|
24
|
+
return n;
|
|
25
|
+
} catch (e) {
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
retry: (e, t) => t.response?.status === 404,
|
|
30
|
+
refetchOnWindowFocus: !1,
|
|
31
|
+
gcTime: 300 * 1e3,
|
|
32
|
+
staleTime: 0
|
|
33
|
+
});
|
|
35
34
|
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as useCheckAccountQuery };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
|
-
|
|
3
2
|
export declare const useGetAllTokensQuery: ({ nativeAuthToken, bridgeOnly }: {
|
|
4
3
|
nativeAuthToken?: string;
|
|
5
4
|
bridgeOnly?: boolean;
|
|
6
|
-
}) => import('@tanstack/react-query').UseQueryResult<import('../..').TokenType[]
|
|
5
|
+
}) => import('@tanstack/react-query').UseQueryResult<NoInfer<import('../..').TokenType[]>, AxiosError<unknown, any>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../api/getTokens.js"),t=require("../../helpers/getApiURL.js");let n=require("@tanstack/react-query");var r=({nativeAuthToken:r,bridgeOnly:i=!0})=>(0,n.useQuery)({queryKey:[`all-tokens`,i],queryFn:async()=>{try{let{data:n}=await e.getTokens({url:t.getApiURL(),nativeAuthToken:r??``,bridgeOnly:!!i});return n}catch(e){throw e}},retry:(e,t)=>t.response?.status===404,refetchOnWindowFocus:!1,gcTime:300*1e3,staleTime:0});exports.useGetAllTokensQuery=r;
|
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return ((t = n.response) == null ? void 0 : t.status) === 404;
|
|
24
|
-
},
|
|
25
|
-
refetchOnWindowFocus: !1,
|
|
26
|
-
gcTime: 5 * 60 * 1e3,
|
|
27
|
-
staleTime: 0
|
|
1
|
+
import { getTokens as e } from "../../api/getTokens.mjs";
|
|
2
|
+
import { getApiURL as t } from "../../helpers/getApiURL.mjs";
|
|
3
|
+
import { useQuery as n } from "@tanstack/react-query";
|
|
4
|
+
//#region src/reactjs/queries/useGetAllTokens.query.ts
|
|
5
|
+
var r = ({ nativeAuthToken: r, bridgeOnly: i = !0 }) => n({
|
|
6
|
+
queryKey: ["all-tokens", i],
|
|
7
|
+
queryFn: async () => {
|
|
8
|
+
try {
|
|
9
|
+
let { data: n } = await e({
|
|
10
|
+
url: t(),
|
|
11
|
+
nativeAuthToken: r ?? "",
|
|
12
|
+
bridgeOnly: !!i
|
|
13
|
+
});
|
|
14
|
+
return n;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
throw e;
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
retry: (e, t) => t.response?.status === 404,
|
|
20
|
+
refetchOnWindowFocus: !1,
|
|
21
|
+
gcTime: 300 * 1e3,
|
|
22
|
+
staleTime: 0
|
|
28
23
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { r as useGetAllTokensQuery };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { AxiosError } from 'axios';
|
|
2
|
-
|
|
3
|
-
export declare const useGetChainsQuery: () => import('@tanstack/react-query').UseQueryResult<import('../..').ChainDTO[], AxiosError<unknown, any>>;
|
|
2
|
+
export declare const useGetChainsQuery: () => import('@tanstack/react-query').UseQueryResult<NoInfer<import('../..').ChainDTO[]>, AxiosError<unknown, any>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../api/getChains.js"),t=require("../../helpers/getApiURL.js"),n=require("../context/useWeb3App.js");let r=require("@tanstack/react-query");var i=()=>{let{nativeAuthToken:i,bridgeOnly:a}=n.useWeb3App();return(0,r.useQuery)({queryKey:[`chains`,a],queryFn:async()=>{try{let{data:n}=await e.getChains({url:t.getApiURL(),nativeAuthToken:i,bridgeOnly:!!a});return n}catch(e){throw e}},retry:(e,t)=>t.response?.status===404,refetchOnWindowFocus:!1,gcTime:300*1e3,staleTime:0})};exports.useGetChainsQuery=i;
|
|
@@ -1,32 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
staleTime: 0
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
l as useGetChainsQuery
|
|
1
|
+
import { getChains as e } from "../../api/getChains.mjs";
|
|
2
|
+
import { getApiURL as t } from "../../helpers/getApiURL.mjs";
|
|
3
|
+
import { useWeb3App as n } from "../context/useWeb3App.mjs";
|
|
4
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
5
|
+
//#region src/reactjs/queries/useGetChains.query.ts
|
|
6
|
+
var i = () => {
|
|
7
|
+
let { nativeAuthToken: i, bridgeOnly: a } = n();
|
|
8
|
+
return r({
|
|
9
|
+
queryKey: ["chains", a],
|
|
10
|
+
queryFn: async () => {
|
|
11
|
+
try {
|
|
12
|
+
let { data: n } = await e({
|
|
13
|
+
url: t(),
|
|
14
|
+
nativeAuthToken: i,
|
|
15
|
+
bridgeOnly: !!a
|
|
16
|
+
});
|
|
17
|
+
return n;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw e;
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
retry: (e, t) => t.response?.status === 404,
|
|
23
|
+
refetchOnWindowFocus: !1,
|
|
24
|
+
gcTime: 300 * 1e3,
|
|
25
|
+
staleTime: 0
|
|
26
|
+
});
|
|
32
27
|
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as useGetChainsQuery };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ProviderType } from 'types/providerType';
|
|
2
1
|
import { AxiosError } from 'axios';
|
|
3
|
-
|
|
2
|
+
import { ProviderType } from 'types/providerType';
|
|
4
3
|
type HistoryQueryType = {
|
|
5
4
|
address?: string;
|
|
6
5
|
sender?: string;
|
|
@@ -9,6 +8,6 @@ type HistoryQueryType = {
|
|
|
9
8
|
tokenIn?: string;
|
|
10
9
|
tokenOut?: string;
|
|
11
10
|
};
|
|
12
|
-
export declare const useGetHistoryQuery: ({ address, sender, provider, status, tokenIn, tokenOut }?: HistoryQueryType) => import('@tanstack/react-query').UseQueryResult<import('../..').TransactionDTO[]
|
|
11
|
+
export declare const useGetHistoryQuery: ({ address, sender, provider, status, tokenIn, tokenOut }?: HistoryQueryType) => import('@tanstack/react-query').UseQueryResult<NoInfer<import('../..').TransactionDTO[]>, AxiosError<unknown, any>>;
|
|
13
12
|
export declare const useInvalidateHistoryQuery: () => () => void;
|
|
14
13
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../api/getTransactions.js"),t=require("../../helpers/getApiURL.js"),n=require("../context/useWeb3App.js");let r=require("react"),i=require("@tanstack/react-query");var a=({address:r,sender:a,provider:o,status:s,tokenIn:c,tokenOut:l}={})=>{let{nativeAuthToken:u}=n.useWeb3App();return(0,i.useQuery)({queryKey:[`user-history`,r,a,o,s,c,l],queryFn:async()=>{if(!r)throw Error(`User is not connected`);try{let{data:n}=await e.getTransactions({url:t.getApiURL(),address:r,sender:a,provider:o,status:s,tokenIn:c,tokenOut:l,nativeAuthToken:u});return n}catch(e){throw e}},retry:(e,t)=>t.response?.status===404,enabled:!!r,refetchOnWindowFocus:!1,refetchIntervalInBackground:!0,refetchInterval:1e4,gcTime:0})},o=()=>{let e=(0,i.useQueryClient)();return(0,r.useCallback)(()=>{e.invalidateQueries({queryKey:[`user-history`]})},[e])};exports.useGetHistoryQuery=a,exports.useInvalidateHistoryQuery=o;
|
|
@@ -1,65 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
refetchOnWindowFocus: !1,
|
|
50
|
-
refetchIntervalInBackground: !0,
|
|
51
|
-
refetchInterval: 1e4,
|
|
52
|
-
gcTime: 0
|
|
53
|
-
});
|
|
54
|
-
}, F = () => {
|
|
55
|
-
const r = l();
|
|
56
|
-
return f(() => {
|
|
57
|
-
r.invalidateQueries({
|
|
58
|
-
queryKey: ["user-history"]
|
|
59
|
-
});
|
|
60
|
-
}, [r]);
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
A as useGetHistoryQuery,
|
|
64
|
-
F as useInvalidateHistoryQuery
|
|
1
|
+
import { getTransactions as e } from "../../api/getTransactions.mjs";
|
|
2
|
+
import { getApiURL as t } from "../../helpers/getApiURL.mjs";
|
|
3
|
+
import { useWeb3App as n } from "../context/useWeb3App.mjs";
|
|
4
|
+
import { useCallback as r } from "react";
|
|
5
|
+
import { useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
6
|
+
//#region src/reactjs/queries/useGetHistory.query.ts
|
|
7
|
+
var o = ({ address: r, sender: a, provider: o, status: s, tokenIn: c, tokenOut: l } = {}) => {
|
|
8
|
+
let { nativeAuthToken: u } = n();
|
|
9
|
+
return i({
|
|
10
|
+
queryKey: [
|
|
11
|
+
"user-history",
|
|
12
|
+
r,
|
|
13
|
+
a,
|
|
14
|
+
o,
|
|
15
|
+
s,
|
|
16
|
+
c,
|
|
17
|
+
l
|
|
18
|
+
],
|
|
19
|
+
queryFn: async () => {
|
|
20
|
+
if (!r) throw Error("User is not connected");
|
|
21
|
+
try {
|
|
22
|
+
let { data: n } = await e({
|
|
23
|
+
url: t(),
|
|
24
|
+
address: r,
|
|
25
|
+
sender: a,
|
|
26
|
+
provider: o,
|
|
27
|
+
status: s,
|
|
28
|
+
tokenIn: c,
|
|
29
|
+
tokenOut: l,
|
|
30
|
+
nativeAuthToken: u
|
|
31
|
+
});
|
|
32
|
+
return n;
|
|
33
|
+
} catch (e) {
|
|
34
|
+
throw e;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
retry: (e, t) => t.response?.status === 404,
|
|
38
|
+
enabled: !!r,
|
|
39
|
+
refetchOnWindowFocus: !1,
|
|
40
|
+
refetchIntervalInBackground: !0,
|
|
41
|
+
refetchInterval: 1e4,
|
|
42
|
+
gcTime: 0
|
|
43
|
+
});
|
|
44
|
+
}, s = () => {
|
|
45
|
+
let e = a();
|
|
46
|
+
return r(() => {
|
|
47
|
+
e.invalidateQueries({ queryKey: ["user-history"] });
|
|
48
|
+
}, [e]);
|
|
65
49
|
};
|
|
50
|
+
//#endregion
|
|
51
|
+
export { o as useGetHistoryQuery, s as useInvalidateHistoryQuery };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { TokenType } from '../../types/token';
|
|
2
1
|
import { AxiosError } from 'axios';
|
|
3
|
-
|
|
2
|
+
import { TokenType } from '../../types/token';
|
|
4
3
|
export declare const useGetMvxTokensBalancesQuery: ({ tokens, mvxAddress, apiURL }: {
|
|
5
4
|
tokens: TokenType[];
|
|
6
5
|
mvxAddress?: string;
|
|
7
6
|
apiURL: string;
|
|
8
|
-
}) => import('@tanstack/react-query').UseQueryResult<{
|
|
7
|
+
}) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
9
8
|
balance: string;
|
|
10
9
|
address: string;
|
|
11
10
|
symbol: string;
|
|
@@ -25,5 +24,5 @@ export declare const useGetMvxTokensBalancesQuery: ({ tokens, mvxAddress, apiURL
|
|
|
25
24
|
symbol: string;
|
|
26
25
|
}[];
|
|
27
26
|
isNative?: boolean;
|
|
28
|
-
}[]
|
|
27
|
+
}[]>, AxiosError<unknown, any>>;
|
|
29
28
|
export declare function useInvalidateMvxTokensBalancesQuery(): () => void;
|
|
@@ -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("../context/useWeb3App.js");let n=require("axios");n=e.n(n);let r=require("react"),i=require("@tanstack/react-query");var a=({tokens:e,mvxAddress:a,apiURL:o})=>{let{nativeAuthToken:s}=t.useWeb3App(),c=(0,r.useMemo)(()=>e.map(({address:e})=>e),[e]),l=`${o}/accounts/${a}/tokens?identifiers=${c}`,u={headers:{Authorization:`Bearer ${s}`},timeout:3e3};return(0,i.useQuery)({queryKey:[`mvx-tokens-balances`,a,c.sort()],queryFn:async()=>{let{data:t}=await n.default.get(l,u);return t.map(t=>{let n=e.find(e=>e.address.toLowerCase()===t.identifier.toLowerCase());if(!n)throw Error(`Token not found`);return{...n,balance:t.balance?.toString()??`0`,address:t.identifier,symbol:t.ticker??n.symbol}})},retry:(e,t)=>t.response?.status===404,enabled:!!a&&c.length>0,refetchOnWindowFocus:!1,refetchIntervalInBackground:!0,refetchInterval:2e4,refetchOnReconnect:`always`,gcTime:0})};function o(){let e=(0,i.useQueryClient)();return(0,r.useCallback)(()=>{e.invalidateQueries({queryKey:[`mvx-tokens-balances`]})},[e])}exports.useGetMvxTokensBalancesQuery=a,exports.useInvalidateMvxTokensBalancesQuery=o;
|
|
@@ -1,58 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
retry: m,
|
|
39
|
-
enabled: !!o && a.length > 0,
|
|
40
|
-
refetchOnWindowFocus: !1,
|
|
41
|
-
refetchIntervalInBackground: !0,
|
|
42
|
-
refetchInterval: 2e4,
|
|
43
|
-
refetchOnReconnect: "always",
|
|
44
|
-
gcTime: 0
|
|
45
|
-
});
|
|
1
|
+
import { useWeb3App as e } from "../context/useWeb3App.mjs";
|
|
2
|
+
import t from "axios";
|
|
3
|
+
import { useCallback as n, useMemo as r } from "react";
|
|
4
|
+
import { useQuery as i, useQueryClient as a } from "@tanstack/react-query";
|
|
5
|
+
//#region src/reactjs/queries/useGetMvxTokensBalances.query.ts
|
|
6
|
+
var o = ({ tokens: n, mvxAddress: a, apiURL: o }) => {
|
|
7
|
+
let { nativeAuthToken: s } = e(), c = r(() => n.map(({ address: e }) => e), [n]), l = `${o}/accounts/${a}/tokens?identifiers=${c}`, u = {
|
|
8
|
+
headers: { Authorization: `Bearer ${s}` },
|
|
9
|
+
timeout: 3e3
|
|
10
|
+
};
|
|
11
|
+
return i({
|
|
12
|
+
queryKey: [
|
|
13
|
+
"mvx-tokens-balances",
|
|
14
|
+
a,
|
|
15
|
+
c.sort()
|
|
16
|
+
],
|
|
17
|
+
queryFn: async () => {
|
|
18
|
+
let { data: e } = await t.get(l, u);
|
|
19
|
+
return e.map((e) => {
|
|
20
|
+
let t = n.find((t) => t.address.toLowerCase() === e.identifier.toLowerCase());
|
|
21
|
+
if (!t) throw Error("Token not found");
|
|
22
|
+
return {
|
|
23
|
+
...t,
|
|
24
|
+
balance: e.balance?.toString() ?? "0",
|
|
25
|
+
address: e.identifier,
|
|
26
|
+
symbol: e.ticker ?? t.symbol
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
retry: (e, t) => t.response?.status === 404,
|
|
31
|
+
enabled: !!a && c.length > 0,
|
|
32
|
+
refetchOnWindowFocus: !1,
|
|
33
|
+
refetchIntervalInBackground: !0,
|
|
34
|
+
refetchInterval: 2e4,
|
|
35
|
+
refetchOnReconnect: "always",
|
|
36
|
+
gcTime: 0
|
|
37
|
+
});
|
|
46
38
|
};
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
}, [e]);
|
|
39
|
+
function s() {
|
|
40
|
+
let e = a();
|
|
41
|
+
return n(() => {
|
|
42
|
+
e.invalidateQueries({ queryKey: ["mvx-tokens-balances"] });
|
|
43
|
+
}, [e]);
|
|
54
44
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
I as useInvalidateMvxTokensBalancesQuery
|
|
58
|
-
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { o as useGetMvxTokensBalancesQuery, s as useInvalidateMvxTokensBalancesQuery };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { TokenType } from '../../types';
|
|
2
1
|
import { AxiosError } from 'axios';
|
|
3
|
-
|
|
2
|
+
import { TokenType } from '../../types';
|
|
4
3
|
export declare const useGetNonMvxTokensBalancesQuery: ({ tokens, chainId }: {
|
|
5
4
|
tokens: TokenType[];
|
|
6
5
|
chainId?: string;
|
|
7
|
-
}) => import('@tanstack/react-query').UseQueryResult<{
|
|
6
|
+
}) => import('@tanstack/react-query').UseQueryResult<NoInfer<{
|
|
8
7
|
balance: string;
|
|
9
8
|
chainId: string;
|
|
10
9
|
address: string;
|
|
@@ -24,5 +23,5 @@ export declare const useGetNonMvxTokensBalancesQuery: ({ tokens, chainId }: {
|
|
|
24
23
|
symbol: string;
|
|
25
24
|
}[];
|
|
26
25
|
isNative?: boolean;
|
|
27
|
-
}[]
|
|
26
|
+
}[]>, AxiosError<unknown, any>>;
|
|
28
27
|
export declare function useInvalidateEvmTokensBalances(): () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../useFetchBridgeData-B5xt9GbW.js");exports.useGetNonMvxTokensBalancesQuery=e.r,exports.useInvalidateEvmTokensBalances=e.i;
|
|
@@ -1,75 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { useMemo as l, useCallback as f } from "react";
|
|
4
|
-
import "yup";
|
|
5
|
-
import "@multiversx/sdk-dapp-utils/out/helpers/parseAmount";
|
|
6
|
-
import "bignumber.js";
|
|
7
|
-
import "wagmi";
|
|
8
|
-
import { useBalances as d } from "../hooks/useBalances.mjs";
|
|
9
|
-
import "formik";
|
|
10
|
-
import "axios";
|
|
11
|
-
import "@solana/web3.js";
|
|
12
|
-
import "bitcoinjs-lib";
|
|
13
|
-
import "viem";
|
|
14
|
-
import "../context/Web3AppProvider.mjs";
|
|
15
|
-
import "../constants/index.mjs";
|
|
16
|
-
import "@reown/appkit-adapter-solana/react";
|
|
17
|
-
import "@reown/appkit-controllers";
|
|
18
|
-
const M = ({
|
|
19
|
-
tokens: e,
|
|
20
|
-
chainId: o
|
|
21
|
-
}) => {
|
|
22
|
-
const { address: s } = c(), { getBalances: a } = d(), i = l(
|
|
23
|
-
() => e.map((r) => r.address),
|
|
24
|
-
[e]
|
|
25
|
-
);
|
|
26
|
-
return m({
|
|
27
|
-
queryKey: ["non-mvx-tokens-balances", s, o, i],
|
|
28
|
-
queryFn: async () => {
|
|
29
|
-
try {
|
|
30
|
-
if (!s)
|
|
31
|
-
throw new Error("User address is required");
|
|
32
|
-
if (!o)
|
|
33
|
-
throw new Error("Chain ID is required");
|
|
34
|
-
return (await a({
|
|
35
|
-
tokens: e,
|
|
36
|
-
chainId: o
|
|
37
|
-
})).map((n) => {
|
|
38
|
-
const t = e.find(
|
|
39
|
-
(u) => u.address.toLowerCase() === n.tokenId.toLowerCase()
|
|
40
|
-
);
|
|
41
|
-
if (!t)
|
|
42
|
-
throw new Error("Token not found");
|
|
43
|
-
return {
|
|
44
|
-
...t,
|
|
45
|
-
balance: n.balance.toString()
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
|
-
} catch (r) {
|
|
49
|
-
throw r;
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
retry: (r, n) => {
|
|
53
|
-
var t;
|
|
54
|
-
return ((t = n.response) == null ? void 0 : t.status) === 404;
|
|
55
|
-
},
|
|
56
|
-
enabled: !!s && !!o,
|
|
57
|
-
refetchOnWindowFocus: !1,
|
|
58
|
-
refetchIntervalInBackground: !0,
|
|
59
|
-
refetchInterval: 2e4,
|
|
60
|
-
refetchOnReconnect: "always",
|
|
61
|
-
gcTime: 0
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
function O() {
|
|
65
|
-
const e = p();
|
|
66
|
-
return f(() => {
|
|
67
|
-
e.invalidateQueries({
|
|
68
|
-
queryKey: ["non-mvx-tokens-balances"]
|
|
69
|
-
});
|
|
70
|
-
}, [e]);
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
M as useGetNonMvxTokensBalancesQuery,
|
|
74
|
-
O as useInvalidateEvmTokensBalances
|
|
75
|
-
};
|
|
1
|
+
import { i as e, r as t } from "../../useFetchBridgeData-C_hZjzd_.mjs";
|
|
2
|
+
export { t as useGetNonMvxTokensBalancesQuery, e as useInvalidateEvmTokensBalances };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../api/getRate.js"),t=require("../../helpers/getApiURL.js");let n=require("@tanstack/react-query");var r=()=>(0,n.useMutation)({mutationFn:async n=>{let{data:r}=await e.getRate({url:t.getApiURL(),...n});return r}});exports.useGetRateMutation=r;
|