@getpara/web-sdk 2.0.0-alpha.64 → 2.0.0-alpha.65

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/dist/ParaWeb.js CHANGED
@@ -97,11 +97,12 @@ class Para extends ParaCore {
97
97
  }
98
98
  }
99
99
  break;
100
- case "WALLET_SWITCH_COMPLETED":
100
+ case "SYNC_WALLETS":
101
101
  {
102
- const { walletIds } = event.data.payload;
103
- this.walletSwitchIds = walletIds;
104
- payload = {};
102
+ payload = {
103
+ wallets: this.wallets,
104
+ currentWalletIds: this.currentWalletIds
105
+ };
105
106
  }
106
107
  break;
107
108
  }
package/dist/WebUtils.js CHANGED
@@ -69,7 +69,8 @@ class WebUtils {
69
69
  popUpHeight = 464;
70
70
  break;
71
71
  }
72
- case PopupType.SIGN_MESSAGE_REVIEW: {
72
+ case PopupType.SIGN_MESSAGE_REVIEW:
73
+ case PopupType.EXPORT_PRIVATE_KEY: {
73
74
  popUpHeight = 585;
74
75
  break;
75
76
  }
@@ -1,6 +1,6 @@
1
1
  import { CurrentWalletIds, OnRampConfig, OnRampPurchase, OnRampPurchaseUpdateParams } from '@getpara/user-management-client';
2
- import { OfframpDepositRequest } from '@getpara/core-sdk';
3
- export type PortalMessageType = 'ONRAMPS__INIT' | 'ONRAMPS__UPDATE_PURCHASE' | 'ONRAMPS__SIGN_MOONPAY_URL' | 'ONRAMPS__SIGN_DEPOSIT_TX' | 'WALLET_SWITCH_COMPLETED';
2
+ import { OfframpDepositRequest, Wallet } from '@getpara/core-sdk';
3
+ export type PortalMessageType = 'ONRAMPS__INIT' | 'ONRAMPS__UPDATE_PURCHASE' | 'ONRAMPS__SIGN_MOONPAY_URL' | 'ONRAMPS__SIGN_DEPOSIT_TX' | 'WALLET_SWITCH_COMPLETED' | 'SYNC_WALLETS';
4
4
  export type PortalMessageStatus = 'ERROR' | 'SUCCESS';
5
5
  export type PortalRequestPayload<T extends PortalMessageType> = T extends 'ONRAMPS__UPDATE_PURCHASE' ? {
6
6
  updates: OnRampPurchaseUpdateParams;
@@ -11,7 +11,7 @@ export type PortalRequestPayload<T extends PortalMessageType> = T extends 'ONRAM
11
11
  depositRequest: OfframpDepositRequest;
12
12
  } : T extends 'WALLET_SWITCH_COMPLETED' ? {
13
13
  walletIds?: CurrentWalletIds;
14
- } : never;
14
+ } : T extends 'SYNC_WALLETS' ? undefined : never;
15
15
  export type PortalRequest = {
16
16
  isPara: boolean;
17
17
  id: string;
@@ -31,6 +31,9 @@ export type PortalRequest = {
31
31
  } | {
32
32
  type: 'WALLET_SWITCH_COMPLETED';
33
33
  payload: PortalRequestPayload<'WALLET_SWITCH_COMPLETED'>;
34
+ } | {
35
+ type: 'SYNC_WALLETS';
36
+ payload?: undefined;
34
37
  });
35
38
  export type PortalResponsePayload<T extends PortalMessageType> = T extends 'ONRAMPS__INIT' ? {
36
39
  onRampPurchase: OnRampPurchase;
@@ -44,6 +47,9 @@ export type PortalResponsePayload<T extends PortalMessageType> = T extends 'ONRA
44
47
  onRampPurchase: OnRampPurchase;
45
48
  } : T extends 'WALLET_SWITCH_COMPLETED' ? {
46
49
  walletIds?: CurrentWalletIds;
50
+ } : T extends 'SYNC_WALLETS' ? {
51
+ wallets: Record<string, Wallet>;
52
+ currentWalletIds?: CurrentWalletIds;
47
53
  } : never;
48
54
  export type PortalResponse = {
49
55
  id: string;
@@ -74,4 +80,8 @@ export type PortalResponse = {
74
80
  status: 'SUCCESS';
75
81
  type: 'WALLET_SWITCH_COMPLETED';
76
82
  payload: PortalResponsePayload<'WALLET_SWITCH_COMPLETED'>;
83
+ } | {
84
+ status: 'SUCCESS';
85
+ type: 'SYNC_WALLETS';
86
+ payload: PortalResponsePayload<'SYNC_WALLETS'>;
77
87
  });
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@getpara/web-sdk",
3
- "version": "2.0.0-alpha.64",
3
+ "version": "2.0.0-alpha.65",
4
4
  "dependencies": {
5
- "@getpara/core-sdk": "2.0.0-alpha.64",
6
- "@getpara/user-management-client": "2.0.0-alpha.64",
5
+ "@getpara/core-sdk": "2.0.0-alpha.65",
6
+ "@getpara/user-management-client": "2.0.0-alpha.65",
7
7
  "base64url": "^3.0.1",
8
8
  "buffer": "6.0.3",
9
9
  "cbor-web": "^9.0.2",
@@ -28,7 +28,7 @@
28
28
  "dist",
29
29
  "package.json"
30
30
  ],
31
- "gitHead": "c55ecfbbd200053ddb78d88c93c597c0f781a6bb",
31
+ "gitHead": "9945ab14944c22851eb81c5bbb831b23bf7eaf2a",
32
32
  "main": "dist/index.js",
33
33
  "scripts": {
34
34
  "build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",