zano_web3 3.1.0 → 3.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zano_web3",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/zanoWallet.ts CHANGED
@@ -116,7 +116,13 @@ class ZanoWallet {
116
116
 
117
117
  const existingWallet = this.params.useLocalStorage ? this.getSavedWalletCredentials() : undefined;
118
118
 
119
- if (existingWallet && existingWallet.address === walletData.address) {
119
+ const existingWalletValid = existingWallet && existingWallet.address === walletData.address;
120
+
121
+ console.log('existingWalletValid', existingWalletValid);
122
+ console.log('existingWallet', existingWallet);
123
+ console.log('walletData', walletData);
124
+
125
+ if (existingWalletValid) {
120
126
  nonce = existingWallet.nonce;
121
127
  signature = existingWallet.signature;
122
128
  publicKey = existingWallet.publicKey;
@@ -147,7 +153,7 @@ class ZanoWallet {
147
153
  signature,
148
154
  pkey: publicKey,
149
155
  message: nonce,
150
- isSavedData: !!existingWallet
156
+ isSavedData: existingWalletValid
151
157
  }
152
158
 
153
159
  if (this.params.onLocalConnectEnd) {
@@ -176,7 +182,7 @@ class ZanoWallet {
176
182
  return this.handleError({ message: result.error });
177
183
  }
178
184
 
179
- if (!existingWallet && this.params.useLocalStorage) {
185
+ if (!existingWalletValid && this.params.useLocalStorage) {
180
186
  this.setWalletCredentials({
181
187
  publicKey,
182
188
  signature,