cosmos-connect-core 0.1.15 → 0.1.17

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.
@@ -127,7 +127,7 @@ export class WalletConnectV2 {
127
127
  console.log(`WalletConnectV2: URI generated (attempt ${attempt + 1}/${maxRetries})`, uri);
128
128
  this._uri = uri;
129
129
  this.onUriCbs.forEach((cb) => cb(uri));
130
- console.log('WalletConnectV2: Waiting for approval...');
130
+ console.log(`WalletConnectV2: Waiting for approval (timeout: ${pairingTimeout}ms)...`);
131
131
  try {
132
132
  const approvalPromise = approval();
133
133
  const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('Connection approval timed out')), pairingTimeout));
@@ -144,9 +144,10 @@ export class WalletConnectV2 {
144
144
  return; // Successfully connected
145
145
  }
146
146
  catch (err) {
147
- if (err?.message === 'Connection approval timed out' &&
148
- attempt < maxRetries - 1) {
149
- console.log(`WalletConnectV2: Timed out, regenerating QR code (attempt ${attempt + 2}/${maxRetries})...`);
147
+ const isRetryable = err?.message === 'Connection approval timed out' ||
148
+ err?.message === 'Proposal expired';
149
+ if (isRetryable && attempt < maxRetries - 1) {
150
+ console.log(`WalletConnectV2: ${err.message}, regenerating QR code (attempt ${attempt + 2}/${maxRetries})...`);
150
151
  continue; // Retry with a new URI
151
152
  }
152
153
  throw err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosmos-connect-core",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Core SDK for Cosmos Connect",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",