@embarkai/ui-kit 0.4.45 → 0.4.46
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 +30 -15
- package/dist/index.js +80 -65
- 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.46</title>
|
|
19
19
|
|
|
20
20
|
<!-- Styles will be injected by build process -->
|
|
21
21
|
<style>
|
package/dist/iframe/main.js
CHANGED
|
@@ -6391,7 +6391,7 @@ var SigningManager = class extends TokenRefreshApiClient {
|
|
|
6391
6391
|
};
|
|
6392
6392
|
|
|
6393
6393
|
// src/iframe/main.ts
|
|
6394
|
-
var IFRAME_VERSION = "0.4.
|
|
6394
|
+
var IFRAME_VERSION = "0.4.46";
|
|
6395
6395
|
var IframeWallet = class {
|
|
6396
6396
|
constructor() {
|
|
6397
6397
|
console.log("=".repeat(60));
|
package/dist/index.cjs
CHANGED
|
@@ -9581,6 +9581,7 @@ var init_networks = __esm({
|
|
|
9581
9581
|
// src/internal/components/BuyMenu/binance/BinanceSummary.tsx
|
|
9582
9582
|
function BinanceSummary(props) {
|
|
9583
9583
|
const { payment } = props;
|
|
9584
|
+
const qc = (0, import_react_query7.useQueryClient)();
|
|
9584
9585
|
const { t } = useT();
|
|
9585
9586
|
const walletAddress = useSession((st) => st.address);
|
|
9586
9587
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -9599,10 +9600,10 @@ function BinanceSummary(props) {
|
|
|
9599
9600
|
network: CHAIN_ID_TO_BINANCE_NETWORK_NAMES[chainConfig.id],
|
|
9600
9601
|
payMethodCode: payment?.payMethodCode || void 0,
|
|
9601
9602
|
payMethodSubCode: payment?.payMethodSubCode || void 0,
|
|
9602
|
-
// redirectUrl: returnUrl,
|
|
9603
|
-
// failRedirectUrl: returnUrl,
|
|
9604
9603
|
// TODO: pass quote response to backend to create order with exact quote details (amount, fees, etc.)
|
|
9605
9604
|
quote: quoteData
|
|
9605
|
+
// redirectUrl: returnUrl,
|
|
9606
|
+
// failRedirectUrl: returnUrl,
|
|
9606
9607
|
});
|
|
9607
9608
|
},
|
|
9608
9609
|
onSuccess: (response) => {
|
|
@@ -9613,6 +9614,7 @@ function BinanceSummary(props) {
|
|
|
9613
9614
|
} else {
|
|
9614
9615
|
setTimeout(() => {
|
|
9615
9616
|
setRedirecting(false);
|
|
9617
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
9616
9618
|
window.open(link, "_blank", "noopener,noreferrer");
|
|
9617
9619
|
useBuyMenuStore.getState().setError(null);
|
|
9618
9620
|
useBuyMenuStore.getState().setIsTransactionHistory(true);
|
|
@@ -9622,6 +9624,7 @@ function BinanceSummary(props) {
|
|
|
9622
9624
|
onError: (err) => {
|
|
9623
9625
|
setRedirecting(false);
|
|
9624
9626
|
console.error("[BINANCE] Create Checkout Order failed", err);
|
|
9627
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
9625
9628
|
}
|
|
9626
9629
|
});
|
|
9627
9630
|
const isContinueDisabled = !!redirecting || !!isFundWalletOrderCheckouting || !quoteData;
|
|
@@ -9703,6 +9706,7 @@ var init_BinanceSummary = __esm({
|
|
|
9703
9706
|
init_button();
|
|
9704
9707
|
init_highlight();
|
|
9705
9708
|
init_contants();
|
|
9709
|
+
init_queryKeys();
|
|
9706
9710
|
init_useBuyMenuStore();
|
|
9707
9711
|
init_api();
|
|
9708
9712
|
init_networks();
|
|
@@ -9947,31 +9951,40 @@ function BinanceTxHistoryItem(props) {
|
|
|
9947
9951
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full flex items-start gap-[var(--ui-kit-gap)] mb-1", children: [
|
|
9948
9952
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TokenIcon, { className: "w-8 h-8" }),
|
|
9949
9953
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "w-full", children: [
|
|
9954
|
+
Number(fiatAmount || "0") > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-[10px] leading-3", children: [
|
|
9955
|
+
formatPrice(Number(fiatAmount)),
|
|
9956
|
+
" ",
|
|
9957
|
+
fiatCurrency
|
|
9958
|
+
] }),
|
|
9950
9959
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-lg leading-5", children: [
|
|
9951
9960
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: formatPrice(Number(cryptoAmount)) }),
|
|
9952
9961
|
" ",
|
|
9953
9962
|
cryptoCurrency
|
|
9954
|
-
] }),
|
|
9955
|
-
Number(fiatAmount || "0") > 0 && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-[10px] leading-4", children: [
|
|
9956
|
-
formatPrice(Number(fiatAmount)),
|
|
9957
|
-
" ",
|
|
9958
|
-
fiatCurrency
|
|
9959
9963
|
] })
|
|
9960
9964
|
] })
|
|
9961
9965
|
] }),
|
|
9962
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] justify-between
|
|
9963
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className:
|
|
9966
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-[var(--ui-kit-gap)] justify-between leading-4", children: [
|
|
9967
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex-none whitespace-nowrap text-[10px] text-[var(--ui-kit-fg-muted)]", children: [
|
|
9964
9968
|
"ID: ",
|
|
9965
9969
|
id
|
|
9966
9970
|
] }),
|
|
9967
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9971
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
9972
|
+
"span",
|
|
9973
|
+
{
|
|
9974
|
+
className: cn(
|
|
9975
|
+
"whitespace-nowrap overflow-hidden text-ellipsis",
|
|
9976
|
+
"block flex-1 text-[10px] text-right text-[var(--ui-kit-fg-muted)]"
|
|
9977
|
+
),
|
|
9978
|
+
children: (0, import_dayjs.default)(updatedAt || createdAt).format("MMM D YYYY [at] HH:mm")
|
|
9979
|
+
}
|
|
9980
|
+
)
|
|
9968
9981
|
] }),
|
|
9969
9982
|
orderDetailLink && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
9970
9983
|
Button,
|
|
9971
9984
|
{
|
|
9972
9985
|
variant: "outline",
|
|
9973
9986
|
size: "medium",
|
|
9974
|
-
className: "w-full",
|
|
9987
|
+
className: "w-full mt-1",
|
|
9975
9988
|
onClick: () => window.open(orderDetailLink, "_blank", "noopener,noreferrer"),
|
|
9976
9989
|
children: [
|
|
9977
9990
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.ExternalLinkIcon, { className: "w-4 h-4" }),
|
|
@@ -10021,7 +10034,7 @@ function BinanceTxHistory() {
|
|
|
10021
10034
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Highlight, { children: t("passport:buyMenu.noItems.noTransactions") });
|
|
10022
10035
|
}
|
|
10023
10036
|
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
10024
|
-
txList.map((tx) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BinanceTxHistoryItem, { ...tx }, tx.id)),
|
|
10037
|
+
isTxDataLoading ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react13.LoaderIcon, { className: "w-4 h-4 animate-spin" }) }) : txList.map((tx) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BinanceTxHistoryItem, { ...tx }, tx.id)),
|
|
10025
10038
|
hasNextPage && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
10026
10039
|
Button,
|
|
10027
10040
|
{
|
|
@@ -10076,7 +10089,7 @@ function useBinanceSseTxTracing(walletAddress) {
|
|
|
10076
10089
|
if (data?.type !== "ORDER_UPDATED") return;
|
|
10077
10090
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
10078
10091
|
debounceRef.current = setTimeout(() => {
|
|
10079
|
-
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions
|
|
10092
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
10080
10093
|
}, 500);
|
|
10081
10094
|
}) || null;
|
|
10082
10095
|
connectTxTracing({ walletAddress }).catch(
|
|
@@ -20273,6 +20286,7 @@ function useBridge() {
|
|
|
20273
20286
|
},
|
|
20274
20287
|
onSuccess: (operationHashes) => {
|
|
20275
20288
|
const { setBridgeStep, setBridgeTxStatus } = useBridgeStore.getState();
|
|
20289
|
+
qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY] });
|
|
20276
20290
|
useOperationHashesStore.getState().setOperationHashes(operationHashes);
|
|
20277
20291
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
20278
20292
|
useFlowSelectorStore.getState().setIsUiLocked(false);
|
|
@@ -20285,7 +20299,7 @@ function useBridge() {
|
|
|
20285
20299
|
if (hyperlaneDbTx?.id) {
|
|
20286
20300
|
patchInitiatedBridgeTxStatus({ txId: hyperlaneDbTx.id, txStatus: "REJECTED" }).then(({ ok }) => {
|
|
20287
20301
|
console.log("[HYPERLANE SDK] initiated tx patched as REJECTED: ", hyperlaneDbTx.id, "ok: ", ok);
|
|
20288
|
-
if (ok) qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY
|
|
20302
|
+
if (ok) qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY] });
|
|
20289
20303
|
});
|
|
20290
20304
|
}
|
|
20291
20305
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
@@ -21579,6 +21593,7 @@ function BridgeHistorySwitch(props) {
|
|
|
21579
21593
|
onChange: () => {
|
|
21580
21594
|
const { bridgeStep: bridgeStep2, setBridgeStep } = useBridgeStore.getState();
|
|
21581
21595
|
if (bridgeStep2 !== "tx-history") lastBridgeStepRef.current = bridgeStep2;
|
|
21596
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21582
21597
|
setBridgeStep(bridgeStep2 === "tx-history" ? lastBridgeStepRef.current || "select" : "tx-history");
|
|
21583
21598
|
}
|
|
21584
21599
|
}
|
|
@@ -24491,7 +24506,7 @@ var init_package = __esm({
|
|
|
24491
24506
|
"package.json"() {
|
|
24492
24507
|
package_default = {
|
|
24493
24508
|
name: "@embarkai/ui-kit",
|
|
24494
|
-
version: "0.4.
|
|
24509
|
+
version: "0.4.46",
|
|
24495
24510
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24496
24511
|
type: "module",
|
|
24497
24512
|
main: "./dist/index.cjs",
|
package/dist/index.js
CHANGED
|
@@ -9545,11 +9545,12 @@ var init_networks = __esm({
|
|
|
9545
9545
|
});
|
|
9546
9546
|
|
|
9547
9547
|
// src/internal/components/BuyMenu/binance/BinanceSummary.tsx
|
|
9548
|
-
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
|
9548
|
+
import { useMutation as useMutation5, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
9549
9549
|
import { InfoIcon as InfoIcon3, LoaderIcon } from "lucide-react";
|
|
9550
9550
|
import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
9551
9551
|
function BinanceSummary(props) {
|
|
9552
9552
|
const { payment } = props;
|
|
9553
|
+
const qc = useQueryClient3();
|
|
9553
9554
|
const { t } = useT();
|
|
9554
9555
|
const walletAddress = useSession((st) => st.address);
|
|
9555
9556
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -9568,10 +9569,10 @@ function BinanceSummary(props) {
|
|
|
9568
9569
|
network: CHAIN_ID_TO_BINANCE_NETWORK_NAMES[chainConfig.id],
|
|
9569
9570
|
payMethodCode: payment?.payMethodCode || void 0,
|
|
9570
9571
|
payMethodSubCode: payment?.payMethodSubCode || void 0,
|
|
9571
|
-
// redirectUrl: returnUrl,
|
|
9572
|
-
// failRedirectUrl: returnUrl,
|
|
9573
9572
|
// TODO: pass quote response to backend to create order with exact quote details (amount, fees, etc.)
|
|
9574
9573
|
quote: quoteData
|
|
9574
|
+
// redirectUrl: returnUrl,
|
|
9575
|
+
// failRedirectUrl: returnUrl,
|
|
9575
9576
|
});
|
|
9576
9577
|
},
|
|
9577
9578
|
onSuccess: (response) => {
|
|
@@ -9582,6 +9583,7 @@ function BinanceSummary(props) {
|
|
|
9582
9583
|
} else {
|
|
9583
9584
|
setTimeout(() => {
|
|
9584
9585
|
setRedirecting(false);
|
|
9586
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
9585
9587
|
window.open(link, "_blank", "noopener,noreferrer");
|
|
9586
9588
|
useBuyMenuStore.getState().setError(null);
|
|
9587
9589
|
useBuyMenuStore.getState().setIsTransactionHistory(true);
|
|
@@ -9591,6 +9593,7 @@ function BinanceSummary(props) {
|
|
|
9591
9593
|
onError: (err) => {
|
|
9592
9594
|
setRedirecting(false);
|
|
9593
9595
|
console.error("[BINANCE] Create Checkout Order failed", err);
|
|
9596
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
9594
9597
|
}
|
|
9595
9598
|
});
|
|
9596
9599
|
const isContinueDisabled = !!redirecting || !!isFundWalletOrderCheckouting || !quoteData;
|
|
@@ -9669,6 +9672,7 @@ var init_BinanceSummary = __esm({
|
|
|
9669
9672
|
init_button();
|
|
9670
9673
|
init_highlight();
|
|
9671
9674
|
init_contants();
|
|
9675
|
+
init_queryKeys();
|
|
9672
9676
|
init_useBuyMenuStore();
|
|
9673
9677
|
init_api();
|
|
9674
9678
|
init_networks();
|
|
@@ -9917,31 +9921,40 @@ function BinanceTxHistoryItem(props) {
|
|
|
9917
9921
|
/* @__PURE__ */ jsxs30("div", { className: "w-full flex items-start gap-[var(--ui-kit-gap)] mb-1", children: [
|
|
9918
9922
|
/* @__PURE__ */ jsx35(TokenIcon, { className: "w-8 h-8" }),
|
|
9919
9923
|
/* @__PURE__ */ jsxs30("div", { className: "w-full", children: [
|
|
9924
|
+
Number(fiatAmount || "0") > 0 && /* @__PURE__ */ jsxs30("p", { className: "text-[10px] leading-3", children: [
|
|
9925
|
+
formatPrice(Number(fiatAmount)),
|
|
9926
|
+
" ",
|
|
9927
|
+
fiatCurrency
|
|
9928
|
+
] }),
|
|
9920
9929
|
/* @__PURE__ */ jsxs30("p", { className: "text-lg leading-5", children: [
|
|
9921
9930
|
/* @__PURE__ */ jsx35("strong", { children: formatPrice(Number(cryptoAmount)) }),
|
|
9922
9931
|
" ",
|
|
9923
9932
|
cryptoCurrency
|
|
9924
|
-
] }),
|
|
9925
|
-
Number(fiatAmount || "0") > 0 && /* @__PURE__ */ jsxs30("p", { className: "text-[10px] leading-4", children: [
|
|
9926
|
-
formatPrice(Number(fiatAmount)),
|
|
9927
|
-
" ",
|
|
9928
|
-
fiatCurrency
|
|
9929
9933
|
] })
|
|
9930
9934
|
] })
|
|
9931
9935
|
] }),
|
|
9932
|
-
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-[var(--ui-kit-gap)] justify-between
|
|
9933
|
-
/* @__PURE__ */ jsxs30("span", { className:
|
|
9936
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-[var(--ui-kit-gap)] justify-between leading-4", children: [
|
|
9937
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex-none whitespace-nowrap text-[10px] text-[var(--ui-kit-fg-muted)]", children: [
|
|
9934
9938
|
"ID: ",
|
|
9935
9939
|
id
|
|
9936
9940
|
] }),
|
|
9937
|
-
/* @__PURE__ */ jsx35(
|
|
9941
|
+
/* @__PURE__ */ jsx35(
|
|
9942
|
+
"span",
|
|
9943
|
+
{
|
|
9944
|
+
className: cn(
|
|
9945
|
+
"whitespace-nowrap overflow-hidden text-ellipsis",
|
|
9946
|
+
"block flex-1 text-[10px] text-right text-[var(--ui-kit-fg-muted)]"
|
|
9947
|
+
),
|
|
9948
|
+
children: dayjs(updatedAt || createdAt).format("MMM D YYYY [at] HH:mm")
|
|
9949
|
+
}
|
|
9950
|
+
)
|
|
9938
9951
|
] }),
|
|
9939
9952
|
orderDetailLink && /* @__PURE__ */ jsxs30(
|
|
9940
9953
|
Button,
|
|
9941
9954
|
{
|
|
9942
9955
|
variant: "outline",
|
|
9943
9956
|
size: "medium",
|
|
9944
|
-
className: "w-full",
|
|
9957
|
+
className: "w-full mt-1",
|
|
9945
9958
|
onClick: () => window.open(orderDetailLink, "_blank", "noopener,noreferrer"),
|
|
9946
9959
|
children: [
|
|
9947
9960
|
/* @__PURE__ */ jsx35(ExternalLinkIcon, { className: "w-4 h-4" }),
|
|
@@ -9991,7 +10004,7 @@ function BinanceTxHistory() {
|
|
|
9991
10004
|
return /* @__PURE__ */ jsx35(Highlight, { children: t("passport:buyMenu.noItems.noTransactions") });
|
|
9992
10005
|
}
|
|
9993
10006
|
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-[var(--ui-kit-gap)]", children: [
|
|
9994
|
-
txList.map((tx) => /* @__PURE__ */ jsx35(BinanceTxHistoryItem, { ...tx }, tx.id)),
|
|
10007
|
+
isTxDataLoading ? /* @__PURE__ */ jsx35("div", { className: "w-full flex items-center justify-center p-[var(--ui-kit-pd)]", children: /* @__PURE__ */ jsx35(LoaderIcon2, { className: "w-4 h-4 animate-spin" }) }) : txList.map((tx) => /* @__PURE__ */ jsx35(BinanceTxHistoryItem, { ...tx }, tx.id)),
|
|
9995
10008
|
hasNextPage && /* @__PURE__ */ jsxs30(
|
|
9996
10009
|
Button,
|
|
9997
10010
|
{
|
|
@@ -10029,10 +10042,10 @@ var init_BinanceTxHistory = __esm({
|
|
|
10029
10042
|
});
|
|
10030
10043
|
|
|
10031
10044
|
// src/internal/components/BuyMenu/binance/useBinanceSseTracing.ts
|
|
10032
|
-
import { useQueryClient as
|
|
10045
|
+
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
10033
10046
|
import { useEffect as useEffect12, useRef as useRef8 } from "react";
|
|
10034
10047
|
function useBinanceSseTxTracing(walletAddress) {
|
|
10035
|
-
const qc =
|
|
10048
|
+
const qc = useQueryClient4();
|
|
10036
10049
|
const debounceRef = useRef8(null);
|
|
10037
10050
|
useEffect12(() => {
|
|
10038
10051
|
if (!walletAddress) return;
|
|
@@ -10042,7 +10055,7 @@ function useBinanceSseTxTracing(walletAddress) {
|
|
|
10042
10055
|
if (data?.type !== "ORDER_UPDATED") return;
|
|
10043
10056
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
10044
10057
|
debounceRef.current = setTimeout(() => {
|
|
10045
|
-
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions
|
|
10058
|
+
qc.invalidateQueries({ queryKey: [QUERY_KEYS2.binanceTransactions] });
|
|
10046
10059
|
}, 500);
|
|
10047
10060
|
}) || null;
|
|
10048
10061
|
connectTxTracing({ walletAddress }).catch(
|
|
@@ -10074,7 +10087,7 @@ var init_utils6 = __esm({
|
|
|
10074
10087
|
});
|
|
10075
10088
|
|
|
10076
10089
|
// src/internal/components/BuyMenu/binance/Binance.tsx
|
|
10077
|
-
import { useMutation as useMutation6, useQuery as useQuery2, useQueryClient as
|
|
10090
|
+
import { useMutation as useMutation6, useQuery as useQuery2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
10078
10091
|
import { LoaderIcon as LoaderIcon3 } from "lucide-react";
|
|
10079
10092
|
import { useEffect as useEffect13 } from "react";
|
|
10080
10093
|
import { Fragment as Fragment11, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
@@ -10084,7 +10097,7 @@ function normalizeChainName(chainName) {
|
|
|
10084
10097
|
return chainName.toUpperCase();
|
|
10085
10098
|
}
|
|
10086
10099
|
function Binance() {
|
|
10087
|
-
const qc =
|
|
10100
|
+
const qc = useQueryClient5();
|
|
10088
10101
|
const { t, i18n } = useT();
|
|
10089
10102
|
const resolvedLanguage = i18n.resolvedLanguage || "en";
|
|
10090
10103
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -10700,10 +10713,10 @@ var init_networks2 = __esm({
|
|
|
10700
10713
|
});
|
|
10701
10714
|
|
|
10702
10715
|
// src/internal/components/BuyMenu/finchpay/useFinchpaySseTxTracing.ts
|
|
10703
|
-
import { useQueryClient as
|
|
10716
|
+
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
10704
10717
|
import { useEffect as useEffect14, useRef as useRef9 } from "react";
|
|
10705
10718
|
function useFinchpaySseTxTracing(walletAddress) {
|
|
10706
|
-
const qc =
|
|
10719
|
+
const qc = useQueryClient6();
|
|
10707
10720
|
const debounceRef = useRef9(null);
|
|
10708
10721
|
useEffect14(() => {
|
|
10709
10722
|
if (!walletAddress) return;
|
|
@@ -10752,12 +10765,12 @@ var init_utils7 = __esm({
|
|
|
10752
10765
|
});
|
|
10753
10766
|
|
|
10754
10767
|
// src/internal/components/BuyMenu/finchpay/FinchPay.tsx
|
|
10755
|
-
import { useQuery as useQuery3, useQueryClient as
|
|
10768
|
+
import { useQuery as useQuery3, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
10756
10769
|
import { DollarSign, LoaderIcon as LoaderIcon5 } from "lucide-react";
|
|
10757
10770
|
import { useEffect as useEffect15 } from "react";
|
|
10758
10771
|
import { Fragment as Fragment12, jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
10759
10772
|
function FinchPay() {
|
|
10760
|
-
const qc =
|
|
10773
|
+
const qc = useQueryClient7();
|
|
10761
10774
|
const { t, i18n } = useT();
|
|
10762
10775
|
const resolvedLanguage = i18n.resolvedLanguage || "en";
|
|
10763
10776
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -11967,7 +11980,7 @@ var init_ChainsMenu2 = __esm({
|
|
|
11967
11980
|
});
|
|
11968
11981
|
|
|
11969
11982
|
// src/internal/clients/devices.ts
|
|
11970
|
-
import { useMutation as useMutation8, useQuery as useQuery5, useQueryClient as
|
|
11983
|
+
import { useMutation as useMutation8, useQuery as useQuery5, useQueryClient as useQueryClient8 } from "@tanstack/react-query";
|
|
11971
11984
|
async function getDevices() {
|
|
11972
11985
|
const response = await tssClient.get("/api/auth/devices", true);
|
|
11973
11986
|
if (!response.success || !response.data) {
|
|
@@ -11999,7 +12012,7 @@ function useDevices() {
|
|
|
11999
12012
|
});
|
|
12000
12013
|
}
|
|
12001
12014
|
function useLinkDevice() {
|
|
12002
|
-
const qc =
|
|
12015
|
+
const qc = useQueryClient8();
|
|
12003
12016
|
return useMutation8({
|
|
12004
12017
|
mutationFn: (code) => linkDevice(code),
|
|
12005
12018
|
onSuccess: () => {
|
|
@@ -12008,7 +12021,7 @@ function useLinkDevice() {
|
|
|
12008
12021
|
});
|
|
12009
12022
|
}
|
|
12010
12023
|
function useUnlinkDevice() {
|
|
12011
|
-
const qc =
|
|
12024
|
+
const qc = useQueryClient8();
|
|
12012
12025
|
return useMutation8({
|
|
12013
12026
|
mutationFn: (deviceId) => unlinkDevice(deviceId),
|
|
12014
12027
|
onSuccess: () => {
|
|
@@ -13751,10 +13764,10 @@ var init_cloudStorage = __esm({
|
|
|
13751
13764
|
});
|
|
13752
13765
|
|
|
13753
13766
|
// src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts
|
|
13754
|
-
import { useMutation as useMutation9, useQueryClient as
|
|
13767
|
+
import { useMutation as useMutation9, useQueryClient as useQueryClient9 } from "@tanstack/react-query";
|
|
13755
13768
|
import { useEffect as useEffect20 } from "react";
|
|
13756
13769
|
function useCreateBackup() {
|
|
13757
|
-
const qc =
|
|
13770
|
+
const qc = useQueryClient9();
|
|
13758
13771
|
const session = useSession((st) => st.session);
|
|
13759
13772
|
const address = useSession((st) => st.address);
|
|
13760
13773
|
const hasServerVault = useSession((st) => st.hasServerVault);
|
|
@@ -14541,7 +14554,7 @@ var init_File = __esm({
|
|
|
14541
14554
|
});
|
|
14542
14555
|
|
|
14543
14556
|
// src/internal/components/KeyshareRestoreMenu/methods/Server.tsx
|
|
14544
|
-
import { useQueryClient as
|
|
14557
|
+
import { useQueryClient as useQueryClient10 } from "@tanstack/react-query";
|
|
14545
14558
|
import dayjs3 from "dayjs";
|
|
14546
14559
|
import { Download as Download3, Key as Key5, Upload as Upload3 } from "lucide-react";
|
|
14547
14560
|
import { useEffect as useEffect23 } from "react";
|
|
@@ -14549,7 +14562,7 @@ import { Fragment as Fragment21, jsx as jsx58, jsxs as jsxs53 } from "react/jsx-
|
|
|
14549
14562
|
function Server(props) {
|
|
14550
14563
|
const { isLoading, mode = "restore", serverHandler, createPasskeyHandler } = props;
|
|
14551
14564
|
const address = useSession((st) => st.address);
|
|
14552
|
-
const qc =
|
|
14565
|
+
const qc = useQueryClient10();
|
|
14553
14566
|
const { t } = useT();
|
|
14554
14567
|
const usePasskey = useRestoreStore((st) => st.usePasskey);
|
|
14555
14568
|
const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
|
|
@@ -14996,7 +15009,7 @@ var init_methods = __esm({
|
|
|
14996
15009
|
});
|
|
14997
15010
|
|
|
14998
15011
|
// src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
|
|
14999
|
-
import { useMutation as useMutation11, useQuery as useQuery7, useQueryClient as
|
|
15012
|
+
import { useMutation as useMutation11, useQuery as useQuery7, useQueryClient as useQueryClient11 } from "@tanstack/react-query";
|
|
15000
15013
|
import { AlertCircle as AlertCircle2, CheckCircle2, CloudDownload as CloudDownload2, Loader as Loader10, UserCircle as UserCircle2 } from "lucide-react";
|
|
15001
15014
|
import { useEffect as useEffect25 } from "react";
|
|
15002
15015
|
import { Fragment as Fragment24, jsx as jsx62, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -15025,7 +15038,7 @@ var init_KeyshareRestoreMenu = __esm({
|
|
|
15025
15038
|
guardian: Guardian
|
|
15026
15039
|
};
|
|
15027
15040
|
KeyshareRestoreMenu = () => {
|
|
15028
|
-
const qc =
|
|
15041
|
+
const qc = useQueryClient11();
|
|
15029
15042
|
const { callbacksRef } = useProviderConfig();
|
|
15030
15043
|
const { t } = useT();
|
|
15031
15044
|
const { address, setSession, setAddress, setStatus, setIsLoading } = useSession();
|
|
@@ -15886,10 +15899,10 @@ var init_MainMenu2 = __esm({
|
|
|
15886
15899
|
});
|
|
15887
15900
|
|
|
15888
15901
|
// src/modules/linkedProfiles.ts
|
|
15889
|
-
import { useQuery as useQuery11, useQueryClient as
|
|
15902
|
+
import { useQuery as useQuery11, useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
15890
15903
|
import { useCallback as useCallback18 } from "react";
|
|
15891
15904
|
function useLinkedProfiles() {
|
|
15892
|
-
const qc =
|
|
15905
|
+
const qc = useQueryClient12();
|
|
15893
15906
|
const address = useSession((st) => st.address);
|
|
15894
15907
|
const { data, isFetching, isLoading, error } = useQuery11({
|
|
15895
15908
|
retry: false,
|
|
@@ -16131,10 +16144,10 @@ var init_useSendVerificationCode = __esm({
|
|
|
16131
16144
|
});
|
|
16132
16145
|
|
|
16133
16146
|
// src/internal/components/ManageWalletMenu/hooks/useVerifyCode.ts
|
|
16134
|
-
import { useMutation as useMutation14, useQueryClient as
|
|
16147
|
+
import { useMutation as useMutation14, useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
16135
16148
|
function useVerifyCode() {
|
|
16136
16149
|
const { callbacksRef } = useProviderConfig();
|
|
16137
|
-
const qc =
|
|
16150
|
+
const qc = useQueryClient13();
|
|
16138
16151
|
const address = useSession((st) => st.address);
|
|
16139
16152
|
const setIsLoading = useSession((st) => st.setIsLoading);
|
|
16140
16153
|
const {
|
|
@@ -16198,7 +16211,7 @@ var init_useVerifyCode = __esm({
|
|
|
16198
16211
|
});
|
|
16199
16212
|
|
|
16200
16213
|
// src/internal/components/ManageWalletMenu/AddProvider.tsx
|
|
16201
|
-
import { useQueryClient as
|
|
16214
|
+
import { useQueryClient as useQueryClient14 } from "@tanstack/react-query";
|
|
16202
16215
|
import { Fragment as Fragment27, jsx as jsx70, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
16203
16216
|
function normalizePasskeyLinkError(msg) {
|
|
16204
16217
|
const lower = msg.toLowerCase();
|
|
@@ -16211,7 +16224,7 @@ function normalizePasskeyLinkError(msg) {
|
|
|
16211
16224
|
return msg;
|
|
16212
16225
|
}
|
|
16213
16226
|
function AddProvider() {
|
|
16214
|
-
const qc =
|
|
16227
|
+
const qc = useQueryClient14();
|
|
16215
16228
|
const { callbacksRef } = useProviderConfig();
|
|
16216
16229
|
const address = useSession((st) => st.address);
|
|
16217
16230
|
const { t } = useT();
|
|
@@ -16388,7 +16401,7 @@ var init_EmailNotConnectedWarning = __esm({
|
|
|
16388
16401
|
});
|
|
16389
16402
|
|
|
16390
16403
|
// src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts
|
|
16391
|
-
import { useQueryClient as
|
|
16404
|
+
import { useQueryClient as useQueryClient15 } from "@tanstack/react-query";
|
|
16392
16405
|
import React5, { useEffect as useEffect30 } from "react";
|
|
16393
16406
|
function normalizeSocialLinkError(message) {
|
|
16394
16407
|
if (message === "X_ALREADY_LINKED") {
|
|
@@ -16397,7 +16410,7 @@ function normalizeSocialLinkError(message) {
|
|
|
16397
16410
|
return message;
|
|
16398
16411
|
}
|
|
16399
16412
|
function useLinkSocial() {
|
|
16400
|
-
const qc =
|
|
16413
|
+
const qc = useQueryClient15();
|
|
16401
16414
|
const address = useSession((st) => st.address);
|
|
16402
16415
|
const {
|
|
16403
16416
|
config: { current: config },
|
|
@@ -16547,14 +16560,14 @@ var init_telegram2 = __esm({
|
|
|
16547
16560
|
});
|
|
16548
16561
|
|
|
16549
16562
|
// src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
|
|
16550
|
-
import { useQueryClient as
|
|
16563
|
+
import { useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
16551
16564
|
import { useCallback as useCallback19, useEffect as useEffect31, useState as useState17 } from "react";
|
|
16552
16565
|
function useLinkTelegram() {
|
|
16553
16566
|
const {
|
|
16554
16567
|
config: { current: config },
|
|
16555
16568
|
callbacksRef
|
|
16556
16569
|
} = useProviderConfig();
|
|
16557
|
-
const qc =
|
|
16570
|
+
const qc = useQueryClient16();
|
|
16558
16571
|
const address = useSession((st) => st.address);
|
|
16559
16572
|
const isWalletLinking = useLayoutDataStore((st) => st.isWalletLinking);
|
|
16560
16573
|
const { providerType, linkIsLoading, setLinkIsLoading, setProviderType, setAlert } = useManageWalletStore();
|
|
@@ -16956,13 +16969,13 @@ var init_useExternalWalletStore = __esm({
|
|
|
16956
16969
|
});
|
|
16957
16970
|
|
|
16958
16971
|
// src/internal/components/ManageWalletMenu/UnlinkProviderMenu.tsx
|
|
16959
|
-
import { useMutation as useMutation15, useQueryClient as
|
|
16972
|
+
import { useMutation as useMutation15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
16960
16973
|
import { Key as Key6, Loader as Loader15 } from "lucide-react";
|
|
16961
16974
|
import { useState as useState18 } from "react";
|
|
16962
16975
|
import { useDisconnect } from "wagmi";
|
|
16963
16976
|
import { jsx as jsx74, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
16964
16977
|
function UnlinkProviderMenu() {
|
|
16965
|
-
const qc =
|
|
16978
|
+
const qc = useQueryClient17();
|
|
16966
16979
|
const address = useSession((st) => st.address);
|
|
16967
16980
|
const { callbacksRef } = useProviderConfig();
|
|
16968
16981
|
const { disconnect: disconnectExternalWallet } = useDisconnect();
|
|
@@ -17197,7 +17210,7 @@ var init_nickname_validation = __esm({
|
|
|
17197
17210
|
});
|
|
17198
17211
|
|
|
17199
17212
|
// src/internal/components/NicknameMenu/NicknameEditForm.tsx
|
|
17200
|
-
import { useMutation as useMutation16, useQueryClient as
|
|
17213
|
+
import { useMutation as useMutation16, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
17201
17214
|
import { AtSign, Check as Check2, ChevronRight as ChevronRight5, Copy as Copy2, Loader as Loader17 } from "lucide-react";
|
|
17202
17215
|
import { useCallback as useCallback20, useState as useState19 } from "react";
|
|
17203
17216
|
import { Fragment as Fragment29, jsx as jsx76, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
@@ -17214,7 +17227,7 @@ function NicknameEditForm(props) {
|
|
|
17214
17227
|
info
|
|
17215
17228
|
} = props;
|
|
17216
17229
|
const { handle: currentNickname, canChange } = info || { handle: "", canChange: false };
|
|
17217
|
-
const qc =
|
|
17230
|
+
const qc = useQueryClient18();
|
|
17218
17231
|
const { t } = useT();
|
|
17219
17232
|
const passportWalletAddress = useSession((st) => st.address);
|
|
17220
17233
|
const { callbacksRef } = useProviderConfig();
|
|
@@ -18068,7 +18081,7 @@ var init_BalanceView2 = __esm({
|
|
|
18068
18081
|
});
|
|
18069
18082
|
|
|
18070
18083
|
// src/internal/components/PortfolioMenu/PortfolioItem.tsx
|
|
18071
|
-
import { useQuery as useQuery16, useQueryClient as
|
|
18084
|
+
import { useQuery as useQuery16, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
18072
18085
|
import { Image as ImageIcon, Loader as Loader19, ShieldAlert, Sparkles } from "lucide-react";
|
|
18073
18086
|
import { useState as useState22 } from "react";
|
|
18074
18087
|
import { formatUnits as formatUnits5 } from "viem";
|
|
@@ -18161,7 +18174,7 @@ function PortfolioItem(props) {
|
|
|
18161
18174
|
const { assets: projectAssets, showBalanceAs: showBalanceAsSymbol } = providerConfig.projectAssets || {};
|
|
18162
18175
|
const customAssetRateQuery = providerConfig.portfolio?.assetRateQuery;
|
|
18163
18176
|
const customAssetRateQueryKey = providerConfig.portfolio?.assetRateQueryKey;
|
|
18164
|
-
const qc =
|
|
18177
|
+
const qc = useQueryClient19();
|
|
18165
18178
|
const { balanceQueryKey } = projectAssets?.find((a) => a.symbol === showBalanceAsSymbol) || {};
|
|
18166
18179
|
const projectAssetBalance = !!balanceQueryKey ? qc.getQueryData(balanceQueryKey) : null;
|
|
18167
18180
|
const isNft = isNftAsset(asset);
|
|
@@ -18255,14 +18268,14 @@ var init_PortfolioItem = __esm({
|
|
|
18255
18268
|
});
|
|
18256
18269
|
|
|
18257
18270
|
// src/internal/components/PortfolioMenu/PortfolioMenu.tsx
|
|
18258
|
-
import { useQueryClient as
|
|
18271
|
+
import { useQueryClient as useQueryClient20 } from "@tanstack/react-query";
|
|
18259
18272
|
import { AlertCircle as AlertCircle4, ArrowLeft as ArrowLeft16, Gem, Loader as Loader20, RefreshCw as RefreshCw2 } from "lucide-react";
|
|
18260
18273
|
import { useCallback as useCallback22 } from "react";
|
|
18261
18274
|
import { jsx as jsx80, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
18262
18275
|
function PortfolioMenu() {
|
|
18263
18276
|
const { assets: projectAssets = [] } = useProviderConfig().config.current?.projectAssets || {};
|
|
18264
18277
|
const { t } = useT();
|
|
18265
|
-
const qc =
|
|
18278
|
+
const qc = useQueryClient20();
|
|
18266
18279
|
const address = useSession((st) => st.address);
|
|
18267
18280
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
18268
18281
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
@@ -19000,12 +19013,12 @@ var init_UntrustApplication = __esm({
|
|
|
19000
19013
|
});
|
|
19001
19014
|
|
|
19002
19015
|
// src/internal/components/SecurityMenu/SecurityMenu.tsx
|
|
19003
|
-
import { useMutation as useMutation17, useQueryClient as
|
|
19016
|
+
import { useMutation as useMutation17, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
|
|
19004
19017
|
import { ArrowLeft as ArrowLeft18 } from "lucide-react";
|
|
19005
19018
|
import { useState as useState24 } from "react";
|
|
19006
19019
|
import { jsx as jsx88, jsxs as jsxs83 } from "react/jsx-runtime";
|
|
19007
19020
|
function SecurityMenu() {
|
|
19008
|
-
const qc =
|
|
19021
|
+
const qc = useQueryClient21();
|
|
19009
19022
|
const { t } = useT();
|
|
19010
19023
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
19011
19024
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
@@ -20035,11 +20048,11 @@ var init_useOperationHashesStore = __esm({
|
|
|
20035
20048
|
});
|
|
20036
20049
|
|
|
20037
20050
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridge.ts
|
|
20038
|
-
import { useMutation as useMutation19, useQueryClient as
|
|
20051
|
+
import { useMutation as useMutation19, useQueryClient as useQueryClient22 } from "@tanstack/react-query";
|
|
20039
20052
|
import { useCallback as useCallback25 } from "react";
|
|
20040
20053
|
import { useSwitchChain, useWalletClient } from "wagmi";
|
|
20041
20054
|
function useBridge() {
|
|
20042
|
-
const qc =
|
|
20055
|
+
const qc = useQueryClient22();
|
|
20043
20056
|
const { t } = useT();
|
|
20044
20057
|
const address = useSession((st) => st.address);
|
|
20045
20058
|
const { data: walletClient } = useWalletClient();
|
|
@@ -20192,6 +20205,7 @@ function useBridge() {
|
|
|
20192
20205
|
},
|
|
20193
20206
|
onSuccess: (operationHashes) => {
|
|
20194
20207
|
const { setBridgeStep, setBridgeTxStatus } = useBridgeStore.getState();
|
|
20208
|
+
qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY] });
|
|
20195
20209
|
useOperationHashesStore.getState().setOperationHashes(operationHashes);
|
|
20196
20210
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
20197
20211
|
useFlowSelectorStore.getState().setIsUiLocked(false);
|
|
@@ -20204,7 +20218,7 @@ function useBridge() {
|
|
|
20204
20218
|
if (hyperlaneDbTx?.id) {
|
|
20205
20219
|
patchInitiatedBridgeTxStatus({ txId: hyperlaneDbTx.id, txStatus: "REJECTED" }).then(({ ok }) => {
|
|
20206
20220
|
console.log("[HYPERLANE SDK] initiated tx patched as REJECTED: ", hyperlaneDbTx.id, "ok: ", ok);
|
|
20207
|
-
if (ok) qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY
|
|
20221
|
+
if (ok) qc.invalidateQueries({ queryKey: [HYPERLANE_HISTORY_QUERY_KEY] });
|
|
20208
20222
|
});
|
|
20209
20223
|
}
|
|
20210
20224
|
useLayoutStore.getState().setIsDialogForced(false);
|
|
@@ -20354,12 +20368,12 @@ var init_ResolveChainIcon = __esm({
|
|
|
20354
20368
|
|
|
20355
20369
|
// src/internal/components/SendMenu/hyperbridge/hooks/useBridgeBalance.ts
|
|
20356
20370
|
import { CHAINS_BROWSERS_TRANSPORTS as CHAINS_BROWSERS_TRANSPORTS2 } from "@embarkai/core";
|
|
20357
|
-
import { useQuery as useQuery20, useQueryClient as
|
|
20371
|
+
import { useQuery as useQuery20, useQueryClient as useQueryClient23 } from "@tanstack/react-query";
|
|
20358
20372
|
import { useCallback as useCallback26, useEffect as useEffect39 } from "react";
|
|
20359
20373
|
import { createPublicClient as createPublicClient2, erc20Abi as erc20Abi2, formatUnits as formatUnits7, http as http3 } from "viem";
|
|
20360
20374
|
import { useSwitchChain as useSwitchChain2 } from "wagmi";
|
|
20361
20375
|
function useBridgeBalance(hyperlaneWarpRoutes) {
|
|
20362
|
-
const qc =
|
|
20376
|
+
const qc = useQueryClient23();
|
|
20363
20377
|
const { t } = useT();
|
|
20364
20378
|
const address = useSession((st) => st.address);
|
|
20365
20379
|
const directWalletAddress = useExternalWalletStore((st) => st.externalAddress);
|
|
@@ -21019,7 +21033,7 @@ var init_SuccessStep = __esm({
|
|
|
21019
21033
|
});
|
|
21020
21034
|
|
|
21021
21035
|
// src/internal/components/SendMenu/hyperbridge/steps/HistoryStep.tsx
|
|
21022
|
-
import { useQueryClient as
|
|
21036
|
+
import { useQueryClient as useQueryClient24 } from "@tanstack/react-query";
|
|
21023
21037
|
import dayjs7 from "dayjs";
|
|
21024
21038
|
import { ArrowRightIcon, DownloadIcon as DownloadIcon2, ExternalLinkIcon as ExternalLinkIcon3, InfoIcon as InfoIcon4, LoaderIcon as LoaderIcon10 } from "lucide-react";
|
|
21025
21039
|
import { jsx as jsx97, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
@@ -21140,7 +21154,7 @@ function HistoryItem(props) {
|
|
|
21140
21154
|
txStatus
|
|
21141
21155
|
} = props;
|
|
21142
21156
|
const { t } = useT();
|
|
21143
|
-
const qc =
|
|
21157
|
+
const qc = useQueryClient24();
|
|
21144
21158
|
const address = useSession((st) => st.address);
|
|
21145
21159
|
const warpRoutes = qc.getQueryData([HYPERLANE_WARP_ROUTES_QUERY_KEY, address]);
|
|
21146
21160
|
const assetWarpRoute = warpRoutes?.find((route) => {
|
|
@@ -21490,6 +21504,7 @@ function BridgeHistorySwitch(props) {
|
|
|
21490
21504
|
onChange: () => {
|
|
21491
21505
|
const { bridgeStep: bridgeStep2, setBridgeStep } = useBridgeStore.getState();
|
|
21492
21506
|
if (bridgeStep2 !== "tx-history") lastBridgeStepRef.current = bridgeStep2;
|
|
21507
|
+
useFlowSelectorStore.getState().setError(null);
|
|
21493
21508
|
setBridgeStep(bridgeStep2 === "tx-history" ? lastBridgeStepRef.current || "select" : "tx-history");
|
|
21494
21509
|
}
|
|
21495
21510
|
}
|
|
@@ -24020,12 +24035,12 @@ var init_TransactionsGroup = __esm({
|
|
|
24020
24035
|
});
|
|
24021
24036
|
|
|
24022
24037
|
// src/internal/components/TransactionsMenu/TransactionsMenu.tsx
|
|
24023
|
-
import { useQuery as useQuery23, useQueryClient as
|
|
24038
|
+
import { useQuery as useQuery23, useQueryClient as useQueryClient25 } from "@tanstack/react-query";
|
|
24024
24039
|
import { ArrowLeft as ArrowLeft22, Loader as Loader32, RefreshCw as RefreshCw3, XCircle } from "lucide-react";
|
|
24025
24040
|
import { useCallback as useCallback28, useState as useState31 } from "react";
|
|
24026
24041
|
import { jsx as jsx114, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
24027
24042
|
function TransactionsMenu() {
|
|
24028
|
-
const qc =
|
|
24043
|
+
const qc = useQueryClient25();
|
|
24029
24044
|
const address = useSession((st) => st.address);
|
|
24030
24045
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
24031
24046
|
const { t } = useT();
|
|
@@ -24392,7 +24407,7 @@ var init_package = __esm({
|
|
|
24392
24407
|
"package.json"() {
|
|
24393
24408
|
package_default = {
|
|
24394
24409
|
name: "@embarkai/ui-kit",
|
|
24395
|
-
version: "0.4.
|
|
24410
|
+
version: "0.4.46",
|
|
24396
24411
|
description: "React UI components and hooks for EmbarkAI authentication and Account Abstraction",
|
|
24397
24412
|
type: "module",
|
|
24398
24413
|
main: "./dist/index.cjs",
|
|
@@ -24490,11 +24505,11 @@ var init_package = __esm({
|
|
|
24490
24505
|
});
|
|
24491
24506
|
|
|
24492
24507
|
// src/internal/components/Footer/Footer.tsx
|
|
24493
|
-
import { useMutation as useMutation20, useQueryClient as
|
|
24508
|
+
import { useMutation as useMutation20, useQueryClient as useQueryClient26 } from "@tanstack/react-query";
|
|
24494
24509
|
import { Loader as Loader33, LogOut } from "lucide-react";
|
|
24495
24510
|
import { jsx as jsx116, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
24496
24511
|
function Footer() {
|
|
24497
|
-
const qc =
|
|
24512
|
+
const qc = useQueryClient26();
|
|
24498
24513
|
const { callbacksRef } = useProviderConfig();
|
|
24499
24514
|
const { address, setSession, setAddress, setStatus, setError, setIsLoading } = useSession();
|
|
24500
24515
|
const chainConfig = useSession((st) => st.chainConfig);
|
|
@@ -25061,11 +25076,11 @@ var init_TssManager = __esm({
|
|
|
25061
25076
|
|
|
25062
25077
|
// src/internal/components/WalletConnectHandler.tsx
|
|
25063
25078
|
import { useConnectModal as useConnectModal2 } from "@rainbow-me/rainbowkit";
|
|
25064
|
-
import { useMutation as useMutation21, useQueryClient as
|
|
25079
|
+
import { useMutation as useMutation21, useQueryClient as useQueryClient27 } from "@tanstack/react-query";
|
|
25065
25080
|
import React9, { useCallback as useCallback32, useEffect as useEffect48 } from "react";
|
|
25066
25081
|
import { useAccount, useDisconnect as useDisconnect2, useSignMessage as useSignMessage2 } from "wagmi";
|
|
25067
25082
|
function WalletConnectHandler() {
|
|
25068
|
-
const qc =
|
|
25083
|
+
const qc = useQueryClient27();
|
|
25069
25084
|
const { callbacksRef } = useProviderConfig();
|
|
25070
25085
|
const passportWalletAddress = useSession((st) => st.address);
|
|
25071
25086
|
const { address: walletAddress, isConnected, chain, connector } = useAccount();
|