@embarkai/ui-kit 0.4.108 → 0.4.109
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 +9 -8
- package/dist/index.js +9 -8
- 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.4.
|
|
18
|
+
<title>EmbarkAI Secure Wallet - iframe version 0.4.109</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
package/dist/iframe/main.js
CHANGED
|
@@ -6342,7 +6342,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
6342
6342
|
};
|
|
6343
6343
|
|
|
6344
6344
|
// src/iframe/main.ts
|
|
6345
|
-
var IFRAME_VERSION = "0.4.
|
|
6345
|
+
var IFRAME_VERSION = "0.4.109";
|
|
6346
6346
|
var IframeWallet = class {
|
|
6347
6347
|
// private finchpay: FinchPayRampAPI
|
|
6348
6348
|
// private rampnow: RampnowOnrampAPI
|
package/dist/index.cjs
CHANGED
|
@@ -15718,10 +15718,11 @@ function someInErrorChain(error, predicate) {
|
|
|
15718
15718
|
}
|
|
15719
15719
|
return false;
|
|
15720
15720
|
}
|
|
15721
|
-
function dropFailedConnectorSession(error, connector, wagmiConfig3) {
|
|
15721
|
+
async function dropFailedConnectorSession(error, connector, wagmiConfig3) {
|
|
15722
|
+
if (connector.type !== "walletConnect") return;
|
|
15722
15723
|
if (isRequestPendingError(error) || isUserRejectedError(error)) return;
|
|
15723
15724
|
if (wagmiConfig3.state.connections.has(connector.uid)) return;
|
|
15724
|
-
connector.disconnect().catch(() => {
|
|
15725
|
+
await connector.disconnect().catch(() => {
|
|
15725
15726
|
});
|
|
15726
15727
|
}
|
|
15727
15728
|
var REQUEST_PENDING_ERROR_CODE, USER_REJECTED_ERROR_CODE, isRequestPendingError, isUserRejectedError, isUnsupportedChainError;
|
|
@@ -17519,7 +17520,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17519
17520
|
onError: (error, { connector }) => reportConnectError(error, connector)
|
|
17520
17521
|
}
|
|
17521
17522
|
});
|
|
17522
|
-
function reportConnectError(error, connector) {
|
|
17523
|
+
async function reportConnectError(error, connector) {
|
|
17523
17524
|
const connectFlowType = getConnectFlowType({
|
|
17524
17525
|
isEmbarkAI: !!embarkAiAddress,
|
|
17525
17526
|
connectFlow: menuParams.current?.connectFlowType || "auth"
|
|
@@ -17528,7 +17529,6 @@ function ConnectExternalWalletMenu() {
|
|
|
17528
17529
|
if (!isRequestPending && connectFlowType !== "connect" && wagmiConfig3.state.connections.has(connector.uid)) {
|
|
17529
17530
|
disconnect({ connector });
|
|
17530
17531
|
}
|
|
17531
|
-
dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17532
17532
|
const errorMessage = isRequestPending ? (
|
|
17533
17533
|
// @ts-expect-error i18n typing
|
|
17534
17534
|
t("passport:connectMenu.requestPending", { wallet: connector.name })
|
|
@@ -17551,6 +17551,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17551
17551
|
}
|
|
17552
17552
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17553
17553
|
}, 100);
|
|
17554
|
+
await dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17554
17555
|
}
|
|
17555
17556
|
const visibleConnectors = (0, import_react46.useMemo)(() => {
|
|
17556
17557
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -17629,7 +17630,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17629
17630
|
await disconnectAsync({ connector: connectedConnector });
|
|
17630
17631
|
}
|
|
17631
17632
|
} catch (error) {
|
|
17632
|
-
reportConnectError(error, connector);
|
|
17633
|
+
await reportConnectError(error, connector);
|
|
17633
17634
|
return;
|
|
17634
17635
|
} finally {
|
|
17635
17636
|
setIsPreparingConnect(false);
|
|
@@ -17737,8 +17738,8 @@ function useExternalWalletConnnect(options) {
|
|
|
17737
17738
|
onSuccess?.({ connected: true, address: signingWalletAddress });
|
|
17738
17739
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17739
17740
|
},
|
|
17740
|
-
onError: (error, { connector }) => {
|
|
17741
|
-
dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17741
|
+
onError: async (error, { connector }) => {
|
|
17742
|
+
await dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17742
17743
|
onError?.({
|
|
17743
17744
|
connected: false,
|
|
17744
17745
|
connector: connector?.name || "Unknown Wallet",
|
|
@@ -30041,7 +30042,7 @@ var init_package = __esm({
|
|
|
30041
30042
|
"package.json"() {
|
|
30042
30043
|
package_default = {
|
|
30043
30044
|
name: "@embarkai/ui-kit",
|
|
30044
|
-
version: "0.4.
|
|
30045
|
+
version: "0.4.109",
|
|
30045
30046
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
30046
30047
|
type: "module",
|
|
30047
30048
|
main: "./dist/index.cjs",
|
package/dist/index.js
CHANGED
|
@@ -15676,10 +15676,11 @@ function someInErrorChain(error, predicate) {
|
|
|
15676
15676
|
}
|
|
15677
15677
|
return false;
|
|
15678
15678
|
}
|
|
15679
|
-
function dropFailedConnectorSession(error, connector, wagmiConfig3) {
|
|
15679
|
+
async function dropFailedConnectorSession(error, connector, wagmiConfig3) {
|
|
15680
|
+
if (connector.type !== "walletConnect") return;
|
|
15680
15681
|
if (isRequestPendingError(error) || isUserRejectedError(error)) return;
|
|
15681
15682
|
if (wagmiConfig3.state.connections.has(connector.uid)) return;
|
|
15682
|
-
connector.disconnect().catch(() => {
|
|
15683
|
+
await connector.disconnect().catch(() => {
|
|
15683
15684
|
});
|
|
15684
15685
|
}
|
|
15685
15686
|
var REQUEST_PENDING_ERROR_CODE, USER_REJECTED_ERROR_CODE, isRequestPendingError, isUserRejectedError, isUnsupportedChainError;
|
|
@@ -17482,7 +17483,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17482
17483
|
onError: (error, { connector }) => reportConnectError(error, connector)
|
|
17483
17484
|
}
|
|
17484
17485
|
});
|
|
17485
|
-
function reportConnectError(error, connector) {
|
|
17486
|
+
async function reportConnectError(error, connector) {
|
|
17486
17487
|
const connectFlowType = getConnectFlowType({
|
|
17487
17488
|
isEmbarkAI: !!embarkAiAddress,
|
|
17488
17489
|
connectFlow: menuParams.current?.connectFlowType || "auth"
|
|
@@ -17491,7 +17492,6 @@ function ConnectExternalWalletMenu() {
|
|
|
17491
17492
|
if (!isRequestPending && connectFlowType !== "connect" && wagmiConfig3.state.connections.has(connector.uid)) {
|
|
17492
17493
|
disconnect({ connector });
|
|
17493
17494
|
}
|
|
17494
|
-
dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17495
17495
|
const errorMessage = isRequestPending ? (
|
|
17496
17496
|
// @ts-expect-error i18n typing
|
|
17497
17497
|
t("passport:connectMenu.requestPending", { wallet: connector.name })
|
|
@@ -17514,6 +17514,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17514
17514
|
}
|
|
17515
17515
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17516
17516
|
}, 100);
|
|
17517
|
+
await dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17517
17518
|
}
|
|
17518
17519
|
const visibleConnectors = useMemo9(() => {
|
|
17519
17520
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -17592,7 +17593,7 @@ function ConnectExternalWalletMenu() {
|
|
|
17592
17593
|
await disconnectAsync({ connector: connectedConnector });
|
|
17593
17594
|
}
|
|
17594
17595
|
} catch (error) {
|
|
17595
|
-
reportConnectError(error, connector);
|
|
17596
|
+
await reportConnectError(error, connector);
|
|
17596
17597
|
return;
|
|
17597
17598
|
} finally {
|
|
17598
17599
|
setIsPreparingConnect(false);
|
|
@@ -17696,8 +17697,8 @@ function useExternalWalletConnnect(options) {
|
|
|
17696
17697
|
onSuccess?.({ connected: true, address: signingWalletAddress });
|
|
17697
17698
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
17698
17699
|
},
|
|
17699
|
-
onError: (error, { connector }) => {
|
|
17700
|
-
dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17700
|
+
onError: async (error, { connector }) => {
|
|
17701
|
+
await dropFailedConnectorSession(error, connector, wagmiConfig3);
|
|
17701
17702
|
onError?.({
|
|
17702
17703
|
connected: false,
|
|
17703
17704
|
connector: connector?.name || "Unknown Wallet",
|
|
@@ -29942,7 +29943,7 @@ var init_package = __esm({
|
|
|
29942
29943
|
"package.json"() {
|
|
29943
29944
|
package_default = {
|
|
29944
29945
|
name: "@embarkai/ui-kit",
|
|
29945
|
-
version: "0.4.
|
|
29946
|
+
version: "0.4.109",
|
|
29946
29947
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
29947
29948
|
type: "module",
|
|
29948
29949
|
main: "./dist/index.cjs",
|