@aurora-is-near/intents-swap-widget 2.6.6 → 2.8.0

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.
Files changed (124) hide show
  1. package/README.md +49 -2
  2. package/dist/components/SkeletonBox.d.ts +3 -0
  3. package/dist/components/SkeletonBox.js +12 -0
  4. package/dist/components/SkeletonBox.js.map +1 -0
  5. package/dist/components/WidgetContainer.d.ts +2 -0
  6. package/dist/components/WidgetContainer.js +6 -0
  7. package/dist/components/WidgetContainer.js.map +1 -0
  8. package/dist/{config-Dq9mlDST.js → config-haLfG4Cu.js} +24 -24
  9. package/dist/{config-Dq9mlDST.js.map → config-haLfG4Cu.js.map} +1 -1
  10. package/dist/config.js +1 -1
  11. package/dist/errors.js +1 -1
  12. package/dist/ext/alchemy/index.js +1 -1
  13. package/dist/ext/index.js +1 -1
  14. package/dist/features/BalanceRpcLoader/index.js +1 -1
  15. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  16. package/dist/features/ChainsDropdown/index.js +1 -1
  17. package/dist/features/DepositMethodSwitcher.js +1 -1
  18. package/dist/features/ErrorBoundary.js +1 -1
  19. package/dist/features/ExternalDeposit.js +1 -1
  20. package/dist/features/SendAddress/index.js +1 -1
  21. package/dist/features/SendAddress/useNotification.js +1 -1
  22. package/dist/features/SubmitButton/index.js +1 -1
  23. package/dist/features/SuccessScreen/index.js +1 -1
  24. package/dist/features/SwapDirectionSwitcher.js +1 -1
  25. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  26. package/dist/features/TokenInput/TokenInput.js +1 -1
  27. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  28. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  29. package/dist/features/TokenInput/WalletBalance.js +1 -1
  30. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  31. package/dist/features/TokensList/TokenItem.js +1 -1
  32. package/dist/features/TokensList/TokensList.js +1 -1
  33. package/dist/features/TokensModal.js +4 -3
  34. package/dist/features/TokensModal.js.map +1 -1
  35. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  36. package/dist/hooks/index.js +1 -1
  37. package/dist/hooks/useChains.js +1 -1
  38. package/dist/hooks/useCompatibilityCheck.js +1 -1
  39. package/dist/hooks/useDefaultToken.js +1 -1
  40. package/dist/hooks/useExternalDepositStatus.js +1 -1
  41. package/dist/hooks/useIntentsBalance.js +1 -1
  42. package/dist/hooks/useMakeDepositAddress.js +1 -1
  43. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  44. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  45. package/dist/hooks/useMakeQuote.js +1 -1
  46. package/dist/hooks/useMakeQuoteTransfer.d.ts +2 -6
  47. package/dist/hooks/useMakeQuoteTransfer.js +24 -17
  48. package/dist/hooks/useMakeQuoteTransfer.js.map +1 -1
  49. package/dist/hooks/useMakeTransfer.js +1 -1
  50. package/dist/hooks/useMergedBalance.js +1 -1
  51. package/dist/hooks/useTokenInputPair.js +1 -1
  52. package/dist/hooks/useTokens.js +1 -1
  53. package/dist/hooks/useTokensFiltered.js +1 -1
  54. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  55. package/dist/index.js +4 -4
  56. package/dist/machine/effects/index.js +1 -1
  57. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  58. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  59. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  60. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  61. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  62. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  63. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  64. package/dist/machine/events/index.js +1 -1
  65. package/dist/machine/events/tokenSelect.js +1 -1
  66. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  67. package/dist/machine/index.js +1 -1
  68. package/dist/machine/snap.js +1 -1
  69. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  70. package/dist/machine/subscriptions/index.js +1 -1
  71. package/dist/types/transfer.d.ts +9 -1
  72. package/dist/utils/intents/signers/near.js +1 -1
  73. package/dist/utils/intents/signers/privy.js +1 -1
  74. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  75. package/dist/widgets/{WidgetDeposit.d.ts → WidgetDeposit/WidgetDepositContent.d.ts} +4 -4
  76. package/dist/widgets/{WidgetDeposit.js → WidgetDeposit/WidgetDepositContent.js} +39 -39
  77. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -0
  78. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.d.ts +1 -0
  79. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +10 -0
  80. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js.map +1 -0
  81. package/dist/widgets/WidgetDeposit/index.d.ts +3 -0
  82. package/dist/widgets/WidgetDeposit/index.js +8 -0
  83. package/dist/widgets/WidgetDeposit/index.js.map +1 -0
  84. package/dist/widgets/{WidgetSwap.d.ts → WidgetSwap/WidgetSwapContent.d.ts} +4 -4
  85. package/dist/widgets/{WidgetSwap.js → WidgetSwap/WidgetSwapContent.js} +34 -34
  86. package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -0
  87. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.d.ts +1 -0
  88. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +13 -0
  89. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js.map +1 -0
  90. package/dist/widgets/WidgetSwap/index.d.ts +3 -0
  91. package/dist/widgets/WidgetSwap/index.js +8 -0
  92. package/dist/widgets/WidgetSwap/index.js.map +1 -0
  93. package/dist/widgets/{WidgetWithdraw.d.ts → WidgetWithdraw/WidgetWithdrawContent.d.ts} +4 -4
  94. package/dist/widgets/{WidgetWithdraw.js → WidgetWithdraw/WidgetWithdrawContent.js} +33 -33
  95. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -0
  96. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.d.ts +1 -0
  97. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +11 -0
  98. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js.map +1 -0
  99. package/dist/widgets/WidgetWithdraw/index.d.ts +3 -0
  100. package/dist/widgets/WidgetWithdraw/index.js +8 -0
  101. package/dist/widgets/WidgetWithdraw/index.js.map +1 -0
  102. package/dist/widgets/index.js +3 -3
  103. package/package.json +1 -1
  104. package/src/components/SkeletonBox.tsx +7 -0
  105. package/src/components/WidgetContainer.tsx +9 -0
  106. package/src/config.tsx +1 -3
  107. package/src/hooks/useMakeQuoteTransfer.ts +8 -6
  108. package/src/types/transfer.ts +11 -1
  109. package/src/widgets/{WidgetDeposit.tsx → WidgetDeposit/WidgetDepositContent.tsx} +9 -9
  110. package/src/widgets/WidgetDeposit/WidgetDepositSkeleton.tsx +8 -0
  111. package/src/widgets/WidgetDeposit/index.tsx +10 -0
  112. package/src/widgets/{WidgetSwap.tsx → WidgetSwap/WidgetSwapContent.tsx} +9 -9
  113. package/src/widgets/WidgetSwap/WidgetSwapSkeleton.tsx +13 -0
  114. package/src/widgets/WidgetSwap/index.tsx +10 -0
  115. package/src/widgets/{WidgetWithdraw.tsx → WidgetWithdraw/WidgetWithdrawContent.tsx} +9 -9
  116. package/src/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.tsx +9 -0
  117. package/src/widgets/WidgetWithdraw/index.tsx +10 -0
  118. package/dist/widgets/WidgetDeposit.js.map +0 -1
  119. package/dist/widgets/WidgetSkeleton.d.ts +0 -5
  120. package/dist/widgets/WidgetSkeleton.js +0 -29
  121. package/dist/widgets/WidgetSkeleton.js.map +0 -1
  122. package/dist/widgets/WidgetSwap.js.map +0 -1
  123. package/dist/widgets/WidgetWithdraw.js.map +0 -1
  124. package/src/widgets/WidgetSkeleton.tsx +0 -36
