@multiversx/sdk-dapp-liquidity 2.0.0 → 2.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all-networks--dfVLHLJ.js +2 -0
- package/all-networks-Czd8zS1n.mjs +4 -0
- package/api/checkAccount.js +1 -21
- package/api/checkAccount.mjs +13 -13
- package/api/confirmRate.js +1 -29
- package/api/confirmRate.mjs +17 -22
- package/api/getChains.js +1 -17
- package/api/getChains.mjs +10 -10
- package/api/getRate.js +1 -27
- package/api/getRate.mjs +17 -20
- package/api/getTokens.js +1 -22
- package/api/getTokens.mjs +14 -15
- package/api/getTokensBalances.js +1 -21
- package/api/getTokensBalances.mjs +13 -13
- package/api/getTransactions.js +1 -38
- package/api/getTransactions.mjs +25 -31
- package/api/index.js +1 -18
- package/api/index.mjs +16 -16
- package/api/sendTransactions.js +1 -32
- package/api/sendTransactions.mjs +19 -19
- package/api/tests/confirmRate.spec.js +1 -130
- package/api/tests/confirmRate.spec.mjs +44 -58
- package/api/tests/getChains.spec.js +1 -43
- package/api/tests/getChains.spec.mjs +15 -18
- package/api/tests/getRate.spec.js +1 -87
- package/api/tests/getRate.spec.mjs +35 -49
- package/api/tests/getTokens.spec.js +1 -68
- package/api/tests/getTokens.spec.mjs +23 -29
- package/api/tests/getTransactions.spec.js +1 -94
- package/api/tests/getTransactions.spec.mjs +35 -51
- package/api/tests/sendTransactions.spec.js +1 -96
- package/api/tests/sendTransactions.spec.mjs +44 -52
- package/constants/index.js +1 -4
- package/constants/index.mjs +2 -2
- package/default-D0Jk5ROI.mjs +4 -0
- package/default-DbU6vPaB.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.d.ts +8 -0
- package/helpers/assertRateConfirmationMatchesIntent.js +2 -0
- package/helpers/assertRateConfirmationMatchesIntent.mjs +20 -0
- package/helpers/base64Utils.js +1 -31
- package/helpers/base64Utils.mjs +14 -24
- package/helpers/decodeLoginToken.js +1 -27
- package/helpers/decodeLoginToken.mjs +13 -18
- package/helpers/decodeToken.js +1 -39
- package/helpers/decodeToken.mjs +20 -31
- package/helpers/getApiURL.js +1 -7
- package/helpers/getApiURL.mjs +3 -5
- package/helpers/getBridgeURL.js +1 -7
- package/helpers/getBridgeURL.mjs +3 -5
- package/helpers/getDisplayName.js +1 -11
- package/helpers/getDisplayName.mjs +3 -8
- package/helpers/getMvxApiURL.js +1 -7
- package/helpers/getMvxApiURL.mjs +3 -5
- package/helpers/getMvxChainId.js +1 -7
- package/helpers/getMvxChainId.mjs +3 -5
- package/helpers/getMvxExplorerAddress.js +1 -7
- package/helpers/getMvxExplorerAddress.mjs +3 -5
- package/helpers/index.d.ts +2 -0
- package/helpers/index.js +1 -22
- package/helpers/index.mjs +24 -20
- package/helpers/safeImageUrl.d.ts +1 -0
- package/helpers/safeImageUrl.js +2 -0
- package/helpers/safeImageUrl.mjs +13 -0
- package/helpers/serializeTransaction.js +1 -8
- package/helpers/serializeTransaction.mjs +3 -5
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.d.ts +1 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +2 -0
- package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +52 -0
- package/helpers/tests/base64Utils.spec.js +1 -29
- package/helpers/tests/base64Utils.spec.mjs +11 -24
- package/helpers/tests/decodeLoginToken.spec.js +1 -34
- package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
- package/helpers/tests/decodeToken.spec.js +1 -27
- package/helpers/tests/decodeToken.spec.mjs +7 -12
- package/helpers/tests/safeImageUrl.spec.d.ts +1 -0
- package/helpers/tests/safeImageUrl.spec.js +2 -0
- package/helpers/tests/safeImageUrl.spec.mjs +32 -0
- package/helpers/tests/serializeTransaction.spec.d.ts +1 -0
- package/helpers/tests/serializeTransaction.spec.js +2 -0
- package/helpers/tests/serializeTransaction.spec.mjs +24 -0
- package/index.js +1 -228
- package/index.mjs +196 -192
- package/package.json +14 -9
- package/react.esm-B0AMOHxa.js +73 -0
- package/react.esm-BxvJJ86Q.mjs +9949 -0
- package/reactjs/adapters/SuiAdapter.d.ts +14 -0
- package/reactjs/adapters/SuiAdapter.js +1 -349
- package/reactjs/adapters/SuiAdapter.mjs +171 -199
- package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
- package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
- package/reactjs/components/AccountAddress/index.js +1 -4
- package/reactjs/components/AccountAddress/index.mjs +2 -2
- package/reactjs/components/AmountCard/AmountCard.js +1 -33
- package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
- package/reactjs/components/AmountCard/index.js +1 -4
- package/reactjs/components/AmountCard/index.mjs +2 -2
- package/reactjs/components/AmountInput/AmountInput.js +1 -71
- package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
- package/reactjs/components/AmountInput/index.js +1 -4
- package/reactjs/components/AmountInput/index.mjs +2 -2
- package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
- package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
- package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
- package/reactjs/components/BridgeForm/Deposit.js +1 -673
- package/reactjs/components/BridgeForm/Deposit.mjs +381 -503
- package/reactjs/components/BridgeForm/Transfer.js +1 -559
- package/reactjs/components/BridgeForm/Transfer.mjs +316 -427
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
- package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
- package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
- package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
- package/reactjs/components/BridgeForm/index.js +1 -4
- package/reactjs/components/BridgeForm/index.mjs +2 -2
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
- package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +35 -65
- package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -367
- package/reactjs/components/BridgeHistory/BridgeHistory.mjs +177 -193
- package/reactjs/components/BridgeHistory/index.js +1 -4
- package/reactjs/components/BridgeHistory/index.mjs +2 -2
- package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
- package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
- package/reactjs/components/Connect/BridgeConnectButton.js +1 -34
- package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -19
- package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
- package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
- package/reactjs/components/Connect/CustomConnectButton.js +1 -40
- package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
- package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
- package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
- package/reactjs/components/Connect/MvxConnectButton.js +1 -43
- package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
- package/reactjs/components/Connect/SwitchChainButton.js +1 -29
- package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
- package/reactjs/components/Connect/index.js +1 -16
- package/reactjs/components/Connect/index.mjs +14 -14
- package/reactjs/components/CopyButton/CopyButton.js +1 -46
- package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
- package/reactjs/components/CopyButton/index.js +1 -4
- package/reactjs/components/CopyButton/index.mjs +2 -2
- package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
- package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
- package/reactjs/components/CopyButton/utils/index.js +1 -4
- package/reactjs/components/CopyButton/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
- package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
- package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
- package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
- package/reactjs/components/DisplayAmount/index.js +1 -4
- package/reactjs/components/DisplayAmount/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/index.js +1 -4
- package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
- package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
- package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
- package/reactjs/components/Error/Error.js +1 -66
- package/reactjs/components/Error/Error.mjs +29 -29
- package/reactjs/components/Error/index.js +1 -4
- package/reactjs/components/Error/index.mjs +2 -2
- package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
- package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
- package/reactjs/components/SmallLoader/index.js +1 -4
- package/reactjs/components/SmallLoader/index.mjs +2 -2
- package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
- package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
- package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
- package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
- package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -51
- package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -44
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
- package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
- package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -39
- package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +22 -18
- package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
- package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
- package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
- package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
- package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
- package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
- package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -81
- package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -57
- package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
- package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
- package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
- package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
- package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
- package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
- package/reactjs/components/TokenSelector/index.js +1 -4
- package/reactjs/components/TokenSelector/index.mjs +2 -2
- package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
- package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
- package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
- package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
- package/reactjs/components/TransactionToast/index.js +1 -6
- package/reactjs/components/TransactionToast/index.mjs +4 -4
- package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
- package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
- package/reactjs/components/TrimAddress/index.js +1 -4
- package/reactjs/components/TrimAddress/index.mjs +2 -2
- package/reactjs/components/base/MxButton/MxButton.js +1 -71
- package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
- package/reactjs/components/base/MxButton/index.js +1 -4
- package/reactjs/components/base/MxButton/index.mjs +2 -2
- package/reactjs/components/base/MxCard/MxCard.js +1 -54
- package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
- package/reactjs/components/base/MxCard/index.js +1 -4
- package/reactjs/components/base/MxCard/index.mjs +2 -2
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
- package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
- package/reactjs/components/base/MxCircleLoader/index.js +1 -4
- package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
- package/reactjs/components/base/MxLink/MxLink.js +1 -70
- package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
- package/reactjs/components/base/MxLink/index.js +1 -4
- package/reactjs/components/base/MxLink/index.mjs +2 -2
- package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
- package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
- package/reactjs/components/base/MxSearch/index.js +1 -4
- package/reactjs/components/base/MxSearch/index.mjs +2 -2
- package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
- package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
- package/reactjs/components/base/MxSlideover/index.js +1 -4
- package/reactjs/components/base/MxSlideover/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
- package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
- package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
- package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
- package/reactjs/components/base/MxTooltip/components/index.js +1 -6
- package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
- package/reactjs/components/base/MxTooltip/index.js +1 -4
- package/reactjs/components/base/MxTooltip/index.mjs +2 -2
- package/reactjs/components/base/index.js +1 -14
- package/reactjs/components/base/index.mjs +12 -12
- package/reactjs/components/index.js +1 -54
- package/reactjs/components/index.mjs +52 -52
- package/reactjs/constants/chains.js +1 -54
- package/reactjs/constants/chains.mjs +33 -52
- package/reactjs/constants/index.js +1 -13
- package/reactjs/constants/index.mjs +9 -10
- package/reactjs/context/Web3AppProvider.js +1 -40
- package/reactjs/context/Web3AppProvider.mjs +34 -34
- package/reactjs/context/queryClient.js +1 -11
- package/reactjs/context/queryClient.mjs +5 -8
- package/reactjs/context/useWeb3App.js +1 -12
- package/reactjs/context/useWeb3App.mjs +7 -8
- package/reactjs/helpers/index.js +1 -6
- package/reactjs/helpers/index.mjs +4 -4
- package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
- package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
- package/reactjs/hooks/index.js +1 -35
- package/reactjs/hooks/index.mjs +33 -33
- package/reactjs/hooks/tests/useGenericSignMessage.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.js +2 -0
- package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +52 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.d.ts +1 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.js +2 -0
- package/reactjs/hooks/tests/useSignTransaction.spec.mjs +156 -0
- package/reactjs/hooks/useAccount.js +1 -13
- package/reactjs/hooks/useAccount.mjs +7 -8
- package/reactjs/hooks/useBalances.js +1 -53
- package/reactjs/hooks/useBalances.mjs +28 -40
- package/reactjs/hooks/useBridgeApiChainId.js +1 -13
- package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
- package/reactjs/hooks/useBridgeFormik.js +1 -162
- package/reactjs/hooks/useBridgeFormik.mjs +110 -150
- package/reactjs/hooks/useDebounce.js +1 -13
- package/reactjs/hooks/useDebounce.mjs +8 -10
- package/reactjs/hooks/useFetchBridgeData.js +1 -45
- package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
- package/reactjs/hooks/useFetchTokens.js +1 -113
- package/reactjs/hooks/useFetchTokens.mjs +80 -106
- package/reactjs/hooks/useGenericSignMessage.js +1 -55
- package/reactjs/hooks/useGenericSignMessage.mjs +47 -47
- package/reactjs/hooks/useGetChainId.js +1 -11
- package/reactjs/hooks/useGetChainId.mjs +7 -8
- package/reactjs/hooks/useResolveTokenChain.js +1 -20
- package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
- package/reactjs/hooks/useSendTransactions.js +1 -25
- package/reactjs/hooks/useSendTransactions.mjs +19 -23
- package/reactjs/hooks/useSignTransaction.js +1 -86
- package/reactjs/hooks/useSignTransaction.mjs +59 -59
- package/reactjs/hooks/useSuiConnect.js +1 -86
- package/reactjs/hooks/useSuiConnect.mjs +52 -70
- package/reactjs/hooks/validation/index.js +1 -10
- package/reactjs/hooks/validation/index.mjs +8 -8
- package/reactjs/hooks/validation/useAmountSchema.js +1 -32
- package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
- package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
- package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
- package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
- package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
- package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
- package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
- package/reactjs/index.js +1 -190
- package/reactjs/index.mjs +154 -154
- package/reactjs/init/index.js +1 -5
- package/reactjs/init/index.mjs +3 -3
- package/reactjs/init/init.d.ts +1 -0
- package/reactjs/init/init.js +1 -139
- package/reactjs/init/init.mjs +59 -72
- package/reactjs/queries/index.js +1 -17
- package/reactjs/queries/index.mjs +15 -15
- package/reactjs/queries/useCheckAccount.query.js +1 -39
- package/reactjs/queries/useCheckAccount.query.mjs +29 -33
- package/reactjs/queries/useGetAllTokens.query.js +1 -35
- package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
- package/reactjs/queries/useGetChains.query.js +1 -34
- package/reactjs/queries/useGetChains.query.mjs +26 -28
- package/reactjs/queries/useGetHistory.query.d.ts +1 -1
- package/reactjs/queries/useGetHistory.query.js +1 -68
- package/reactjs/queries/useGetHistory.query.mjs +55 -58
- package/reactjs/queries/useGetMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -71
- package/reactjs/queries/useGetMvxTokensBalances.query.mjs +40 -53
- package/reactjs/queries/useGetNonMvxTokensBalances.query.d.ts +1 -1
- package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
- package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +51 -59
- package/reactjs/queries/useGetRate.mutation.js +1 -18
- package/reactjs/queries/useGetRate.mutation.mjs +12 -15
- package/reactjs/reexports.js +1 -48
- package/reactjs/reexports.mjs +13 -13
- package/reactjs/utils/delay.js +1 -6
- package/reactjs/utils/delay.mjs +3 -3
- package/reactjs/utils/formatAmount.js +1 -23
- package/reactjs/utils/formatAmount.mjs +16 -17
- package/reactjs/utils/getCleanStringAmount.js +1 -11
- package/reactjs/utils/getCleanStringAmount.mjs +6 -8
- package/reactjs/utils/getCompletePathname.js +1 -5
- package/reactjs/utils/getCompletePathname.mjs +3 -3
- package/reactjs/utils/getInitialTokens.js +1 -12
- package/reactjs/utils/getInitialTokens.mjs +6 -7
- package/reactjs/utils/hasEnoughFunds.js +1 -19
- package/reactjs/utils/hasEnoughFunds.mjs +11 -14
- package/reactjs/utils/index.js +1 -26
- package/reactjs/utils/index.mjs +24 -24
- package/reactjs/utils/isStringFloat.js +1 -21
- package/reactjs/utils/isStringFloat.mjs +11 -18
- package/reactjs/utils/mxClsx.js +1 -8
- package/reactjs/utils/mxClsx.mjs +4 -6
- package/reactjs/utils/pipe.js +1 -25
- package/reactjs/utils/pipe.mjs +13 -17
- package/reactjs/utils/removeCommas.js +1 -6
- package/reactjs/utils/removeCommas.mjs +2 -4
- package/reactjs/utils/roundAmount.js +1 -40
- package/reactjs/utils/roundAmount.mjs +16 -36
- package/reactjs/utils/testNumber.js +1 -4
- package/reactjs/utils/testNumber.mjs +2 -2
- package/store/inMemoryStore.js +1 -39
- package/store/inMemoryStore.mjs +17 -21
- package/style.css +1 -2274
- package/types/chainType.js +1 -11
- package/types/chainType.mjs +2 -9
- package/types/errors.d.ts +3 -0
- package/types/errors.js +2 -0
- package/types/errors.mjs +8 -0
- package/types/providerType.js +1 -9
- package/types/providerType.mjs +2 -7
- package/types/transaction.d.ts +2 -0
- package/all-networks-EJIVYZ_i.mjs +0 -4
- package/all-networks-NYACMyeN.js +0 -4
- package/default-BYtXv70Z.mjs +0 -4
- package/default-H3AbmzFV.js +0 -4
- package/reactjs/hooks/useSignTransaction.d.ts +0 -511
|
@@ -1,151 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
-
const faPowerOff = require("@fortawesome/free-solid-svg-icons/faPowerOff");
|
|
6
|
-
const reactFontawesome = require("@fortawesome/react-fontawesome");
|
|
7
|
-
const react = require("@reown/appkit/react");
|
|
8
|
-
const helpers_getDisplayName = require("../../../helpers/getDisplayName.js");
|
|
9
|
-
const reactjs_components_Connect_SwitchChainButton = require("./SwitchChainButton.js");
|
|
10
|
-
const types_chainType = require("../../../types/chainType.js");
|
|
11
|
-
const reactjs_hooks_useAccount = require("../../hooks/useAccount.js");
|
|
12
|
-
const reactjs_hooks_useSuiConnect = require("../../hooks/useSuiConnect.js");
|
|
13
|
-
require("clsx");
|
|
14
|
-
require("tailwind-merge");
|
|
15
|
-
require("../base/MxCard/MxCard.js");
|
|
16
|
-
const reactjs_components_base_MxLink_MxLink = require("../base/MxLink/MxLink.js");
|
|
17
|
-
require("../base/MxSearch/MxSearch.js");
|
|
18
|
-
require("@fortawesome/free-solid-svg-icons/faClose");
|
|
19
|
-
require("@headlessui/react");
|
|
20
|
-
require("react");
|
|
21
|
-
require("react-dom");
|
|
22
|
-
require("react-popper");
|
|
23
|
-
require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");
|
|
24
|
-
require("../../constants/index.js");
|
|
25
|
-
const reactjs_components_CopyButton_CopyButton = require("../CopyButton/CopyButton.js");
|
|
26
|
-
const reactjs_components_TrimAddress_TrimAddress = require("../TrimAddress/TrimAddress.js");
|
|
27
|
-
const BridgeAccountDisplay = ({
|
|
28
|
-
activeChain,
|
|
29
|
-
disabled
|
|
30
|
-
}) => {
|
|
31
|
-
var _a;
|
|
32
|
-
const account = reactjs_hooks_useAccount.useAccount();
|
|
33
|
-
const { disconnect } = react.useDisconnect();
|
|
34
|
-
const suiConnect = reactjs_hooks_useSuiConnect.useSuiConnect();
|
|
35
|
-
const isSuiChain = (activeChain == null ? void 0 : activeChain.chainType) === types_chainType.ChainType.sui;
|
|
36
|
-
const displayAddress = isSuiChain ? suiConnect.suiAddress : account.address;
|
|
37
|
-
const handleDisconnect = async (e) => {
|
|
38
|
-
try {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
if (isSuiChain) {
|
|
41
|
-
await suiConnect.disconnect();
|
|
42
|
-
} else {
|
|
43
|
-
await disconnect();
|
|
44
|
-
}
|
|
45
|
-
} catch (error) {
|
|
46
|
-
console.error("Failed to disconnect:", error);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
if (displayAddress) {
|
|
50
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
-
"img",
|
|
53
|
-
{
|
|
54
|
-
src: activeChain == null ? void 0 : activeChain.pngUrl,
|
|
55
|
-
alt: "",
|
|
56
|
-
className: "liq-w-6 liq-h-6 liq-rounded-lg"
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-truncate liq-text-gray-400", children: helpers_getDisplayName.getDisplayName(activeChain) }),
|
|
60
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-ml-[-5px]", children: ":" }),
|
|
61
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center liq-justify-between", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1", children: [
|
|
62
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
reactjs_components_base_MxLink_MxLink.MxLink,
|
|
64
|
-
{
|
|
65
|
-
to: `${(_a = activeChain == null ? void 0 : activeChain.blockExplorerUrls) == null ? void 0 : _a[0]}/address/${displayAddress}`,
|
|
66
|
-
target: "_blank",
|
|
67
|
-
showExternalIcon: false,
|
|
68
|
-
className: "!liq-relative",
|
|
69
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
70
|
-
reactjs_components_TrimAddress_TrimAddress.TrimAddress,
|
|
71
|
-
{
|
|
72
|
-
address: displayAddress,
|
|
73
|
-
"data-testid": "evm-address"
|
|
74
|
-
}
|
|
75
|
-
) })
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
79
|
-
reactjs_components_CopyButton_CopyButton.CopyButton,
|
|
80
|
-
{
|
|
81
|
-
text: displayAddress,
|
|
82
|
-
className: "liq-text-sm",
|
|
83
|
-
"data-testid": "evm-copy-button"
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] }) }),
|
|
87
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
|
-
"button",
|
|
89
|
-
{
|
|
90
|
-
className: "focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",
|
|
91
|
-
onClick: handleDisconnect,
|
|
92
|
-
"data-testid": "evm-disconnect-button",
|
|
93
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: faPowerOff.faPowerOff })
|
|
94
|
-
}
|
|
95
|
-
) })
|
|
96
|
-
] });
|
|
97
|
-
}
|
|
98
|
-
if (isSuiChain) {
|
|
99
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-max-w-full liq-items-center liq-gap-2", children: [
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
-
"button",
|
|
102
|
-
{
|
|
103
|
-
disabled: disabled || suiConnect.isConnecting,
|
|
104
|
-
onClick: () => suiConnect.connect(),
|
|
105
|
-
className: "liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",
|
|
106
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
107
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: suiConnect.isConnecting ? "Connecting..." : "Connect" }),
|
|
108
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
-
"img",
|
|
110
|
-
{
|
|
111
|
-
src: activeChain == null ? void 0 : activeChain.pngUrl,
|
|
112
|
-
alt: "",
|
|
113
|
-
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-truncate md:liq-text-clip", children: helpers_getDisplayName.getDisplayName(activeChain) })
|
|
117
|
-
] }) })
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
suiConnect.isConnecting && /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
|
-
"button",
|
|
122
|
-
{
|
|
123
|
-
type: "button",
|
|
124
|
-
onClick: () => void suiConnect.cancelPendingConnection(),
|
|
125
|
-
className: "liq-shrink-0 liq-rounded-lg liq-px-2 liq-py-1 liq-text-xs liq-font-medium liq-text-neutral-400 hover:liq-text-white",
|
|
126
|
-
children: "Cancel"
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
] });
|
|
130
|
-
}
|
|
131
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
132
|
-
reactjs_components_Connect_SwitchChainButton.SwitchChainButton,
|
|
133
|
-
{
|
|
134
|
-
disabled,
|
|
135
|
-
className: "liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",
|
|
136
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: account.isConnecting ? "Connecting..." : "Connect" }),
|
|
138
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
139
|
-
"img",
|
|
140
|
-
{
|
|
141
|
-
src: activeChain == null ? void 0 : activeChain.pngUrl,
|
|
142
|
-
alt: "",
|
|
143
|
-
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
144
|
-
}
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-truncate md:liq-text-clip", children: helpers_getDisplayName.getDisplayName(activeChain) })
|
|
147
|
-
] }) })
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
};
|
|
151
|
-
exports.BridgeAccountDisplay = BridgeAccountDisplay;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("@fortawesome/free-solid-svg-icons/faPowerOff"),x=require("@fortawesome/react-fontawesome"),p=require("@reown/appkit/react"),t=require("../../../helpers/getDisplayName.js"),g=require("./SwitchChainButton.js"),j=require("../../../types/chainType.js"),y=require("../../hooks/useAccount.js"),f=require("../../hooks/useSuiConnect.js");require("clsx");require("tailwind-merge");require("../base/MxCard/MxCard.js");const b=require("../base/MxLink/MxLink.js");require("../base/MxSearch/MxSearch.js");require("@fortawesome/free-solid-svg-icons/faClose");require("@headlessui/react");require("react");require("react-dom");require("react-popper");require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");require("../../constants/index.js");const N=require("../CopyButton/CopyButton.js"),w=require("../TrimAddress/TrimAddress.js"),_=({activeChain:i,disabled:n})=>{var c;const o=y.useAccount(),{disconnect:q}=p.useDisconnect(),l=f.useSuiConnect(),r=(i==null?void 0:i.chainType)===j.ChainType.sui,s=r?l.suiAddress:o.address,d=async a=>{try{a.preventDefault(),r?await l.disconnect():await q()}catch(u){console.error("Failed to disconnect:",u)}};return s?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:i==null?void 0:i.pngUrl,alt:"",className:"liq-w-6 liq-h-6 liq-rounded-lg"}),e.jsx("span",{className:"liq-truncate liq-text-gray-400",children:t.getDisplayName(i)}),e.jsx("span",{className:"liq-ml-[-5px]",children:":"}),e.jsx("div",{className:"liq-flex liq-items-center liq-justify-between",children:e.jsxs("div",{className:"liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1",children:[e.jsx(b.MxLink,{to:`${(c=i==null?void 0:i.blockExplorerUrls)==null?void 0:c[0]}/address/${s}`,target:"_blank",showExternalIcon:!1,className:"!liq-relative",children:e.jsx("div",{className:"liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",children:e.jsx(w.TrimAddress,{address:s,"data-testid":"evm-address"})})}),e.jsx(N.CopyButton,{text:s,className:"liq-text-sm","data-testid":"evm-copy-button"})]})}),e.jsx("div",{className:"liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1",children:e.jsx("button",{className:"focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",onClick:d,"data-testid":"evm-disconnect-button",children:e.jsx(x.FontAwesomeIcon,{icon:m.faPowerOff})})})]}):r?e.jsxs("div",{className:"liq-flex liq-max-w-full liq-items-center liq-gap-2",children:[e.jsx("button",{disabled:n||l.isConnecting,onClick:()=>l.connect(),className:"liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",children:e.jsx("div",{className:"liq-flex liq-items-center",children:e.jsxs("div",{className:"liq-flex liq-justify-center liq-items-center liq-gap-2",children:[e.jsx("div",{children:l.isConnecting?"Connecting...":"Connect"}),e.jsx("img",{src:i==null?void 0:i.pngUrl,alt:"",className:"liq-w-4 liq-h-4 liq-rounded-sm"}),e.jsx("div",{className:"liq-truncate md:liq-text-clip",children:t.getDisplayName(i)})]})})}),l.isConnecting&&e.jsx("button",{type:"button",onClick:()=>void l.cancelPendingConnection(),className:"liq-shrink-0 liq-rounded-lg liq-px-2 liq-py-1 liq-text-xs liq-font-medium liq-text-neutral-400 hover:liq-text-white",children:"Cancel"})]}):e.jsx(g.SwitchChainButton,{disabled:n,className:"liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",children:e.jsx("div",{className:"liq-flex liq-items-center",children:e.jsxs("div",{className:"liq-flex liq-justify-center liq-items-center liq-gap-2",children:[e.jsx("div",{children:o.isConnecting?"Connecting...":"Connect"}),e.jsx("img",{src:i==null?void 0:i.pngUrl,alt:"",className:"liq-w-4 liq-h-4 liq-rounded-sm"}),e.jsx("div",{className:"liq-truncate md:liq-text-clip",children:t.getDisplayName(i)})]})})})};exports.BridgeAccountDisplay=_;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { faPowerOff } from "@fortawesome/free-solid-svg-icons/faPowerOff";
|
|
3
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { useDisconnect } from "@reown/appkit/react";
|
|
5
|
-
import { getDisplayName } from "../../../helpers/getDisplayName.mjs";
|
|
6
|
-
import { SwitchChainButton } from "./SwitchChainButton.mjs";
|
|
7
|
-
import { ChainType } from "../../../types/chainType.mjs";
|
|
8
|
-
import { useAccount } from "../../hooks/useAccount.mjs";
|
|
9
|
-
import { useSuiConnect } from "../../hooks/useSuiConnect.mjs";
|
|
1
|
+
import { jsxs as t, Fragment as u, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { faPowerOff as f } from "@fortawesome/free-solid-svg-icons/faPowerOff";
|
|
3
|
+
import { FontAwesomeIcon as x } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { useDisconnect as g } from "@reown/appkit/react";
|
|
5
|
+
import { getDisplayName as s } from "../../../helpers/getDisplayName.mjs";
|
|
6
|
+
import { SwitchChainButton as y } from "./SwitchChainButton.mjs";
|
|
7
|
+
import { ChainType as N } from "../../../types/chainType.mjs";
|
|
8
|
+
import { useAccount as b } from "../../hooks/useAccount.mjs";
|
|
9
|
+
import { useSuiConnect as w } from "../../hooks/useSuiConnect.mjs";
|
|
10
10
|
import "clsx";
|
|
11
11
|
import "tailwind-merge";
|
|
12
12
|
import "../base/MxCard/MxCard.mjs";
|
|
13
|
-
import { MxLink } from "../base/MxLink/MxLink.mjs";
|
|
13
|
+
import { MxLink as h } from "../base/MxLink/MxLink.mjs";
|
|
14
14
|
import "../base/MxSearch/MxSearch.mjs";
|
|
15
15
|
import "@fortawesome/free-solid-svg-icons/faClose";
|
|
16
16
|
import "@headlessui/react";
|
|
@@ -19,132 +19,116 @@ import "react-dom";
|
|
|
19
19
|
import "react-popper";
|
|
20
20
|
import "../base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs";
|
|
21
21
|
import "../../constants/index.mjs";
|
|
22
|
-
import { CopyButton } from "../CopyButton/CopyButton.mjs";
|
|
23
|
-
import { TrimAddress } from "../TrimAddress/TrimAddress.mjs";
|
|
24
|
-
const
|
|
25
|
-
activeChain,
|
|
26
|
-
disabled
|
|
22
|
+
import { CopyButton as k } from "../CopyButton/CopyButton.mjs";
|
|
23
|
+
import { TrimAddress as A } from "../TrimAddress/TrimAddress.mjs";
|
|
24
|
+
const W = ({
|
|
25
|
+
activeChain: i,
|
|
26
|
+
disabled: o
|
|
27
27
|
}) => {
|
|
28
|
-
var
|
|
29
|
-
const
|
|
30
|
-
const { disconnect } = useDisconnect();
|
|
31
|
-
const suiConnect = useSuiConnect();
|
|
32
|
-
const isSuiChain = (activeChain == null ? void 0 : activeChain.chainType) === ChainType.sui;
|
|
33
|
-
const displayAddress = isSuiChain ? suiConnect.suiAddress : account.address;
|
|
34
|
-
const handleDisconnect = async (e) => {
|
|
28
|
+
var d;
|
|
29
|
+
const m = b(), { disconnect: c } = g(), e = w(), n = (i == null ? void 0 : i.chainType) === N.sui, r = n ? e.suiAddress : m.address, q = async (a) => {
|
|
35
30
|
try {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} else {
|
|
40
|
-
await disconnect();
|
|
41
|
-
}
|
|
42
|
-
} catch (error) {
|
|
43
|
-
console.error("Failed to disconnect:", error);
|
|
31
|
+
a.preventDefault(), n ? await e.disconnect() : await c();
|
|
32
|
+
} catch (p) {
|
|
33
|
+
console.error("Failed to disconnect:", p);
|
|
44
34
|
}
|
|
45
35
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
60
|
-
MxLink,
|
|
61
|
-
{
|
|
62
|
-
to: `${(_a = activeChain == null ? void 0 : activeChain.blockExplorerUrls) == null ? void 0 : _a[0]}/address/${displayAddress}`,
|
|
63
|
-
target: "_blank",
|
|
64
|
-
showExternalIcon: false,
|
|
65
|
-
className: "!liq-relative",
|
|
66
|
-
children: /* @__PURE__ */ jsx("div", { className: "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]", children: /* @__PURE__ */ jsx(
|
|
67
|
-
TrimAddress,
|
|
68
|
-
{
|
|
69
|
-
address: displayAddress,
|
|
70
|
-
"data-testid": "evm-address"
|
|
71
|
-
}
|
|
72
|
-
) })
|
|
73
|
-
}
|
|
74
|
-
),
|
|
75
|
-
/* @__PURE__ */ jsx(
|
|
76
|
-
CopyButton,
|
|
77
|
-
{
|
|
78
|
-
text: displayAddress,
|
|
79
|
-
className: "liq-text-sm",
|
|
80
|
-
"data-testid": "evm-copy-button"
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
] }) }),
|
|
84
|
-
/* @__PURE__ */ jsx("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsx(
|
|
85
|
-
"button",
|
|
86
|
-
{
|
|
87
|
-
className: "focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",
|
|
88
|
-
onClick: handleDisconnect,
|
|
89
|
-
"data-testid": "evm-disconnect-button",
|
|
90
|
-
children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faPowerOff })
|
|
91
|
-
}
|
|
92
|
-
) })
|
|
93
|
-
] });
|
|
94
|
-
}
|
|
95
|
-
if (isSuiChain) {
|
|
96
|
-
return /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-max-w-full liq-items-center liq-gap-2", children: [
|
|
97
|
-
/* @__PURE__ */ jsx(
|
|
98
|
-
"button",
|
|
36
|
+
return r ? /* @__PURE__ */ t(u, { children: [
|
|
37
|
+
/* @__PURE__ */ l(
|
|
38
|
+
"img",
|
|
39
|
+
{
|
|
40
|
+
src: i == null ? void 0 : i.pngUrl,
|
|
41
|
+
alt: "",
|
|
42
|
+
className: "liq-w-6 liq-h-6 liq-rounded-lg"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ l("span", { className: "liq-truncate liq-text-gray-400", children: s(i) }),
|
|
46
|
+
/* @__PURE__ */ l("span", { className: "liq-ml-[-5px]", children: ":" }),
|
|
47
|
+
/* @__PURE__ */ l("div", { className: "liq-flex liq-items-center liq-justify-between", children: /* @__PURE__ */ t("div", { className: "liq-flex liq-max-w-[10rem] liq-items-center liq-gap-1", children: [
|
|
48
|
+
/* @__PURE__ */ l(
|
|
49
|
+
h,
|
|
99
50
|
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
),
|
|
113
|
-
/* @__PURE__ */ jsx("div", { className: "liq-truncate md:liq-text-clip", children: getDisplayName(activeChain) })
|
|
114
|
-
] }) })
|
|
51
|
+
to: `${(d = i == null ? void 0 : i.blockExplorerUrls) == null ? void 0 : d[0]}/address/${r}`,
|
|
52
|
+
target: "_blank",
|
|
53
|
+
showExternalIcon: !1,
|
|
54
|
+
className: "!liq-relative",
|
|
55
|
+
children: /* @__PURE__ */ l("div", { className: "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]", children: /* @__PURE__ */ l(
|
|
56
|
+
A,
|
|
57
|
+
{
|
|
58
|
+
address: r,
|
|
59
|
+
"data-testid": "evm-address"
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
115
62
|
}
|
|
116
63
|
),
|
|
117
|
-
|
|
118
|
-
|
|
64
|
+
/* @__PURE__ */ l(
|
|
65
|
+
k,
|
|
119
66
|
{
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
children: "Cancel"
|
|
67
|
+
text: r,
|
|
68
|
+
className: "liq-text-sm",
|
|
69
|
+
"data-testid": "evm-copy-button"
|
|
124
70
|
}
|
|
125
71
|
)
|
|
126
|
-
] })
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
72
|
+
] }) }),
|
|
73
|
+
/* @__PURE__ */ l("div", { className: "liq-ml-auto liq-mr-0 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ l(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
className: "focus-primary liq-flex liq-items-center liq-gap-1 liq-rounded-xl liq-px-0 liq-py-2 liq-text-sm liq-font-semibold liq-text-neutral-400 liq-transition-colors liq-duration-200 hover:enabled:liq-text-white disabled:liq-opacity-50",
|
|
77
|
+
onClick: q,
|
|
78
|
+
"data-testid": "evm-disconnect-button",
|
|
79
|
+
children: /* @__PURE__ */ l(x, { icon: f })
|
|
80
|
+
}
|
|
81
|
+
) })
|
|
82
|
+
] }) : n ? /* @__PURE__ */ t("div", { className: "liq-flex liq-max-w-full liq-items-center liq-gap-2", children: [
|
|
83
|
+
/* @__PURE__ */ l(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
disabled: o || e.isConnecting,
|
|
87
|
+
onClick: () => e.connect(),
|
|
88
|
+
className: "liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",
|
|
89
|
+
children: /* @__PURE__ */ l("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ t("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
90
|
+
/* @__PURE__ */ l("div", { children: e.isConnecting ? "Connecting..." : "Connect" }),
|
|
91
|
+
/* @__PURE__ */ l(
|
|
92
|
+
"img",
|
|
93
|
+
{
|
|
94
|
+
src: i == null ? void 0 : i.pngUrl,
|
|
95
|
+
alt: "",
|
|
96
|
+
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ l("div", { className: "liq-truncate md:liq-text-clip", children: s(i) })
|
|
100
|
+
] }) })
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
e.isConnecting && /* @__PURE__ */ l(
|
|
104
|
+
"button",
|
|
105
|
+
{
|
|
106
|
+
type: "button",
|
|
107
|
+
onClick: () => void e.cancelPendingConnection(),
|
|
108
|
+
className: "liq-shrink-0 liq-rounded-lg liq-px-2 liq-py-1 liq-text-xs liq-font-medium liq-text-neutral-400 hover:liq-text-white",
|
|
109
|
+
children: "Cancel"
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }) : /* @__PURE__ */ l(
|
|
113
|
+
y,
|
|
130
114
|
{
|
|
131
|
-
disabled,
|
|
115
|
+
disabled: o,
|
|
132
116
|
className: "liq-rounded-lg liq-font-semibold liq-transition-colors liq-duration-200 disabled:liq-opacity-50 liq-bg-neutral-750 !liq-text-primary-200 hover:enabled:liq-bg-primary liq-px-2",
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ l("div", { className: "liq-flex liq-items-center", children: /* @__PURE__ */ t("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
|
|
118
|
+
/* @__PURE__ */ l("div", { children: m.isConnecting ? "Connecting..." : "Connect" }),
|
|
119
|
+
/* @__PURE__ */ l(
|
|
136
120
|
"img",
|
|
137
121
|
{
|
|
138
|
-
src:
|
|
122
|
+
src: i == null ? void 0 : i.pngUrl,
|
|
139
123
|
alt: "",
|
|
140
124
|
className: "liq-w-4 liq-h-4 liq-rounded-sm"
|
|
141
125
|
}
|
|
142
126
|
),
|
|
143
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ l("div", { className: "liq-truncate md:liq-text-clip", children: s(i) })
|
|
144
128
|
] }) })
|
|
145
129
|
}
|
|
146
130
|
);
|
|
147
131
|
};
|
|
148
132
|
export {
|
|
149
|
-
BridgeAccountDisplay
|
|
133
|
+
W as BridgeAccountDisplay
|
|
150
134
|
};
|
|
@@ -1,35 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const jsxRuntime = require("react/jsx-runtime");
|
|
5
|
-
const reactjs_components_Connect_CustomConnectButton = require("./CustomConnectButton.js");
|
|
6
|
-
const helpers_getDisplayName = require("../../../helpers/getDisplayName.js");
|
|
7
|
-
const reactjs_hooks_useAccount = require("../../hooks/useAccount.js");
|
|
8
|
-
const BridgeConnectButton = ({
|
|
9
|
-
activeChain,
|
|
10
|
-
disabled,
|
|
11
|
-
className
|
|
12
|
-
}) => {
|
|
13
|
-
const account = reactjs_hooks_useAccount.useAccount();
|
|
14
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
-
reactjs_components_Connect_CustomConnectButton.CustomConnectButton,
|
|
16
|
-
{
|
|
17
|
-
className,
|
|
18
|
-
disabled,
|
|
19
|
-
"data-testid": "evm-network-connect-button",
|
|
20
|
-
children: account.isConnected ? null : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liq-flex liq-items-center liq-justify-center liq-gap-1", children: [
|
|
21
|
-
!account.isConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liq-ml-2 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-text-primary-200", children: account.isConnecting ? "Connecting..." : "Connect" }) }),
|
|
22
|
-
activeChain && /* @__PURE__ */ jsxRuntime.jsx(
|
|
23
|
-
"img",
|
|
24
|
-
{
|
|
25
|
-
src: activeChain.pngUrl,
|
|
26
|
-
alt: "",
|
|
27
|
-
className: "liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
(activeChain == null ? void 0 : activeChain.networkName) && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "liq-inline liq-truncate", children: helpers_getDisplayName.getDisplayName(activeChain) })
|
|
31
|
-
] })
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
exports.BridgeConnectButton = BridgeConnectButton;
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("./CustomConnectButton.js"),o=require("../../../helpers/getDisplayName.js"),c=require("../../../helpers/safeImageUrl.js"),i=require("../../hooks/useAccount.js"),u=({activeChain:e,disabled:s,className:l})=>{const t=i.useAccount();return n.jsx(r.CustomConnectButton,{className:l,disabled:s,"data-testid":"evm-network-connect-button",children:t.isConnected?null:n.jsxs("div",{className:"liq-flex liq-items-center liq-justify-center liq-gap-1",children:[!t.isConnected&&n.jsx("div",{className:"liq-ml-2 liq-flex liq-items-center liq-gap-1",children:n.jsx("span",{className:"liq-text-primary-200",children:t.isConnecting?"Connecting...":"Connect"})}),e&&n.jsx("img",{src:c.safeImageUrl(e.pngUrl),alt:"",className:"liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"}),(e==null?void 0:e.networkName)&&n.jsx("span",{className:"liq-inline liq-truncate",children:o.getDisplayName(e)})]})})};exports.BridgeConnectButton=u;
|
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CustomConnectButton } from "./CustomConnectButton.mjs";
|
|
3
|
-
import { getDisplayName } from "../../../helpers/getDisplayName.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as l, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { CustomConnectButton as i } from "./CustomConnectButton.mjs";
|
|
3
|
+
import { getDisplayName as s } from "../../../helpers/getDisplayName.mjs";
|
|
4
|
+
import { safeImageUrl as m } from "../../../helpers/safeImageUrl.mjs";
|
|
5
|
+
import { useAccount as c } from "../../hooks/useAccount.mjs";
|
|
6
|
+
const f = ({
|
|
7
|
+
activeChain: e,
|
|
8
|
+
disabled: t,
|
|
9
|
+
className: r
|
|
9
10
|
}) => {
|
|
10
|
-
const
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
11
|
+
const n = c();
|
|
12
|
+
return /* @__PURE__ */ l(
|
|
13
|
+
i,
|
|
13
14
|
{
|
|
14
|
-
className,
|
|
15
|
-
disabled,
|
|
15
|
+
className: r,
|
|
16
|
+
disabled: t,
|
|
16
17
|
"data-testid": "evm-network-connect-button",
|
|
17
|
-
children:
|
|
18
|
-
!
|
|
19
|
-
|
|
18
|
+
children: n.isConnected ? null : /* @__PURE__ */ o("div", { className: "liq-flex liq-items-center liq-justify-center liq-gap-1", children: [
|
|
19
|
+
!n.isConnected && /* @__PURE__ */ l("div", { className: "liq-ml-2 liq-flex liq-items-center liq-gap-1", children: /* @__PURE__ */ l("span", { className: "liq-text-primary-200", children: n.isConnecting ? "Connecting..." : "Connect" }) }),
|
|
20
|
+
e && /* @__PURE__ */ l(
|
|
20
21
|
"img",
|
|
21
22
|
{
|
|
22
|
-
src:
|
|
23
|
+
src: m(e.pngUrl),
|
|
23
24
|
alt: "",
|
|
24
25
|
className: "liq-z-10 liq-flex liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
|
|
25
26
|
}
|
|
26
27
|
),
|
|
27
|
-
(
|
|
28
|
+
(e == null ? void 0 : e.networkName) && /* @__PURE__ */ l("span", { className: "liq-inline liq-truncate", children: s(e) })
|
|
28
29
|
] })
|
|
29
30
|
}
|
|
30
31
|
);
|
|
31
32
|
};
|
|
32
33
|
export {
|
|
33
|
-
BridgeConnectButton
|
|
34
|
+
f as BridgeConnectButton
|
|
34
35
|
};
|