@loafmarkets/ui 0.1.347 → 0.1.349

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/index.d.mts CHANGED
@@ -524,7 +524,7 @@ type DemoLoginResult = {
524
524
  success: boolean;
525
525
  };
526
526
  type DemoLoginHandler = (email: string, handle?: string | null) => Promise<DemoLoginResult | void> | DemoLoginResult | void;
527
- type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding";
527
+ type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding" | "receive" | "referral";
528
528
  type FundWalletParams = {
529
529
  amount: string;
530
530
  mode?: "crypto" | "fiat";
@@ -580,6 +580,10 @@ type LoginPopupProps = {
580
580
  onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
581
581
  /** Optional view to show immediately when the popup opens. */
582
582
  initialView?: LoginPopupView;
583
+ /** Wallet address used for the receive funds view (bypasses Privy modal). */
584
+ walletAddress?: string | null;
585
+ /** Called when the user submits a referral code during onboarding. */
586
+ onSubmitReferralCode?: (code: string) => Promise<void> | void;
583
587
  /** Handler invoked when the user selects "Sign in with Wallet". */
584
588
  onWalletLogin?: () => Promise<void> | void;
585
589
  /** Current KYC status — used to show "Resume Verification" when previously started. */
@@ -974,6 +978,8 @@ type ToastData = {
974
978
  };
975
979
  type ToastContextValue = {
976
980
  toast: (data: Omit<ToastData, 'id'>) => string;
981
+ /** Patch an existing toast in place (e.g. a climbing partial-fill count). No-op if the id is gone. Does not reset the auto-dismiss timer. */
982
+ update: (id: string, patch: Partial<Omit<ToastData, 'id'>>) => void;
977
983
  dismiss: (id: string) => void;
978
984
  };
979
985
  declare function ToastProvider({ children }: {
package/dist/index.d.ts CHANGED
@@ -524,7 +524,7 @@ type DemoLoginResult = {
524
524
  success: boolean;
525
525
  };
526
526
  type DemoLoginHandler = (email: string, handle?: string | null) => Promise<DemoLoginResult | void> | DemoLoginResult | void;
527
- type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding";
527
+ type LoginPopupView = "main" | "email" | "otp" | "kyc" | "kyc-success" | "kyc-failed" | "funding" | "receive" | "referral";
528
528
  type FundWalletParams = {
529
529
  amount: string;
530
530
  mode?: "crypto" | "fiat";
@@ -580,6 +580,10 @@ type LoginPopupProps = {
580
580
  onFundWallet?: (params: FundWalletParams) => Promise<FundWalletResult> | void;
581
581
  /** Optional view to show immediately when the popup opens. */
582
582
  initialView?: LoginPopupView;
583
+ /** Wallet address used for the receive funds view (bypasses Privy modal). */
584
+ walletAddress?: string | null;
585
+ /** Called when the user submits a referral code during onboarding. */
586
+ onSubmitReferralCode?: (code: string) => Promise<void> | void;
583
587
  /** Handler invoked when the user selects "Sign in with Wallet". */
584
588
  onWalletLogin?: () => Promise<void> | void;
585
589
  /** Current KYC status — used to show "Resume Verification" when previously started. */
@@ -974,6 +978,8 @@ type ToastData = {
974
978
  };
975
979
  type ToastContextValue = {
976
980
  toast: (data: Omit<ToastData, 'id'>) => string;
981
+ /** Patch an existing toast in place (e.g. a climbing partial-fill count). No-op if the id is gone. Does not reset the auto-dismiss timer. */
982
+ update: (id: string, patch: Partial<Omit<ToastData, 'id'>>) => void;
977
983
  dismiss: (id: string) => void;
978
984
  };
979
985
  declare function ToastProvider({ children }: {
package/dist/index.js CHANGED
@@ -6457,13 +6457,19 @@ var LoginPopup = ({
6457
6457
  renderKycWidget,
6458
6458
  onFundWallet,
6459
6459
  initialView,
6460
- kycStatus: kycStatusProp
6460
+ kycStatus: kycStatusProp,
6461
+ walletAddress,
6462
+ onSubmitReferralCode
6461
6463
  }) => {
6462
6464
  const [view, setView] = React5.useState(() => initialView ?? "main");
6463
6465
  const [email, setEmail] = React5.useState("");
6464
6466
  const [handle, setHandle] = React5.useState("");
6465
6467
  const [otp, setOtp] = React5.useState(Array(OTP_INPUT_LENGTH).fill(""));
6466
6468
  const [error, setError] = React5.useState("");
6469
+ const [copied, setCopied] = React5.useState(false);
6470
+ const [referralCode, setReferralCode] = React5.useState("");
6471
+ const [referralLoading, setReferralLoading] = React5.useState(false);
6472
+ const [referralError, setReferralError] = React5.useState("");
6467
6473
  const [loading, setLoading] = React5.useState(false);
6468
6474
  const [isSignUp, setIsSignUp] = React5.useState(false);
6469
6475
  const [fundingAmount] = React5.useState("");
@@ -6520,7 +6526,7 @@ var LoginPopup = ({
6520
6526
  if (suppressAutoCloseRef.current) {
6521
6527
  return;
6522
6528
  }
6523
- if (view === "kyc" || view === "kyc-success" || view === "kyc-failed" || view === "funding") {
6529
+ if (view === "kyc" || view === "kyc-success" || view === "kyc-failed" || view === "funding" || view === "receive" || view === "referral") {
6524
6530
  return;
6525
6531
  }
6526
6532
  if (isAuthenticated || currentUser) {
@@ -6683,7 +6689,7 @@ var LoginPopup = ({
6683
6689
  try {
6684
6690
  await onVerifyEmailCode({ code, email });
6685
6691
  if (isSignUp) {
6686
- setView("funding");
6692
+ setView(onSubmitReferralCode ? "referral" : "funding");
6687
6693
  setLoading(false);
6688
6694
  return;
6689
6695
  }
@@ -7046,7 +7052,13 @@ var LoginPopup = ({
7046
7052
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { textAlign: "center" }, children: "Deposit Funds" }),
7047
7053
  /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { textAlign: "center", marginBottom: "1rem" }, children: "Choose how you'd like to fund your account." }),
7048
7054
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: [
7049
- /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: handleCryptoFund, disabled: cryptoFundingLoading, children: [
7055
+ /* @__PURE__ */ jsxRuntime.jsxs(ModalOptionCard, { onClick: () => {
7056
+ if (walletAddress) {
7057
+ setView("receive");
7058
+ } else {
7059
+ void handleCryptoFund();
7060
+ }
7061
+ }, disabled: cryptoFundingLoading, children: [
7050
7062
  /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", style: { color: "rgba(255,255,255,0.6)", flexShrink: 0 }, children: [
7051
7063
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "6", width: "20", height: "12", rx: "2" }),
7052
7064
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22 10H18a2 2 0 0 0 0 4h4" })
@@ -7078,6 +7090,193 @@ var LoginPopup = ({
7078
7090
  }
7079
7091
  ) });
7080
7092
  }
7093
+ if (view === "referral") {
7094
+ const handleReferralSubmit = async () => {
7095
+ const trimmed = referralCode.trim();
7096
+ if (!trimmed) {
7097
+ setReferralError("Please enter a referral code");
7098
+ return;
7099
+ }
7100
+ setReferralError("");
7101
+ setReferralLoading(true);
7102
+ try {
7103
+ await onSubmitReferralCode?.(trimmed);
7104
+ setView("funding");
7105
+ } catch (err) {
7106
+ setReferralError(err instanceof Error ? err.message : "Invalid referral code. Please try again.");
7107
+ } finally {
7108
+ setReferralLoading(false);
7109
+ }
7110
+ };
7111
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7112
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close login popup", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7113
+ /* @__PURE__ */ jsxRuntime.jsxs(OnboardingStepContainer, { children: [
7114
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
7115
+ width: 52,
7116
+ height: 52,
7117
+ borderRadius: 14,
7118
+ background: "linear-gradient(135deg, rgba(230,200,126,0.15) 0%, rgba(230,200,126,0.08) 100%)",
7119
+ border: "1px solid rgba(230,200,126,0.25)",
7120
+ display: "flex",
7121
+ alignItems: "center",
7122
+ justifyContent: "center",
7123
+ marginBottom: "1.1rem"
7124
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#e6c87e", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
7125
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
7126
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "9", cy: "7", r: "4" }),
7127
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
7128
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
7129
+ ] }) }),
7130
+ /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { children: "Do you have a referral code?" }),
7131
+ /* @__PURE__ */ jsxRuntime.jsx(OnboardingSubtext, { style: { marginBottom: "1.5rem" }, children: "Enter your code to unlock full access, or skip to continue." }),
7132
+ /* @__PURE__ */ jsxRuntime.jsxs(EmailFormContainer, { style: { width: "100%", marginBottom: 0 }, children: [
7133
+ /* @__PURE__ */ jsxRuntime.jsx(
7134
+ EmailInput,
7135
+ {
7136
+ type: "text",
7137
+ placeholder: "e.g. LOAF-XXXX",
7138
+ value: referralCode,
7139
+ onChange: (e) => {
7140
+ setReferralCode(e.target.value.toUpperCase());
7141
+ setReferralError("");
7142
+ },
7143
+ onKeyDown: (e) => {
7144
+ if (e.key === "Enter") void handleReferralSubmit();
7145
+ },
7146
+ autoFocus: true
7147
+ }
7148
+ ),
7149
+ /* @__PURE__ */ jsxRuntime.jsx(
7150
+ SubmitButton,
7151
+ {
7152
+ type: "button",
7153
+ onClick: () => void handleReferralSubmit(),
7154
+ disabled: referralLoading || !referralCode.trim(),
7155
+ children: referralLoading ? "Verifying\u2026" : "Apply Code"
7156
+ }
7157
+ ),
7158
+ referralError && /* @__PURE__ */ jsxRuntime.jsx(StatusMessage, { $error: true, children: referralError })
7159
+ ] }),
7160
+ /* @__PURE__ */ jsxRuntime.jsx(
7161
+ OnboardingSkipButton,
7162
+ {
7163
+ type: "button",
7164
+ onClick: () => setView("funding"),
7165
+ style: { marginTop: "0.75rem" },
7166
+ children: "Skip for now"
7167
+ }
7168
+ )
7169
+ ] })
7170
+ ] }) });
7171
+ }
7172
+ if (view === "receive") {
7173
+ const handleCopy = () => {
7174
+ if (walletAddress) {
7175
+ navigator.clipboard.writeText(walletAddress).then(() => {
7176
+ setCopied(true);
7177
+ setTimeout(() => setCopied(false), 2e3);
7178
+ }).catch(() => {
7179
+ });
7180
+ }
7181
+ };
7182
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay2, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(PopupContainer, { onClick: (event) => event.stopPropagation(), children: [
7183
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) }),
7184
+ /* @__PURE__ */ jsxRuntime.jsxs(BackButton, { onClick: () => setView("funding"), children: [
7185
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" }) }),
7186
+ "Back"
7187
+ ] }),
7188
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", paddingTop: "0.5rem" }, children: [
7189
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
7190
+ width: 52,
7191
+ height: 52,
7192
+ borderRadius: 14,
7193
+ background: "linear-gradient(135deg, rgba(230,200,126,0.15) 0%, rgba(230,200,126,0.08) 100%)",
7194
+ border: "1px solid rgba(230,200,126,0.25)",
7195
+ display: "flex",
7196
+ alignItems: "center",
7197
+ justifyContent: "center",
7198
+ marginBottom: "1.1rem"
7199
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "#e6c87e", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", children: [
7200
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2L12 16M12 16L7 11M12 16L17 11" }),
7201
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 20H21" })
7202
+ ] }) }),
7203
+ /* @__PURE__ */ jsxRuntime.jsx(OnboardingHeading, { style: { marginBottom: "0.35rem" }, children: "Receive USDC" }),
7204
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
7205
+ display: "inline-flex",
7206
+ alignItems: "center",
7207
+ gap: "0.35rem",
7208
+ background: "rgba(0,82,255,0.12)",
7209
+ border: "1px solid rgba(0,82,255,0.3)",
7210
+ borderRadius: 20,
7211
+ padding: "0.2rem 0.65rem",
7212
+ marginBottom: "1.25rem"
7213
+ }, children: [
7214
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: 7, height: 7, borderRadius: "50%", background: "#0052FF", flexShrink: 0 } }),
7215
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "0.72rem", fontWeight: 600, color: "#6b9fff", letterSpacing: "0.02em" }, children: "Base Sepolia" })
7216
+ ] }),
7217
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { style: { fontSize: "0.82rem", color: "rgba(255,255,255,0.5)", textAlign: "center", marginBottom: "1.1rem", lineHeight: 1.5, maxWidth: 320 }, children: [
7218
+ "Send ",
7219
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { style: { color: "rgba(255,255,255,0.8)" }, children: "USDC" }),
7220
+ " on Base Sepolia to the address below. Only send on this network."
7221
+ ] }),
7222
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
7223
+ width: "100%",
7224
+ background: "rgba(255,255,255,0.03)",
7225
+ border: "1px solid rgba(255,255,255,0.09)",
7226
+ borderRadius: 10,
7227
+ padding: "0.85rem 1rem",
7228
+ marginBottom: "0.75rem"
7229
+ }, children: [
7230
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: "0.65rem", color: "rgba(255,255,255,0.35)", textTransform: "uppercase", letterSpacing: "0.06em", marginBottom: "0.4rem", fontWeight: 600 }, children: "Your wallet address" }),
7231
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
7232
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
7233
+ flex: 1,
7234
+ fontFamily: "monospace",
7235
+ fontSize: "0.76rem",
7236
+ color: "#eaecef",
7237
+ wordBreak: "break-all",
7238
+ lineHeight: 1.6
7239
+ }, children: walletAddress }),
7240
+ /* @__PURE__ */ jsxRuntime.jsx(
7241
+ "button",
7242
+ {
7243
+ type: "button",
7244
+ onClick: handleCopy,
7245
+ style: {
7246
+ background: copied ? "rgba(14,203,129,0.15)" : "rgba(230,200,126,0.1)",
7247
+ border: "1px solid " + (copied ? "rgba(14,203,129,0.35)" : "rgba(230,200,126,0.3)"),
7248
+ borderRadius: 6,
7249
+ padding: "0.4rem 0.8rem",
7250
+ color: copied ? "#0ecb81" : "#e6c87e",
7251
+ fontSize: "0.78rem",
7252
+ fontWeight: 600,
7253
+ cursor: "pointer",
7254
+ whiteSpace: "nowrap",
7255
+ flexShrink: 0,
7256
+ transition: "all 0.15s ease"
7257
+ },
7258
+ children: copied ? "\u2713 Copied" : "Copy"
7259
+ }
7260
+ )
7261
+ ] })
7262
+ ] }),
7263
+ /* @__PURE__ */ jsxRuntime.jsx(SubmitButton, { onClick: onClose, style: { marginBottom: "1.1rem" }, children: "Done" }),
7264
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
7265
+ display: "flex",
7266
+ alignItems: "center",
7267
+ gap: "0.4rem",
7268
+ color: "rgba(255,255,255,0.28)",
7269
+ fontSize: "0.72rem"
7270
+ }, children: [
7271
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) }),
7272
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
7273
+ "Wallet secured by ",
7274
+ /* @__PURE__ */ jsxRuntime.jsx("strong", { style: { color: "rgba(255,255,255,0.45)", fontWeight: 600 }, children: "Privy" })
7275
+ ] })
7276
+ ] })
7277
+ ] })
7278
+ ] }) });
7279
+ }
7081
7280
  return null;
