@getpara/evm-wallet-connectors 1.9.0 → 1.10.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.
@@ -51,9 +51,7 @@ function EvmExternalWalletProvider({ children, para, onSwitchWallet }) {
51
51
  const { switchAccountAsync } = useSwitchAccount();
52
52
  const { signMessageAsync } = useSignMessage();
53
53
  const { data: ensName, refetch: refetchEnsName } = useEnsName({ address: wagmiAddress });
54
- const { data: ensAvatar, refetch: refetchEnsAvatar } = useEnsAvatar({
55
- name: normalize(ensName)
56
- });
54
+ const { data: ensAvatar, refetch: refetchEnsAvatar } = useEnsAvatar({ name: normalize(ensName) });
57
55
  const { data: wagmiBalance, isLoading: isBalanceLoading } = useBalance({ address: wagmiAddress });
58
56
  const fullAuthWallets = useExternalWalletProviderStore((state) => state.fullAuthWallets);
59
57
  const { selectedWallet } = useWalletState();
@@ -98,10 +96,7 @@ function EvmExternalWalletProvider({ children, para, onSwitchWallet }) {
98
96
  });
99
97
  const signMessage = (message) => __async(this, null, function* () {
100
98
  try {
101
- const signature = yield signMessageAsync({
102
- message,
103
- account: wagmiAddress
104
- });
99
+ const signature = yield signMessageAsync({ message, account: wagmiAddress });
105
100
  return { address: wagmiAddress, signature };
106
101
  } catch (e) {
107
102
  switch (e.name) {
@@ -122,7 +117,7 @@ function EvmExternalWalletProvider({ children, para, onSwitchWallet }) {
122
117
  var _a;
123
118
  const connector = (_a = connections.find((c) => c.connector.name === connectorName)) == null ? void 0 : _a.connector;
124
119
  if (!connector) {
125
- throw new Error(`connector not found: ${connectorName}`);
120
+ return;
126
121
  }
127
122
  yield switchAccountAsync({ connector });
128
123
  });
@@ -298,10 +293,7 @@ function EvmExternalWalletProvider({ children, para, onSwitchWallet }) {
298
293
  return (_a = connectors.find((w) => w.id === id)) == null ? void 0 : _a.paraDetails;
299
294
  };
300
295
  const formattedChains = chains.map((c) => {
301
- return {
302
- id: c.id,
303
- name: c.name
304
- };
296
+ return { id: c.id, name: c.name };
305
297
  });
306
298
  const username = useMemo(() => ensName != null ? ensName : wagmiAddress, [ensName, wagmiAddress]);
307
299
  const disconnect = disconnectAsync;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/evm-wallet-connectors",
3
- "version": "1.9.0",
3
+ "version": "1.10.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": "4.3.0",
13
- "@getpara/react-sdk": "1.9.0",
14
- "@getpara/wagmi-v2-integration": "1.9.0",
13
+ "@getpara/react-sdk": "1.10.0",
14
+ "@getpara/wagmi-v2-integration": "1.10.0",
15
15
  "zustand": "^4.5.2",
16
16
  "zustand-sync-tabs": "^0.2.2"
17
17
  },
@@ -37,5 +37,5 @@
37
37
  "dist",
38
38
  "package.json"
39
39
  ],
40
- "gitHead": "3d749844bf071e2c8de2769dd16e17c026951109"
40
+ "gitHead": "617cf0aa1307a96ec5e91d39e306e8a0b3b86b82"
41
41
  }