0xtrails 0.16.0 → 0.16.1

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.
@@ -1,238 +1,242 @@
1
1
  import { logger as N } from "../../logger/index.js";
2
- import { normalizeAddress as K, truncateAddress as C } from "../../utils/address.js";
3
- import { formatAmountDisplay as G } from "../../utils/format.js";
4
- import J from "./CopyButton.js";
5
- import U from "./TokenImage.js";
6
- import Q from "./Tooltip.js";
7
- import { useTrails as X } from "../providers/TrailsProvider.js";
8
- import { formatUnits as Y } from "viem";
9
- import { useCallback as B, useEffect as L, useMemo as M, useState as S } from "react";
10
- import { Fragment as T, jsx as r, jsxs as s } from "react/jsx-runtime";
11
- import { ChevronDown as Z, ChevronUp as _ } from "lucide-react";
12
- var x = (l) => "hasEnoughBalanceForFee" in l && "balance" in l, O = (l) => l?.contractAddress ? C(l.contractAddress) : "Native Token", E = ({ option: l, chainId: i, feeDisplay: d, isSelected: u = !1, isDisabled: c = !1, showRadio: o = !1, radioName: a = "feeOption", onSelect: w }) => {
13
- const f = (n) => {
14
- n?.stopPropagation(), !c && w?.();
2
+ import { normalizeAddress as X, truncateAddress as Y } from "../../utils/address.js";
3
+ import { formatAmountDisplay as Z } from "../../utils/format.js";
4
+ import _ from "./CopyButton.js";
5
+ import V from "./TokenImage.js";
6
+ import ee from "./Tooltip.js";
7
+ import { useTrails as re } from "../providers/TrailsProvider.js";
8
+ import { formatUnits as se } from "viem";
9
+ import { useCallback as j, useEffect as I, useMemo as P, useRef as te, useState as w } from "react";
10
+ import { Fragment as R, jsx as r, jsxs as t } from "react/jsx-runtime";
11
+ import { ChevronDown as ae, ChevronUp as le } from "lucide-react";
12
+ var F = (a) => "hasEnoughBalanceForFee" in a && "balance" in a, ne = (a) => a?.contractAddress ? Y(a.contractAddress) : "Native Token", W = ({ option: a, chainId: i, feeDisplay: n, isSelected: u = !1, isDisabled: o = !1, showRadio: d = !1, radioName: l = "feeOption", onSelect: A }) => {
13
+ const h = (c) => {
14
+ c?.stopPropagation(), !o && A?.();
15
15
  };
16
16
  return /* @__PURE__ */ r("div", {
17
- className: `px-4 py-3 flex flex-col space-y-3 border border-gray-200 dark:border-gray-800 rounded-lg transition-all duration-200 ${c ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900/30" : "bg-white dark:bg-gray-900 hover:shadow-sm"}`,
18
- role: o ? "radio" : void 0,
19
- tabIndex: o && !c ? 0 : void 0,
20
- "aria-disabled": c,
21
- onClick: o ? f : void 0,
22
- onKeyDown: o ? (n) => {
23
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), f());
17
+ className: `px-4 py-3 flex flex-col space-y-3 border border-gray-200 dark:border-gray-800 rounded-lg transition-all duration-200 ${o ? "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-900/30" : "bg-white dark:bg-gray-900 hover:shadow-sm"}`,
18
+ role: d ? "radio" : void 0,
19
+ tabIndex: d && !o ? 0 : void 0,
20
+ "aria-disabled": o,
21
+ onClick: d ? h : void 0,
22
+ onKeyDown: d ? (c) => {
23
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), h());
24
24
  } : void 0,
25
- children: /* @__PURE__ */ s("div", {
25
+ children: /* @__PURE__ */ t("div", {
26
26
  className: "flex items-start justify-between gap-3",
27
- children: [/* @__PURE__ */ s("div", {
27
+ children: [/* @__PURE__ */ t("div", {
28
28
  className: "flex items-center space-x-3",
29
- children: [/* @__PURE__ */ r(U, {
30
- symbol: l.token.symbol,
31
- imageUrl: l.token.logoURL,
29
+ children: [/* @__PURE__ */ r(V, {
30
+ symbol: a.token.symbol,
31
+ imageUrl: a.token.logoURL,
32
32
  chainId: i,
33
33
  size: 32
34
- }), /* @__PURE__ */ s("div", {
34
+ }), /* @__PURE__ */ t("div", {
35
35
  className: "ml-2 text-left",
36
36
  children: [/* @__PURE__ */ r("div", {
37
37
  className: "text-sm font-semibold",
38
- children: l.token.symbol
38
+ children: a.token.symbol
39
39
  }), /* @__PURE__ */ r("div", {
40
40
  className: "text-xs trails-text-muted",
41
- children: O(l.token)
41
+ children: ne(a.token)
42
42
  })]
43
43
  })]
44
- }), /* @__PURE__ */ s("div", {
44
+ }), /* @__PURE__ */ t("div", {
45
45
  className: "flex items-center space-x-3",
46
- children: [/* @__PURE__ */ s("div", {
46
+ children: [/* @__PURE__ */ t("div", {
47
47
  className: "text-right",
48
48
  children: [/* @__PURE__ */ r("div", {
49
49
  className: "text-[10px] uppercase tracking-wide trails-text-muted",
50
50
  children: "Fee to pay"
51
- }), /* @__PURE__ */ s("div", {
51
+ }), /* @__PURE__ */ t("div", {
52
52
  className: "text-base font-semibold",
53
53
  children: [
54
- d.feeAmountFormatted,
54
+ n.feeAmountFormatted,
55
55
  " ",
56
- l.token.symbol
56
+ a.token.symbol
57
57
  ]
58
58
  })]
59
- }), o && /* @__PURE__ */ r("input", {
59
+ }), d && /* @__PURE__ */ r("input", {
60
60
  type: "radio",
61
- name: a,
61
+ name: l,
62
62
  checked: u,
63
- disabled: c,
64
- onChange: f,
63
+ disabled: o,
64
+ onChange: h,
65
65
  className: "w-4 h-4 text-trails-primary focus:ring-trails-primary"
66
66
  })]
67
67
  })]
68
68
  })
69
69
  });
70
- }, ee = ({ chainId: l, originToken: i, originTokenAmount: d, setIsFeeOptionConfirmed: u, onFeeOptionsLoaded: c, setIsError: o, pendingFeeOptionConfirmation: a, confirmPendingFeeOption: w, rejectPendingFeeOption: f }) => {
71
- const [n, y] = S(), [g, q] = S(!1), [h, k] = S(!1), V = !!a && (!a.options || a.options.length === 0), F = M(() => i?.contractAddress?.toLowerCase() || null, [i?.contractAddress]), p = M(() => {
72
- if (!d) return null;
70
+ }, O = () => /* @__PURE__ */ r("div", {
71
+ className: "flex items-center justify-center py-8",
72
+ children: /* @__PURE__ */ r("p", {
73
+ className: "text-sm trails-text-muted",
74
+ children: "Loading fee options..."
75
+ })
76
+ }), oe = ({ chainId: a, originToken: i, originTokenAmount: n, setIsFeeOptionConfirmed: u, onFeeOptionsLoaded: o, setIsError: d, pendingFeeOptionConfirmation: l, confirmPendingFeeOption: A, rejectPendingFeeOption: h }) => {
77
+ const [c, x] = w(), S = te(void 0), [y, H] = w(!1), [f, g] = w(!1), [$, T] = w(!1), K = !!l && (!l.options || l.options.length === 0), B = P(() => i?.contractAddress?.toLowerCase() || null, [i?.contractAddress]), p = P(() => {
78
+ if (!n) return null;
73
79
  try {
74
- return BigInt(d);
80
+ return BigInt(n);
75
81
  } catch (e) {
76
82
  return N.console.error("[trails-sdk] Failed to parse origin token amount for fee comparison", {
77
- originTokenAmount: d,
83
+ originTokenAmount: n,
78
84
  error: e
79
85
  }), null;
80
86
  }
81
- }, [d]), D = B((e) => {
87
+ }, [n]), z = j((e) => {
82
88
  if (!i || !e?.token) return !1;
83
- const t = e.token.contractAddress ? K(e.token.contractAddress) : null;
84
- return F && t ? F === t : !1;
85
- }, [i, F]), j = B((e) => {
86
- if (!p || p <= 0n || !D(e) || !e?.balance || !e?.value) return !1;
89
+ const s = e.token.contractAddress ? X(e.token.contractAddress) : null;
90
+ return B && s ? B === s : !1;
91
+ }, [i, B]), v = j((e) => {
92
+ if (!p || p <= 0n || !z(e) || !e?.balance || !e?.value) return !1;
87
93
  try {
88
94
  return BigInt(e.balance) < BigInt(e.value) + p;
89
- } catch (t) {
95
+ } catch (s) {
90
96
  return N.console.error("[trails-sdk] Failed to compare origin amount plus fee with balance", {
91
97
  balance: e?.balance,
92
98
  value: e?.value,
93
- originAmount: d,
94
- error: t
99
+ originAmount: n,
100
+ error: s
95
101
  }), !1;
96
102
  }
97
103
  }, [
98
- D,
104
+ z,
99
105
  p,
100
- d
101
- ]), P = B((e) => {
102
- const t = e.token.decimals ?? 18, b = e.value || "0";
103
- let I = "0";
106
+ n
107
+ ]), M = j((e) => {
108
+ const s = e.token.decimals ?? 18, b = e.value || "0";
109
+ let C = "0";
104
110
  try {
105
- I = G(Y(BigInt(b), t), {
106
- maxFractionDigits: Math.min(t, 6),
111
+ C = Z(se(BigInt(b), s), {
112
+ maxFractionDigits: Math.min(s, 6),
107
113
  minFractionDigits: 0
108
114
  });
109
- } catch (H) {
115
+ } catch (Q) {
110
116
  N.console.warn("[trails-sdk] Failed to format fee option amount", {
111
- error: H,
117
+ error: Q,
112
118
  value: b,
113
- decimals: t,
119
+ decimals: s,
114
120
  token: e?.token?.symbol
115
121
  });
116
122
  }
117
- return { feeAmountFormatted: I };
118
- }, []);
119
- L(() => {
120
- if (a && (N.console.log("[trails-sdk] Pending fee options: ", a.options), c && a.options?.length > 0 && a.options.find((e) => x(e) && e.hasEnoughBalanceForFee) && c(), a.options.length > 0 && !n)) {
121
- const e = a.options.find((t) => x(t) && t.hasEnoughBalanceForFee);
122
- e?.token?.symbol && y(e.token.symbol);
123
+ return { feeAmountFormatted: C };
124
+ }, []), L = P(() => {
125
+ const e = (l?.options ?? []).filter(F).filter((s) => s.hasEnoughBalanceForFee);
126
+ return e.find((s) => !v(s)) ?? e[0];
127
+ }, [l?.options, v]), E = L?.token?.symbol;
128
+ I(() => {
129
+ const e = l?.id;
130
+ if (!e) {
131
+ S.current = void 0;
132
+ return;
123
133
  }
134
+ S.current !== e && (S.current = e, T(!1), u(!1), x(void 0));
135
+ }, [l?.id, u]), I(() => {
136
+ l && (N.console.log("[trails-sdk] Pending fee options: ", l.options), L && o && o(), !c && E && x(E));
124
137
  }, [
125
- a,
126
- c,
127
- n
128
- ]), L(() => {
129
- a?.id && (u(!1), y(void 0));
130
- }, [a?.id, u]);
131
- const R = async (e) => {
132
- if (a && !h) {
133
- k(!0);
138
+ L,
139
+ E,
140
+ o,
141
+ l,
142
+ c
143
+ ]);
144
+ const G = async (e) => {
145
+ if (l && !f) {
146
+ g(!0);
134
147
  try {
135
- w(a.id, e), u(!0);
148
+ T(!0), u(!0), A(l.id, e);
136
149
  } finally {
137
- k(!1);
150
+ g(!1);
138
151
  }
139
152
  }
140
- }, $ = async () => {
141
- if (a && !h) {
142
- k(!0);
153
+ }, J = async () => {
154
+ if (l && !f) {
155
+ g(!0);
143
156
  try {
144
- f(a.id);
157
+ h(l.id);
145
158
  } finally {
146
- k(!1);
159
+ g(!1);
147
160
  }
148
161
  }
149
162
  };
150
- if (!a) return null;
151
- if (V) return /* @__PURE__ */ r("div", {
152
- className: "flex items-center justify-center py-8",
153
- children: /* @__PURE__ */ s("div", {
154
- className: "flex flex-col items-center space-y-3",
155
- children: [/* @__PURE__ */ r("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-trails-primary" }), /* @__PURE__ */ r("p", {
156
- className: "text-sm trails-text-muted",
157
- children: "Loading fee options..."
158
- })]
159
- })
160
- });
161
- const v = a.options, m = v.filter(x).filter((e) => e.hasEnoughBalanceForFee).find((e) => e.token.symbol === n), W = m ? P(m) : null, A = m ? j(m) : !1, z = v.find((e) => x(e) && e.hasEnoughBalanceForFee);
162
- return z || o?.(!0), z ? /* @__PURE__ */ s("div", {
163
+ if (!l) return $ ? null : /* @__PURE__ */ r(O, {});
164
+ if (K) return /* @__PURE__ */ r(O, {});
165
+ const k = l.options, m = k.filter(F).filter((e) => e.hasEnoughBalanceForFee).find((e) => e.token.symbol === c), U = m ? M(m) : null, D = m ? v(m) : !1, q = k.find((e) => F(e) && e.hasEnoughBalanceForFee);
166
+ return q || d?.(!0), q ? /* @__PURE__ */ t("div", {
163
167
  className: "space-y-2",
164
168
  children: [
165
- /* @__PURE__ */ s("div", {
169
+ /* @__PURE__ */ t("div", {
166
170
  className: "flex items-center justify-between",
167
171
  children: [/* @__PURE__ */ r("div", {
168
172
  className: "text-sm font-medium trails-text-primary",
169
173
  children: "Select Fee Payment Token"
170
- }), /* @__PURE__ */ s("button", {
174
+ }), /* @__PURE__ */ t("button", {
171
175
  type: "button",
172
- onClick: () => q(!g),
176
+ onClick: () => H(!y),
173
177
  className: "flex items-center space-x-1 text-xs trails-text-muted hover:trails-text-primary transition-colors cursor-pointer",
174
- children: [/* @__PURE__ */ s("span", { children: [g ? "Hide" : "Show", " options"] }), g ? /* @__PURE__ */ r(_, { className: "w-3 h-3" }) : /* @__PURE__ */ r(Z, { className: "w-3 h-3" })]
178
+ children: [/* @__PURE__ */ t("span", { children: [y ? "Hide" : "Show", " options"] }), y ? /* @__PURE__ */ r(le, { className: "w-3 h-3" }) : /* @__PURE__ */ r(ae, { className: "w-3 h-3" })]
175
179
  })]
176
180
  }),
177
- m?.hasEnoughBalanceForFee && W && /* @__PURE__ */ r(E, {
181
+ m?.hasEnoughBalanceForFee && U && /* @__PURE__ */ r(W, {
178
182
  option: m,
179
- chainId: l,
180
- feeDisplay: W,
183
+ chainId: a,
184
+ feeDisplay: U,
181
185
  isSelected: !0,
182
- isDisabled: A,
186
+ isDisabled: D,
183
187
  showRadio: !1
184
188
  }),
185
- g && /* @__PURE__ */ r("div", {
189
+ y && /* @__PURE__ */ r("div", {
186
190
  className: "space-y-2",
187
- children: v.filter(x).filter((e) => e.hasEnoughBalanceForFee).map((e) => {
188
- const t = j(e), b = P(e);
189
- return t ? /* @__PURE__ */ r(Q, {
191
+ children: k.filter(F).filter((e) => e.hasEnoughBalanceForFee).map((e) => {
192
+ const s = v(e), b = M(e);
193
+ return s ? /* @__PURE__ */ r(ee, {
190
194
  message: "Not enough balance to cover sell amount and fee",
191
- children: /* @__PURE__ */ r(E, {
195
+ children: /* @__PURE__ */ r(W, {
192
196
  option: e,
193
- chainId: l,
197
+ chainId: a,
194
198
  feeDisplay: b,
195
- isSelected: n === e.token.symbol,
196
- isDisabled: t,
199
+ isSelected: c === e.token.symbol,
200
+ isDisabled: s,
197
201
  showRadio: !0,
198
- onSelect: () => y(e.token.symbol)
202
+ onSelect: () => x(e.token.symbol)
199
203
  }, e.token.symbol || e.token.contractAddress)
200
- }, e.token.symbol) : /* @__PURE__ */ r(E, {
204
+ }, e.token.symbol) : /* @__PURE__ */ r(W, {
201
205
  option: e,
202
- chainId: l,
206
+ chainId: a,
203
207
  feeDisplay: b,
204
- isSelected: n === e.token.symbol,
205
- isDisabled: t,
208
+ isSelected: c === e.token.symbol,
209
+ isDisabled: s,
206
210
  showRadio: !0,
207
- onSelect: () => y(e.token.symbol)
211
+ onSelect: () => x(e.token.symbol)
208
212
  }, e.token.symbol || e.token.contractAddress);
209
213
  })
210
214
  }),
211
- /* @__PURE__ */ s("div", {
215
+ /* @__PURE__ */ t("div", {
212
216
  className: "flex flex-col space-y-3 sm:flex-row sm:space-y-0 sm:space-x-3",
213
- children: [!A && /* @__PURE__ */ r("div", {
217
+ children: [!D && /* @__PURE__ */ r("div", {
214
218
  className: "flex-1",
215
219
  children: /* @__PURE__ */ r("button", {
216
220
  type: "button",
217
- onClick: () => R(m?.token.contractAddress || null),
218
- disabled: !m || h,
221
+ onClick: () => G(m?.token.contractAddress || null),
222
+ disabled: !m || f,
219
223
  className: "w-full py-3 px-6 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-300 disabled:text-gray-500 text-white font-semibold rounded-lg transition-all duration-200 cursor-pointer disabled:cursor-not-allowed shadow-sm hover:shadow-md disabled:shadow-none flex items-center justify-center",
220
- children: h ? /* @__PURE__ */ s(T, { children: [/* @__PURE__ */ r("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" }), "Processing..."] }) : "Confirm Fee"
224
+ children: f ? /* @__PURE__ */ t(R, { children: [/* @__PURE__ */ r("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2" }), "Processing..."] }) : "Confirm Fee"
221
225
  })
222
226
  }), /* @__PURE__ */ r("button", {
223
227
  type: "button",
224
- onClick: $,
225
- disabled: h,
226
- className: `px-6 py-3 bg-gray-100 hover:bg-gray-200 disabled:bg-gray-50 text-gray-700 font-semibold rounded-lg transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 flex items-center justify-center border border-gray-300 ${A ? "w-full sm:flex-1" : ""}`,
227
- children: h ? /* @__PURE__ */ s(T, { children: [/* @__PURE__ */ r("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-gray-500 mr-2" }), "Processing..."] }) : "Cancel"
228
+ onClick: J,
229
+ disabled: f,
230
+ className: `px-6 py-3 bg-gray-100 hover:bg-gray-200 disabled:bg-gray-50 text-gray-700 font-semibold rounded-lg transition-all duration-200 cursor-pointer disabled:cursor-not-allowed disabled:opacity-50 flex items-center justify-center border border-gray-300 ${D ? "w-full sm:flex-1" : ""}`,
231
+ children: f ? /* @__PURE__ */ t(R, { children: [/* @__PURE__ */ r("div", { className: "animate-spin rounded-full h-4 w-4 border-b-2 border-gray-500 mr-2" }), "Processing..."] }) : "Cancel"
228
232
  })]
229
233
  })
230
234
  ]
231
- }) : /* @__PURE__ */ s("div", {
235
+ }) : /* @__PURE__ */ t("div", {
232
236
  className: "space-y-4 py-6",
233
237
  children: [/* @__PURE__ */ r("div", {
234
238
  className: "p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",
235
- children: /* @__PURE__ */ s("div", {
239
+ children: /* @__PURE__ */ t("div", {
236
240
  className: "flex items-start space-x-2",
237
241
  children: [/* @__PURE__ */ r("svg", {
238
242
  "aria-hidden": "true",
@@ -253,34 +257,34 @@ var x = (l) => "hasEnoughBalanceForFee" in l && "balance" in l, O = (l) => l?.co
253
257
  })
254
258
  }), /* @__PURE__ */ r("div", {
255
259
  className: "flex flex-col space-y-2",
256
- children: v.map((e) => {
257
- const t = e.token.contractAddress;
258
- return /* @__PURE__ */ s("div", {
260
+ children: k.map((e) => {
261
+ const s = e.token.contractAddress;
262
+ return /* @__PURE__ */ t("div", {
259
263
  className: "flex items-center space-x-3 p-3 trails-bg-secondary trails-border-radius-container border border-transparent",
260
264
  children: [/* @__PURE__ */ r("div", {
261
265
  className: "flex items-center shrink-0",
262
- children: /* @__PURE__ */ r(U, {
266
+ children: /* @__PURE__ */ r(V, {
263
267
  symbol: e.token.symbol,
264
268
  imageUrl: e.token.logoURL,
265
- chainId: l,
269
+ chainId: a,
266
270
  size: 32
267
271
  })
268
- }), /* @__PURE__ */ s("div", {
272
+ }), /* @__PURE__ */ t("div", {
269
273
  className: "flex-1 min-w-0 flex flex-col items-start",
270
274
  children: [/* @__PURE__ */ r("span", {
271
275
  className: "text-sm font-bold trails-text-primary leading-tight",
272
276
  children: e.token.symbol
273
- }), t ? /* @__PURE__ */ s("div", {
277
+ }), s ? /* @__PURE__ */ t("div", {
274
278
  className: "flex items-center space-x-1.5 mt-0.5",
275
- children: [/* @__PURE__ */ s("span", {
279
+ children: [/* @__PURE__ */ t("span", {
276
280
  className: "text-xs trails-text-muted leading-tight",
277
281
  children: [
278
- t.slice(0, 4),
282
+ s.slice(0, 4),
279
283
  "...",
280
- t.slice(-4)
284
+ s.slice(-4)
281
285
  ]
282
- }), /* @__PURE__ */ r(J, {
283
- text: t,
286
+ }), /* @__PURE__ */ r(_, {
287
+ text: s,
284
288
  stopPropagation: !0,
285
289
  className: "shrink-0 p-0.5",
286
290
  size: "sm"
@@ -290,15 +294,15 @@ var x = (l) => "hasEnoughBalanceForFee" in l && "balance" in l, O = (l) => l?.co
290
294
  children: "Native Token"
291
295
  })]
292
296
  })]
293
- }, e.token.symbol || t);
297
+ }, e.token.symbol || s);
294
298
  })
295
299
  })]
296
300
  });
297
- }, re = () => /* @__PURE__ */ r("div", {
301
+ }, ce = () => /* @__PURE__ */ r("div", {
298
302
  className: "space-y-4 py-6",
299
303
  children: /* @__PURE__ */ r("div", {
300
304
  className: "p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",
301
- children: /* @__PURE__ */ s("div", {
305
+ children: /* @__PURE__ */ t("div", {
302
306
  className: "flex items-start space-x-2",
303
307
  children: [/* @__PURE__ */ r("svg", {
304
308
  "aria-hidden": "true",
@@ -312,7 +316,7 @@ var x = (l) => "hasEnoughBalanceForFee" in l && "balance" in l, O = (l) => l?.co
312
316
  strokeWidth: 2,
313
317
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
314
318
  })
315
- }), /* @__PURE__ */ s("p", {
319
+ }), /* @__PURE__ */ t("p", {
316
320
  className: "text-sm text-red-800 dark:text-red-200 font-medium",
317
321
  children: [
318
322
  "Sequence fee options require adapter-owned Sequence support. Pass the matching wagmi adapter through ",
@@ -328,18 +332,18 @@ var x = (l) => "hasEnoughBalanceForFee" in l && "balance" in l, O = (l) => l?.co
328
332
  })]
329
333
  })
330
334
  })
331
- }), he = (l) => {
332
- const { sequenceSupport: i } = X(), d = i?.WaasFeeOptionsController, { chainId: u, setIsError: c } = l;
333
- return L(() => {
334
- d || c?.(!0);
335
- }, [d, c]), d ? /* @__PURE__ */ r(d, {
335
+ }), ve = (a) => {
336
+ const { sequenceSupport: i } = re(), n = i?.WaasFeeOptionsController, { chainId: u, setIsError: o } = a;
337
+ return I(() => {
338
+ n || o?.(!0);
339
+ }, [n, o]), n ? /* @__PURE__ */ r(n, {
336
340
  chainId: u,
337
- children: (o) => /* @__PURE__ */ r(ee, {
338
- ...l,
339
- ...o
341
+ children: (d) => /* @__PURE__ */ r(oe, {
342
+ ...a,
343
+ ...d
340
344
  })
341
- }) : /* @__PURE__ */ r(re, {});
345
+ }) : /* @__PURE__ */ r(ce, {});
342
346
  };
343
347
  export {
344
- he as default
348
+ ve as default
345
349
  };