7082
7281
  };
7083
7282
  var Overlay2 = styled9__default.default.div`
@@ -13608,7 +13807,9 @@ function PortfolioActivityPanel({
13608
13807
  }
13609
13808
  };
13610
13809
  const mergedOrderHistory = React5.useMemo(() => {
13611
- if (showSubscriptionsTab || offeringOrders.length === 0) return orderHistory;
13810
+ if (showSubscriptionsTab || offeringOrders.length === 0) {
13811
+ return [...orderHistory].sort((a, b) => b.createdAt - a.createdAt);
13812
+ }
13612
13813
  const mapped = offeringOrders.map((o, i) => ({
13613
13814
  id: o.ipoOrderId ?? -(i + 1),
13614
13815
  propertyId: 0,
@@ -13629,6 +13830,22 @@ function PortfolioActivityPanel({
13629
13830
  }));
13630
13831
  return [...orderHistory, ...mapped].sort((a, b) => b.createdAt - a.createdAt);
13631
13832
  }, [showSubscriptionsTab, offeringOrders, orderHistory]);
13833
+ const sortedOpenOrders = React5.useMemo(
13834
+ () => [...openOrders].sort((a, b) => b.createdAt - a.createdAt),
13835
+ [openOrders]
13836
+ );
13837
+ const sortedOfferingOrders = React5.useMemo(
13838
+ () => [...offeringOrders].sort((a, b) => b.createdAt - a.createdAt),
13839
+ [offeringOrders]
13840
+ );
13841
+ const sortedTradeHistory = React5.useMemo(
13842
+ () => [...tradeHistory].sort((a, b) => b.executedAt - a.executedAt),
13843
+ [tradeHistory]
13844
+ );
13845
+ const sortedTransfers = React5.useMemo(
13846
+ () => [...transfers].sort((a, b) => b.createdAt - a.createdAt),
13847
+ [transfers]
13848
+ );
13632
13849
  const positionsCount = positions.length;
13633
13850
  const openOrdersCount = React5.useMemo(
13634
13851
  () => openOrders.filter((o) => o.status === "OPEN" || o.status === "PARTIALLY_FILLED").length,
@@ -13653,25 +13870,25 @@ function PortfolioActivityPanel({
13653
13870
  const activeDataLength = (() => {
13654
13871
  switch (activeTab) {
13655
13872
  case "subscriptions":
13656
- return offeringOrders.length;
13873
+ return sortedOfferingOrders.length;
13657
13874
  case "open-orders":
13658
- return openOrders.length;
13875
+ return sortedOpenOrders.length;
13659
13876
  case "orders":
13660
13877
  return mergedOrderHistory.length;
13661
13878
  case "trades":
13662
- return tradeHistory.length;
13879
+ return sortedTradeHistory.length;
13663
13880
  case "transfers":
13664
- return transfers.length;
13881
+ return sortedTransfers.length;
13665
13882
  default:
13666
13883
  return 0;
13667
13884
  }
13668
13885
  })();
13669
13886
  const totalPages = Math.ceil(activeDataLength / pageSize);
13670
- const pagedOfferingOrders = offeringOrders.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13671
- const pagedOpenOrders = openOrders.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13887
+ const pagedOfferingOrders = sortedOfferingOrders.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13888
+ const pagedOpenOrders = sortedOpenOrders.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13672
13889
  const pagedOrderHistory = mergedOrderHistory.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13673
- const pagedTradeHistory = tradeHistory.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13674
- const pagedTransfers = transfers.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13890
+ const pagedTradeHistory = sortedTradeHistory.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13891
+ const pagedTransfers = sortedTransfers.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
13675
13892
  return /* @__PURE__ */ jsxRuntime.jsxs(Container2, { className, style, children: [
13676
13893
  /* @__PURE__ */ jsxRuntime.jsx(PanelTitle, { children: "Activity" }),
13677
13894
  /* @__PURE__ */ jsxRuntime.jsxs(TabContainer, { children: [
@@ -17870,10 +18087,13 @@ function ToastProvider({ children }) {
17870
18087
  setToasts((prev) => [...prev, { ...data, id }]);
17871
18088
  return id;
17872
18089
  }, []);
18090
+ const update = React5.useCallback((id, patch) => {
18091
+ setToasts((prev) => prev.map((t) => t.id === id ? { ...t, ...patch } : t));
18092
+ }, []);
17873
18093
  const dismiss = React5.useCallback((id) => {
17874
18094
  setToasts((prev) => prev.filter((t) => t.id !== id));
17875
18095
  }, []);
17876
- return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, dismiss }, children: [
18096
+ return /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value: { toast: addToast, update, dismiss }, children: [
17877
18097
  children,
17878
18098
  /* @__PURE__ */ jsxRuntime.jsx(Container3, { children: toasts.map((t) => /* @__PURE__ */ jsxRuntime.jsx(ToastItem, { toast: t, onDismiss: dismiss }, t.id)) })
17879
18099
  ] });