@getpara/evm-wallet-connectors 0.1.0 → 0.2.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.
|
@@ -25,7 +25,7 @@ import { connectorsForWallets } from '../wallets/connectorsForWallets.js';
|
|
|
25
25
|
import { http } from 'viem';
|
|
26
26
|
import { computeWalletConnectMetaData } from '../utils/computeWalletConnectMetaData.js';
|
|
27
27
|
import { EvmExternalWalletContext, EvmExternalWalletProvider } from './EvmExternalWalletContext.js';
|
|
28
|
-
import { useExternalWalletProviderStore } from '@getpara/react-sdk';
|
|
28
|
+
import { useClient, useExternalWalletProviderStore } from '@getpara/react-sdk';
|
|
29
29
|
import { connect } from 'wagmi/actions';
|
|
30
30
|
import { paraConnector } from '@getpara/wagmi-v2-integration';
|
|
31
31
|
const createDefaultTransports = (chains) => {
|
|
@@ -37,11 +37,13 @@ const createDefaultTransports = (chains) => {
|
|
|
37
37
|
return transportsObject;
|
|
38
38
|
};
|
|
39
39
|
export function ParaEvmProvider(_a) {
|
|
40
|
+
var _b;
|
|
40
41
|
var { children, config: _config } = _a, wagmiProviderProps = __rest(_a, ["children", "config"]);
|
|
41
42
|
const updateExternalWalletProviderState = useExternalWalletProviderStore(state => state.updateState);
|
|
42
43
|
const EvmProvider = useExternalWalletProviderStore(state => state.EvmProvider);
|
|
43
44
|
const evmContext = useExternalWalletProviderStore(state => state.evmContext);
|
|
44
|
-
const
|
|
45
|
+
const para = (_b = useClient()) !== null && _b !== void 0 ? _b : _config.para;
|
|
46
|
+
const { projectId, appName, appDescription, appIcon, appUrl, wallets, chains, transports, paraDisableModal, paraOptions } = _config, wagmiConfigParams = __rest(_config, ["projectId", "appName", "appDescription", "appIcon", "appUrl", "wallets", "chains", "transports", "paraDisableModal", "paraOptions"]);
|
|
45
47
|
const wcMetadata = computeWalletConnectMetaData({ appName, appDescription, appUrl, appIcon });
|
|
46
48
|
const paraConnectorInstance = useMemo(() => {
|
|
47
49
|
if (!para)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/evm-wallet-connectors",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@coinbase/wallet-sdk": "3.9.3",
|
|
13
|
-
"@getpara/react-sdk": "0.
|
|
14
|
-
"@getpara/wagmi-v2-integration": "0.
|
|
13
|
+
"@getpara/react-sdk": "0.2.0",
|
|
14
|
+
"@getpara/wagmi-v2-integration": "0.2.0"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rm -rf dist && tsc",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"dist",
|
|
35
35
|
"package.json"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "9e28f35ede16f3627aeb5baebdf26dae03fa4dcf"
|
|
38
38
|
}
|