@embarkai/ui-kit 0.3.1 → 0.3.2
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/iframe/index.html
CHANGED
|
@@ -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.3.
|
|
18
|
+
<title>EmbarkAI Secure Wallet - iframe version 0.3.2</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
package/dist/iframe/main.js
CHANGED
|
@@ -4410,7 +4410,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
4410
4410
|
};
|
|
4411
4411
|
|
|
4412
4412
|
// src/iframe/main.ts
|
|
4413
|
-
var IFRAME_VERSION = "0.3.
|
|
4413
|
+
var IFRAME_VERSION = "0.3.2";
|
|
4414
4414
|
var IframeWallet = class {
|
|
4415
4415
|
constructor() {
|
|
4416
4416
|
console.log("=".repeat(60));
|
package/dist/index.cjs
CHANGED
|
@@ -15573,7 +15573,7 @@ var init_package = __esm({
|
|
|
15573
15573
|
"package.json"() {
|
|
15574
15574
|
package_default = {
|
|
15575
15575
|
name: "@embarkai/ui-kit",
|
|
15576
|
-
version: "0.3.
|
|
15576
|
+
version: "0.3.2",
|
|
15577
15577
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
15578
15578
|
type: "module",
|
|
15579
15579
|
main: "./dist/index.cjs",
|
|
@@ -16430,6 +16430,7 @@ function WalletConnectHandler() {
|
|
|
16430
16430
|
[qc, passportWalletAddress, setProviderType, setPage, setIsWalletLinking]
|
|
16431
16431
|
);
|
|
16432
16432
|
const [hasStartedLinking, setHasStartedLinking] = import_react63.default.useState(false);
|
|
16433
|
+
const [modalWasOpened, setModalWasOpened] = import_react63.default.useState(false);
|
|
16433
16434
|
(0, import_react63.useEffect)(() => {
|
|
16434
16435
|
if (isWalletLinking && !hasStartedLinking) {
|
|
16435
16436
|
console.log("[WalletConnectHandler] Starting wallet link flow:", {
|
|
@@ -16453,6 +16454,7 @@ function WalletConnectHandler() {
|
|
|
16453
16454
|
}
|
|
16454
16455
|
if (!isWalletLinking && hasStartedLinking) {
|
|
16455
16456
|
setHasStartedLinking(false);
|
|
16457
|
+
setModalWasOpened(false);
|
|
16456
16458
|
const shouldKeepConnected = walletMode === "direct" || walletMode === "both";
|
|
16457
16459
|
if (isConnected && !shouldKeepConnected) disconnect();
|
|
16458
16460
|
}
|
|
@@ -16467,12 +16469,18 @@ function WalletConnectHandler() {
|
|
|
16467
16469
|
walletMode
|
|
16468
16470
|
]);
|
|
16469
16471
|
(0, import_react63.useEffect)(() => {
|
|
16470
|
-
if (
|
|
16472
|
+
if (connectModalOpen && hasStartedLinking) {
|
|
16473
|
+
setModalWasOpened(true);
|
|
16474
|
+
}
|
|
16475
|
+
}, [connectModalOpen, hasStartedLinking]);
|
|
16476
|
+
(0, import_react63.useEffect)(() => {
|
|
16477
|
+
if (modalWasOpened && !connectModalOpen && !isConnected && isWalletLinking) {
|
|
16471
16478
|
console.log("[WalletConnectHandler] Modal closed without connecting");
|
|
16472
16479
|
onLinkingComplete(false);
|
|
16473
16480
|
setHasStartedLinking(false);
|
|
16481
|
+
setModalWasOpened(false);
|
|
16474
16482
|
}
|
|
16475
|
-
}, [connectModalOpen,
|
|
16483
|
+
}, [connectModalOpen, modalWasOpened, isConnected, isWalletLinking]);
|
|
16476
16484
|
(0, import_react63.useEffect)(() => {
|
|
16477
16485
|
if (isWalletLinking) {
|
|
16478
16486
|
const timeout = setTimeout(() => {
|