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