@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.
- package/dist/components/TokenIcon.d.ts +5 -12
- package/dist/components/TokenIcon.js +34 -32
- package/dist/components/TokenIcon.js.map +1 -1
- package/dist/{config-DKdwFIJc.js → config-DQMHUj5z.js} +745 -748
- package/dist/config-DQMHUj5z.js.map +1 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/constants/chains.d.ts +0 -1
- package/dist/constants/chains.js +44 -65
- package/dist/constants/chains.js.map +1 -1
- package/dist/constants/tokens.d.ts +1 -1
- package/dist/constants/tokens.js +3 -50
- package/dist/constants/tokens.js.map +1 -1
- package/dist/errors.js +1 -1
- package/dist/ext/alchemy/index.js +1 -1
- package/dist/ext/index.js +1 -1
- package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
- package/dist/features/BalanceRpcLoader/index.js +1 -1
- package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
- package/dist/features/ChainsDropdown/index.js +32 -32
- package/dist/features/ChainsDropdown/index.js.map +1 -1
- package/dist/features/DepositMethodSwitcher.js +1 -1
- package/dist/features/ErrorBoundary.js +1 -1
- package/dist/features/ExternalDeposit.js +1 -1
- package/dist/features/SendAddress/index.js +1 -1
- package/dist/features/SendAddress/useNotification.js +1 -1
- package/dist/features/SubmitButton/index.js +1 -1
- package/dist/features/SuccessScreen/index.js +1 -1
- package/dist/features/SwapDirectionSwitcher.js +1 -1
- package/dist/features/SwapQuote/SwapQuote.js +1 -1
- package/dist/features/SwapQuote/index.js +1 -1
- package/dist/features/TokenInput/TokenInput.js +1 -1
- package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
- package/dist/features/TokenInput/TokenInputSource.js +1 -1
- package/dist/features/TokenInput/TokenInputTarget.js +1 -1
- package/dist/features/TokenInput/WalletBalance.js +1 -1
- package/dist/features/TokenInput/hooks/index.js +1 -1
- package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
- package/dist/features/TokenInput/index.js +1 -1
- package/dist/features/TokensList/TokenItem.js +1 -1
- package/dist/features/TokensList/TokensList.js +1 -1
- package/dist/features/TokensList/index.js +1 -1
- package/dist/features/TokensModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
- package/dist/features/WalletCompatibilityCheck/index.js +1 -1
- package/dist/features/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAllTokens.js +1 -1
- package/dist/hooks/useChains.js +1 -1
- package/dist/hooks/useCompatibilityCheck.js +1 -1
- package/dist/hooks/useDefaultToken.js +1 -1
- package/dist/hooks/useExternalDepositStatus/index.js +1 -1
- package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
- package/dist/hooks/useIntentsBalance.js +1 -1
- package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
- package/dist/hooks/useMakeDepositAddress.js +1 -1
- package/dist/hooks/useMakeIntentsTransfer.js +1 -1
- package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
- package/dist/hooks/useMakeQuote.js +1 -1
- package/dist/hooks/useMakeQuoteTransfer.js +1 -1
- package/dist/hooks/useMakeTransfer.js +1 -1
- package/dist/hooks/useMergedBalance.js +1 -1
- package/dist/hooks/useSwitchChain.js +1 -1
- package/dist/hooks/useTheme.js +1 -1
- package/dist/hooks/useTokenInputPair.js +1 -1
- package/dist/hooks/useTokens.js +2 -2
- package/dist/hooks/useTokensFiltered.js +1 -1
- package/dist/hooks/useTokensIntentsUnique.js +1 -1
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +392 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/machine/effects/index.js +1 -1
- package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
- package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
- package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
- package/dist/machine/effects/useSelectedTokensEffect.d.ts +0 -2
- package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
- package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
- package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
- package/dist/machine/effects/useWalletConnEffect.js +1 -1
- package/dist/machine/events/index.js +1 -1
- package/dist/machine/events/tokenSelect.js +1 -1
- package/dist/machine/events/validateInputAndMoveTo.js +1 -1
- package/dist/machine/events/validateInputs.js +1 -1
- package/dist/machine/index.js +1 -1
- package/dist/machine/snap.d.ts +0 -18
- package/dist/machine/snap.js +1 -1
- package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
- package/dist/machine/subscriptions/index.js +1 -1
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/types/chain.d.ts +0 -1
- package/dist/types/config.d.ts +1 -1
- package/dist/types/token.d.ts +0 -1
- package/dist/utils/intents/signers/near.js +1 -1
- package/dist/utils/intents/signers/privy.js +1 -1
- package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
- package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
- package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
- package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
- package/package.json +1 -1
- package/src/components/TokenIcon.tsx +35 -38
- package/src/config.tsx +0 -2
- package/src/constants/chains.ts +0 -23
- package/src/constants/tokens.ts +1 -48
- package/src/features/ChainsDropdown/index.tsx +5 -5
- package/src/features/TokenInput/TokenInput.tsx +1 -1
- package/src/features/TokensList/TokenItem.tsx +1 -1
- package/src/hooks/useTokens.ts +1 -8
- package/src/icons/abg.svg +11 -0
- package/src/icons/arb.svg +22 -0
- package/src/icons/aster.svg +1 -0
- package/src/icons/aurora.svg +14 -0
- package/src/icons/avax.svg +12 -0
- package/src/icons/base.svg +11 -0
- package/src/icons/bera.svg +20 -0
- package/src/icons/bsc.svg +14 -0
- package/src/icons/btc.svg +11 -0
- package/src/icons/cardano.svg +40 -0
- package/src/icons/doge.svg +15 -0
- package/src/icons/eth.svg +16 -0
- package/src/icons/frax.svg +26 -0
- package/src/icons/gnear.svg +1 -0
- package/src/icons/gnosis.svg +16 -0
- package/src/icons/index.tsx +111 -0
- package/src/icons/itlx.svg +12 -0
- package/src/icons/jambo.svg +10 -0
- package/src/icons/knc.svg +1 -0
- package/src/icons/loud.svg +7 -0
- package/src/icons/ltc.svg +1 -0
- package/src/icons/mon.svg +1 -0
- package/src/icons/mpdao.svg +1 -0
- package/src/icons/near.svg +16 -0
- package/src/icons/noear.svg +10 -0
- package/src/icons/op.svg +12 -0
- package/src/icons/pol.svg +11 -0
- package/src/icons/public.svg +1 -0
- package/src/icons/purge.svg +10 -0
- package/src/icons/rhea.svg +10 -0
- package/src/icons/sol.svg +21 -0
- package/src/icons/sui.svg +16 -0
- package/src/icons/ton.svg +11 -0
- package/src/icons/tron.svg +11 -0
- package/src/icons/unknown.svg +4 -0
- package/src/icons/usd1.svg +10 -0
- package/src/icons/usdf.svg +10 -0
- package/src/icons/wif.svg +10 -0
- package/src/icons/xdai.svg +22 -0
- package/src/icons/xrp.svg +17 -0
- package/src/icons/zec.svg +16 -0
- package/src/types/chain.ts +0 -1
- package/src/types/config.ts +1 -1
- package/src/types/token.ts +0 -1
- 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-
|
|
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,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-
|
|
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-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import "react";
|
|
2
2
|
import "../../hooks/useWalletAddressForToken.js";
|
|
3
|
-
import { I as f } from "../../config-
|
|
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-
|
|
6
|
+
import { _ as b } from "../../config-DQMHUj5z.js";
|
|
7
7
|
import "./tokenSetAmount.js";
|
|
8
8
|
import "./quoteSetStatus.js";
|
|
9
9
|
import "./depositTypeSet.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-
|
|
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";
|
package/dist/machine/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as o, u as t, a as r, c as a, b as f } from "../config-
|
|
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";
|
package/dist/machine/snap.d.ts
CHANGED
|
@@ -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;
|
package/dist/machine/snap.js
CHANGED
|
@@ -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-
|
|
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";
|
|
@@ -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-
|
|
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-
|
|
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
|
package/dist/types/chain.d.ts
CHANGED
package/dist/types/config.d.ts
CHANGED
|
@@ -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
|
|
9
|
+
appIcon?: string;
|
|
10
10
|
intentsAccountType?: IntentsAccountType;
|
|
11
11
|
walletSupportedChains: ReadonlyArray<Chains>;
|
|
12
12
|
connectedWallets: WalletAddresses;
|
package/dist/types/token.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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,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
|
-
|
|
7
|
-
|
|
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
|
-
|
|
26
|
-
name,
|
|
27
|
-
chainName,
|
|
28
|
-
chainIcon,
|
|
17
|
+
token,
|
|
29
18
|
chainShowIcon,
|
|
30
19
|
className,
|
|
31
|
-
}: TokenItemProps) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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',
|