@getpara/react-native-wallet 1.5.0 → 1.6.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.
@@ -254,7 +254,16 @@ export class ParaMobile extends ParaCore {
254
254
  type: desiredWallet.type || undefined,
255
255
  };
256
256
  }
257
+ const currentWalletIds = {};
258
+ for (const wallet of Object.values(walletsToInsert)) {
259
+ const { id, type } = wallet;
260
+ const currentIdsForType = currentWalletIds[type || 'EVM'] || [];
261
+ currentWalletIds[type || 'EVM'] = [...currentIdsForType, id];
262
+ }
257
263
  yield this.setWallets(walletsToInsert);
264
+ yield this.setCurrentWalletIds(currentWalletIds, {
265
+ sessionLookupId: session.data.sessionLookupId,
266
+ });
258
267
  });
259
268
  }
260
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/react-native-wallet",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Para Wallet for React Native",
5
5
  "homepage": "https://getpara.com",
6
6
  "author": "Para Team <hello@getpara.com> (https://getpara.com)",
@@ -22,9 +22,9 @@
22
22
  "compile-signer": "bash ./scripts/compileSigner.sh"
23
23
  },
24
24
  "dependencies": {
25
- "@getpara/core-sdk": "1.5.0",
26
- "@getpara/user-management-client": "1.5.0",
27
- "@getpara/web-sdk": "1.5.0",
25
+ "@getpara/core-sdk": "1.6.0",
26
+ "@getpara/user-management-client": "1.6.0",
27
+ "@getpara/web-sdk": "1.6.0",
28
28
  "@peculiar/webcrypto": "^1.5.0",
29
29
  "@sentry/react-native": "^6.7.0",
30
30
  "node-forge": "1.3.1",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "0e3c1401b4f1da60b288cdde7695077c9bcbc48f"
63
+ "gitHead": "2dd6c8ea893d72d693804e5c5b0856d2ea6c3a7a"
64
64
  }
@@ -22,7 +22,7 @@ import {
22
22
  PasskeyGetRequest,
23
23
  PasskeyGetResult,
24
24
  } from 'react-native-passkey';
25
- import { Auth, extractAuthInfo, PublicKeyStatus, WalletScheme } from '@getpara/user-management-client';
25
+ import { Auth, CurrentWalletIds, extractAuthInfo, PublicKeyStatus, WalletScheme } from '@getpara/user-management-client';
26
26
  import { setEnv } from '../config.js';
27
27
  import base64url from 'base64url';
28
28
  import { webcrypto } from 'crypto';
@@ -293,6 +293,16 @@ export class ParaMobile extends ParaCore {
293
293
  };
294
294
  }
295
295
 
296
+ const currentWalletIds: CurrentWalletIds = {};
297
+ for (const wallet of Object.values(walletsToInsert)) {
298
+ const { id, type } = wallet;
299
+ const currentIdsForType = currentWalletIds[type || 'EVM'] || [];
300
+ currentWalletIds[type || 'EVM'] = [...currentIdsForType, id];
301
+ }
302
+
296
303
  await this.setWallets(walletsToInsert);
304
+ await this.setCurrentWalletIds(currentWalletIds, {
305
+ sessionLookupId: session.data.sessionLookupId,
306
+ });
297
307
  }
298
308
  }