@aurora-is-near/intents-swap-widget 3.15.3 → 3.16.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 (157) hide show
  1. package/dist/components/TokenIcon.d.ts +5 -12
  2. package/dist/components/TokenIcon.js +34 -32
  3. package/dist/components/TokenIcon.js.map +1 -1
  4. package/dist/{config-DKdwFIJc.js → config-DQMHUj5z.js} +745 -748
  5. package/dist/config-DQMHUj5z.js.map +1 -0
  6. package/dist/config.d.ts +1 -1
  7. package/dist/config.js +1 -1
  8. package/dist/constants/chains.d.ts +0 -1
  9. package/dist/constants/chains.js +44 -65
  10. package/dist/constants/chains.js.map +1 -1
  11. package/dist/constants/tokens.d.ts +1 -1
  12. package/dist/constants/tokens.js +3 -50
  13. package/dist/constants/tokens.js.map +1 -1
  14. package/dist/errors.js +1 -1
  15. package/dist/ext/alchemy/index.js +1 -1
  16. package/dist/ext/index.js +1 -1
  17. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  18. package/dist/features/BalanceRpcLoader/index.js +1 -1
  19. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  20. package/dist/features/ChainsDropdown/index.js +32 -32
  21. package/dist/features/ChainsDropdown/index.js.map +1 -1
  22. package/dist/features/DepositMethodSwitcher.js +1 -1
  23. package/dist/features/ErrorBoundary.js +1 -1
  24. package/dist/features/ExternalDeposit.js +1 -1
  25. package/dist/features/SendAddress/index.js +1 -1
  26. package/dist/features/SendAddress/useNotification.js +1 -1
  27. package/dist/features/SubmitButton/index.js +1 -1
  28. package/dist/features/SuccessScreen/index.js +1 -1
  29. package/dist/features/SwapDirectionSwitcher.js +1 -1
  30. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  31. package/dist/features/SwapQuote/index.js +1 -1
  32. package/dist/features/TokenInput/TokenInput.js +1 -1
  33. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  34. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  35. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  36. package/dist/features/TokenInput/WalletBalance.js +1 -1
  37. package/dist/features/TokenInput/hooks/index.js +1 -1
  38. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  39. package/dist/features/TokenInput/index.js +1 -1
  40. package/dist/features/TokensList/TokenItem.js +1 -1
  41. package/dist/features/TokensList/TokensList.js +1 -1
  42. package/dist/features/TokensList/index.js +1 -1
  43. package/dist/features/TokensModal.js +1 -1
  44. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  45. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  46. package/dist/features/index.js +1 -1
  47. package/dist/hooks/index.js +1 -1
  48. package/dist/hooks/useAllTokens.js +1 -1
  49. package/dist/hooks/useChains.js +1 -1
  50. package/dist/hooks/useCompatibilityCheck.js +1 -1
  51. package/dist/hooks/useDefaultToken.js +1 -1
  52. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  53. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  54. package/dist/hooks/useIntentsBalance.js +1 -1
  55. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  56. package/dist/hooks/useMakeDepositAddress.js +1 -1
  57. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  58. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  59. package/dist/hooks/useMakeQuote.js +1 -1
  60. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  61. package/dist/hooks/useMakeTransfer.js +1 -1
  62. package/dist/hooks/useMergedBalance.js +1 -1
  63. package/dist/hooks/useSwitchChain.js +1 -1
  64. package/dist/hooks/useTheme.js +1 -1
  65. package/dist/hooks/useTokenInputPair.js +1 -1
  66. package/dist/hooks/useTokens.js +2 -2
  67. package/dist/hooks/useTokensFiltered.js +1 -1
  68. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  69. package/dist/icons/index.d.ts +4 -0
  70. package/dist/icons/index.js +392 -0
  71. package/dist/icons/index.js.map +1 -0
  72. package/dist/index.js +1 -1
  73. package/dist/machine/effects/index.js +1 -1
  74. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  75. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  76. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  77. package/dist/machine/effects/useSelectedTokensEffect.d.ts +0 -2
  78. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  79. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  80. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  81. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  82. package/dist/machine/events/index.js +1 -1
  83. package/dist/machine/events/tokenSelect.js +1 -1
  84. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  85. package/dist/machine/events/validateInputs.js +1 -1
  86. package/dist/machine/index.js +1 -1
  87. package/dist/machine/snap.d.ts +0 -18
  88. package/dist/machine/snap.js +1 -1
  89. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  90. package/dist/machine/subscriptions/index.js +1 -1
  91. package/dist/theme/ThemeProvider.js +1 -1
  92. package/dist/types/chain.d.ts +0 -1
  93. package/dist/types/config.d.ts +1 -1
  94. package/dist/types/token.d.ts +0 -1
  95. package/dist/utils/intents/signers/near.js +1 -1
  96. package/dist/utils/intents/signers/privy.js +1 -1
  97. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  98. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  99. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  100. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  101. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  102. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  103. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  104. package/package.json +1 -1
  105. package/src/components/TokenIcon.tsx +35 -38
  106. package/src/config.tsx +0 -2
  107. package/src/constants/chains.ts +0 -23
  108. package/src/constants/tokens.ts +1 -48
  109. package/src/features/ChainsDropdown/index.tsx +5 -5
  110. package/src/features/TokenInput/TokenInput.tsx +1 -1
  111. package/src/features/TokensList/TokenItem.tsx +1 -1
  112. package/src/hooks/useTokens.ts +1 -8
  113. package/src/icons/abg.svg +11 -0
  114. package/src/icons/arb.svg +22 -0
  115. package/src/icons/aster.svg +1 -0
  116. package/src/icons/aurora.svg +14 -0
  117. package/src/icons/avax.svg +12 -0
  118. package/src/icons/base.svg +11 -0
  119. package/src/icons/bera.svg +20 -0
  120. package/src/icons/bsc.svg +14 -0
  121. package/src/icons/btc.svg +11 -0
  122. package/src/icons/cardano.svg +40 -0
  123. package/src/icons/doge.svg +15 -0
  124. package/src/icons/eth.svg +16 -0
  125. package/src/icons/frax.svg +26 -0
  126. package/src/icons/gnear.svg +1 -0
  127. package/src/icons/gnosis.svg +16 -0
  128. package/src/icons/index.tsx +111 -0
  129. package/src/icons/itlx.svg +12 -0
  130. package/src/icons/jambo.svg +10 -0
  131. package/src/icons/knc.svg +1 -0
  132. package/src/icons/loud.svg +7 -0
  133. package/src/icons/ltc.svg +1 -0
  134. package/src/icons/mon.svg +1 -0
  135. package/src/icons/mpdao.svg +1 -0
  136. package/src/icons/near.svg +16 -0
  137. package/src/icons/noear.svg +10 -0
  138. package/src/icons/op.svg +12 -0
  139. package/src/icons/pol.svg +11 -0
  140. package/src/icons/public.svg +1 -0
  141. package/src/icons/purge.svg +10 -0
  142. package/src/icons/rhea.svg +10 -0
  143. package/src/icons/sol.svg +21 -0
  144. package/src/icons/sui.svg +16 -0
  145. package/src/icons/ton.svg +11 -0
  146. package/src/icons/tron.svg +11 -0
  147. package/src/icons/unknown.svg +4 -0
  148. package/src/icons/usd1.svg +10 -0
  149. package/src/icons/usdf.svg +10 -0
  150. package/src/icons/wif.svg +10 -0
  151. package/src/icons/xdai.svg +22 -0
  152. package/src/icons/xrp.svg +17 -0
  153. package/src/icons/zec.svg +16 -0
  154. package/src/types/chain.ts +0 -1
  155. package/src/types/config.ts +1 -1
  156. package/src/types/token.ts +0 -1
  157. package/dist/config-DKdwFIJc.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as l, e as S, d as k, u as T, f as g, g as h, h as B, j as C, i as E, k as M, a as I, c as W, l as w, n as D, m as A, b as v } from "./config-DKdwFIJc.js";
