@depay/web3-wallets-evm 15.1.2 → 15.1.4

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.
@@ -59927,11 +59927,11 @@ class Safe {
59927
59927
 
59928
59928
  async transactionCount() {
59929
59929
  let transactionCount;
59930
- let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/`)
59930
+ let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`)
59931
59931
  .then((response) => response.json())
59932
59932
  .catch((error) => { console.error('Error:', error); });
59933
- if(jsonResult && jsonResult.nonce) {
59934
- transactionCount = jsonResult.nonce;
59933
+ if(jsonResult && jsonResult.results && jsonResult.results.length) {
59934
+ transactionCount = jsonResult.results[0].nonce;
59935
59935
  } else {
59936
59936
  transactionCount = parseInt((await request$1({
59937
59937
  blockchain: this.blockchain,
@@ -60221,7 +60221,7 @@ class WalletConnectV1 {
60221
60221
 
60222
60222
  if(options && options.reconnect) {
60223
60223
  if(this.connector) {
60224
- await this.connector.killSession();
60224
+ try{ await this.connector.killSession(); } catch (e) {}
60225
60225
  this.disconnect();
60226
60226
  }
60227
60227
  }
package/dist/esm/index.js CHANGED
@@ -1021,11 +1021,11 @@ class Safe {
1021
1021
 
1022
1022
  async transactionCount() {
1023
1023
  let transactionCount;
1024
- let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/`)
1024
+ let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`)
1025
1025
  .then((response) => response.json())
1026
1026
  .catch((error) => { console.error('Error:', error); });
1027
- if(jsonResult && jsonResult.nonce) {
1028
- transactionCount = jsonResult.nonce;
1027
+ if(jsonResult && jsonResult.results && jsonResult.results.length) {
1028
+ transactionCount = jsonResult.results[0].nonce;
1029
1029
  } else {
1030
1030
  transactionCount = parseInt((await request$2({
1031
1031
  blockchain: this.blockchain,
@@ -1315,7 +1315,7 @@ class WalletConnectV1 {
1315
1315
 
1316
1316
  if(options && options.reconnect) {
1317
1317
  if(this.connector) {
1318
- await this.connector.killSession();
1318
+ try{ await this.connector.killSession(); } catch (e) {}
1319
1319
  this.disconnect();
1320
1320
  }
1321
1321
  }
@@ -59926,11 +59926,11 @@
59926
59926
 
59927
59927
  async transactionCount() {
59928
59928
  let transactionCount;
59929
- let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/`)
59929
+ let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`)
59930
59930
  .then((response) => response.json())
59931
59931
  .catch((error) => { console.error('Error:', error); });
59932
- if(jsonResult && jsonResult.nonce) {
59933
- transactionCount = jsonResult.nonce;
59932
+ if(jsonResult && jsonResult.results && jsonResult.results.length) {
59933
+ transactionCount = jsonResult.results[0].nonce;
59934
59934
  } else {
59935
59935
  transactionCount = parseInt((await request$1({
59936
59936
  blockchain: this.blockchain,
@@ -60220,7 +60220,7 @@
60220
60220
 
60221
60221
  if(options && options.reconnect) {
60222
60222
  if(this.connector) {
60223
- await this.connector.killSession();
60223
+ try{ await this.connector.killSession(); } catch (e) {}
60224
60224
  this.disconnect();
60225
60225
  }
60226
60226
  }
package/dist/umd/index.js CHANGED
@@ -1019,11 +1019,11 @@
1019
1019
 
1020
1020
  async transactionCount() {
1021
1021
  let transactionCount;
1022
- let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/`)
1022
+ let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[this.blockchain]}.safe.global/api/v1/safes/${this.address}/all-transactions/`)
1023
1023
  .then((response) => response.json())
1024
1024
  .catch((error) => { console.error('Error:', error); });
1025
- if(jsonResult && jsonResult.nonce) {
1026
- transactionCount = jsonResult.nonce;
1025
+ if(jsonResult && jsonResult.results && jsonResult.results.length) {
1026
+ transactionCount = jsonResult.results[0].nonce;
1027
1027
  } else {
1028
1028
  transactionCount = parseInt((await web3Client.request({
1029
1029
  blockchain: this.blockchain,
@@ -1313,7 +1313,7 @@
1313
1313
 
1314
1314
  if(options && options.reconnect) {
1315
1315
  if(this.connector) {
1316
- await this.connector.killSession();
1316
+ try{ await this.connector.killSession(); } catch (e) {}
1317
1317
  this.disconnect();
1318
1318
  }
1319
1319
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depay/web3-wallets-evm",
3
3
  "moduleName": "Web3Wallets",
4
- "version": "15.1.2",
4
+ "version": "15.1.4",
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",