package/README.md CHANGED
@@ -4,7 +4,40 @@ Swap Widget frontend that uses [1Click API](https://docs.near-intents.org/near-i
4
4
 
5
5
  ![Swap Widget Screenshot](./docs/screenshot.png)
6
6
 
7
- ## Package structure
7
+ ## Usage
8
+
9
+ ### Widgets
10
+
11
+ This package exports a number of pre-built widget components, `WidgetSwap`,
12
+ `WidgetDeposit` and `WidgetWithdraw`.
13
+
14
+ See the `/demo` folder for some examples of how to use these widgets.
15
+
16
+ #### Making a transfer
17
+
18
+ To each of these components we should pass in a `makeTransfer` function. When
19
+ the user clicks the relevant submit button this function is called with an
20
+ `args` object that has the following shape:
21
+
22
+ ```ts
23
+ type MakeTransferArgs = {
24
+ amount: string;
25
+ address: string;
26
+ tokenAddress?: string;
27
+ chain: Chains;
28
+ evmChainId: number | null;
29
+ };
30
+ ```
31
+
32
+ It is the responsibility of the consuming application to handle this transfer.
33
+
34
+ ## Custom implementation
35
+
36
+ If your use cases cannot be met using the pre-built widgets described above you
37
+ have the option to roll your own, using the components and hooks exposed by this
38
+ package.
39
+
40
+ For this purpose, the package structure is as follows:
8
41
 
9
42
  ### Components
10
43
 
@@ -42,6 +75,20 @@ _Types_ submodule exports domain types such as `Token`, `Chain`, `Quote` etc.
42
75
 
43
76
  _Ext_ submodule contains various extensions that can be used with the widget but are completely optional. For example, it includes an Alchemy API integration that allows you to easily get token balances. Essentially, these are pre-written pieces of custom code.
44
77
 
78
+ ## Styling
79
+
80
+ If you are importing one of our pre-built widget components (e.g. `WidgetSwap`)
81
+ then you don't need to do anything to apply the widget styles.
82
+
83
+ If you are rolling your own using our components you will need to add the `sw`
84
+ class to some wrapping element, for example:
85
+
86
+ ```tsx
87
+ <div className="sw">
88
+ {/* Your custom widget */}
89
+ </div>
90
+ ```
91
+
45
92
  ## Theming
46
93
 
47
94
  This package uses Tailwind, but your app doesn't have to. It exposes CSS variables to control styling. Each variable and its corresponding Tailwind token uses the `sw-` prefix to avoid conflicts with your app's theme and variables.
@@ -68,7 +115,7 @@ variable you can find in `src/theme.css`):
68
115
  }