1
+ import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as l, e as S, d as k, u as T, f as g, g as h, h as B, j as C, i as E, k as M, a as I, c as W, l as w, n as D, m as A, b as v } from "./config-DQMHUj5z.js";
2
2
  import { DEFAULT_RPCS as b } from "./rpcs.js";
3
3
  import { Accordion as L } from "./components/Accordion.js";
4
4
  import { Badge as R } from "./components/Badge.js";
@@ -1,6 +1,6 @@
1
1
  import "lodash.once";
2
2
  import "react";
3
- import { r as i, c as m } from "../../config-DKdwFIJc.js";
3
+ import { r as i, c as m } from "../../config-DQMHUj5z.js";
4
4
  import "../../logger.js";
5
5
  export {
6
6
  i as registerStoreEvents,
@@ -1,4 +1,4 @@
1
- import { U as c } from "../../config-DKdwFIJc.js";
1
+ import { U as c } from "../../config-DQMHUj5z.js";
2
2
  export {
3
3
  c as useAlchemyBalanceEffect
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
- import { F as a } from "../../config-DKdwFIJc.js";
3
+ import { F as a } from "../../config-DQMHUj5z.js";
4
4
  import "../guards/index.js";
5
5
  import "../machine.js";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "../../logger.js";
3
3
  import "../guards/checks/isDryQuote.js";
4
- import { P as a } from "../../config-DKdwFIJc.js";
4
+ import { P as a } from "../../config-DQMHUj5z.js";
5
5
  import "../guards/index.js";
6
6
  import "../machine.js";
7
7
  import "../events/utils/fireEvent.js";
@@ -16,7 +16,6 @@ export declare const useSelectedTokensEffect: ({ isEnabled, skipIntents, target,
16
16
  readonly isIntent: boolean;
17
17
  readonly chainName: string;
18
18
  readonly name: string;
19
- readonly chainIcon: string;
20
19
  } | undefined;
21
20
  target: {
22
21
  readonly symbol: string;
@@ -29,6 +28,5 @@ export declare const useSelectedTokensEffect: ({ isEnabled, skipIntents, target,
29
28
  readonly isIntent: boolean;
30
29
  readonly chainName: string;
31
30
  readonly name: string;
32
- readonly chainIcon: string;
33
31
  } | undefined;
34
32
  };
@@ -2,7 +2,7 @@ import "react";
2
2
  import "../../utils/solana/isSolanaAddress.js";
3
3
  import "../../utils/evm/isEvmAddress.js";
4
4
  import "../../utils/near/isNearAddress.js";
5
- import { R as l } from "../../config-DKdwFIJc.js";
5
+ import { R as l } from "../../config-DQMHUj5z.js";
6
6
  import "../../utils/tokens/getMainTokenByChain.js";
7
7
  import "../../utils/tokens/getDefaultIntentsToken.js";
8
8
  import "../../utils/tokens/getTokenWithHighBalance.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { G as a } from "../../config-DKdwFIJc.js";
2
+ import { G as a } from "../../config-DQMHUj5z.js";
3
3
  import "../../utils/intents/getTokenBalanceKey.js";
4
4
  import "ethers";
5
5
  import "../machine.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { H as i } from "../../config-DKdwFIJc.js";
2
+ import { H as i } from "../../config-DQMHUj5z.js";
3
3
  import "ethers";
4
4
  import "../machine.js";
5
5
  import "../events/utils/fireEvent.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../../hooks/useWalletAddressForToken.js";
3
- import { I as f } from "../../config-DKdwFIJc.js";
3
+ import { I as f } from "../../config-DQMHUj5z.js";
4
4
  import "../guards/index.js";
5
5
  import "../machine.js";
6
6
  import "../events/utils/fireEvent.js";
@@ -3,7 +3,7 @@ import "./tokenSelectRotate.js";
3
3
  import "./errorSet.js";
4
4
  import "./quoteSet.js";
5
5
  import "./addressSet.js";
6
- import { _ as b } from "../../config-DKdwFIJc.js";
6
+ import { _ as b } from "../../config-DQMHUj5z.js";
7
7
  import "./tokenSetAmount.js";
8
8
  import "./quoteSetStatus.js";
9
9
  import "./depositTypeSet.js";
@@ -1,6 +1,6 @@
1
1
  import "valtio";
2
2
  import "./tokenSelectRotate.js";
3
- import { Z as p } from "../../config-DKdwFIJc.js";
3
+ import { Z as p } from "../../config-DQMHUj5z.js";
4
4
  import "../../utils/notReachable.js";
5
5
  export {
6
6
  p as tokenSelect
@@ -1,4 +1,4 @@
1
- import { O as m } from "../../config-DKdwFIJc.js";
1
+ import { O as m } from "../../config-DQMHUj5z.js";
2
2
  import "ethers";
3
3
  import "../machine.js";
4
4
  import "../guards/checks/isDryQuote.js";
@@ -3,7 +3,7 @@ import "../../utils/near/checkNearAccountExists.js";
3
3
  import "../../utils/checkers/isNotEmptyAmount.js";
4
4
  import "../../utils/checkers/isValidBigint.js";
5
5
  import "../../utils/near/isNearAddress.js";
6
- import { K as I, L as d, N as u } from "../../config-DKdwFIJc.js";
6
+ import { K as I, L as d, N as u } from "../../config-DQMHUj5z.js";
7
7
  import "../guards/index.js";
8
8
  import "../machine.js";
9
9
  import "../guards/checks/isBalanceSufficient.js";
@@ -1,4 +1,4 @@
1
- import { r as o, u as t, a as r, c as a, b as f } from "../config-DKdwFIJc.js";
1
+ import { r as o, u as t, a as r, c as a, b as f } from "../config-DQMHUj5z.js";
2
2
  import { guardStates as S } from "./guards/index.js";
3
3
  import { machine as n, moveTo as u } from "./machine.js";
4
4
  import { fireEvent as i } from "./events/utils/fireEvent.js";
@@ -26,7 +26,6 @@ export declare const useUnsafeSnapshot: () => {
26
26
  readonly isIntent: boolean;
27
27
  readonly chainName: string;
28
28
  readonly name: string;
29
- readonly chainIcon: string;
30
29
  } | undefined;
31
30
  readonly sourceTokenAmount: string;
32
31
  readonly sourceTokenBalance?: never | undefined;
@@ -41,7 +40,6 @@ export declare const useUnsafeSnapshot: () => {
41
40
  readonly isIntent: boolean;
42
41
  readonly chainName: string;
43
42
  readonly name: string;
44
- readonly chainIcon: string;
45
43
  } | undefined;
46
44
  readonly targetTokenAmount: string;
47
45
  readonly sendAddress?: string | undefined;
@@ -76,7 +74,6 @@ export declare const useUnsafeSnapshot: () => {
76
74
  readonly isIntent: boolean;
77
75
  readonly chainName: string;
78
76
  readonly name: string;
79
- readonly chainIcon: string;
80
77
  } | undefined;
81
78
  readonly sourceTokenAmount: string;
82
79
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -91,7 +88,6 @@ export declare const useUnsafeSnapshot: () => {
91
88
  readonly isIntent: boolean;
92
89
  readonly chainName: string;
93
90
  readonly name: string;
94
- readonly chainIcon: string;
95
91
  } | undefined;
96
92
  readonly targetTokenAmount: string;
97
93
  readonly walletAddress: string;
@@ -154,7 +150,6 @@ export declare const useUnsafeSnapshot: () => {
154
150
  readonly isIntent: boolean;
155
151
  readonly chainName: string;
156
152
  readonly name: string;
157
- readonly chainIcon: string;
158
153
  };
159
154
  readonly sourceTokenAmount: string;
160
155
  readonly sourceTokenBalance?: never | undefined;
@@ -169,7 +164,6 @@ export declare const useUnsafeSnapshot: () => {
169
164
  readonly isIntent: boolean;
170
165
  readonly chainName: string;
171
166
  readonly name: string;
172
- readonly chainIcon: string;
173
167
  };
174
168
  readonly targetTokenAmount: string;
175
169
  readonly sendAddress?: string | undefined;
@@ -224,7 +218,6 @@ export declare const useUnsafeSnapshot: () => {
224
218
  readonly isIntent: boolean;
225
219
  readonly chainName: string;
226
220
  readonly name: string;
227
- readonly chainIcon: string;
228
221
  };
229
222
  readonly sourceTokenAmount: string;
230
223
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -239,7 +232,6 @@ export declare const useUnsafeSnapshot: () => {
239
232
  readonly isIntent: boolean;
240
233
  readonly chainName: string;
241
234
  readonly name: string;
242
- readonly chainIcon: string;
243
235
  };
244
236
  readonly targetTokenAmount: string;
245
237
  readonly sendAddress?: never | undefined;
@@ -296,7 +288,6 @@ export declare const useUnsafeSnapshot: () => {
296
288
  readonly isIntent: boolean;
297
289
  readonly chainName: string;
298
290
  readonly name: string;
299
- readonly chainIcon: string;
300
291
  };
301
292
  readonly sourceTokenAmount: string;
302
293
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -311,7 +302,6 @@ export declare const useUnsafeSnapshot: () => {
311
302
  readonly isIntent: boolean;
312
303
  readonly chainName: string;
313
304
  readonly name: string;
314
- readonly chainIcon: string;
315
305
  };
316
306
  readonly targetTokenAmount: string;
317
307
  readonly sendAddress: string;
@@ -368,7 +358,6 @@ export declare const useUnsafeSnapshot: () => {
368
358
  readonly isIntent: boolean;
369
359
  readonly chainName: string;
370
360
  readonly name: string;
371
- readonly chainIcon: string;
372
361
  };
373
362
  readonly sourceTokenAmount: string;
374
363
  readonly sourceTokenBalance?: never | undefined;
@@ -383,7 +372,6 @@ export declare const useUnsafeSnapshot: () => {
383
372
  readonly isIntent: boolean;
384
373
  readonly chainName: string;
385
374
  readonly name: string;
386
- readonly chainIcon: string;
387
375
  };
388
376
  readonly targetTokenAmount: string;
389
377
  readonly sendAddress?: never | undefined;
@@ -454,7 +442,6 @@ export declare const useUnsafeSnapshot: () => {
454
442
  readonly isIntent: boolean;
455
443
  readonly chainName: string;
456
444
  readonly name: string;
457
- readonly chainIcon: string;
458
445
  };
459
446
  readonly sourceTokenAmount: string;
460
447
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -469,7 +456,6 @@ export declare const useUnsafeSnapshot: () => {
469
456
  readonly isIntent: boolean;
470
457
  readonly chainName: string;
471
458
  readonly name: string;
472
- readonly chainIcon: string;
473
459
  };
474
460
  readonly targetTokenAmount: string;
475
461
  readonly sendAddress?: never | undefined;
@@ -544,7 +530,6 @@ export declare const useUnsafeSnapshot: () => {
544
530
  readonly isIntent: boolean;
545
531
  readonly chainName: string;
546
532
  readonly name: string;
547
- readonly chainIcon: string;
548
533
  };
549
534
  readonly sourceTokenAmount: string;
550
535
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -559,7 +544,6 @@ export declare const useUnsafeSnapshot: () => {
559
544
  readonly isIntent: boolean;
560
545
  readonly chainName: string;
561
546
  readonly name: string;
562
- readonly chainIcon: string;
563
547
  };
564
548
  readonly targetTokenAmount: string;
565
549
  readonly sendAddress: string;
@@ -634,7 +618,6 @@ export declare const useUnsafeSnapshot: () => {
634
618
  readonly isIntent: boolean;
635
619
  readonly chainName: string;
636
620
  readonly name: string;
637
- readonly chainIcon: string;
638
621
  };
639
622
  readonly sourceTokenAmount: string;
640
623
  readonly sourceTokenBalance: import('..').TokenBalance;
@@ -649,7 +632,6 @@ export declare const useUnsafeSnapshot: () => {
649
632
  readonly isIntent: boolean;
650
633
  readonly chainName: string;
651
634
  readonly name: string;
652
- readonly chainIcon: string;
653
635
  };
654
636
  readonly targetTokenAmount: string;
655
637
  readonly walletAddress: string;
@@ -2,7 +2,7 @@ import "valtio";
2
2
  import "derive-valtio";
3
3
  import "./computed/getIsNativeNearDeposit.js";
4
4
  import "./computed/getIsDirectTokenOnNearDeposit.js";
5
- import { u as h, a as b, b as d } from "../config-DKdwFIJc.js";
5
+ import { u as h, a as b, b as d } from "../config-DQMHUj5z.js";
6
6
  import "./machine.js";
7
7
  import "./guards/index.js";
8
8
  import "./computed/getUsdTradeDelta.js";
@@ -1,5 +1,5 @@
1
1
  import "valtio";
2
- import { V as o } from "../../../config-DKdwFIJc.js";
2
+ import { V as o } from "../../../config-DQMHUj5z.js";
3
3
  export {
4
4
  o as isSendAddressAsConnected
5
5
  };
@@ -5,7 +5,7 @@ import "./checkers/isOnlyErrorChanged.js";
5
5
  import "./checkers/isValidInitialState.js";
6
6
  import "./checkers/isWalletDisconnected.js";
7
7
  import "./checkers/isSendAddressForbidden.js";
8
- import { X as g, Y as u } from "../../config-DKdwFIJc.js";
8
+ import { X as g, Y as u } from "../../config-DQMHUj5z.js";
9
9
  import "./checkers/isAmountChangedFromQuote.js";
10
10
  import "ethers";
11
11
  import "../machine.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "browser-or-node";
3
3
  import "react";
4
4
  import "./createColorPalette.js";
5
- import { C as p, ae as a } from "../config-DKdwFIJc.js";
5
+ import { C as p, ae as a } from "../config-DQMHUj5z.js";
6
6
  export {
7
7
  p as ThemeContext,
8
8
  a as ThemeProvider
@@ -3,7 +3,6 @@ export type Chains = (typeof CHAINS)[number];
3
3
  export type EvmChains = (typeof EVM_CHAINS)[number];
4
4
  export type Chain = {
5
5
  id: Chains;
6
- icon: string;
7
6
  label: string;
8
7
  };
9
8
  export type ChainsFilter = {
@@ -6,7 +6,7 @@ export type WalletAddresses = Partial<Record<Chains | 'default', string | null>>
6
6
  export type IntentsAccountType = 'evm' | 'near' | 'sol';
7
7
  export type WidgetConfig = {
8
8
  appName: string;
9
- appIcon: string;
9
+ appIcon?: string;
10
10
  intentsAccountType?: IntentsAccountType;
11
11
  walletSupportedChains: ReadonlyArray<Chains>;
12
12
  connectedWallets: WalletAddresses;
@@ -13,7 +13,6 @@ export type Token = Omit<SimpleToken, 'icon'> & {
13
13
  isIntent: boolean;
14
14
  chainName: string;
15
15
  name: string;
16
- chainIcon: string;
17
16
  };
18
17
  export type TokenBalance = string | 0 | undefined;
19
18
  export type TokenBalances = Record<string, TokenBalance>;
@@ -1,6 +1,6 @@
1
1
  import "../../../index-DEq3oXQF.js";
2
2
  import "@defuse-protocol/bridge-sdk";
3
- import { a2 as o } from "../../../config-DKdwFIJc.js";
3
+ import { a2 as o } from "../../../config-DQMHUj5z.js";
4
4
  export {
5
5
  o as createNearWalletSigner
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import "@defuse-protocol/internal-utils";
2
- import { a1 as i } from "../../../config-DKdwFIJc.js";
2
+ import { a1 as i } from "../../../config-DQMHUj5z.js";
3
3
  export {
4
4
  i as IntentSignerPrivy
5
5
  };
@@ -2,7 +2,7 @@ import "../../index-DEq3oXQF.js";
2
2
  import "zod";
3
3
  import "./decodeQueryResult.js";
4
4
  import "./rpc.js";
5
- import { $ as m } from "../../config-DKdwFIJc.js";
5
+ import { $ as m } from "../../config-DQMHUj5z.js";
6
6
  export {
7
7
  m as getNearNep141StorageBalance
8
8
  };
@@ -3,7 +3,7 @@ import { useState as y, useEffect as l, useCallback as B } from "react";
3
3
  import { useTokenModal as R } from "../../hooks/useTokenModal.js";
4
4
  import { useTypedTranslation as A } from "../../localisation.js";
5
5
  import { WidgetDepositSkeleton as b } from "./WidgetDepositSkeleton.js";
6
- import { b as F, u as q, y as j, n as N, c as O, p as Q, o as U, S as K } from "../../config-DKdwFIJc.js";
6
+ import { b as F, u as q, y as j, n as N, c as O, p as Q, o as U, S as K } from "../../config-DQMHUj5z.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import a from "clsx";
3
3
  import { SkeletonBox as s } from "../../components/SkeletonBox.js";
4
- import { y as i } from "../../config-DKdwFIJc.js";
4
+ import { y as i } from "../../config-DQMHUj5z.js";
5
5
  const p = () => {
6
6
  const { hideTokenInputHeadings: l } = i();
7
7
  return /* @__PURE__ */ o("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
@@ -3,7 +3,7 @@ import { useState as b, useEffect as y } from "react";
3
3
  import { useTokenModal as R } from "../../hooks/useTokenModal.js";
4
4
  import { WidgetSwapSkeleton as S } from "./WidgetSwapSkeleton.js";
5
5
  import { useTypedTranslation as D } from "../../localisation.js";
6
- import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-DKdwFIJc.js";
6
+ import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-DQMHUj5z.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  import { SkeletonBox as s } from "../../components/SkeletonBox.js";
4
- import { y as i } from "../../config-DKdwFIJc.js";
4
+ import { y as i } from "../../config-DQMHUj5z.js";
5
5
  const m = () => {
6
6
  const { hideTokenInputHeadings: e } = i();
7
7
  return /* @__PURE__ */ a("div", { className: "w-full gap-sw-lg relative flex flex-col", children: [
@@ -3,7 +3,7 @@ import { useState as w, useEffect as b } from "react";
3
3
  import { useTokenModal as B } from "../../hooks/useTokenModal.js";
4
4
  import { WidgetWithdrawSkeleton as y } from "./WidgetWithdrawSkeleton.js";
5
5
  import { useTypedTranslation as D } from "../../localisation.js";
6
- import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-DKdwFIJc.js";
6
+ import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-DQMHUj5z.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  import { SkeletonBox as l } from "../../components/SkeletonBox.js";
4
- import { y as x } from "../../config-DKdwFIJc.js";
4
+ import { y as x } from "../../config-DQMHUj5z.js";
5
5
  const p = () => {
6
6
  const { hideTokenInputHeadings: s } = x();
7
7
  return /* @__PURE__ */ a("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-is-near/intents-swap-widget",
3
- "version": "3.15.3",
3
+ "version": "3.16.0",
4
4
  "description": "Provides components and hooks to build your own Intents swap widget",
5
5
  "author": "Maksim Vashchuk",
6
6
  "license": "MIT",
@@ -1,50 +1,47 @@
1
1
  import { Icon } from './Icon';
2
2
 
3
3
  import { cn } from '@/utils';
4
+ import { TOKENS_DATA } from '@/constants/tokens';
5
+ import { ASSET_ICONS, CHAIN_ICONS, UNKNOWN_ICON } from '@/icons';
6
+ import type { Token } from '@/types/token';
4
7
 
5
8
  type TokenItemProps = {
6
- icon: string;
7
- name: string;
9
+ token: Token;
10
+ chainShowIcon: boolean;
8
11
  className?: string;
9
- } & (
10
- | {
11
- chainShowIcon: true;
12
- chainIcon: string;
13
- chainName: string;
14
- }
15
- | {
16
- chainShowIcon: false;
17
- chainIcon?: string | undefined;
18
- chainName?: string | undefined;
19
- }
20
- );
12
+ };
21
13
 
22
14
  const BORDER_RADIUS = 4;
23
15
 
24
16
  export const TokenIcon = ({
25
- icon,
26
- name,
27
- chainName,
28
- chainIcon,
17
+ token,
29
18
  chainShowIcon,
30
19
  className,
31
- }: TokenItemProps) => (
32
- <div className="relative flex items-center">
33
- <Icon icon={icon} label={name} />
34
- {chainShowIcon && (
35
- <div
36
- className={cn(
37
- 'absolute top-[19px] right-[-4px] flex h-[16px] w-[16px] items-center justify-center overflow-hidden border-2',
38
- className,
39
- )}
40
- style={{ borderRadius: BORDER_RADIUS }}>
41
- <Icon
42
- size={16}
43
- radius={BORDER_RADIUS}
44
- icon={chainIcon}
45
- label={chainName}
46
- />
47
- </div>
48
- )}
49
- </div>
50
- );
20
+ }: TokenItemProps) => {
21
+ const tokenSymbolLowerCase = token.symbol.toLowerCase();
22
+ const chainIcon = CHAIN_ICONS[token.blockchain] ?? UNKNOWN_ICON;
23
+ const tokenIcon =
24
+ ASSET_ICONS[tokenSymbolLowerCase] ??
25
+ TOKENS_DATA[tokenSymbolLowerCase]?.icon;
26
+
27
+ return (
28
+ <div className="relative flex items-center">
29
+ <Icon icon={tokenIcon} label={token.name} />
30
+ {chainShowIcon && (
31
+ <div
32
+ className={cn(
33
+ 'absolute top-[19px] right-[-4px] flex h-[16px] w-[16px] items-center justify-center overflow-hidden border-2',
34
+ className,
35
+ )}
36
+ style={{ borderRadius: BORDER_RADIUS }}>
37
+ <Icon
38
+ size={16}
39
+ radius={BORDER_RADIUS}
40
+ icon={chainIcon}
41
+ label={token.chainName}
42
+ />
43
+ </div>
44
+ )}
45
+ </div>
46
+ );
47
+ };
package/src/config.tsx CHANGED
@@ -33,8 +33,6 @@ const DISABLED_TOKENS = ['fms', 'abg', 'stjack', 'noear', 'testnebula'];
33
33
 
34
34
  const DEFAULT_CONFIG: WidgetConfig = {
35
35
  appName: 'Unknown',
36
- appIcon:
37
- 'https://wtmcxrwapthiogjpxwfr.supabase.co/storage/v1/object/public/swap-widget/unknown.svg',
38
36
 
39
37
  slippageTolerance: 100, // 1%
40
38
  intentsAccountType: 'evm',