@depay/web3-wallets-evm 14.8.0 → 14.9.1

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.
@@ -60185,6 +60185,8 @@ class WalletConnectV1 {
60185
60185
 
60186
60186
  instance.on("disconnect", (error, payload) => {
60187
60187
  setConnectedInstance$2(undefined);
60188
+ localStorage[KEY$1+'_name'] = undefined;
60189
+ localStorage[KEY$1+'_logo'] = undefined;
60188
60190
  if (error) { throw error }
60189
60191
  });
60190
60192
 
@@ -60204,8 +60206,6 @@ class WalletConnectV1 {
60204
60206
 
60205
60207
  async connect(options) {
60206
60208
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
60207
- if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { this.name = options.name; }
60208
- if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { this.logo = options.logo; }
60209
60209
  try {
60210
60210
 
60211
60211
  this.connector = WalletConnectV1.instance;
@@ -60215,6 +60215,8 @@ class WalletConnectV1 {
60215
60215
  }
60216
60216
 
60217
60217
  if(this.connector.connected) {
60218
+ if(localStorage[KEY$1+'_name']) { this.name = localStorage[KEY$1+'_name']; }
60219
+ if(localStorage[KEY$1+'_logo']) { this.logo = localStorage[KEY$1+'_logo']; }
60218
60220
 
60219
60221
  let account = await this.account();
60220
60222
  this.connectedChainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
@@ -60224,6 +60226,9 @@ class WalletConnectV1 {
60224
60226
 
60225
60227
  let { accounts, chainId } = await this.connector.connect();
60226
60228
 
60229
+ if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
60230
+ if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
60231
+
60227
60232
  if(accounts instanceof Array && accounts.length) {
60228
60233
  setConnectedInstance$2(this);
60229
60234
  accounts = accounts.map((account)=>ethers.utils.getAddress(account));
package/dist/esm/index.js CHANGED
@@ -1279,6 +1279,8 @@ class WalletConnectV1 {
1279
1279
 
1280
1280
  instance.on("disconnect", (error, payload) => {
1281
1281
  setConnectedInstance$2(undefined);
1282
+ localStorage[KEY$1+'_name'] = undefined;
1283
+ localStorage[KEY$1+'_logo'] = undefined;
1282
1284
  if (error) { throw error }
1283
1285
  });
1284
1286
 
@@ -1298,8 +1300,6 @@ class WalletConnectV1 {
1298
1300
 
1299
1301
  async connect(options) {
1300
1302
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1301
- if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { this.name = options.name; }
1302
- if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { this.logo = options.logo; }
1303
1303
  try {
1304
1304
 
1305
1305
  this.connector = WalletConnectV1.instance;
@@ -1309,6 +1309,8 @@ class WalletConnectV1 {
1309
1309
  }
1310
1310
 
1311
1311
  if(this.connector.connected) {
1312
+ if(localStorage[KEY$1+'_name']) { this.name = localStorage[KEY$1+'_name']; }
1313
+ if(localStorage[KEY$1+'_logo']) { this.logo = localStorage[KEY$1+'_logo']; }
1312
1314
 
1313
1315
  let account = await this.account();
1314
1316
  this.connectedChainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
@@ -1318,6 +1320,9 @@ class WalletConnectV1 {
1318
1320
 
1319
1321
  let { accounts, chainId } = await this.connector.connect();
1320
1322
 
1323
+ if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1324
+ if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1325
+
1321
1326
  if(accounts instanceof Array && accounts.length) {
1322
1327
  setConnectedInstance$2(this);
1323
1328
  accounts = accounts.map((account)=>ethers.utils.getAddress(account));
@@ -60183,6 +60183,8 @@
60183
60183
 
60184
60184
  instance.on("disconnect", (error, payload) => {
60185
60185
  setConnectedInstance$2(undefined);
60186
+ localStorage[KEY$1+'_name'] = undefined;
60187
+ localStorage[KEY$1+'_logo'] = undefined;
60186
60188
  if (error) { throw error }
60187
60189
  });
60188
60190
 
@@ -60202,8 +60204,6 @@
60202
60204
 
60203
60205
  async connect(options) {
60204
60206
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
60205
- if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { this.name = options.name; }
60206
- if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { this.logo = options.logo; }
60207
60207
  try {
60208
60208
 
60209
60209
  this.connector = WalletConnectV1.instance;
@@ -60213,6 +60213,8 @@
60213
60213
  }
60214
60214
 
60215
60215
  if(this.connector.connected) {
60216
+ if(localStorage[KEY$1+'_name']) { this.name = localStorage[KEY$1+'_name']; }
60217
+ if(localStorage[KEY$1+'_logo']) { this.logo = localStorage[KEY$1+'_logo']; }
60216
60218
 
60217
60219
  let account = await this.account();
60218
60220
  this.connectedChainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
@@ -60222,6 +60224,9 @@
60222
60224
 
60223
60225
  let { accounts, chainId } = await this.connector.connect();
60224
60226
 
60227
+ if(_optionalChain$4([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
60228
+ if(_optionalChain$4([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
60229
+
60225
60230
  if(accounts instanceof Array && accounts.length) {
60226
60231
  setConnectedInstance$2(this);
60227
60232
  accounts = accounts.map((account)=>ethers.ethers.utils.getAddress(account));
package/dist/umd/index.js CHANGED
@@ -1276,6 +1276,8 @@
1276
1276
 
1277
1277
  instance.on("disconnect", (error, payload) => {
1278
1278
  setConnectedInstance$2(undefined);
1279
+ localStorage[KEY$1+'_name'] = undefined;
1280
+ localStorage[KEY$1+'_logo'] = undefined;
1279
1281
  if (error) { throw error }
1280
1282
  });
1281
1283
 
@@ -1295,8 +1297,6 @@
1295
1297
 
1296
1298
  async connect(options) {
1297
1299
  let connect = (options && options.connect) ? options.connect : ({uri})=>{};
1298
- if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { this.name = options.name; }
1299
- if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { this.logo = options.logo; }
1300
1300
  try {
1301
1301
 
1302
1302
  this.connector = WalletConnectV1.instance;
@@ -1306,6 +1306,8 @@
1306
1306
  }
1307
1307
 
1308
1308
  if(this.connector.connected) {
1309
+ if(localStorage[KEY$1+'_name']) { this.name = localStorage[KEY$1+'_name']; }
1310
+ if(localStorage[KEY$1+'_logo']) { this.logo = localStorage[KEY$1+'_logo']; }
1309
1311
 
1310
1312
  let account = await this.account();
1311
1313
  this.connectedChainId = await this.connector.sendCustomRequest({ method: 'eth_chainId' });
@@ -1315,6 +1317,9 @@
1315
1317
 
1316
1318
  let { accounts, chainId } = await this.connector.connect();
1317
1319
 
1320
+ if(_optionalChain$2([options, 'optionalAccess', _ => _.name])) { localStorage[KEY$1+'_name'] = this.name = options.name; }
1321
+ if(_optionalChain$2([options, 'optionalAccess', _2 => _2.logo])) { localStorage[KEY$1+'_logo'] = this.logo = options.logo; }
1322
+
1318
1323
  if(accounts instanceof Array && accounts.length) {
1319
1324
  setConnectedInstance$2(this);
1320
1325
  accounts = accounts.map((account)=>ethers.ethers.utils.getAddress(account));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/web3-wallets-evm",
3
3
  "moduleName": "Web3Wallets",
4
- "version": "14.8.0",
4
+ "version": "14.9.1",
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",