69
116
  ```
70
117
 
71
- ## Change copy
118
+ ## Localisation
72
119
 
73
120
  To change copy within the widget you can pass a `localisation` object to the
74
121
  `WidgetConfigProvider`, for example:
@@ -0,0 +1,3 @@
1
+ export declare const SkeletonBox: ({ className }: {
2
+ className: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { cn as r } from "../utils/cn.js";
3
+ const t = ({ className: o }) => /* @__PURE__ */ e(
4
+ "div",
5
+ {
6
+ className: r("animate-pulse rounded-sw-lg bg-sw-gray-800", o)
7
+ }
8
+ );
9
+ export {
10
+ t as SkeletonBox
11
+ };
12
+ //# sourceMappingURL=SkeletonBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkeletonBox.js","sources":["../../src/components/SkeletonBox.tsx"],"sourcesContent":["import { cn } from '@/utils/cn';\n\nexport const SkeletonBox = ({ className }: { className: string }) => (\n <div\n className={cn('animate-pulse rounded-sw-lg bg-sw-gray-800', className)}\n />\n);\n"],"names":["SkeletonBox","className","jsx","cn"],"mappings":";;AAEO,MAAMA,IAAc,CAAC,EAAE,WAAAC,EAAA,MAC5B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,8CAA8CF,CAAS;AAAA,EAAA;AACvE;"}
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare const WidgetContainer: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ const s = ({ children: e }) => /* @__PURE__ */ t("div", { className: "sw w-full h-full flex justify-center items-center", children: e });
3
+ export {
4
+ s as WidgetContainer
5
+ };
6
+ //# sourceMappingURL=WidgetContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetContainer.js","sources":["../../src/components/WidgetContainer.tsx"],"sourcesContent":["import { PropsWithChildren } from 'react';\n\nexport const WidgetContainer = ({ children }: PropsWithChildren) => {\n return (\n <div className=\"sw w-full h-full flex justify-center items-center\">\n {children}\n </div>\n );\n};\n"],"names":["WidgetContainer","children","jsx"],"mappings":";AAEO,MAAMA,IAAkB,CAAC,EAAE,UAAAC,QAE9B,gBAAAC,EAAC,OAAA,EAAI,WAAU,qDACZ,UAAAD,EAAA,CACH;"}
@@ -3,12 +3,12 @@ import Te from "i18next";
3
3
  import { deepClone as M } from "valtio/utils";
4
4
  import { useSnapshot as P, snapshot as $, proxy as ne } from "valtio";
5
5
  import { useMemo as D, useEffect as h, useRef as O, createContext as Ie, useContext as ke } from "react";
6
- import { useQuery as se, useInfiniteQuery as ge, useQueryClient as Ae, QueryClient as he, QueryClientProvider as we } from "@tanstack/react-query";
7
- import { I18nextProvider as ye } from "react-i18next";
6
+ import { useQuery as se, useInfiniteQuery as ge, useQueryClient as Ae, QueryClient as he, QueryClientProvider as ye } from "@tanstack/react-query";
7
+ import { I18nextProvider as we } from "react-i18next";
8
8
  import { CHAINS_LIST as Se, DEFAULT_CHAIN_ICON as _e, DRY_QUOTE_ADDRESSES as J, CHAIN_POA_MAP as be, CHAIN_BASE_TOKENS as Ee, EVM_CHAINS as ve } from "./constants/chains.js";
9
9
  import { ErrorBoundary as Ne } from "react-error-boundary";
10
10
  import { derive as De } from "derive-valtio";
11
- import { machine as L, moveTo as y } from "./machine/machine.js";
11
+ import { machine as L, moveTo as w } from "./machine/machine.js";
12
12
  import { guardStates as S } from "./machine/guards/index.js";
13
13
  import { getUsdTradeDelta as Ce } from "./machine/computed/getUsdTradeDelta.js";
14
14
  import { getIsDirectTransfer as qe } from "./machine/computed/getIsDirectTransfer.js";
@@ -42,7 +42,7 @@ import { depositTypeSet as Je } from "./machine/events/depositTypeSet.js";
42
42
  import { walletAddressSet as Ye } from "./machine/events/walletAddressSet.js";
43
43
  import { tokenSetBalance as et } from "./machine/events/tokenSetBalance.js";
44
44
  import { transferSetStatus as tt } from "./machine/events/transferSetStatus.js";
45
- import { OneClickService as nt, QuoteRequest as w } from "@defuse-protocol/one-click-sdk-typescript";
45
+ import { OneClickService as nt, QuoteRequest as y } from "@defuse-protocol/one-click-sdk-typescript";
46
46
  import { TOKENS_DATA as K, NATIVE_NEAR_DUMB_ASSET_ID as x, WNEAR_ASSET_ID as V } from "./constants/tokens.js";
47
47
  import { isValidChain as st } from "./utils/checkers/isValidChain.js";
48
48
  import { useWalletBalance as ce } from "./hooks/useWalletBalance.js";
@@ -82,9 +82,9 @@ const N = L.getStore(), pt = De({
82
82
  const t = !e.walletAddress, s = !t && e.targetToken?.isIntent === !0, n = !t && e.targetToken?.isIntent === !1;
83
83
  if (t) {
84
84
  const o = oe(e);
85
- return y(o ? "input_valid_dry" : "initial_dry");
85
+ return w(o ? "input_valid_dry" : "initial_dry");
86
86
  }
87
- n && re(e) ? y("input_valid_external") : s && ae(e) ? y("input_valid_internal") : y("initial_wallet");
87
+ n && re(e) ? w("input_valid_external") : s && ae(e) ? w("input_valid_internal") : w("initial_wallet");
88
88
  }, It = (e, t) => {
89
89
  const { config: s } = $(z);
90
90
  return e.targetToken && !e.sendAddress && !!e.walletAddress && !e.targetToken.isIntent && !t.find((n) => n?.key === "sendAddress") && s.walletSupportedChains.includes(e.targetToken.blockchain);
@@ -94,14 +94,14 @@ const N = L.getStore(), pt = De({
94
94
  if (e && _.debug("[WIDGET] Context changed", n), e && t.error && Pe(n) && _.debug(`[WIDGET] Error set to ${t.error.code}`), We(n) || $e(t, n, e))
95
95
  return;
96
96
  if (Me(t, n)) {
97
- d("reset", null), y("initial_dry");
97
+ d("reset", null), w("initial_dry");
98
98
  return;
99
99
  }
100
100
  const { isChanged: o, isDry: r } = Qe(t, n);
101
101
  if (o) {
102
102
  if (Re(t)) {
103
103
  const u = r ? "initial_dry" : "initial_wallet";
104
- y(u, {
104
+ w(u, {
105
105
  onMoved: () => {
106
106
  e && _.debug(
107
107
  `[WIDGET] Inputs changed. State moved to ${u}`
@@ -146,10 +146,10 @@ const N = L.getStore(), pt = De({
146
146
  L.on(e, (s, n) => t(s, n));
147
147
  }, ht = () => {
148
148
  g("quoteSetStatus", Ze), g("walletAddressSet", Ye), g("transferSetStatus", tt), g("tokenSelectRotate", F), g("tokenSetBalance", et), g("tokenSetAmount", Xe), g("depositTypeSet", Je), g("tokenSelect", At), g("addressSet", ze), g("errorSet", He), g("quoteSet", je), g("reset", Ke), g("validateDryInputs", oe), g("validateExternalInputs", re), g("validateInternalInputs", ae);
149
- }, wt = (e) => {
149
+ }, yt = (e) => {
150
150
  const t = e.symbol.toLowerCase();
151
151
  return K[t]?.icon ?? "";
152
- }, Y = (e) => Se[e].icon ?? _e, yt = (e) => `${e.blockchain?.charAt(0).toUpperCase()}${e.blockchain?.slice(1)}`, St = (e) => K[e.symbol]?.name ?? e.symbol, W = (e) => {
152
+ }, Y = (e) => Se[e].icon ?? _e, wt = (e) => `${e.blockchain?.charAt(0).toUpperCase()}${e.blockchain?.slice(1)}`, St = (e) => K[e.symbol]?.name ?? e.symbol, W = (e) => {
153
153
  const {
154
154
  showIntentTokens: t,
155
155
  allowedTokensList: s,
@@ -168,10 +168,10 @@ const N = L.getStore(), pt = De({
168
168
  ...a,
169
169
  blockchain: T,
170
170
  isIntent: !1,
171
- icon: wt(a),
171
+ icon: yt(a),
172
172
  name: St(a),
173
173
  chainIcon: Y(T),
174
- chainName: yt(a),
174
+ chainName: wt(a),
175
175
  contractAddress: a.contractAddress
176
176
  };
177
177
  }).filter((a) => !!a).filter(r ?? (() => !0)), m = c.filter(
@@ -362,7 +362,7 @@ const N = L.getStore(), pt = De({
362
362
  h(() => {
363
363
  if (!e)
364
364
  return;
365
- d("walletAddressSet", t ?? void 0), S(s, ["initial_dry", "initial_wallet"]) && (n === "initial_wallet" && !t ? y("initial_dry") : n === "initial_dry" && t && y("initial_wallet"));
365
+ d("walletAddressSet", t ?? void 0), S(s, ["initial_dry", "initial_wallet"]) && (n === "initial_wallet" && !t ? w("initial_dry") : n === "initial_dry" && t && w("initial_wallet"));
366
366
  }, [e, t, s, n]);
367
367
  }, Dt = () => {
368
368
  const { ctx: e } = b(), { intentsAccountType: t, oneClickApiQuoteProxyUrl: s, appName: n } = v(), o = !e.walletAddress, r = H({
@@ -404,7 +404,7 @@ const N = L.getStore(), pt = De({
404
404
  // 1%
405
405
  deadline: new Date(Date.now() + 3600 * 1e3).toISOString(),
406
406
  // 1 hour
407
- swapType: T === "exact_out" ? w.swapType.EXACT_OUTPUT : w.swapType.EXACT_INPUT,
407
+ swapType: T === "exact_out" ? y.swapType.EXACT_OUTPUT : y.swapType.EXACT_INPUT,
408
408
  // Target
409
409
  destinationAsset: e.targetToken.assetId === x ? V : e.targetToken.assetId,
410
410
  // Source
@@ -416,19 +416,19 @@ const N = L.getStore(), pt = De({
416
416
  e.sourceToken.isIntent && e.targetToken.isIntent && (u.current = c({
417
417
  ...k,
418
418
  recipient: r,
419
- recipientType: w.recipientType.INTENTS,
420
- depositType: w.depositType.INTENTS,
419
+ recipientType: y.recipientType.INTENTS,
420
+ depositType: y.depositType.INTENTS,
421
421
  // Refund
422
422
  refundTo: r,
423
- refundType: w.refundType.INTENTS
423
+ refundType: y.refundType.INTENTS
424
424
  }), I = (await u.current).data), u.current = c({
425
425
  ...k,
426
426
  recipient: !e.targetToken.isIntent && e.sendAddress ? e.sendAddress : r,
427
- recipientType: e.targetToken.isIntent ? w.recipientType.INTENTS : w.recipientType.DESTINATION_CHAIN,
428
- depositType: e.sourceToken.isIntent ? w.depositType.INTENTS : w.depositType.ORIGIN_CHAIN,
427
+ recipientType: e.targetToken.isIntent ? y.recipientType.INTENTS : y.recipientType.DESTINATION_CHAIN,
428
+ depositType: e.sourceToken.isIntent ? y.depositType.INTENTS : y.depositType.ORIGIN_CHAIN,
429
429
  // Refund
430
430
  refundTo: e.sourceToken.isIntent ? r : m,
431
- refundType: e.sourceToken.isIntent ? w.refundType.INTENTS : w.refundType.ORIGIN_CHAIN
431
+ refundType: e.sourceToken.isIntent ? y.refundType.INTENTS : y.refundType.ORIGIN_CHAIN
432
432
  }), I = (await u.current).data;
433
433
  } catch (p) {
434
434
  if (p instanceof le)
@@ -620,10 +620,10 @@ const N = L.getStore(), pt = De({
620
620
  variant: "target",
621
621
  amount: f.amountOut
622
622
  }), n.state === "input_valid_dry") {
623
- y("quote_success_dry");
623
+ w("quote_success_dry");
624
624
  return;
625
625
  }
626
- n.targetToken?.isIntent ? y("quote_success_internal") : y("quote_success_external");
626
+ n.targetToken?.isIntent ? w("quote_success_internal") : w("quote_success_external");
627
627
  }
628
628
  } catch (f) {
629
629
  if (f instanceof A) {
@@ -889,7 +889,7 @@ const Yn = (e) => typeof e == "object" && e !== null && "_is_widget_error" in e
889
889
  ...t
890
890
  });
891
891
  Object.assign(n.current.config, o), Mt(o);
892
- }, [t]), Ge(s ?? {}), Ve("headlessui-portal-root", "sw"), /* @__PURE__ */ q(we, { client: Wt, children: /* @__PURE__ */ q(ye, { i18n: Te, children: /* @__PURE__ */ q(pe.Provider, { value: n.current, children: /* @__PURE__ */ q(Pt, { children: /* @__PURE__ */ q("div", { className: "sw", children: e }) }) }) }) });
892
+ }, [t]), Ge(s ?? {}), Ve("headlessui-portal-root", "sw"), /* @__PURE__ */ q(ye, { client: Wt, children: /* @__PURE__ */ q(we, { i18n: Te, children: /* @__PURE__ */ q(pe.Provider, { value: n.current, children: /* @__PURE__ */ q(Pt, { children: e }) }) }) });
893
893
  };
894
894
  export {
895
895
  Lt as A,
@@ -926,4 +926,4 @@ export {
926
926
  qt as y,
927
927
  Ot as z
928
928
  };
929
- //# sourceMappingURL=config-Dq9mlDST.js.map
929
+ //# sourceMappingURL=config-haLfG4Cu.js.map