@depay/web3-wallets-evm 16.2.8 → 16.2.9

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.
@@ -1326,7 +1326,8 @@ const getLastSession = async(walletName)=>{
1326
1326
  if(!localStorage[KEY+":projectId"]) { return }
1327
1327
  if(walletName !== localStorage[KEY+":lastSessionWalletName"]) { return }
1328
1328
  let signClient = await getSignClient();
1329
- const existingSessions = signClient.find(getWalletConnectV2Config(walletName));
1329
+ let existingSessions;
1330
+ try { existingSessions = signClient.find(getWalletConnectV2Config(walletName)); } catch (e) {}
1330
1331
  const lastSession = existingSessions ? existingSessions[existingSessions.length-1] : undefined;
1331
1332
  if(lastSession && localStorage[KEY+":lastExpiredSessionTopic"] !== lastSession.topic && lastSession.expiry > Math.ceil(Date.now()/1000)) {
1332
1333
  const result = await Promise.race([signClient.ping({ topic: lastSession.topic }), new Promise((resolve)=>setTimeout(resolve, 1500))]);
package/dist/esm/index.js CHANGED
@@ -1798,7 +1798,8 @@ const getLastSession = async(walletName)=>{
1798
1798
  if(!localStorage[KEY+":projectId"]) { return }
1799
1799
  if(walletName !== localStorage[KEY+":lastSessionWalletName"]) { return }
1800
1800
  let signClient = await getSignClient();
1801
- const existingSessions = signClient.find(getWalletConnectV2Config(walletName));
1801
+ let existingSessions;
1802
+ try { existingSessions = signClient.find(getWalletConnectV2Config(walletName)); } catch (e) {}
1802
1803
  const lastSession = existingSessions ? existingSessions[existingSessions.length-1] : undefined;
1803
1804
  if(lastSession && localStorage[KEY+":lastExpiredSessionTopic"] !== lastSession.topic && lastSession.expiry > Math.ceil(Date.now()/1000)) {
1804
1805
  const result = await Promise.race([signClient.ping({ topic: lastSession.topic }), new Promise((resolve)=>setTimeout(resolve, 1500))]);
@@ -1329,7 +1329,8 @@
1329
1329
  if(!localStorage[KEY+":projectId"]) { return }
1330
1330
  if(walletName !== localStorage[KEY+":lastSessionWalletName"]) { return }
1331
1331
  let signClient = await getSignClient();
1332
- const existingSessions = signClient.find(getWalletConnectV2Config(walletName));
1332
+ let existingSessions;
1333
+ try { existingSessions = signClient.find(getWalletConnectV2Config(walletName)); } catch (e) {}
1333
1334
  const lastSession = existingSessions ? existingSessions[existingSessions.length-1] : undefined;
1334
1335
  if(lastSession && localStorage[KEY+":lastExpiredSessionTopic"] !== lastSession.topic && lastSession.expiry > Math.ceil(Date.now()/1000)) {
1335
1336
  const result = await Promise.race([signClient.ping({ topic: lastSession.topic }), new Promise((resolve)=>setTimeout(resolve, 1500))]);
package/dist/umd/index.js CHANGED
@@ -1800,7 +1800,8 @@
1800
1800
  if(!localStorage[KEY+":projectId"]) { return }
1801
1801
  if(walletName !== localStorage[KEY+":lastSessionWalletName"]) { return }
1802
1802
  let signClient = await getSignClient();
1803
- const existingSessions = signClient.find(getWalletConnectV2Config(walletName));
1803
+ let existingSessions;
1804
+ try { existingSessions = signClient.find(getWalletConnectV2Config(walletName)); } catch (e) {}
1804
1805
  const lastSession = existingSessions ? existingSessions[existingSessions.length-1] : undefined;
1805
1806
  if(lastSession && localStorage[KEY+":lastExpiredSessionTopic"] !== lastSession.topic && lastSession.expiry > Math.ceil(Date.now()/1000)) {
1806
1807
  const result = await Promise.race([signClient.ping({ topic: lastSession.topic }), new Promise((resolve)=>setTimeout(resolve, 1500))]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/web3-wallets-evm",
3
3
  "moduleName": "Web3Wallets",
4
- "version": "16.2.8",
4
+ "version": "16.2.9",
5
5
  "description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
6
6
  "main": "dist/umd/index.evm.js",
7
7
  "module": "dist/esm/index.evm.js",