@getpara/react-sdk-lite 2.17.0 → 2.19.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/aa/hooks/alchemy.d.ts +15 -0
- package/dist/aa/hooks/alchemy.js +9 -0
- package/dist/aa/hooks/biconomy.d.ts +15 -0
- package/dist/aa/hooks/biconomy.js +9 -0
- package/dist/aa/hooks/cdp.d.ts +14 -0
- package/dist/aa/hooks/cdp.js +9 -0
- package/dist/aa/hooks/gelato.d.ts +14 -0
- package/dist/aa/hooks/gelato.js +9 -0
- package/dist/aa/hooks/pimlico.d.ts +15 -0
- package/dist/aa/hooks/pimlico.js +9 -0
- package/dist/aa/hooks/porto.d.ts +15 -0
- package/dist/aa/hooks/porto.js +9 -0
- package/dist/aa/hooks/rhinestone.d.ts +15 -0
- package/dist/aa/hooks/rhinestone.js +9 -0
- package/dist/aa/hooks/safe.d.ts +15 -0
- package/dist/aa/hooks/safe.js +9 -0
- package/dist/aa/hooks/thirdweb.d.ts +13 -0
- package/dist/aa/hooks/thirdweb.js +9 -0
- package/dist/aa/hooks/zerodev.d.ts +15 -0
- package/dist/aa/hooks/zerodev.js +9 -0
- package/dist/aa/useWagmiSignerEnhancer.d.ts +15 -0
- package/dist/aa/useWagmiSignerEnhancer.js +45 -0
- package/dist/index.d.ts +11 -12
- package/dist/index.js +10 -12
- package/dist/modal/ParaModal.js +5 -3
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +1 -1
- package/dist/modal/components/QuantityInput.js +1 -0
- package/dist/modal/components/SearchableButtonList.js +20 -11
- package/dist/modal/components/flows/account/AccountProvider/AccountProvider.js +35 -42
- package/dist/modal/components/flows/account/AddFunds/AddFundsSettings.js +1 -0
- package/dist/modal/components/flows/account/Wallet/Wallet.js +1 -1
- package/dist/provider/ParaProviderMin.js +46 -54
- package/dist/provider/actions/index.d.ts +2 -34
- package/dist/provider/actions/index.js +43 -34
- package/dist/provider/hooks/mutations/index.d.ts +2 -29
- package/dist/provider/hooks/mutations/index.js +3 -58
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +2 -2
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +24 -4
- package/dist/provider/hooks/mutations/useExportPrivateKey.js +7 -2
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +2 -2
- package/dist/provider/hooks/queries/index.d.ts +2 -2
- package/dist/provider/hooks/queries/index.js +2 -3
- package/dist/provider/hooks/queries/useAccount.d.ts +14 -69
- package/dist/provider/hooks/queries/useAccount.js +30 -136
- package/dist/provider/hooks/queries/useParaStatus.d.ts +7 -11
- package/dist/provider/hooks/queries/useParaStatus.js +9 -16
- package/dist/provider/hooks/queries/useProfileBalance.js +1 -1
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +14 -10
- package/dist/provider/hooks/utils/useEventListeners.js +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/providers/ExternalWalletProvider.js +2 -0
- package/dist/provider/utils/renameMutations.d.ts +4 -2
- package/package.json +19 -18
- package/dist/aa/alchemy/hook.d.ts +0 -16708
- package/dist/aa/alchemy/hook.js +0 -26
- package/dist/aa/biconomy/hook.d.ts +0 -44
- package/dist/aa/biconomy/hook.js +0 -26
- package/dist/aa/cdp/hook.d.ts +0 -11
- package/dist/aa/cdp/hook.js +0 -26
- package/dist/aa/createSmartAccountHook.d.ts +0 -13
- package/dist/aa/createSmartAccountHook.js +0 -81
- package/dist/aa/gelato/hook.d.ts +0 -11
- package/dist/aa/gelato/hook.js +0 -26
- package/dist/aa/pimlico/hook.d.ts +0 -838
- package/dist/aa/pimlico/hook.js +0 -26
- package/dist/aa/porto/hook.d.ts +0 -12
- package/dist/aa/porto/hook.js +0 -26
- package/dist/aa/rhinestone/hook.d.ts +0 -12
- package/dist/aa/rhinestone/hook.js +0 -26
- package/dist/aa/safe/hook.d.ts +0 -12
- package/dist/aa/safe/hook.js +0 -26
- package/dist/aa/thirdweb/hook.d.ts +0 -12
- package/dist/aa/thirdweb/hook.js +0 -26
- package/dist/aa/types.d.ts +0 -21
- package/dist/aa/types.js +0 -1
- package/dist/aa/zerodev/hook.d.ts +0 -12
- package/dist/aa/zerodev/hook.js +0 -26
- package/dist/modal/components/flows/account/AddFunds/MoonPayEmbed.d.ts +0 -2
- package/dist/modal/components/flows/account/AddFunds/MoonPayEmbed.js +0 -7
- package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -27
- package/dist/provider/actions/getEmbeddedAccount.js +0 -66
- package/dist/provider/actions/getWallet.d.ts +0 -5
- package/dist/provider/actions/getWallet.js +0 -18
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +0 -34
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +0 -28
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +0 -34
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +0 -28
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +0 -34
- package/dist/provider/hooks/mutations/useClaimPregenWallets.js +0 -31
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +0 -34
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +0 -31
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +0 -34
- package/dist/provider/hooks/mutations/useCreatePregenWallet.js +0 -31
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +0 -34
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +0 -28
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +0 -34
- package/dist/provider/hooks/mutations/useCreateWallet.js +0 -31
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +0 -34
- package/dist/provider/hooks/mutations/useCreateWalletPerType.js +0 -28
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +0 -34
- package/dist/provider/hooks/mutations/useEnable2fa.js +0 -28
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +0 -34
- package/dist/provider/hooks/mutations/useHasPregenWallet.js +0 -28
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +0 -34
- package/dist/provider/hooks/mutations/useIssueJwt.js +0 -28
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -33
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +0 -28
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +0 -34
- package/dist/provider/hooks/mutations/useLoginExternalWallet.js +0 -31
- package/dist/provider/hooks/mutations/useLogout.d.ts +0 -34
- package/dist/provider/hooks/mutations/useLogout.js +0 -28
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +0 -34
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +0 -31
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +0 -34
- package/dist/provider/hooks/mutations/useSetup2fa.js +0 -28
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -34
- package/dist/provider/hooks/mutations/useSignMessage.js +0 -28
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -34
- package/dist/provider/hooks/mutations/useSignTransaction.js +0 -31
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +0 -34
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +0 -31
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +0 -34
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +0 -31
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +0 -34
- package/dist/provider/hooks/mutations/useVerify2fa.js +0 -28
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +0 -34
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +0 -31
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +0 -34
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +0 -31
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +0 -34
- package/dist/provider/hooks/mutations/useVerifyOAuth.js +0 -28
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +0 -34
- package/dist/provider/hooks/mutations/useVerifyTelegram.js +0 -28
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +0 -34
- package/dist/provider/hooks/mutations/useWaitForLogin.js +0 -31
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +0 -34
- package/dist/provider/hooks/mutations/useWaitForSignup.js +0 -28
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +0 -34
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +0 -28
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -8
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -29
- package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
- package/dist/provider/hooks/queries/useWallet.js +0 -26
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ALCHEMY_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { ALCHEMY_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage an Alchemy smart account.
|
|
5
|
+
*
|
|
6
|
+
* Supports both EIP-4337 and EIP-7702 modes. Uses Alchemy's Account Kit for
|
|
7
|
+
* bundler and paymaster infrastructure.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-alchemy` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useAlchemySmartAccount: (params?: import("@getpara/aa-alchemy").AlchemySmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createAlchemySmartAccountHook, ALCHEMY_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useAlchemySmartAccount = createAlchemySmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
ALCHEMY_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useAlchemySmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BICONOMY_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { BICONOMY_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Biconomy smart account.
|
|
5
|
+
*
|
|
6
|
+
* Supports both EIP-4337 and EIP-7702 modes. Transactions are executed via
|
|
7
|
+
* Biconomy's MEE (Multi-chain Execution Environment).
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-biconomy` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useBiconomySmartAccount: (params?: import("@getpara/aa-biconomy").BiconomySmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createBiconomySmartAccountHook, BICONOMY_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useBiconomySmartAccount = createBiconomySmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
BICONOMY_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useBiconomySmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CDP_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { CDP_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Coinbase Developer Platform smart account.
|
|
5
|
+
*
|
|
6
|
+
* CDP operates in EIP-4337 mode only. Only supports Base and Base Sepolia.
|
|
7
|
+
*
|
|
8
|
+
* Requires `@getpara/aa-cdp` to be installed.
|
|
9
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
10
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useCDPSmartAccount: (params?: import("@getpara/aa-cdp").CDPSmartAccountConfig & {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createCDPSmartAccountHook, CDP_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useCDPSmartAccount = createCDPSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
CDP_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useCDPSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GELATO_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { GELATO_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Gelato smart account.
|
|
5
|
+
*
|
|
6
|
+
* Gelato operates in EIP-7702 mode only. Uses Gelato's relay for gas-sponsored transactions.
|
|
7
|
+
*
|
|
8
|
+
* Requires `@getpara/aa-gelato` to be installed.
|
|
9
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
10
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useGelatoSmartAccount: (params?: import("@getpara/aa-gelato").GelatoSmartAccountConfig & {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createGelatoSmartAccountHook, GELATO_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useGelatoSmartAccount = createGelatoSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
GELATO_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useGelatoSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PIMLICO_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { PIMLICO_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Pimlico smart account.
|
|
5
|
+
*
|
|
6
|
+
* Supports both EIP-4337 and EIP-7702 modes. Uses Pimlico's bundler and paymaster
|
|
7
|
+
* infrastructure for gas sponsorship.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-pimlico` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const usePimlicoSmartAccount: (params?: import("@getpara/aa-pimlico").PimlicoSmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createPimlicoSmartAccountHook, PIMLICO_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const usePimlicoSmartAccount = createPimlicoSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
PIMLICO_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
usePimlicoSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PORTO_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { PORTO_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Porto smart account.
|
|
5
|
+
*
|
|
6
|
+
* Porto operates in EIP-7702 mode only. No API key required — Porto uses its own relay RPC.
|
|
7
|
+
* On testnets, Porto's relay sponsors gas by default. For mainnet, pass `merchantUrl`.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-porto` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const usePortoSmartAccount: (params?: import("@getpara/aa-porto").PortoAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createPortoSmartAccountHook, PORTO_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const usePortoSmartAccount = createPortoSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
PORTO_ACCOUNT_BASE_KEY,
|
|
8
|
+
usePortoSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RHINESTONE_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { RHINESTONE_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Rhinestone smart account.
|
|
5
|
+
*
|
|
6
|
+
* Rhinestone operates in EIP-4337 mode only. Uses Rhinestone's orchestrator
|
|
7
|
+
* with Pimlico's bundler infrastructure.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-rhinestone` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useRhinestoneSmartAccount: (params?: import("@getpara/aa-rhinestone").RhinestoneSmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createRhinestoneSmartAccountHook, RHINESTONE_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useRhinestoneSmartAccount = createRhinestoneSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
RHINESTONE_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useRhinestoneSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SAFE_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { SAFE_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Safe smart account.
|
|
5
|
+
*
|
|
6
|
+
* Safe operates in EIP-4337 mode only. Uses permissionless's Safe implementation
|
|
7
|
+
* with Pimlico's bundler and paymaster infrastructure.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-safe` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useSafeSmartAccount: (params?: import("@getpara/aa-safe").SafeSmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createSafeSmartAccountHook, SAFE_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useSafeSmartAccount = createSafeSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
SAFE_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useSafeSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { THIRDWEB_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { THIRDWEB_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a Thirdweb smart account.
|
|
5
|
+
*
|
|
6
|
+
* Supports both EIP-4337 and EIP-7702 modes. Uses Thirdweb's smart wallet
|
|
7
|
+
* infrastructure with optional gas sponsorship.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-thirdweb` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useThirdwebSmartAccount: (params?: any) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createThirdwebSmartAccountHook, THIRDWEB_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useThirdwebSmartAccount = createThirdwebSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
THIRDWEB_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useThirdwebSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ZERODEV_SMART_ACCOUNT_BASE_KEY } from '@getpara/react-core/internal';
|
|
2
|
+
export { ZERODEV_SMART_ACCOUNT_BASE_KEY };
|
|
3
|
+
/**
|
|
4
|
+
* React / React Native hook to create and manage a ZeroDev smart account.
|
|
5
|
+
*
|
|
6
|
+
* Supports both EIP-4337 and EIP-7702 modes. Uses ZeroDev's Kernel account
|
|
7
|
+
* with ECDSA validation and gas sponsorship.
|
|
8
|
+
*
|
|
9
|
+
* Requires `@getpara/aa-zerodev` to be installed.
|
|
10
|
+
* On web, automatically detects connected external wallets (MetaMask, etc.) via wagmi
|
|
11
|
+
* and uses them as the signer when no Para embedded wallet is active.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useZeroDevSmartAccount: (params?: import("@getpara/aa-zerodev").ZeroDevSmartAccountConfig & {
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
}) => import("@getpara/react-core/internal").UseSmartAccountResult<import("@getpara/aa-alchemy").SmartAccount>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../../chunk-MMUBH76A.js";
|
|
3
|
+
import { createZeroDevSmartAccountHook, ZERODEV_SMART_ACCOUNT_BASE_KEY } from "@getpara/react-core/internal";
|
|
4
|
+
import { useWagmiSignerEnhancer } from "../useWagmiSignerEnhancer.js";
|
|
5
|
+
const useZeroDevSmartAccount = createZeroDevSmartAccountHook(useWagmiSignerEnhancer);
|
|
6
|
+
export {
|
|
7
|
+
ZERODEV_SMART_ACCOUNT_BASE_KEY,
|
|
8
|
+
useZeroDevSmartAccount
|
|
9
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { SmartAccountEnhancement } from '@getpara/react-core/internal';
|
|
3
|
+
/**
|
|
4
|
+
* Wagmi-based enhancer hook for `createSmartAccountHook`.
|
|
5
|
+
* Provides external wallet signer auto-detection on web via wagmi's context.
|
|
6
|
+
*
|
|
7
|
+
* When no Para embedded wallet is available but an external EVM wallet is
|
|
8
|
+
* connected (e.g. MetaMask via RainbowKit), this hook resolves the wagmi
|
|
9
|
+
* WalletClient as the signer for the smart account.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useWagmiSignerEnhancer<TParams extends {
|
|
12
|
+
address?: Hex;
|
|
13
|
+
walletId?: string;
|
|
14
|
+
signer?: any;
|
|
15
|
+
}>(params: TParams): SmartAccountEnhancement;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "../chunk-MMUBH76A.js";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import { useStore } from "../provider/stores/useStore.js";
|
|
5
|
+
import { useClient, useWallet } from "../provider/index.js";
|
|
6
|
+
function useWagmiSignerEnhancer(params) {
|
|
7
|
+
var _a, _b, _c, _d, _e;
|
|
8
|
+
const para = useClient();
|
|
9
|
+
const { data: wallet } = useWallet();
|
|
10
|
+
const evmContext = useStore((state) => state.evmContext);
|
|
11
|
+
const evmCtxValue = useContext(evmContext);
|
|
12
|
+
const noopUseAccount = () => void 0;
|
|
13
|
+
const noopUseWalletClient = () => ({
|
|
14
|
+
data: void 0,
|
|
15
|
+
isLoading: false
|
|
16
|
+
});
|
|
17
|
+
const useEvmAccount = (_a = evmCtxValue == null ? void 0 : evmCtxValue.useAccount) != null ? _a : noopUseAccount;
|
|
18
|
+
const useEvmWalletClient = (_b = evmCtxValue == null ? void 0 : evmCtxValue.useWalletClient) != null ? _b : noopUseWalletClient;
|
|
19
|
+
const evmAccount = useEvmAccount();
|
|
20
|
+
const { data: evmWalletClient, isLoading: isEvmWalletClientLoading } = useEvmWalletClient();
|
|
21
|
+
const contextAddress = (wallet == null ? void 0 : wallet.type) === "EVM" && !(wallet == null ? void 0 : wallet.isExternal) ? wallet == null ? void 0 : wallet.address : void 0;
|
|
22
|
+
const hasEmbeddedWallet = !!contextAddress;
|
|
23
|
+
const externalEvmAddress = evmAccount == null ? void 0 : evmAccount.address;
|
|
24
|
+
const addressParamIsExternal = (() => {
|
|
25
|
+
if (!para || !(params == null ? void 0 : params.address)) return false;
|
|
26
|
+
try {
|
|
27
|
+
const w = para.findWalletByAddress(params.address, { type: ["EVM"] });
|
|
28
|
+
return !!(w == null ? void 0 : w.isExternal);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
33
|
+
const isPotentiallyExternal = !hasEmbeddedWallet && !!externalEvmAddress || addressParamIsExternal;
|
|
34
|
+
const autoExternalSigner = !(params == null ? void 0 : params.signer) && isPotentiallyExternal && evmWalletClient ? !addressParamIsExternal || (externalEvmAddress == null ? void 0 : externalEvmAddress.toLowerCase()) === ((_c = params == null ? void 0 : params.address) == null ? void 0 : _c.toLowerCase()) ? evmWalletClient : void 0 : void 0;
|
|
35
|
+
const effectiveSigner = (_d = params == null ? void 0 : params.signer) != null ? _d : autoExternalSigner;
|
|
36
|
+
const signerAddress = effectiveSigner ? "address" in effectiveSigner ? effectiveSigner.address : (_e = effectiveSigner.account) == null ? void 0 : _e.address : void 0;
|
|
37
|
+
return {
|
|
38
|
+
signer: effectiveSigner != null ? effectiveSigner : null,
|
|
39
|
+
signerAddress: signerAddress != null ? signerAddress : null,
|
|
40
|
+
isLoading: isPotentiallyExternal && !(params == null ? void 0 : params.signer) && isEvmWalletClientLoading
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
useWagmiSignerEnhancer
|
|
45
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,15 +5,14 @@ export type { Theme } from '@getpara/react-components';
|
|
|
5
5
|
import ParaWeb from '@getpara/web-sdk';
|
|
6
6
|
export default ParaWeb;
|
|
7
7
|
export type { StepOverride } from './modal/types/modalProps.js';
|
|
8
|
-
export {
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export { useZeroDevSmartAccount, ZERODEV_SMART_ACCOUNT_BASE_KEY } from './aa/zerodev/hook.js';
|
|
8
|
+
export type { UseSmartAccountResult } from '@getpara/react-core/internal';
|
|
9
|
+
export { useAlchemySmartAccount, ALCHEMY_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/alchemy.js';
|
|
10
|
+
export { useBiconomySmartAccount, BICONOMY_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/biconomy.js';
|
|
11
|
+
export { useCDPSmartAccount, CDP_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/cdp.js';
|
|
12
|
+
export { useGelatoSmartAccount, GELATO_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/gelato.js';
|
|
13
|
+
export { usePimlicoSmartAccount, PIMLICO_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/pimlico.js';
|
|
14
|
+
export { usePortoSmartAccount, PORTO_ACCOUNT_BASE_KEY } from './aa/hooks/porto.js';
|
|
15
|
+
export { useRhinestoneSmartAccount, RHINESTONE_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/rhinestone.js';
|
|
16
|
+
export { useSafeSmartAccount, SAFE_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/safe.js';
|
|
17
|
+
export { useThirdwebSmartAccount, THIRDWEB_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/thirdweb.js';
|
|
18
|
+
export { useZeroDevSmartAccount, ZERODEV_SMART_ACCOUNT_BASE_KEY } from './aa/hooks/zerodev.js';
|
package/dist/index.js
CHANGED
|
@@ -5,17 +5,16 @@ export * from "./provider/index.js";
|
|
|
5
5
|
export * from "@getpara/web-sdk";
|
|
6
6
|
import ParaWeb from "@getpara/web-sdk";
|
|
7
7
|
var src_default = ParaWeb;
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { useZeroDevSmartAccount, ZERODEV_SMART_ACCOUNT_BASE_KEY } from "./aa/zerodev/hook.js";
|
|
8
|
+
import { useAlchemySmartAccount, ALCHEMY_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/alchemy.js";
|
|
9
|
+
import { useBiconomySmartAccount, BICONOMY_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/biconomy.js";
|
|
10
|
+
import { useCDPSmartAccount, CDP_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/cdp.js";
|
|
11
|
+
import { useGelatoSmartAccount, GELATO_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/gelato.js";
|
|
12
|
+
import { usePimlicoSmartAccount, PIMLICO_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/pimlico.js";
|
|
13
|
+
import { usePortoSmartAccount, PORTO_ACCOUNT_BASE_KEY } from "./aa/hooks/porto.js";
|
|
14
|
+
import { useRhinestoneSmartAccount, RHINESTONE_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/rhinestone.js";
|
|
15
|
+
import { useSafeSmartAccount, SAFE_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/safe.js";
|
|
16
|
+
import { useThirdwebSmartAccount, THIRDWEB_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/thirdweb.js";
|
|
17
|
+
import { useZeroDevSmartAccount, ZERODEV_SMART_ACCOUNT_BASE_KEY } from "./aa/hooks/zerodev.js";
|
|
19
18
|
export {
|
|
20
19
|
ALCHEMY_SMART_ACCOUNT_BASE_KEY,
|
|
21
20
|
BICONOMY_SMART_ACCOUNT_BASE_KEY,
|
|
@@ -27,7 +26,6 @@ export {
|
|
|
27
26
|
SAFE_SMART_ACCOUNT_BASE_KEY,
|
|
28
27
|
THIRDWEB_SMART_ACCOUNT_BASE_KEY,
|
|
29
28
|
ZERODEV_SMART_ACCOUNT_BASE_KEY,
|
|
30
|
-
createSmartAccountHook,
|
|
31
29
|
src_default as default,
|
|
32
30
|
useAlchemySmartAccount,
|
|
33
31
|
useBiconomySmartAccount,
|
package/dist/modal/ParaModal.js
CHANGED
|
@@ -99,7 +99,7 @@ const ParaModal = forwardRef((props, ref) => {
|
|
|
99
99
|
onClose,
|
|
100
100
|
defaultAuthIdentifier
|
|
101
101
|
}), rest),
|
|
102
|
-
reactSdkVersion: "2.
|
|
102
|
+
reactSdkVersion: "2.19.0"
|
|
103
103
|
});
|
|
104
104
|
} catch (e) {
|
|
105
105
|
}
|
|
@@ -218,8 +218,10 @@ const ParaModal = forwardRef((props, ref) => {
|
|
|
218
218
|
setIsModalMounted(true);
|
|
219
219
|
};
|
|
220
220
|
const handleModalExited = () => __async(void 0, null, function* () {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
if (isModalMounted) {
|
|
222
|
+
setIsModalMounted(false);
|
|
223
|
+
goBack();
|
|
224
|
+
}
|
|
223
225
|
});
|
|
224
226
|
useEffect(() => {
|
|
225
227
|
var _a2;
|
|
@@ -13,7 +13,7 @@ const OnRampProviderButton = ({ config, index, onClick: _onClick }) => {
|
|
|
13
13
|
const onClick = () => __async(void 0, null, function* () {
|
|
14
14
|
yield _onClick();
|
|
15
15
|
});
|
|
16
|
-
return /* @__PURE__ */ jsx(StyledButton, { variant: "tertiary", fullWidth: true, onClick, children: /* @__PURE__ */ jsxs(Container, { children: [
|
|
16
|
+
return /* @__PURE__ */ jsx(StyledButton, { variant: "tertiary", fullWidth: true, onClick, "data-testid": `onramp-provider-${provider}`, children: /* @__PURE__ */ jsxs(Container, { children: [
|
|
17
17
|
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(CpslIcon, { icon, color: backgroundColors[0] }) }),
|
|
18
18
|
/* @__PURE__ */ jsxs(ProviderInfoContainer, { children: [
|
|
19
19
|
/* @__PURE__ */ jsx(CpslText, { variant: "bodyL", weight: "medium", children: name }),
|
|
@@ -154,17 +154,26 @@ function SearchableButtonList({
|
|
|
154
154
|
),
|
|
155
155
|
/* @__PURE__ */ jsx(GradientScroll, { height: "100%", gap: "8px", children: /* @__PURE__ */ jsx("div", { ref: scrollContainerRef, children: /* @__PURE__ */ jsx(List, { style: { paddingTop, paddingBottom }, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "sync", children: visibleItems.map(({ assetItem, originalItem }) => {
|
|
156
156
|
const { key, icon, text, textSecondary, endText, endTextSecondary } = assetItem;
|
|
157
|
-
return /* @__PURE__ */ jsx(motion.li, __spreadProps(__spreadValues({ style: { width: "100%" } }, contentMotionProps), { children: /* @__PURE__ */ jsxs(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
return /* @__PURE__ */ jsx(motion.li, __spreadProps(__spreadValues({ style: { width: "100%" } }, contentMotionProps), { children: /* @__PURE__ */ jsxs(
|
|
158
|
+
AssetButton,
|
|
159
|
+
{
|
|
160
|
+
fullWidth: true,
|
|
161
|
+
variant: "secondary",
|
|
162
|
+
onClick: () => onSelect(originalItem),
|
|
163
|
+
"data-testid": `searchable-item-${key}`,
|
|
164
|
+
children: [
|
|
165
|
+
icon,
|
|
166
|
+
/* @__PURE__ */ jsxs(Info, { children: [
|
|
167
|
+
/* @__PURE__ */ jsx(Code, { color: "contrast", variant: "bodyL", children: text }),
|
|
168
|
+
textSecondary && /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyS", children: textSecondary })
|
|
169
|
+
] }),
|
|
170
|
+
endText && /* @__PURE__ */ jsxs(End, { children: [
|
|
171
|
+
/* @__PURE__ */ jsx(EndText, { color: "primary", variant: "bodyM", children: endText }),
|
|
172
|
+
endTextSecondary && /* @__PURE__ */ jsx(EndTextSecondary, { color: "contrast", variant: "bodyS", children: endTextSecondary })
|
|
173
|
+
] })
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
) }), key);
|
|
168
177
|
}) }) }) }) })
|
|
169
178
|
]
|
|
170
179
|
}
|
|
@@ -12,7 +12,7 @@ import { useGoBack } from "../../../../hooks/useGoBack.js";
|
|
|
12
12
|
import { useWalletState } from "../../../../../provider/index.js";
|
|
13
13
|
import { DEFAULTS } from "../../../../constants/defaults.js";
|
|
14
14
|
const AccountProvider = ({ children }) => {
|
|
15
|
-
const {
|
|
15
|
+
const { switchWalletsAsync: mutateSwitchWalletsAsync } = useSwitchWallets();
|
|
16
16
|
const { goBack } = useGoBack();
|
|
17
17
|
const { updateSelectedWallet } = useWalletState();
|
|
18
18
|
const refs = useStore((state) => state.refs);
|
|
@@ -42,55 +42,48 @@ const AccountProvider = ({ children }) => {
|
|
|
42
42
|
refs.poll.current = {
|
|
43
43
|
action: "login",
|
|
44
44
|
timeout: window == null ? void 0 : window.setTimeout(() => __async(void 0, null, function* () {
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
goBack();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return isCanceled;
|
|
59
|
-
},
|
|
60
|
-
onPoll: () => {
|
|
61
|
-
var _a;
|
|
62
|
-
const currentView = store.getState().accountView;
|
|
63
|
-
if (currentView === "ACCOUNT_SWITCH_WALLETS" || currentView === "ACCOUNT_SWITCH_WALLETS_IFRAME") {
|
|
64
|
-
if (((_a = refs.popupWindow.current) == null ? void 0 : _a.closed) && ["ACCOUNT_SWITCH_WALLETS", "ACCOUNT_SWITCH_WALLETS_IFRAME"].includes(currentView)) {
|
|
65
|
-
refs.popupWindow.current = null;
|
|
66
|
-
goBack();
|
|
67
|
-
}
|
|
45
|
+
mutateSwitchWalletsAsync({
|
|
46
|
+
isCanceled: () => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
const currentView = store.getState().accountView;
|
|
49
|
+
const exitedSteps = !!currentView && !["ACCOUNT_SWITCH_WALLETS", "ACCOUNT_SWITCH_WALLETS_IFRAME"].includes(currentView);
|
|
50
|
+
const popupClosed = (_b = (_a = refs.popupWindow.current) == null ? void 0 : _a.closed) != null ? _b : false;
|
|
51
|
+
const isCanceled = exitedSteps || popupClosed;
|
|
52
|
+
if (isCanceled) {
|
|
53
|
+
if (popupClosed && (currentView === "ACCOUNT_SWITCH_WALLETS" || currentView === "ACCOUNT_SWITCH_WALLETS_IFRAME")) {
|
|
54
|
+
goBack();
|
|
68
55
|
}
|
|
69
56
|
}
|
|
57
|
+
return isCanceled;
|
|
70
58
|
},
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
onPoll: () => {
|
|
60
|
+
var _a;
|
|
61
|
+
const currentView = store.getState().accountView;
|
|
62
|
+
if (currentView === "ACCOUNT_SWITCH_WALLETS" || currentView === "ACCOUNT_SWITCH_WALLETS_IFRAME") {
|
|
63
|
+
if (((_a = refs.popupWindow.current) == null ? void 0 : _a.closed) && ["ACCOUNT_SWITCH_WALLETS", "ACCOUNT_SWITCH_WALLETS_IFRAME"].includes(currentView)) {
|
|
76
64
|
refs.popupWindow.current = null;
|
|
77
|
-
}, 500);
|
|
78
|
-
}),
|
|
79
|
-
onError: () => {
|
|
80
|
-
const currentView = store.getState().accountView;
|
|
81
|
-
if (currentView === "ACCOUNT_SWITCH_WALLETS") {
|
|
82
65
|
goBack();
|
|
83
66
|
}
|
|
84
|
-
},
|
|
85
|
-
onSettled: () => {
|
|
86
|
-
var _a;
|
|
87
|
-
setIsSwitchWalletsPending(false);
|
|
88
|
-
window == null ? void 0 : window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
|
|
89
|
-
refs.poll.current = null;
|
|
90
|
-
refs.popupWindow.current = null;
|
|
91
67
|
}
|
|
92
68
|
}
|
|
93
|
-
)
|
|
69
|
+
}).then(() => __async(void 0, null, function* () {
|
|
70
|
+
yield updateSelectedWallet();
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
setAccountView("ACCOUNT_PROFILE");
|
|
73
|
+
refs.popupWindow.current = null;
|
|
74
|
+
}, 500);
|
|
75
|
+
})).catch(() => {
|
|
76
|
+
const currentView = store.getState().accountView;
|
|
77
|
+
if (currentView === "ACCOUNT_SWITCH_WALLETS") {
|
|
78
|
+
goBack();
|
|
79
|
+
}
|
|
80
|
+
}).finally(() => {
|
|
81
|
+
var _a;
|
|
82
|
+
setIsSwitchWalletsPending(false);
|
|
83
|
+
window == null ? void 0 : window.clearTimeout((_a = refs.poll.current) == null ? void 0 : _a.timeout);
|
|
84
|
+
refs.poll.current = null;
|
|
85
|
+
refs.popupWindow.current = null;
|
|
86
|
+
});
|
|
94
87
|
}), DEFAULTS.LOGGIN_POLLING_DELAY_MS)
|
|
95
88
|
};
|
|
96
89
|
}
|
|
@@ -29,7 +29,7 @@ const Wallet = () => {
|
|
|
29
29
|
const setProfileWallet = useStore((state) => state.setProfileWallet);
|
|
30
30
|
const setAccountView = useStore((state) => state.setAccountView);
|
|
31
31
|
const { connectionType } = useAccount();
|
|
32
|
-
const {
|
|
32
|
+
const { exportPrivateKey } = useExportPrivateKey();
|
|
33
33
|
const { disconnectBase, evmDisconnectStatus, solanaDisconnectStatus, cosmosDisconnectStatus } = useExternalWallets();
|
|
34
34
|
const disconnectStatus = useMemo(() => {
|
|
35
35
|
if (!(profileWallet == null ? void 0 : profileWallet.isExternal)) {
|