@embarkai/ui-kit 0.2.6 → 0.2.8

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.
@@ -15,7 +15,7 @@
15
15
  <meta http-equiv="X-Content-Type-Options" content="nosniff" />
16
16
  <meta http-equiv="Referrer-Policy" content="strict-origin-when-cross-origin" />
17
17
 
18
- <title>EmbarkAI Secure Wallet - iframe version 0.2.6</title>
18
+ <title>EmbarkAI Secure Wallet - iframe version 0.2.8</title>
19
19
 
20
20
  <!-- Styles will be injected by build process -->
21
21
  <style>
@@ -2110,7 +2110,8 @@ var TokenRefreshApiClient = class {
2110
2110
  }, 3e4);
2111
2111
  const messageHandler = (event) => {
2112
2112
  const message = event.data;
2113
- if (message && message.type === "IFRAME_MSG_TOKEN_REFRESHED" && message.messageId === messageId) {
2113
+ const type = message?.type?.startsWith?.("LUMIA_PASSPORT_") ? message.type.replace("LUMIA_PASSPORT_", "IFRAME_MSG_") : message?.type;
2114
+ if (message && type === "IFRAME_MSG_TOKEN_REFRESHED" && message.messageId === messageId) {
2114
2115
  cleanup();
2115
2116
  if (message.accessToken) {
2116
2117
  console.log("[iframe][TokenRefresh] \u2705 Received new token from parent");
@@ -3313,6 +3314,10 @@ var SdkChannelManager = class {
3313
3314
  * Validate channel token and origin
3314
3315
  */
3315
3316
  validateChannel(channelToken, origin) {
3317
+ if (!channelToken) {
3318
+ console.warn("[iframe][SdkChannel] \u2717 channelToken is null/undefined");
3319
+ return false;
3320
+ }
3316
3321
  const channel = this.channels.get(channelToken);
3317
3322
  if (!channel) {
3318
3323
  console.warn(`[iframe][SdkChannel] \u2717 NOT FOUND: ${channelToken.slice(0, 16)}... (active channels: ${this.channels.size})`);
@@ -4394,7 +4399,7 @@ var SigningManager = class extends TokenRefreshApiClient {
4394
4399
  };
4395
4400
 
4396
4401
  // src/iframe/main.ts
4397
- var IFRAME_VERSION = "0.2.6";
4402
+ var IFRAME_VERSION = "0.2.8";
4398
4403
  var IframeWallet = class {
4399
4404
  constructor() {
4400
4405
  console.log("=".repeat(60));