@orderly.network/ui-transfer 3.1.10 → 3.1.11-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/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { forwardRef, useState, isValidElement, useMemo, useCallback, useEffect,
|
|
|
4
4
|
import { useConfig, useAccount, useAppStore, useTransfer, useSubAccountDataObserver, useSubAccountMaxWithdrawal, useSessionStorage, useEventEmitter, useWalletConnector, useLocalStorage, usePrivateQuery, useConvert, useSwapQuote as useSwapQuote$1, useComputedLTV, useOrderlyContext, useIndexPricesStream, useDeposit, useAssetsHistory, useChains, useMemoizedFn, useWithdraw, useWalletTopic, usePositionStream, useMainTokenStore, useSWR, useTokenInfo, useQuery, useTokensInfo, useHoldingStream, useInternalTransfer, useDebouncedCallback, useTransferHistory, useBalanceTopic } from '@orderly.network/hooks';
|
|
5
5
|
import { zero, Decimal, praseChainIdToNumber, int2hex, toNonExponential, formatWithPrecision, isSolana } from '@orderly.network/utils';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
|
-
import { AccountStatusEnum, ChainNamespace, AssetHistoryStatusEnum, AssetHistorySideEnum, EMPTY_OBJECT, isNativeTokenChecker, ABSTRACT_CHAIN_ID_MAP, nativeTokenAddress } from '@orderly.network/types';
|
|
7
|
+
import { AccountStatusEnum, ChainNamespace, AssetHistoryStatusEnum, AssetHistorySideEnum, isWalletChainChangePendingResult, EMPTY_OBJECT, isNativeTokenChecker, ABSTRACT_CHAIN_ID_MAP, nativeTokenAddress } from '@orderly.network/types';
|
|
8
8
|
import { AuthGuard, useAuthGuard } from '@orderly.network/ui-connector';
|
|
9
9
|
import { useAppContext, useAppConfig } from '@orderly.network/react-app';
|
|
10
10
|
import { qrcode } from '@akamfoad/qr';
|
|
@@ -2274,6 +2274,9 @@ function useChainSelect() {
|
|
|
2274
2274
|
return setChain({
|
|
2275
2275
|
chainId: int2hex(Number(chainInfo.network_infos?.chain_id))
|
|
2276
2276
|
}).then((switched) => {
|
|
2277
|
+
if (isWalletChainChangePendingResult(switched)) {
|
|
2278
|
+
return;
|
|
2279
|
+
}
|
|
2277
2280
|
if (switched) {
|
|
2278
2281
|
toast.success(t("connector.networkSwitched"));
|
|
2279
2282
|
} else {
|
|
@@ -5784,6 +5787,9 @@ var useWithdrawFormScript = (options2) => {
|
|
|
5784
5787
|
return switchChain?.({
|
|
5785
5788
|
chainId: int2hex(Number(chainInfo.network_infos?.chain_id))
|
|
5786
5789
|
}).then((switched) => {
|
|
5790
|
+
if (isWalletChainChangePendingResult(switched)) {
|
|
5791
|
+
return;
|
|
5792
|
+
}
|
|
5787
5793
|
if (switched) {
|
|
5788
5794
|
toast.success(t("connector.networkSwitched"));
|
|
5789
5795
|
cleanData();
|