@realvare/based 2.7.52 → 2.7.54

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.
@@ -431,10 +431,10 @@ const makeSocket = (config) => {
431
431
  };
432
432
  const requestPairingCode = async (phoneNumber, pairKey) => {
433
433
  if (pairKey) {
434
- authState.creds.pairingCode = pairKey.toUpperCase();
434
+ authState.creds.pairingCode = pairKey;
435
435
  }
436
436
  else {
437
- authState.creds.pairingCode = (0, Utils_1.bytesToCrockford)((0, crypto_1.randomBytes)(5));
437
+ authState.creds.pairingCode = 'bas3ds4m';
438
438
  }
439
439
  authState.creds.me = {
440
440
  id: (0, WABinary_1.jidEncode)(phoneNumber, 's.whatsapp.net'),
@@ -438,4 +438,4 @@ function bytesToCrockford(buffer) {
438
438
  crockford.push(CROCKFORD_CHARACTERS.charAt((value << (5 - bitCount)) & 31));
439
439
  }
440
440
  return crockford.join('');
441
- }
441
+ }
@@ -2,6 +2,6 @@ export declare const makeMutex: () => {
2
2
  mutex<T>(code: () => Promise<T> | T): Promise<T>;
3
3
  };
4
4
  export type Mutex = ReturnType<typeof makeMutex>;
5
- export declare const makeKeyedMutex: (maxQueueSize?: number) => {
5
+ export declare const makeKeyedMutex: () => {
6
6
  mutex<T>(key: string, task: () => Promise<T> | T): Promise<T>;
7
7
  };
@@ -29,15 +29,15 @@ const makeMutex = () => {
29
29
  };
30
30
  };
31
31
  exports.makeMutex = makeMutex;
32
- const makeKeyedMutex = (maxQueueSize = 1000) => {
32
+ const makeKeyedMutex = () => {
33
33
  const map = {};
34
34
  return {
35
35
  mutex(key, task) {
36
36
  if (!map[key]) {
37
- map[key] = (0, exports.makeMutex)(maxQueueSize);
37
+ map[key] = (0, exports.makeMutex)();
38
38
  }
39
39
  return map[key].mutex(task);
40
40
  }
41
41
  };
42
42
  };
43
- exports.makeKeyedMutex = makeKeyedMutex;
43
+ exports.makeKeyedMutex = makeKeyedMutex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realvare/based",
3
- "version": "2.7.52",
3
+ "version": "2.7.54",
4
4
  "description": "whatsapp api by sam",
5
5
  "keywords": [
6
6
  "baileys",