@trustware/sdk-staging 1.1.13-staging.1 → 1.1.13-staging.2
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/constants.cjs +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.mjs +1 -1
- package/dist/index.cjs +522 -460
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +460 -399
- package/dist/index.mjs.map +1 -1
- package/dist/smart-account.cjs +1 -1
- package/dist/smart-account.mjs +1 -1
- package/dist/wallet.cjs +1 -1
- package/dist/wallet.mjs +1 -1
- package/dist/widget.cjs +522 -460
- package/dist/widget.cjs.map +1 -1
- package/dist/widget.mjs +462 -401
- package/dist/widget.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -572,7 +572,7 @@ var init_constants = __esm({
|
|
|
572
572
|
"src/constants.ts"() {
|
|
573
573
|
"use strict";
|
|
574
574
|
SDK_NAME = "@trustware/sdk";
|
|
575
|
-
SDK_VERSION = "1.1.13-staging.
|
|
575
|
+
SDK_VERSION = "1.1.13-staging.2";
|
|
576
576
|
API_ROOT = "https://bv-staging-api.trustware.io";
|
|
577
577
|
GTM_ID = "GTM-TZDGNCXB";
|
|
578
578
|
API_PREFIX = "/api";
|
|
@@ -9805,7 +9805,6 @@ function useGTMTracker() {
|
|
|
9805
9805
|
return { trackEvent, trackPageView, setUserProperty, directGtag };
|
|
9806
9806
|
}
|
|
9807
9807
|
function useGTM(gtmId) {
|
|
9808
|
-
const scriptRef = (0, import_react15.useRef)(null);
|
|
9809
9808
|
const tracker = useGTMTracker();
|
|
9810
9809
|
(0, import_react15.useEffect)(() => {
|
|
9811
9810
|
if (!isGA4Allowed()) {
|
|
@@ -9820,14 +9819,24 @@ function useGTM(gtmId) {
|
|
|
9820
9819
|
);
|
|
9821
9820
|
return;
|
|
9822
9821
|
}
|
|
9823
|
-
|
|
9822
|
+
containerRefCount += 1;
|
|
9823
|
+
const release = () => {
|
|
9824
|
+
containerRefCount -= 1;
|
|
9825
|
+
if (containerRefCount > 0) return;
|
|
9826
|
+
if (injectedScript) {
|
|
9827
|
+
injectedScript.parentNode?.removeChild(injectedScript);
|
|
9828
|
+
injectedScript = null;
|
|
9829
|
+
}
|
|
9830
|
+
isContainerInitialized = false;
|
|
9831
|
+
};
|
|
9832
|
+
if (isContainerInitialized) return release;
|
|
9824
9833
|
const alreadyLoaded = document.querySelector(
|
|
9825
9834
|
`script[src*="googletagmanager.com/gtm.js?id=${gtmId}"]`
|
|
9826
9835
|
);
|
|
9827
9836
|
if (alreadyLoaded) {
|
|
9828
9837
|
window.dataLayer = window.dataLayer || [];
|
|
9829
9838
|
isContainerInitialized = true;
|
|
9830
|
-
return;
|
|
9839
|
+
return release;
|
|
9831
9840
|
}
|
|
9832
9841
|
window.dataLayer = window.dataLayer || [];
|
|
9833
9842
|
window.dataLayer.push({
|
|
@@ -9839,15 +9848,9 @@ function useGTM(gtmId) {
|
|
|
9839
9848
|
script.async = true;
|
|
9840
9849
|
script.src = `https://www.googletagmanager.com/gtm.js?id=${gtmId}`;
|
|
9841
9850
|
firstScript.parentNode?.insertBefore(script, firstScript);
|
|
9842
|
-
|
|
9851
|
+
injectedScript = script;
|
|
9843
9852
|
isContainerInitialized = true;
|
|
9844
|
-
return
|
|
9845
|
-
if (scriptRef.current) {
|
|
9846
|
-
scriptRef.current.parentNode?.removeChild(scriptRef.current);
|
|
9847
|
-
scriptRef.current = null;
|
|
9848
|
-
}
|
|
9849
|
-
isContainerInitialized = false;
|
|
9850
|
-
};
|
|
9853
|
+
return release;
|
|
9851
9854
|
}, [gtmId]);
|
|
9852
9855
|
const addNoscriptIframe = (0, import_react15.useCallback)(() => {
|
|
9853
9856
|
if (!isGA4Allowed()) return;
|
|
@@ -9865,13 +9868,15 @@ function useGTM(gtmId) {
|
|
|
9865
9868
|
}, [gtmId]);
|
|
9866
9869
|
return { ...tracker, addNoscriptIframe };
|
|
9867
9870
|
}
|
|
9868
|
-
var import_react15, isContainerInitialized;
|
|
9871
|
+
var import_react15, isContainerInitialized, containerRefCount, injectedScript;
|
|
9869
9872
|
var init_useGTM = __esm({
|
|
9870
9873
|
"src/hooks/useGTM.ts"() {
|
|
9871
9874
|
"use strict";
|
|
9872
9875
|
import_react15 = require("react");
|
|
9873
9876
|
init_core2();
|
|
9874
9877
|
isContainerInitialized = false;
|
|
9878
|
+
containerRefCount = 0;
|
|
9879
|
+
injectedScript = null;
|
|
9875
9880
|
}
|
|
9876
9881
|
});
|
|
9877
9882
|
|
|
@@ -33864,6 +33869,23 @@ var init_WidgetRouter = __esm({
|
|
|
33864
33869
|
}
|
|
33865
33870
|
});
|
|
33866
33871
|
|
|
33872
|
+
// src/widget/app/WidgetAnalytics.tsx
|
|
33873
|
+
function WidgetAnalytics({
|
|
33874
|
+
children
|
|
33875
|
+
}) {
|
|
33876
|
+
useGTM(GTM_ID);
|
|
33877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children });
|
|
33878
|
+
}
|
|
33879
|
+
var import_jsx_runtime51;
|
|
33880
|
+
var init_WidgetAnalytics = __esm({
|
|
33881
|
+
"src/widget/app/WidgetAnalytics.tsx"() {
|
|
33882
|
+
"use strict";
|
|
33883
|
+
init_hooks();
|
|
33884
|
+
init_constants();
|
|
33885
|
+
import_jsx_runtime51 = require("react/jsx-runtime");
|
|
33886
|
+
}
|
|
33887
|
+
});
|
|
33888
|
+
|
|
33867
33889
|
// src/modes/swap/hooks/useSwapRoute.ts
|
|
33868
33890
|
function useSwapRoute() {
|
|
33869
33891
|
const [state, setState] = (0, import_react44.useState)({
|
|
@@ -34424,6 +34446,36 @@ var init_walletBalance = __esm({
|
|
|
34424
34446
|
}
|
|
34425
34447
|
});
|
|
34426
34448
|
|
|
34449
|
+
// src/modes/swap/analytics.ts
|
|
34450
|
+
function chainLabel(chain) {
|
|
34451
|
+
return chain?.networkName ?? chain?.axelarChainName ?? chain?.chainId ?? UNKNOWN;
|
|
34452
|
+
}
|
|
34453
|
+
function tokenLabel(token) {
|
|
34454
|
+
return token?.symbol ?? UNKNOWN;
|
|
34455
|
+
}
|
|
34456
|
+
function buildSwapPaymentParams(ctx) {
|
|
34457
|
+
return {
|
|
34458
|
+
from_chain: chainLabel(ctx.fromChain),
|
|
34459
|
+
from_token: tokenLabel(ctx.fromToken),
|
|
34460
|
+
to_chain: chainLabel(ctx.toChain),
|
|
34461
|
+
to_token: tokenLabel(ctx.toToken),
|
|
34462
|
+
domain: ctx.domain
|
|
34463
|
+
};
|
|
34464
|
+
}
|
|
34465
|
+
function claimAttemptOnce(slot, attempt) {
|
|
34466
|
+
if (!attempt) return false;
|
|
34467
|
+
if (slot.current === attempt) return false;
|
|
34468
|
+
slot.current = attempt;
|
|
34469
|
+
return true;
|
|
34470
|
+
}
|
|
34471
|
+
var UNKNOWN;
|
|
34472
|
+
var init_analytics = __esm({
|
|
34473
|
+
"src/modes/swap/analytics.ts"() {
|
|
34474
|
+
"use strict";
|
|
34475
|
+
UNKNOWN = "unknown";
|
|
34476
|
+
}
|
|
34477
|
+
});
|
|
34478
|
+
|
|
34427
34479
|
// src/core/forex.ts
|
|
34428
34480
|
async function fetchForexRates(base2 = "USD") {
|
|
34429
34481
|
let r;
|
|
@@ -34619,7 +34671,7 @@ function SwapTokenSelect({
|
|
|
34619
34671
|
(t) => `${Number(t.chainId)}:${t.address.toLowerCase()}` !== excludeKey
|
|
34620
34672
|
);
|
|
34621
34673
|
}, [filteredWalletTokens, excludeKey]);
|
|
34622
|
-
return /* @__PURE__ */ (0,
|
|
34674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
34623
34675
|
"div",
|
|
34624
34676
|
{
|
|
34625
34677
|
style: {
|
|
@@ -34629,7 +34681,7 @@ function SwapTokenSelect({
|
|
|
34629
34681
|
maxHeight: "70vh"
|
|
34630
34682
|
},
|
|
34631
34683
|
children: [
|
|
34632
|
-
/* @__PURE__ */ (0,
|
|
34684
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
34633
34685
|
"div",
|
|
34634
34686
|
{
|
|
34635
34687
|
style: {
|
|
@@ -34639,7 +34691,7 @@ function SwapTokenSelect({
|
|
|
34639
34691
|
borderBottom: `1px solid ${colors.border}`
|
|
34640
34692
|
},
|
|
34641
34693
|
children: [
|
|
34642
|
-
/* @__PURE__ */ (0,
|
|
34694
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34643
34695
|
"button",
|
|
34644
34696
|
{
|
|
34645
34697
|
type: "button",
|
|
@@ -34653,7 +34705,7 @@ function SwapTokenSelect({
|
|
|
34653
34705
|
cursor: "pointer"
|
|
34654
34706
|
},
|
|
34655
34707
|
"aria-label": "Go back",
|
|
34656
|
-
children: /* @__PURE__ */ (0,
|
|
34708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34657
34709
|
"svg",
|
|
34658
34710
|
{
|
|
34659
34711
|
style: {
|
|
@@ -34665,7 +34717,7 @@ function SwapTokenSelect({
|
|
|
34665
34717
|
fill: "none",
|
|
34666
34718
|
stroke: "currentColor",
|
|
34667
34719
|
strokeWidth: 2,
|
|
34668
|
-
children: /* @__PURE__ */ (0,
|
|
34720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34669
34721
|
"path",
|
|
34670
34722
|
{
|
|
34671
34723
|
strokeLinecap: "round",
|
|
@@ -34677,7 +34729,7 @@ function SwapTokenSelect({
|
|
|
34677
34729
|
)
|
|
34678
34730
|
}
|
|
34679
34731
|
),
|
|
34680
|
-
/* @__PURE__ */ (0,
|
|
34732
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34681
34733
|
"h1",
|
|
34682
34734
|
{
|
|
34683
34735
|
style: {
|
|
@@ -34694,8 +34746,8 @@ function SwapTokenSelect({
|
|
|
34694
34746
|
]
|
|
34695
34747
|
}
|
|
34696
34748
|
),
|
|
34697
|
-
/* @__PURE__ */ (0,
|
|
34698
|
-
/* @__PURE__ */ (0,
|
|
34749
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { style: { flex: 1, display: "flex", overflow: "hidden" }, children: [
|
|
34750
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34699
34751
|
ChainSelectorPanel,
|
|
34700
34752
|
{
|
|
34701
34753
|
error: chainsError,
|
|
@@ -34706,7 +34758,7 @@ function SwapTokenSelect({
|
|
|
34706
34758
|
popularChains
|
|
34707
34759
|
}
|
|
34708
34760
|
),
|
|
34709
|
-
/* @__PURE__ */ (0,
|
|
34761
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
34710
34762
|
TokenSelectorPanel,
|
|
34711
34763
|
{
|
|
34712
34764
|
filteredTokens: visibleTokens,
|
|
@@ -34725,12 +34777,12 @@ function SwapTokenSelect({
|
|
|
34725
34777
|
}
|
|
34726
34778
|
)
|
|
34727
34779
|
] }),
|
|
34728
|
-
/* @__PURE__ */ (0,
|
|
34780
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(WidgetSecurityFooter, {})
|
|
34729
34781
|
]
|
|
34730
34782
|
}
|
|
34731
34783
|
);
|
|
34732
34784
|
}
|
|
34733
|
-
var import_react47,
|
|
34785
|
+
var import_react47, import_jsx_runtime52;
|
|
34734
34786
|
var init_SwapTokenSelect = __esm({
|
|
34735
34787
|
"src/modes/swap/components/SwapTokenSelect.tsx"() {
|
|
34736
34788
|
"use strict";
|
|
@@ -34740,7 +34792,7 @@ var init_SwapTokenSelect = __esm({
|
|
|
34740
34792
|
init_hooks2();
|
|
34741
34793
|
init_token_selection();
|
|
34742
34794
|
init_components();
|
|
34743
|
-
|
|
34795
|
+
import_jsx_runtime52 = require("react/jsx-runtime");
|
|
34744
34796
|
}
|
|
34745
34797
|
});
|
|
34746
34798
|
|
|
@@ -34940,7 +34992,7 @@ function SwapWalletSelectorMobile({
|
|
|
34940
34992
|
{ id: "evm", label: "EVM" },
|
|
34941
34993
|
{ id: "solana", label: "Solana" }
|
|
34942
34994
|
];
|
|
34943
|
-
return /* @__PURE__ */ (0,
|
|
34995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
34944
34996
|
"div",
|
|
34945
34997
|
{
|
|
34946
34998
|
style: {
|
|
@@ -34949,7 +35001,7 @@ function SwapWalletSelectorMobile({
|
|
|
34949
35001
|
height: "100%"
|
|
34950
35002
|
},
|
|
34951
35003
|
children: [
|
|
34952
|
-
/* @__PURE__ */ (0,
|
|
35004
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
34953
35005
|
"div",
|
|
34954
35006
|
{
|
|
34955
35007
|
style: {
|
|
@@ -34959,7 +35011,7 @@ function SwapWalletSelectorMobile({
|
|
|
34959
35011
|
borderBottom: `1px solid ${colors.border}`
|
|
34960
35012
|
},
|
|
34961
35013
|
children: [
|
|
34962
|
-
/* @__PURE__ */ (0,
|
|
35014
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
34963
35015
|
"button",
|
|
34964
35016
|
{
|
|
34965
35017
|
type: "button",
|
|
@@ -34972,7 +35024,7 @@ function SwapWalletSelectorMobile({
|
|
|
34972
35024
|
border: 0,
|
|
34973
35025
|
cursor: "pointer"
|
|
34974
35026
|
},
|
|
34975
|
-
children: /* @__PURE__ */ (0,
|
|
35027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
34976
35028
|
"svg",
|
|
34977
35029
|
{
|
|
34978
35030
|
style: {
|
|
@@ -34984,7 +35036,7 @@ function SwapWalletSelectorMobile({
|
|
|
34984
35036
|
fill: "none",
|
|
34985
35037
|
stroke: "currentColor",
|
|
34986
35038
|
strokeWidth: 2,
|
|
34987
|
-
children: /* @__PURE__ */ (0,
|
|
35039
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
34988
35040
|
"path",
|
|
34989
35041
|
{
|
|
34990
35042
|
strokeLinecap: "round",
|
|
@@ -34996,7 +35048,7 @@ function SwapWalletSelectorMobile({
|
|
|
34996
35048
|
)
|
|
34997
35049
|
}
|
|
34998
35050
|
),
|
|
34999
|
-
/* @__PURE__ */ (0,
|
|
35051
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35000
35052
|
"h1",
|
|
35001
35053
|
{
|
|
35002
35054
|
style: {
|
|
@@ -35009,11 +35061,11 @@ function SwapWalletSelectorMobile({
|
|
|
35009
35061
|
children: "Connect Wallet"
|
|
35010
35062
|
}
|
|
35011
35063
|
),
|
|
35012
|
-
/* @__PURE__ */ (0,
|
|
35064
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { width: "1.25rem", marginLeft: spacing[2] }, "aria-hidden": true })
|
|
35013
35065
|
]
|
|
35014
35066
|
}
|
|
35015
35067
|
),
|
|
35016
|
-
/* @__PURE__ */ (0,
|
|
35068
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { padding: `${spacing[3]} ${spacing[4]} 0` }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35017
35069
|
"div",
|
|
35018
35070
|
{
|
|
35019
35071
|
style: {
|
|
@@ -35024,7 +35076,7 @@ function SwapWalletSelectorMobile({
|
|
|
35024
35076
|
padding: "3px",
|
|
35025
35077
|
gap: "2px"
|
|
35026
35078
|
},
|
|
35027
|
-
children: tabs.map((t) => /* @__PURE__ */ (0,
|
|
35079
|
+
children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35028
35080
|
"button",
|
|
35029
35081
|
{
|
|
35030
35082
|
onClick: () => setSelectedNamespace(t.id),
|
|
@@ -35048,7 +35100,7 @@ function SwapWalletSelectorMobile({
|
|
|
35048
35100
|
))
|
|
35049
35101
|
}
|
|
35050
35102
|
) }),
|
|
35051
|
-
/* @__PURE__ */ (0,
|
|
35103
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
35052
35104
|
"div",
|
|
35053
35105
|
{
|
|
35054
35106
|
style: {
|
|
@@ -35057,9 +35109,9 @@ function SwapWalletSelectorMobile({
|
|
|
35057
35109
|
maxHeight: "31.25rem"
|
|
35058
35110
|
},
|
|
35059
35111
|
children: [
|
|
35060
|
-
mobileWalletEntries.length === 0 ? /* @__PURE__ */ (0,
|
|
35061
|
-
/* @__PURE__ */ (0,
|
|
35062
|
-
/* @__PURE__ */ (0,
|
|
35112
|
+
mobileWalletEntries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
|
|
35113
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
|
|
35114
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35063
35115
|
"h3",
|
|
35064
35116
|
{
|
|
35065
35117
|
style: {
|
|
@@ -35071,7 +35123,7 @@ function SwapWalletSelectorMobile({
|
|
|
35071
35123
|
children: "No Wallets Found"
|
|
35072
35124
|
}
|
|
35073
35125
|
),
|
|
35074
|
-
/* @__PURE__ */ (0,
|
|
35126
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35075
35127
|
"p",
|
|
35076
35128
|
{
|
|
35077
35129
|
style: {
|
|
@@ -35082,7 +35134,7 @@ function SwapWalletSelectorMobile({
|
|
|
35082
35134
|
children: "Please install a web3 wallet to continue."
|
|
35083
35135
|
}
|
|
35084
35136
|
),
|
|
35085
|
-
/* @__PURE__ */ (0,
|
|
35137
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35086
35138
|
"a",
|
|
35087
35139
|
{
|
|
35088
35140
|
href: "https://metamask.io/download/",
|
|
@@ -35103,7 +35155,7 @@ function SwapWalletSelectorMobile({
|
|
|
35103
35155
|
children: "Install MetaMask"
|
|
35104
35156
|
}
|
|
35105
35157
|
)
|
|
35106
|
-
] }) : /* @__PURE__ */ (0,
|
|
35158
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35107
35159
|
"div",
|
|
35108
35160
|
{
|
|
35109
35161
|
style: {
|
|
@@ -35116,7 +35168,7 @@ function SwapWalletSelectorMobile({
|
|
|
35116
35168
|
const isWalletConnected = managerConnected && walletMetaId === meta.id;
|
|
35117
35169
|
const isConnecting = connectingId === meta.id && walletStatus === "connecting";
|
|
35118
35170
|
const isRowDisabled = managerConnected && !isWalletConnected && !entry.detectedWallet;
|
|
35119
|
-
return /* @__PURE__ */ (0,
|
|
35171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
35120
35172
|
"div",
|
|
35121
35173
|
{
|
|
35122
35174
|
style: mergeStyles(
|
|
@@ -35137,7 +35189,7 @@ function SwapWalletSelectorMobile({
|
|
|
35137
35189
|
isRowDisabled && { opacity: 0.4 }
|
|
35138
35190
|
),
|
|
35139
35191
|
children: [
|
|
35140
|
-
/* @__PURE__ */ (0,
|
|
35192
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35141
35193
|
"div",
|
|
35142
35194
|
{
|
|
35143
35195
|
style: {
|
|
@@ -35151,7 +35203,7 @@ function SwapWalletSelectorMobile({
|
|
|
35151
35203
|
overflow: "hidden",
|
|
35152
35204
|
flexShrink: 0
|
|
35153
35205
|
},
|
|
35154
|
-
children: meta.logo ? /* @__PURE__ */ (0,
|
|
35206
|
+
children: meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35155
35207
|
"img",
|
|
35156
35208
|
{
|
|
35157
35209
|
src: meta.logo,
|
|
@@ -35162,11 +35214,11 @@ function SwapWalletSelectorMobile({
|
|
|
35162
35214
|
objectFit: "contain"
|
|
35163
35215
|
}
|
|
35164
35216
|
}
|
|
35165
|
-
) : /* @__PURE__ */ (0,
|
|
35217
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { style: { fontSize: "1.5rem" }, children: meta.emoji || "\u{1F45B}" })
|
|
35166
35218
|
}
|
|
35167
35219
|
),
|
|
35168
|
-
/* @__PURE__ */ (0,
|
|
35169
|
-
/* @__PURE__ */ (0,
|
|
35220
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
35221
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35170
35222
|
"p",
|
|
35171
35223
|
{
|
|
35172
35224
|
style: {
|
|
@@ -35176,7 +35228,7 @@ function SwapWalletSelectorMobile({
|
|
|
35176
35228
|
children: meta.name
|
|
35177
35229
|
}
|
|
35178
35230
|
),
|
|
35179
|
-
isWalletConnected && walletAddress && /* @__PURE__ */ (0,
|
|
35231
|
+
isWalletConnected && walletAddress && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
35180
35232
|
"p",
|
|
35181
35233
|
{
|
|
35182
35234
|
style: {
|
|
@@ -35191,7 +35243,7 @@ function SwapWalletSelectorMobile({
|
|
|
35191
35243
|
}
|
|
35192
35244
|
)
|
|
35193
35245
|
] }),
|
|
35194
|
-
isConnecting ? /* @__PURE__ */ (0,
|
|
35246
|
+
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35195
35247
|
"div",
|
|
35196
35248
|
{
|
|
35197
35249
|
style: {
|
|
@@ -35204,7 +35256,7 @@ function SwapWalletSelectorMobile({
|
|
|
35204
35256
|
flexShrink: 0
|
|
35205
35257
|
}
|
|
35206
35258
|
}
|
|
35207
|
-
) : isWalletConnected ? /* @__PURE__ */ (0,
|
|
35259
|
+
) : isWalletConnected ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35208
35260
|
"button",
|
|
35209
35261
|
{
|
|
35210
35262
|
onClick: handleDisconnect,
|
|
@@ -35221,7 +35273,7 @@ function SwapWalletSelectorMobile({
|
|
|
35221
35273
|
},
|
|
35222
35274
|
children: "Disconnect"
|
|
35223
35275
|
}
|
|
35224
|
-
) : /* @__PURE__ */ (0,
|
|
35276
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35225
35277
|
"button",
|
|
35226
35278
|
{
|
|
35227
35279
|
onClick: () => void handleClick(entry),
|
|
@@ -35253,8 +35305,8 @@ function SwapWalletSelectorMobile({
|
|
|
35253
35305
|
})
|
|
35254
35306
|
}
|
|
35255
35307
|
),
|
|
35256
|
-
selectedNamespace === "evm" && /* @__PURE__ */ (0,
|
|
35257
|
-
/* @__PURE__ */ (0,
|
|
35308
|
+
selectedNamespace === "evm" && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
|
|
35309
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35258
35310
|
"div",
|
|
35259
35311
|
{
|
|
35260
35312
|
style: {
|
|
@@ -35267,7 +35319,7 @@ function SwapWalletSelectorMobile({
|
|
|
35267
35319
|
(() => {
|
|
35268
35320
|
const wcConnected = managerConnected && connectedVia === "walletconnect";
|
|
35269
35321
|
const wcRowDisabled = managerConnected && !wcConnected;
|
|
35270
|
-
return /* @__PURE__ */ (0,
|
|
35322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
35271
35323
|
"div",
|
|
35272
35324
|
{
|
|
35273
35325
|
style: mergeStyles(
|
|
@@ -35290,7 +35342,7 @@ function SwapWalletSelectorMobile({
|
|
|
35290
35342
|
),
|
|
35291
35343
|
onClick: !wcConnected && !wcRowDisabled ? () => void handleWalletConnect() : void 0,
|
|
35292
35344
|
children: [
|
|
35293
|
-
/* @__PURE__ */ (0,
|
|
35345
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35294
35346
|
"div",
|
|
35295
35347
|
{
|
|
35296
35348
|
style: {
|
|
@@ -35303,7 +35355,7 @@ function SwapWalletSelectorMobile({
|
|
|
35303
35355
|
justifyContent: "center",
|
|
35304
35356
|
flexShrink: 0
|
|
35305
35357
|
},
|
|
35306
|
-
children: /* @__PURE__ */ (0,
|
|
35358
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35307
35359
|
"svg",
|
|
35308
35360
|
{
|
|
35309
35361
|
style: {
|
|
@@ -35313,13 +35365,13 @@ function SwapWalletSelectorMobile({
|
|
|
35313
35365
|
},
|
|
35314
35366
|
viewBox: "0 0 24 24",
|
|
35315
35367
|
fill: "currentColor",
|
|
35316
|
-
children: /* @__PURE__ */ (0,
|
|
35368
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M6.09 10.56c3.26-3.2 8.56-3.2 11.82 0l.39.39a.4.4 0 010 .58l-1.34 1.31a.21.21 0 01-.3 0l-.54-.53c-2.28-2.23-5.97-2.23-8.24 0l-.58.56a.21.21 0 01-.3 0L5.66 11.6a.4.4 0 010-.58l.43-.46zm14.6 2.72l1.2 1.17a.4.4 0 010 .58l-5.38 5.27a.43.43 0 01-.6 0l-3.82-3.74a.11.11 0 00-.15 0l-3.82 3.74a.43.43 0 01-.6 0L2.15 15.03a.4.4 0 010-.58l1.2-1.17a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0z" })
|
|
35317
35369
|
}
|
|
35318
35370
|
)
|
|
35319
35371
|
}
|
|
35320
35372
|
),
|
|
35321
|
-
/* @__PURE__ */ (0,
|
|
35322
|
-
/* @__PURE__ */ (0,
|
|
35373
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
35374
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35323
35375
|
"p",
|
|
35324
35376
|
{
|
|
35325
35377
|
style: {
|
|
@@ -35329,7 +35381,7 @@ function SwapWalletSelectorMobile({
|
|
|
35329
35381
|
children: "WalletConnect"
|
|
35330
35382
|
}
|
|
35331
35383
|
),
|
|
35332
|
-
wcConnected && walletAddress && /* @__PURE__ */ (0,
|
|
35384
|
+
wcConnected && walletAddress && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
35333
35385
|
"p",
|
|
35334
35386
|
{
|
|
35335
35387
|
style: {
|
|
@@ -35344,7 +35396,7 @@ function SwapWalletSelectorMobile({
|
|
|
35344
35396
|
}
|
|
35345
35397
|
)
|
|
35346
35398
|
] }),
|
|
35347
|
-
wcConnecting ? /* @__PURE__ */ (0,
|
|
35399
|
+
wcConnecting ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35348
35400
|
"div",
|
|
35349
35401
|
{
|
|
35350
35402
|
style: {
|
|
@@ -35357,7 +35409,7 @@ function SwapWalletSelectorMobile({
|
|
|
35357
35409
|
flexShrink: 0
|
|
35358
35410
|
}
|
|
35359
35411
|
}
|
|
35360
|
-
) : wcConnected ? /* @__PURE__ */ (0,
|
|
35412
|
+
) : wcConnected ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35361
35413
|
"button",
|
|
35362
35414
|
{
|
|
35363
35415
|
onClick: (e2) => {
|
|
@@ -35377,7 +35429,7 @@ function SwapWalletSelectorMobile({
|
|
|
35377
35429
|
},
|
|
35378
35430
|
children: "Disconnect"
|
|
35379
35431
|
}
|
|
35380
|
-
) : /* @__PURE__ */ (0,
|
|
35432
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
35381
35433
|
"button",
|
|
35382
35434
|
{
|
|
35383
35435
|
onClick: (e2) => {
|
|
@@ -35417,7 +35469,7 @@ function SwapWalletSelectorMobile({
|
|
|
35417
35469
|
}
|
|
35418
35470
|
);
|
|
35419
35471
|
}
|
|
35420
|
-
var import_react48,
|
|
35472
|
+
var import_react48, import_jsx_runtime53, SwapWalletSelectorMobile_default;
|
|
35421
35473
|
var init_SwapWalletSelectorMobile = __esm({
|
|
35422
35474
|
"src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorMobile.tsx"() {
|
|
35423
35475
|
"use strict";
|
|
@@ -35428,7 +35480,7 @@ var init_SwapWalletSelectorMobile = __esm({
|
|
|
35428
35480
|
init_wallets();
|
|
35429
35481
|
init_config2();
|
|
35430
35482
|
init_Toast();
|
|
35431
|
-
|
|
35483
|
+
import_jsx_runtime53 = require("react/jsx-runtime");
|
|
35432
35484
|
SwapWalletSelectorMobile_default = SwapWalletSelectorMobile;
|
|
35433
35485
|
}
|
|
35434
35486
|
});
|
|
@@ -35526,8 +35578,8 @@ function SwapWalletSelectorDesktop({
|
|
|
35526
35578
|
{ id: "evm", label: "EVM" },
|
|
35527
35579
|
{ id: "solana", label: "Solana" }
|
|
35528
35580
|
];
|
|
35529
|
-
return /* @__PURE__ */ (0,
|
|
35530
|
-
/* @__PURE__ */ (0,
|
|
35581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
35582
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35531
35583
|
"div",
|
|
35532
35584
|
{
|
|
35533
35585
|
style: {
|
|
@@ -35537,7 +35589,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35537
35589
|
borderBottom: `1px solid ${colors.border}`
|
|
35538
35590
|
},
|
|
35539
35591
|
children: [
|
|
35540
|
-
/* @__PURE__ */ (0,
|
|
35592
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35541
35593
|
"button",
|
|
35542
35594
|
{
|
|
35543
35595
|
type: "button",
|
|
@@ -35550,7 +35602,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35550
35602
|
border: 0,
|
|
35551
35603
|
cursor: "pointer"
|
|
35552
35604
|
},
|
|
35553
|
-
children: /* @__PURE__ */ (0,
|
|
35605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35554
35606
|
"svg",
|
|
35555
35607
|
{
|
|
35556
35608
|
style: {
|
|
@@ -35562,7 +35614,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35562
35614
|
fill: "none",
|
|
35563
35615
|
stroke: "currentColor",
|
|
35564
35616
|
strokeWidth: 2,
|
|
35565
|
-
children: /* @__PURE__ */ (0,
|
|
35617
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35566
35618
|
"path",
|
|
35567
35619
|
{
|
|
35568
35620
|
strokeLinecap: "round",
|
|
@@ -35574,7 +35626,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35574
35626
|
)
|
|
35575
35627
|
}
|
|
35576
35628
|
),
|
|
35577
|
-
/* @__PURE__ */ (0,
|
|
35629
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35578
35630
|
"h1",
|
|
35579
35631
|
{
|
|
35580
35632
|
style: {
|
|
@@ -35587,7 +35639,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35587
35639
|
children: "Connect Wallet"
|
|
35588
35640
|
}
|
|
35589
35641
|
),
|
|
35590
|
-
/* @__PURE__ */ (0,
|
|
35642
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35591
35643
|
"div",
|
|
35592
35644
|
{
|
|
35593
35645
|
style: {
|
|
@@ -35598,7 +35650,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35598
35650
|
padding: "3px",
|
|
35599
35651
|
gap: "2px"
|
|
35600
35652
|
},
|
|
35601
|
-
children: tabs.map((t) => /* @__PURE__ */ (0,
|
|
35653
|
+
children: tabs.map((t) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35602
35654
|
"button",
|
|
35603
35655
|
{
|
|
35604
35656
|
onClick: () => setSelectedNamespace(t.id),
|
|
@@ -35624,8 +35676,8 @@ function SwapWalletSelectorDesktop({
|
|
|
35624
35676
|
]
|
|
35625
35677
|
}
|
|
35626
35678
|
),
|
|
35627
|
-
/* @__PURE__ */ (0,
|
|
35628
|
-
isDetecting ? /* @__PURE__ */ (0,
|
|
35679
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { padding: spacing[4] }, children: [
|
|
35680
|
+
isDetecting ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35629
35681
|
"div",
|
|
35630
35682
|
{
|
|
35631
35683
|
style: {
|
|
@@ -35634,7 +35686,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35634
35686
|
gap: spacing[3]
|
|
35635
35687
|
},
|
|
35636
35688
|
children: [
|
|
35637
|
-
[1, 2].map((i) => /* @__PURE__ */ (0,
|
|
35689
|
+
[1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35638
35690
|
"div",
|
|
35639
35691
|
{
|
|
35640
35692
|
style: {
|
|
@@ -35647,7 +35699,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35647
35699
|
animation: "tw-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite"
|
|
35648
35700
|
},
|
|
35649
35701
|
children: [
|
|
35650
|
-
/* @__PURE__ */ (0,
|
|
35702
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35651
35703
|
"div",
|
|
35652
35704
|
{
|
|
35653
35705
|
style: {
|
|
@@ -35658,7 +35710,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35658
35710
|
}
|
|
35659
35711
|
}
|
|
35660
35712
|
),
|
|
35661
|
-
/* @__PURE__ */ (0,
|
|
35713
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35662
35714
|
"div",
|
|
35663
35715
|
{
|
|
35664
35716
|
style: {
|
|
@@ -35673,7 +35725,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35673
35725
|
},
|
|
35674
35726
|
i
|
|
35675
35727
|
)),
|
|
35676
|
-
/* @__PURE__ */ (0,
|
|
35728
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35677
35729
|
"p",
|
|
35678
35730
|
{
|
|
35679
35731
|
style: {
|
|
@@ -35687,9 +35739,9 @@ function SwapWalletSelectorDesktop({
|
|
|
35687
35739
|
)
|
|
35688
35740
|
]
|
|
35689
35741
|
}
|
|
35690
|
-
) : filteredWallets.length === 0 ? /* @__PURE__ */ (0,
|
|
35691
|
-
/* @__PURE__ */ (0,
|
|
35692
|
-
/* @__PURE__ */ (0,
|
|
35742
|
+
) : filteredWallets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { textAlign: "center", padding: `${spacing[8]} 0` }, children: [
|
|
35743
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { style: { fontSize: "2.5rem", marginBottom: spacing[4] }, children: "\u{1F45B}" }),
|
|
35744
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35693
35745
|
"h3",
|
|
35694
35746
|
{
|
|
35695
35747
|
style: {
|
|
@@ -35701,7 +35753,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35701
35753
|
children: "No Wallets Found"
|
|
35702
35754
|
}
|
|
35703
35755
|
),
|
|
35704
|
-
/* @__PURE__ */ (0,
|
|
35756
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35705
35757
|
"p",
|
|
35706
35758
|
{
|
|
35707
35759
|
style: {
|
|
@@ -35712,7 +35764,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35712
35764
|
children: "Please install a web3 wallet to continue."
|
|
35713
35765
|
}
|
|
35714
35766
|
),
|
|
35715
|
-
/* @__PURE__ */ (0,
|
|
35767
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35716
35768
|
"a",
|
|
35717
35769
|
{
|
|
35718
35770
|
href: "https://metamask.io/download/",
|
|
@@ -35733,7 +35785,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35733
35785
|
children: "Install MetaMask"
|
|
35734
35786
|
}
|
|
35735
35787
|
)
|
|
35736
|
-
] }) : /* @__PURE__ */ (0,
|
|
35788
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35737
35789
|
"div",
|
|
35738
35790
|
{
|
|
35739
35791
|
style: {
|
|
@@ -35744,7 +35796,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35744
35796
|
children: filteredWallets.map((wallet) => {
|
|
35745
35797
|
const isWalletConnected = managerConnected && walletMetaId === wallet.meta.id;
|
|
35746
35798
|
const isConnecting = connectingId === wallet.meta.id && walletStatus === "connecting";
|
|
35747
|
-
return /* @__PURE__ */ (0,
|
|
35799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35748
35800
|
"div",
|
|
35749
35801
|
{
|
|
35750
35802
|
style: mergeStyles(
|
|
@@ -35764,7 +35816,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35764
35816
|
}
|
|
35765
35817
|
),
|
|
35766
35818
|
children: [
|
|
35767
|
-
/* @__PURE__ */ (0,
|
|
35819
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35768
35820
|
"div",
|
|
35769
35821
|
{
|
|
35770
35822
|
style: {
|
|
@@ -35778,7 +35830,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35778
35830
|
overflow: "hidden",
|
|
35779
35831
|
flexShrink: 0
|
|
35780
35832
|
},
|
|
35781
|
-
children: wallet.meta.logo ? /* @__PURE__ */ (0,
|
|
35833
|
+
children: wallet.meta.logo ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35782
35834
|
"img",
|
|
35783
35835
|
{
|
|
35784
35836
|
src: wallet.meta.logo,
|
|
@@ -35789,7 +35841,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35789
35841
|
objectFit: "contain"
|
|
35790
35842
|
}
|
|
35791
35843
|
}
|
|
35792
|
-
) : wallet.detail?.info?.icon ? /* @__PURE__ */ (0,
|
|
35844
|
+
) : wallet.detail?.info?.icon ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35793
35845
|
"img",
|
|
35794
35846
|
{
|
|
35795
35847
|
src: wallet.detail.info.icon,
|
|
@@ -35800,11 +35852,11 @@ function SwapWalletSelectorDesktop({
|
|
|
35800
35852
|
objectFit: "contain"
|
|
35801
35853
|
}
|
|
35802
35854
|
}
|
|
35803
|
-
) : /* @__PURE__ */ (0,
|
|
35855
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { style: { fontSize: "1.5rem" }, children: wallet.meta.emoji || "\u{1F45B}" })
|
|
35804
35856
|
}
|
|
35805
35857
|
),
|
|
35806
|
-
/* @__PURE__ */ (0,
|
|
35807
|
-
/* @__PURE__ */ (0,
|
|
35858
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
35859
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35808
35860
|
"p",
|
|
35809
35861
|
{
|
|
35810
35862
|
style: {
|
|
@@ -35814,7 +35866,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35814
35866
|
children: wallet.meta.name
|
|
35815
35867
|
}
|
|
35816
35868
|
),
|
|
35817
|
-
isWalletConnected && walletAddress && /* @__PURE__ */ (0,
|
|
35869
|
+
isWalletConnected && walletAddress && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35818
35870
|
"p",
|
|
35819
35871
|
{
|
|
35820
35872
|
style: {
|
|
@@ -35829,7 +35881,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35829
35881
|
}
|
|
35830
35882
|
)
|
|
35831
35883
|
] }),
|
|
35832
|
-
isConnecting ? /* @__PURE__ */ (0,
|
|
35884
|
+
isConnecting ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35833
35885
|
"div",
|
|
35834
35886
|
{
|
|
35835
35887
|
style: {
|
|
@@ -35842,7 +35894,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35842
35894
|
flexShrink: 0
|
|
35843
35895
|
}
|
|
35844
35896
|
}
|
|
35845
|
-
) : isWalletConnected ? /* @__PURE__ */ (0,
|
|
35897
|
+
) : isWalletConnected ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35846
35898
|
"button",
|
|
35847
35899
|
{
|
|
35848
35900
|
onClick: handleDisconnect,
|
|
@@ -35859,7 +35911,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35859
35911
|
},
|
|
35860
35912
|
children: "Disconnect"
|
|
35861
35913
|
}
|
|
35862
|
-
) : /* @__PURE__ */ (0,
|
|
35914
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35863
35915
|
"button",
|
|
35864
35916
|
{
|
|
35865
35917
|
onClick: () => void handleClick(wallet),
|
|
@@ -35891,8 +35943,8 @@ function SwapWalletSelectorDesktop({
|
|
|
35891
35943
|
})
|
|
35892
35944
|
}
|
|
35893
35945
|
),
|
|
35894
|
-
selectedNamespace === "evm" && /* @__PURE__ */ (0,
|
|
35895
|
-
/* @__PURE__ */ (0,
|
|
35946
|
+
selectedNamespace === "evm" && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
|
|
35947
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35896
35948
|
"div",
|
|
35897
35949
|
{
|
|
35898
35950
|
style: {
|
|
@@ -35904,7 +35956,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35904
35956
|
),
|
|
35905
35957
|
(() => {
|
|
35906
35958
|
const wcConnected = managerConnected && connectedVia === "walletconnect";
|
|
35907
|
-
return /* @__PURE__ */ (0,
|
|
35959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35908
35960
|
"div",
|
|
35909
35961
|
{
|
|
35910
35962
|
style: mergeStyles(
|
|
@@ -35926,7 +35978,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35926
35978
|
),
|
|
35927
35979
|
onClick: !wcConnected ? () => void handleWalletConnect() : void 0,
|
|
35928
35980
|
children: [
|
|
35929
|
-
/* @__PURE__ */ (0,
|
|
35981
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35930
35982
|
"div",
|
|
35931
35983
|
{
|
|
35932
35984
|
style: {
|
|
@@ -35939,7 +35991,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35939
35991
|
justifyContent: "center",
|
|
35940
35992
|
flexShrink: 0
|
|
35941
35993
|
},
|
|
35942
|
-
children: /* @__PURE__ */ (0,
|
|
35994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35943
35995
|
"svg",
|
|
35944
35996
|
{
|
|
35945
35997
|
style: {
|
|
@@ -35949,13 +36001,13 @@ function SwapWalletSelectorDesktop({
|
|
|
35949
36001
|
},
|
|
35950
36002
|
viewBox: "0 0 24 24",
|
|
35951
36003
|
fill: "currentColor",
|
|
35952
|
-
children: /* @__PURE__ */ (0,
|
|
36004
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { d: "M6.09 10.56c3.26-3.2 8.56-3.2 11.82 0l.39.39a.4.4 0 010 .58l-1.34 1.31a.21.21 0 01-.3 0l-.54-.53c-2.28-2.23-5.97-2.23-8.24 0l-.58.56a.21.21 0 01-.3 0L5.66 11.6a.4.4 0 010-.58l.43-.46zm14.6 2.72l1.2 1.17a.4.4 0 010 .58l-5.38 5.27a.43.43 0 01-.6 0l-3.82-3.74a.11.11 0 00-.15 0l-3.82 3.74a.43.43 0 01-.6 0L2.15 15.03a.4.4 0 010-.58l1.2-1.17a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0l3.82 3.74c.04.04.1.04.15 0l3.82-3.74a.43.43 0 01.6 0z" })
|
|
35953
36005
|
}
|
|
35954
36006
|
)
|
|
35955
36007
|
}
|
|
35956
36008
|
),
|
|
35957
|
-
/* @__PURE__ */ (0,
|
|
35958
|
-
/* @__PURE__ */ (0,
|
|
36009
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
36010
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35959
36011
|
"p",
|
|
35960
36012
|
{
|
|
35961
36013
|
style: {
|
|
@@ -35965,7 +36017,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35965
36017
|
children: "WalletConnect"
|
|
35966
36018
|
}
|
|
35967
36019
|
),
|
|
35968
|
-
wcConnected && walletAddress && /* @__PURE__ */ (0,
|
|
36020
|
+
wcConnected && walletAddress && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
35969
36021
|
"p",
|
|
35970
36022
|
{
|
|
35971
36023
|
style: {
|
|
@@ -35980,7 +36032,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35980
36032
|
}
|
|
35981
36033
|
)
|
|
35982
36034
|
] }),
|
|
35983
|
-
wcConnecting ? /* @__PURE__ */ (0,
|
|
36035
|
+
wcConnecting ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35984
36036
|
"div",
|
|
35985
36037
|
{
|
|
35986
36038
|
style: {
|
|
@@ -35993,7 +36045,7 @@ function SwapWalletSelectorDesktop({
|
|
|
35993
36045
|
flexShrink: 0
|
|
35994
36046
|
}
|
|
35995
36047
|
}
|
|
35996
|
-
) : wcConnected ? /* @__PURE__ */ (0,
|
|
36048
|
+
) : wcConnected ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
35997
36049
|
"button",
|
|
35998
36050
|
{
|
|
35999
36051
|
onClick: (e2) => {
|
|
@@ -36013,7 +36065,7 @@ function SwapWalletSelectorDesktop({
|
|
|
36013
36065
|
},
|
|
36014
36066
|
children: "Disconnect"
|
|
36015
36067
|
}
|
|
36016
|
-
) : /* @__PURE__ */ (0,
|
|
36068
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
36017
36069
|
"button",
|
|
36018
36070
|
{
|
|
36019
36071
|
onClick: (e2) => {
|
|
@@ -36043,7 +36095,7 @@ function SwapWalletSelectorDesktop({
|
|
|
36043
36095
|
] })
|
|
36044
36096
|
] });
|
|
36045
36097
|
}
|
|
36046
|
-
var import_react49,
|
|
36098
|
+
var import_react49, import_jsx_runtime54;
|
|
36047
36099
|
var init_SwapWalletSelectorDesktop = __esm({
|
|
36048
36100
|
"src/modes/swap/components/SwapWalletSelector/SwapWalletSelectorDesktop.tsx"() {
|
|
36049
36101
|
"use strict";
|
|
@@ -36053,7 +36105,7 @@ var init_SwapWalletSelectorDesktop = __esm({
|
|
|
36053
36105
|
init_wallets();
|
|
36054
36106
|
init_config2();
|
|
36055
36107
|
init_Toast();
|
|
36056
|
-
|
|
36108
|
+
import_jsx_runtime54 = require("react/jsx-runtime");
|
|
36057
36109
|
}
|
|
36058
36110
|
});
|
|
36059
36111
|
|
|
@@ -36065,8 +36117,8 @@ function SwapWalletSelector({
|
|
|
36065
36117
|
onBack
|
|
36066
36118
|
}) {
|
|
36067
36119
|
const isMobile = useIsMobile();
|
|
36068
|
-
return /* @__PURE__ */ (0,
|
|
36069
|
-
isMobile && /* @__PURE__ */ (0,
|
|
36120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
36121
|
+
isMobile && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
36070
36122
|
SwapWalletSelectorMobile_default,
|
|
36071
36123
|
{
|
|
36072
36124
|
walletStatus,
|
|
@@ -36075,7 +36127,7 @@ function SwapWalletSelector({
|
|
|
36075
36127
|
onBack
|
|
36076
36128
|
}
|
|
36077
36129
|
),
|
|
36078
|
-
!isMobile && /* @__PURE__ */ (0,
|
|
36130
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
36079
36131
|
SwapWalletSelectorDesktop,
|
|
36080
36132
|
{
|
|
36081
36133
|
walletStatus,
|
|
@@ -36086,14 +36138,14 @@ function SwapWalletSelector({
|
|
|
36086
36138
|
)
|
|
36087
36139
|
] });
|
|
36088
36140
|
}
|
|
36089
|
-
var
|
|
36141
|
+
var import_jsx_runtime55, SwapWalletSelector_default;
|
|
36090
36142
|
var init_SwapWalletSelector = __esm({
|
|
36091
36143
|
"src/modes/swap/components/SwapWalletSelector/index.tsx"() {
|
|
36092
36144
|
"use strict";
|
|
36093
36145
|
init_detect();
|
|
36094
36146
|
init_SwapWalletSelectorMobile();
|
|
36095
36147
|
init_SwapWalletSelectorDesktop();
|
|
36096
|
-
|
|
36148
|
+
import_jsx_runtime55 = require("react/jsx-runtime");
|
|
36097
36149
|
SwapWalletSelector_default = SwapWalletSelector;
|
|
36098
36150
|
}
|
|
36099
36151
|
});
|
|
@@ -36179,7 +36231,7 @@ function getActiveStep(status) {
|
|
|
36179
36231
|
}
|
|
36180
36232
|
}
|
|
36181
36233
|
function RateRow({ label, value }) {
|
|
36182
|
-
return /* @__PURE__ */ (0,
|
|
36234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
36183
36235
|
"div",
|
|
36184
36236
|
{
|
|
36185
36237
|
style: {
|
|
@@ -36188,8 +36240,8 @@ function RateRow({ label, value }) {
|
|
|
36188
36240
|
justifyContent: "space-between"
|
|
36189
36241
|
},
|
|
36190
36242
|
children: [
|
|
36191
|
-
/* @__PURE__ */ (0,
|
|
36192
|
-
/* @__PURE__ */ (0,
|
|
36243
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: label }),
|
|
36244
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value })
|
|
36193
36245
|
]
|
|
36194
36246
|
}
|
|
36195
36247
|
);
|
|
@@ -36246,6 +36298,9 @@ function SwapMode({
|
|
|
36246
36298
|
const settingsRef = (0, import_react50.useRef)(null);
|
|
36247
36299
|
const currencyDropdownRef = (0, import_react50.useRef)(null);
|
|
36248
36300
|
const { emitEvent } = useTrustware();
|
|
36301
|
+
const { trackEvent } = useGTMTracker();
|
|
36302
|
+
const initiatedAttemptRef = (0, import_react50.useRef)(null);
|
|
36303
|
+
const completedAttemptRef = (0, import_react50.useRef)(null);
|
|
36249
36304
|
const { features, theme: configTheme } = useTrustwareConfig();
|
|
36250
36305
|
const effectiveThemeSetting = themeProp ?? configTheme ?? "system";
|
|
36251
36306
|
const { resolvedTheme, toggleTheme } = useThemePreference(
|
|
@@ -36487,6 +36542,16 @@ function SwapMode({
|
|
|
36487
36542
|
}, []);
|
|
36488
36543
|
const handleExecute = (0, import_react50.useCallback)(async () => {
|
|
36489
36544
|
if (!route.data) return;
|
|
36545
|
+
const paymentParams = buildSwapPaymentParams({
|
|
36546
|
+
fromChain,
|
|
36547
|
+
fromToken,
|
|
36548
|
+
toChain,
|
|
36549
|
+
toToken,
|
|
36550
|
+
domain: window.origin
|
|
36551
|
+
});
|
|
36552
|
+
if (claimAttemptOnce(initiatedAttemptRef, route.data)) {
|
|
36553
|
+
trackEvent("payment_initiated", paymentParams);
|
|
36554
|
+
}
|
|
36490
36555
|
setStage("processing");
|
|
36491
36556
|
const fromTokenAddress = fromToken?.address ?? fromToken?.address;
|
|
36492
36557
|
const fromTokenDecimals = fromToken?.decimals ?? void 0;
|
|
@@ -36502,12 +36567,25 @@ function SwapMode({
|
|
|
36502
36567
|
walletAddress ?? void 0,
|
|
36503
36568
|
maxApproval,
|
|
36504
36569
|
() => {
|
|
36570
|
+
if (claimAttemptOnce(completedAttemptRef, routeToSend)) {
|
|
36571
|
+
trackEvent("payment_completed", paymentParams);
|
|
36572
|
+
}
|
|
36505
36573
|
setCompletedAt(/* @__PURE__ */ new Date());
|
|
36506
36574
|
setStage("success");
|
|
36507
36575
|
},
|
|
36508
36576
|
() => setStage("error")
|
|
36509
36577
|
);
|
|
36510
|
-
}, [
|
|
36578
|
+
}, [
|
|
36579
|
+
route,
|
|
36580
|
+
execution,
|
|
36581
|
+
fromChain,
|
|
36582
|
+
fromToken,
|
|
36583
|
+
toChain,
|
|
36584
|
+
toToken,
|
|
36585
|
+
walletAddress,
|
|
36586
|
+
maxApproval,
|
|
36587
|
+
trackEvent
|
|
36588
|
+
]);
|
|
36511
36589
|
const handleReset = (0, import_react50.useCallback)(() => {
|
|
36512
36590
|
execution.reset();
|
|
36513
36591
|
route.clear();
|
|
@@ -36854,7 +36932,7 @@ function SwapMode({
|
|
|
36854
36932
|
return () => document.removeEventListener("mousedown", handler);
|
|
36855
36933
|
}, [showCurrencyDropdown]);
|
|
36856
36934
|
if (stage === "select-from") {
|
|
36857
|
-
return /* @__PURE__ */ (0,
|
|
36935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36858
36936
|
SwapTokenSelect,
|
|
36859
36937
|
{
|
|
36860
36938
|
side: "from",
|
|
@@ -36872,7 +36950,7 @@ function SwapMode({
|
|
|
36872
36950
|
) });
|
|
36873
36951
|
}
|
|
36874
36952
|
if (stage === "select-to" && !lockDestToken) {
|
|
36875
|
-
return /* @__PURE__ */ (0,
|
|
36953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36876
36954
|
SwapTokenSelect,
|
|
36877
36955
|
{
|
|
36878
36956
|
side: "to",
|
|
@@ -36891,8 +36969,8 @@ function SwapMode({
|
|
|
36891
36969
|
) });
|
|
36892
36970
|
}
|
|
36893
36971
|
if (stage === "connect-wallet") {
|
|
36894
|
-
return /* @__PURE__ */ (0,
|
|
36895
|
-
/* @__PURE__ */ (0,
|
|
36972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(WidgetContainer, { theme: resolvedTheme, style, children: [
|
|
36973
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36896
36974
|
SwapWalletSelector_default,
|
|
36897
36975
|
{
|
|
36898
36976
|
walletStatus,
|
|
@@ -36901,7 +36979,7 @@ function SwapMode({
|
|
|
36901
36979
|
onBack: handleWalletConnected
|
|
36902
36980
|
}
|
|
36903
36981
|
),
|
|
36904
|
-
isConnected && /* @__PURE__ */ (0,
|
|
36982
|
+
isConnected && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { padding: `0 ${spacing[4]} ${spacing[4]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36905
36983
|
"button",
|
|
36906
36984
|
{
|
|
36907
36985
|
onClick: () => setStage("home"),
|
|
@@ -36934,8 +37012,8 @@ function SwapMode({
|
|
|
36934
37012
|
const offset = circ - progress / 100 * circ;
|
|
36935
37013
|
const isApproving = txStatus === "approving";
|
|
36936
37014
|
const title = isApproving ? "Approving..." : "Order Submitted";
|
|
36937
|
-
return /* @__PURE__ */ (0,
|
|
36938
|
-
/* @__PURE__ */ (0,
|
|
37015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { padding: `${spacing[5]} ${spacing[6]} ${spacing[6]}` }, children: [
|
|
37016
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
36939
37017
|
"div",
|
|
36940
37018
|
{
|
|
36941
37019
|
style: {
|
|
@@ -36945,7 +37023,7 @@ function SwapMode({
|
|
|
36945
37023
|
marginBottom: spacing[5]
|
|
36946
37024
|
},
|
|
36947
37025
|
children: [
|
|
36948
|
-
/* @__PURE__ */ (0,
|
|
37026
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36949
37027
|
"button",
|
|
36950
37028
|
{
|
|
36951
37029
|
onClick: handleReset,
|
|
@@ -36960,7 +37038,7 @@ function SwapMode({
|
|
|
36960
37038
|
border: 0,
|
|
36961
37039
|
cursor: "pointer"
|
|
36962
37040
|
},
|
|
36963
|
-
children: /* @__PURE__ */ (0,
|
|
37041
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36964
37042
|
"svg",
|
|
36965
37043
|
{
|
|
36966
37044
|
style: {
|
|
@@ -36974,12 +37052,12 @@ function SwapMode({
|
|
|
36974
37052
|
strokeWidth: 2,
|
|
36975
37053
|
strokeLinecap: "round",
|
|
36976
37054
|
strokeLinejoin: "round",
|
|
36977
|
-
children: /* @__PURE__ */ (0,
|
|
37055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M19 12H5m7-7-7 7 7 7" })
|
|
36978
37056
|
}
|
|
36979
37057
|
)
|
|
36980
37058
|
}
|
|
36981
37059
|
),
|
|
36982
|
-
/* @__PURE__ */ (0,
|
|
37060
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
36983
37061
|
"button",
|
|
36984
37062
|
{
|
|
36985
37063
|
onClick: handleReset,
|
|
@@ -36996,7 +37074,7 @@ function SwapMode({
|
|
|
36996
37074
|
]
|
|
36997
37075
|
}
|
|
36998
37076
|
),
|
|
36999
|
-
/* @__PURE__ */ (0,
|
|
37077
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37000
37078
|
"h1",
|
|
37001
37079
|
{
|
|
37002
37080
|
style: {
|
|
@@ -37008,7 +37086,7 @@ function SwapMode({
|
|
|
37008
37086
|
children: title
|
|
37009
37087
|
}
|
|
37010
37088
|
),
|
|
37011
|
-
/* @__PURE__ */ (0,
|
|
37089
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37012
37090
|
"div",
|
|
37013
37091
|
{
|
|
37014
37092
|
style: {
|
|
@@ -37022,7 +37100,7 @@ function SwapMode({
|
|
|
37022
37100
|
gap: spacing[5]
|
|
37023
37101
|
},
|
|
37024
37102
|
children: [
|
|
37025
|
-
/* @__PURE__ */ (0,
|
|
37103
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37026
37104
|
"div",
|
|
37027
37105
|
{
|
|
37028
37106
|
style: {
|
|
@@ -37034,14 +37112,14 @@ function SwapMode({
|
|
|
37034
37112
|
justifyContent: "center"
|
|
37035
37113
|
},
|
|
37036
37114
|
children: [
|
|
37037
|
-
/* @__PURE__ */ (0,
|
|
37115
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37038
37116
|
"svg",
|
|
37039
37117
|
{
|
|
37040
37118
|
width: ringSize,
|
|
37041
37119
|
height: ringSize,
|
|
37042
37120
|
style: { position: "absolute", inset: 0 },
|
|
37043
37121
|
children: [
|
|
37044
|
-
/* @__PURE__ */ (0,
|
|
37122
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37045
37123
|
"circle",
|
|
37046
37124
|
{
|
|
37047
37125
|
cx: ringSize / 2,
|
|
@@ -37052,7 +37130,7 @@ function SwapMode({
|
|
|
37052
37130
|
strokeWidth: ringStroke
|
|
37053
37131
|
}
|
|
37054
37132
|
),
|
|
37055
|
-
/* @__PURE__ */ (0,
|
|
37133
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37056
37134
|
"circle",
|
|
37057
37135
|
{
|
|
37058
37136
|
cx: ringSize / 2,
|
|
@@ -37071,7 +37149,7 @@ function SwapMode({
|
|
|
37071
37149
|
]
|
|
37072
37150
|
}
|
|
37073
37151
|
),
|
|
37074
|
-
/* @__PURE__ */ (0,
|
|
37152
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37075
37153
|
"div",
|
|
37076
37154
|
{
|
|
37077
37155
|
style: {
|
|
@@ -37082,7 +37160,7 @@ function SwapMode({
|
|
|
37082
37160
|
textAlign: "center"
|
|
37083
37161
|
},
|
|
37084
37162
|
children: [
|
|
37085
|
-
/* @__PURE__ */ (0,
|
|
37163
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37086
37164
|
"span",
|
|
37087
37165
|
{
|
|
37088
37166
|
style: {
|
|
@@ -37095,7 +37173,7 @@ function SwapMode({
|
|
|
37095
37173
|
children: isApproving ? "Approving" : "Swapping"
|
|
37096
37174
|
}
|
|
37097
37175
|
),
|
|
37098
|
-
/* @__PURE__ */ (0,
|
|
37176
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37099
37177
|
"div",
|
|
37100
37178
|
{
|
|
37101
37179
|
style: {
|
|
@@ -37105,7 +37183,7 @@ function SwapMode({
|
|
|
37105
37183
|
gap: spacing[1.5]
|
|
37106
37184
|
},
|
|
37107
37185
|
children: [
|
|
37108
|
-
fromToken?.iconUrl ? /* @__PURE__ */ (0,
|
|
37186
|
+
fromToken?.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37109
37187
|
"img",
|
|
37110
37188
|
{
|
|
37111
37189
|
src: fromToken.iconUrl,
|
|
@@ -37116,7 +37194,7 @@ function SwapMode({
|
|
|
37116
37194
|
},
|
|
37117
37195
|
alt: ""
|
|
37118
37196
|
}
|
|
37119
|
-
) : /* @__PURE__ */ (0,
|
|
37197
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37120
37198
|
"div",
|
|
37121
37199
|
{
|
|
37122
37200
|
style: {
|
|
@@ -37127,7 +37205,7 @@ function SwapMode({
|
|
|
37127
37205
|
}
|
|
37128
37206
|
}
|
|
37129
37207
|
),
|
|
37130
|
-
/* @__PURE__ */ (0,
|
|
37208
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37131
37209
|
"svg",
|
|
37132
37210
|
{
|
|
37133
37211
|
style: {
|
|
@@ -37141,10 +37219,10 @@ function SwapMode({
|
|
|
37141
37219
|
strokeWidth: 2,
|
|
37142
37220
|
strokeLinecap: "round",
|
|
37143
37221
|
strokeLinejoin: "round",
|
|
37144
|
-
children: /* @__PURE__ */ (0,
|
|
37222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 12h14m-7-7 7 7-7 7" })
|
|
37145
37223
|
}
|
|
37146
37224
|
),
|
|
37147
|
-
toToken?.iconUrl ? /* @__PURE__ */ (0,
|
|
37225
|
+
toToken?.iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37148
37226
|
"img",
|
|
37149
37227
|
{
|
|
37150
37228
|
src: toToken.iconUrl,
|
|
@@ -37155,7 +37233,7 @@ function SwapMode({
|
|
|
37155
37233
|
},
|
|
37156
37234
|
alt: ""
|
|
37157
37235
|
}
|
|
37158
|
-
) : /* @__PURE__ */ (0,
|
|
37236
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37159
37237
|
"div",
|
|
37160
37238
|
{
|
|
37161
37239
|
style: {
|
|
@@ -37169,7 +37247,7 @@ function SwapMode({
|
|
|
37169
37247
|
]
|
|
37170
37248
|
}
|
|
37171
37249
|
),
|
|
37172
|
-
/* @__PURE__ */ (0,
|
|
37250
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37173
37251
|
"span",
|
|
37174
37252
|
{
|
|
37175
37253
|
style: {
|
|
@@ -37181,7 +37259,7 @@ function SwapMode({
|
|
|
37181
37259
|
children: [
|
|
37182
37260
|
fromToken?.symbol,
|
|
37183
37261
|
" ",
|
|
37184
|
-
/* @__PURE__ */ (0,
|
|
37262
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37185
37263
|
"span",
|
|
37186
37264
|
{
|
|
37187
37265
|
style: {
|
|
@@ -37196,7 +37274,7 @@ function SwapMode({
|
|
|
37196
37274
|
]
|
|
37197
37275
|
}
|
|
37198
37276
|
),
|
|
37199
|
-
/* @__PURE__ */ (0,
|
|
37277
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37200
37278
|
"span",
|
|
37201
37279
|
{
|
|
37202
37280
|
style: {
|
|
@@ -37216,7 +37294,7 @@ function SwapMode({
|
|
|
37216
37294
|
]
|
|
37217
37295
|
}
|
|
37218
37296
|
),
|
|
37219
|
-
/* @__PURE__ */ (0,
|
|
37297
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37220
37298
|
"div",
|
|
37221
37299
|
{
|
|
37222
37300
|
style: {
|
|
@@ -37226,7 +37304,7 @@ function SwapMode({
|
|
|
37226
37304
|
justifyContent: "space-between"
|
|
37227
37305
|
},
|
|
37228
37306
|
children: [
|
|
37229
|
-
/* @__PURE__ */ (0,
|
|
37307
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37230
37308
|
ProcessingStepNode,
|
|
37231
37309
|
{
|
|
37232
37310
|
active: activeStep >= 0,
|
|
@@ -37235,8 +37313,8 @@ function SwapMode({
|
|
|
37235
37313
|
label: `Sending ${fromToken?.symbol ?? ""}`
|
|
37236
37314
|
}
|
|
37237
37315
|
),
|
|
37238
|
-
/* @__PURE__ */ (0,
|
|
37239
|
-
/* @__PURE__ */ (0,
|
|
37316
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ProcessingStepLine, { done: activeStep > 0 }),
|
|
37317
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37240
37318
|
ProcessingStepNode,
|
|
37241
37319
|
{
|
|
37242
37320
|
active: activeStep >= 1,
|
|
@@ -37245,8 +37323,8 @@ function SwapMode({
|
|
|
37245
37323
|
label: "Create Order"
|
|
37246
37324
|
}
|
|
37247
37325
|
),
|
|
37248
|
-
/* @__PURE__ */ (0,
|
|
37249
|
-
/* @__PURE__ */ (0,
|
|
37326
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ProcessingStepLine, { done: activeStep > 1 }),
|
|
37327
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37250
37328
|
ProcessingStepNode,
|
|
37251
37329
|
{
|
|
37252
37330
|
active: activeStep >= 2,
|
|
@@ -37265,7 +37343,7 @@ function SwapMode({
|
|
|
37265
37343
|
fromChainTxUrl
|
|
37266
37344
|
);
|
|
37267
37345
|
const isCopied = copiedHash === txHash;
|
|
37268
|
-
return /* @__PURE__ */ (0,
|
|
37346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37269
37347
|
"div",
|
|
37270
37348
|
{
|
|
37271
37349
|
style: {
|
|
@@ -37274,7 +37352,7 @@ function SwapMode({
|
|
|
37274
37352
|
gap: spacing[3]
|
|
37275
37353
|
},
|
|
37276
37354
|
children: [
|
|
37277
|
-
explorerUrl && /* @__PURE__ */ (0,
|
|
37355
|
+
explorerUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37278
37356
|
"a",
|
|
37279
37357
|
{
|
|
37280
37358
|
href: explorerUrl,
|
|
@@ -37293,7 +37371,7 @@ function SwapMode({
|
|
|
37293
37371
|
},
|
|
37294
37372
|
children: [
|
|
37295
37373
|
"View transaction",
|
|
37296
|
-
/* @__PURE__ */ (0,
|
|
37374
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37297
37375
|
"svg",
|
|
37298
37376
|
{
|
|
37299
37377
|
style: { width: "0.875rem", height: "0.875rem" },
|
|
@@ -37304,16 +37382,16 @@ function SwapMode({
|
|
|
37304
37382
|
strokeLinecap: "round",
|
|
37305
37383
|
strokeLinejoin: "round",
|
|
37306
37384
|
children: [
|
|
37307
|
-
/* @__PURE__ */ (0,
|
|
37308
|
-
/* @__PURE__ */ (0,
|
|
37309
|
-
/* @__PURE__ */ (0,
|
|
37385
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
37386
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
37387
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
37310
37388
|
]
|
|
37311
37389
|
}
|
|
37312
37390
|
)
|
|
37313
37391
|
]
|
|
37314
37392
|
}
|
|
37315
37393
|
),
|
|
37316
|
-
/* @__PURE__ */ (0,
|
|
37394
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37317
37395
|
"button",
|
|
37318
37396
|
{
|
|
37319
37397
|
onClick: () => handleCopyHash(txHash),
|
|
@@ -37330,11 +37408,11 @@ function SwapMode({
|
|
|
37330
37408
|
padding: 0,
|
|
37331
37409
|
transition: "color 0.15s"
|
|
37332
37410
|
},
|
|
37333
|
-
children: isCopied ? "Copied!" : /* @__PURE__ */ (0,
|
|
37411
|
+
children: isCopied ? "Copied!" : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
37334
37412
|
txHash.slice(0, 6),
|
|
37335
37413
|
"\u2026",
|
|
37336
37414
|
txHash.slice(-4),
|
|
37337
|
-
/* @__PURE__ */ (0,
|
|
37415
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37338
37416
|
"svg",
|
|
37339
37417
|
{
|
|
37340
37418
|
style: { width: "0.875rem", height: "0.875rem" },
|
|
@@ -37345,7 +37423,7 @@ function SwapMode({
|
|
|
37345
37423
|
strokeLinecap: "round",
|
|
37346
37424
|
strokeLinejoin: "round",
|
|
37347
37425
|
children: [
|
|
37348
|
-
/* @__PURE__ */ (0,
|
|
37426
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37349
37427
|
"rect",
|
|
37350
37428
|
{
|
|
37351
37429
|
x: "9",
|
|
@@ -37356,7 +37434,7 @@ function SwapMode({
|
|
|
37356
37434
|
ry: "2"
|
|
37357
37435
|
}
|
|
37358
37436
|
),
|
|
37359
|
-
/* @__PURE__ */ (0,
|
|
37437
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
37360
37438
|
]
|
|
37361
37439
|
}
|
|
37362
37440
|
)
|
|
@@ -37384,10 +37462,10 @@ function SwapMode({
|
|
|
37384
37462
|
dateStyle: "medium",
|
|
37385
37463
|
timeStyle: "short"
|
|
37386
37464
|
}) ?? null;
|
|
37387
|
-
return /* @__PURE__ */ (0,
|
|
37388
|
-
/* @__PURE__ */ (0,
|
|
37389
|
-
/* @__PURE__ */ (0,
|
|
37390
|
-
/* @__PURE__ */ (0,
|
|
37465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative", overflow: "hidden" }, children: [
|
|
37466
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react50.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ConfettiEffect3, { isActive: true, pieceCount: 60, clearDelay: 4e3 }) }),
|
|
37467
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { padding: `${spacing[6]} ${spacing[6]} 0` }, children: [
|
|
37468
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37391
37469
|
"div",
|
|
37392
37470
|
{
|
|
37393
37471
|
style: {
|
|
@@ -37397,7 +37475,7 @@ function SwapMode({
|
|
|
37397
37475
|
marginBottom: spacing[5]
|
|
37398
37476
|
},
|
|
37399
37477
|
children: [
|
|
37400
|
-
/* @__PURE__ */ (0,
|
|
37478
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37401
37479
|
"div",
|
|
37402
37480
|
{
|
|
37403
37481
|
style: {
|
|
@@ -37410,7 +37488,7 @@ function SwapMode({
|
|
|
37410
37488
|
justifyContent: "center",
|
|
37411
37489
|
flexShrink: 0
|
|
37412
37490
|
},
|
|
37413
|
-
children: /* @__PURE__ */ (0,
|
|
37491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37414
37492
|
"svg",
|
|
37415
37493
|
{
|
|
37416
37494
|
style: {
|
|
@@ -37424,12 +37502,12 @@ function SwapMode({
|
|
|
37424
37502
|
strokeWidth: 3,
|
|
37425
37503
|
strokeLinecap: "round",
|
|
37426
37504
|
strokeLinejoin: "round",
|
|
37427
|
-
children: /* @__PURE__ */ (0,
|
|
37505
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M20 6L9 17l-5-5" })
|
|
37428
37506
|
}
|
|
37429
37507
|
)
|
|
37430
37508
|
}
|
|
37431
37509
|
),
|
|
37432
|
-
/* @__PURE__ */ (0,
|
|
37510
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37433
37511
|
"h2",
|
|
37434
37512
|
{
|
|
37435
37513
|
style: {
|
|
@@ -37443,7 +37521,7 @@ function SwapMode({
|
|
|
37443
37521
|
]
|
|
37444
37522
|
}
|
|
37445
37523
|
),
|
|
37446
|
-
/* @__PURE__ */ (0,
|
|
37524
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37447
37525
|
"div",
|
|
37448
37526
|
{
|
|
37449
37527
|
style: {
|
|
@@ -37453,7 +37531,7 @@ function SwapMode({
|
|
|
37453
37531
|
padding: spacing[5]
|
|
37454
37532
|
},
|
|
37455
37533
|
children: [
|
|
37456
|
-
/* @__PURE__ */ (0,
|
|
37534
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37457
37535
|
"div",
|
|
37458
37536
|
{
|
|
37459
37537
|
style: {
|
|
@@ -37463,7 +37541,7 @@ function SwapMode({
|
|
|
37463
37541
|
fontSize: fontSize.sm
|
|
37464
37542
|
},
|
|
37465
37543
|
children: [
|
|
37466
|
-
/* @__PURE__ */ (0,
|
|
37544
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37467
37545
|
"div",
|
|
37468
37546
|
{
|
|
37469
37547
|
style: {
|
|
@@ -37472,8 +37550,8 @@ function SwapMode({
|
|
|
37472
37550
|
gap: spacing[2]
|
|
37473
37551
|
},
|
|
37474
37552
|
children: [
|
|
37475
|
-
fromToken?.iconUrl && /* @__PURE__ */ (0,
|
|
37476
|
-
/* @__PURE__ */ (0,
|
|
37553
|
+
fromToken?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative", flexShrink: 0 }, children: [
|
|
37554
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37477
37555
|
"img",
|
|
37478
37556
|
{
|
|
37479
37557
|
src: fromToken.iconUrl,
|
|
@@ -37485,7 +37563,7 @@ function SwapMode({
|
|
|
37485
37563
|
}
|
|
37486
37564
|
}
|
|
37487
37565
|
),
|
|
37488
|
-
fromChain?.chainIconURI && /* @__PURE__ */ (0,
|
|
37566
|
+
fromChain?.chainIconURI && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37489
37567
|
"img",
|
|
37490
37568
|
{
|
|
37491
37569
|
src: fromChain.chainIconURI,
|
|
@@ -37503,11 +37581,11 @@ function SwapMode({
|
|
|
37503
37581
|
}
|
|
37504
37582
|
)
|
|
37505
37583
|
] }),
|
|
37506
|
-
/* @__PURE__ */ (0,
|
|
37584
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: "You sold" })
|
|
37507
37585
|
]
|
|
37508
37586
|
}
|
|
37509
37587
|
),
|
|
37510
|
-
/* @__PURE__ */ (0,
|
|
37588
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37511
37589
|
"span",
|
|
37512
37590
|
{
|
|
37513
37591
|
style: {
|
|
@@ -37524,7 +37602,7 @@ function SwapMode({
|
|
|
37524
37602
|
]
|
|
37525
37603
|
}
|
|
37526
37604
|
),
|
|
37527
|
-
/* @__PURE__ */ (0,
|
|
37605
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37528
37606
|
"div",
|
|
37529
37607
|
{
|
|
37530
37608
|
style: {
|
|
@@ -37535,7 +37613,7 @@ function SwapMode({
|
|
|
37535
37613
|
marginTop: spacing[3]
|
|
37536
37614
|
},
|
|
37537
37615
|
children: [
|
|
37538
|
-
/* @__PURE__ */ (0,
|
|
37616
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37539
37617
|
"div",
|
|
37540
37618
|
{
|
|
37541
37619
|
style: {
|
|
@@ -37544,8 +37622,8 @@ function SwapMode({
|
|
|
37544
37622
|
gap: spacing[2]
|
|
37545
37623
|
},
|
|
37546
37624
|
children: [
|
|
37547
|
-
toToken?.iconUrl && /* @__PURE__ */ (0,
|
|
37548
|
-
/* @__PURE__ */ (0,
|
|
37625
|
+
toToken?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative", flexShrink: 0 }, children: [
|
|
37626
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37549
37627
|
"img",
|
|
37550
37628
|
{
|
|
37551
37629
|
src: toToken.iconUrl,
|
|
@@ -37557,7 +37635,7 @@ function SwapMode({
|
|
|
37557
37635
|
}
|
|
37558
37636
|
}
|
|
37559
37637
|
),
|
|
37560
|
-
toChain?.chainIconURI && /* @__PURE__ */ (0,
|
|
37638
|
+
toChain?.chainIconURI && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37561
37639
|
"img",
|
|
37562
37640
|
{
|
|
37563
37641
|
src: toChain.chainIconURI,
|
|
@@ -37575,11 +37653,11 @@ function SwapMode({
|
|
|
37575
37653
|
}
|
|
37576
37654
|
)
|
|
37577
37655
|
] }),
|
|
37578
|
-
/* @__PURE__ */ (0,
|
|
37656
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: "Received" })
|
|
37579
37657
|
]
|
|
37580
37658
|
}
|
|
37581
37659
|
),
|
|
37582
|
-
/* @__PURE__ */ (0,
|
|
37660
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37583
37661
|
"span",
|
|
37584
37662
|
{
|
|
37585
37663
|
style: {
|
|
@@ -37596,7 +37674,7 @@ function SwapMode({
|
|
|
37596
37674
|
]
|
|
37597
37675
|
}
|
|
37598
37676
|
),
|
|
37599
|
-
/* @__PURE__ */ (0,
|
|
37677
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37600
37678
|
"div",
|
|
37601
37679
|
{
|
|
37602
37680
|
style: {
|
|
@@ -37606,7 +37684,7 @@ function SwapMode({
|
|
|
37606
37684
|
}
|
|
37607
37685
|
}
|
|
37608
37686
|
),
|
|
37609
|
-
/* @__PURE__ */ (0,
|
|
37687
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37610
37688
|
"div",
|
|
37611
37689
|
{
|
|
37612
37690
|
style: {
|
|
@@ -37616,28 +37694,28 @@ function SwapMode({
|
|
|
37616
37694
|
fontSize: fontSize.sm
|
|
37617
37695
|
},
|
|
37618
37696
|
children: [
|
|
37619
|
-
fromUsd > 0 && /* @__PURE__ */ (0,
|
|
37697
|
+
fromUsd > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37620
37698
|
SuccessReceiptRow,
|
|
37621
37699
|
{
|
|
37622
37700
|
label: "Value sold",
|
|
37623
37701
|
value: fmtLocal(fromUsd)
|
|
37624
37702
|
}
|
|
37625
37703
|
),
|
|
37626
|
-
toUsd > 0 && /* @__PURE__ */ (0,
|
|
37704
|
+
toUsd > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37627
37705
|
SuccessReceiptRow,
|
|
37628
37706
|
{
|
|
37629
37707
|
label: "Value received",
|
|
37630
37708
|
value: fmtLocal(toUsd)
|
|
37631
37709
|
}
|
|
37632
37710
|
),
|
|
37633
|
-
effectiveRate && /* @__PURE__ */ (0,
|
|
37711
|
+
effectiveRate && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37634
37712
|
SuccessReceiptRow,
|
|
37635
37713
|
{
|
|
37636
37714
|
label: "Effective rate",
|
|
37637
37715
|
value: effectiveRate
|
|
37638
37716
|
}
|
|
37639
37717
|
),
|
|
37640
|
-
completedStr && /* @__PURE__ */ (0,
|
|
37718
|
+
completedStr && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SuccessReceiptRow, { label: "Completed", value: completedStr }),
|
|
37641
37719
|
txHash && (() => {
|
|
37642
37720
|
const srcUrl = buildExplorerUrl(
|
|
37643
37721
|
txHash,
|
|
@@ -37645,7 +37723,7 @@ function SwapMode({
|
|
|
37645
37723
|
fromChainTxUrl
|
|
37646
37724
|
);
|
|
37647
37725
|
const isCopied = copiedHash === txHash;
|
|
37648
|
-
return /* @__PURE__ */ (0,
|
|
37726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37649
37727
|
"div",
|
|
37650
37728
|
{
|
|
37651
37729
|
style: {
|
|
@@ -37654,8 +37732,8 @@ function SwapMode({
|
|
|
37654
37732
|
justifyContent: "space-between"
|
|
37655
37733
|
},
|
|
37656
37734
|
children: [
|
|
37657
|
-
/* @__PURE__ */ (0,
|
|
37658
|
-
/* @__PURE__ */ (0,
|
|
37735
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: destTxHash ? "Source tx" : "Transaction" }),
|
|
37736
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37659
37737
|
"div",
|
|
37660
37738
|
{
|
|
37661
37739
|
style: {
|
|
@@ -37664,7 +37742,7 @@ function SwapMode({
|
|
|
37664
37742
|
gap: spacing[2]
|
|
37665
37743
|
},
|
|
37666
37744
|
children: [
|
|
37667
|
-
srcUrl && /* @__PURE__ */ (0,
|
|
37745
|
+
srcUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37668
37746
|
"a",
|
|
37669
37747
|
{
|
|
37670
37748
|
href: srcUrl,
|
|
@@ -37684,7 +37762,7 @@ function SwapMode({
|
|
|
37684
37762
|
txHash.slice(0, 6),
|
|
37685
37763
|
"\u2026",
|
|
37686
37764
|
txHash.slice(-4),
|
|
37687
|
-
/* @__PURE__ */ (0,
|
|
37765
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37688
37766
|
"svg",
|
|
37689
37767
|
{
|
|
37690
37768
|
style: { width: "0.75rem", height: "0.75rem" },
|
|
@@ -37695,16 +37773,16 @@ function SwapMode({
|
|
|
37695
37773
|
strokeLinecap: "round",
|
|
37696
37774
|
strokeLinejoin: "round",
|
|
37697
37775
|
children: [
|
|
37698
|
-
/* @__PURE__ */ (0,
|
|
37699
|
-
/* @__PURE__ */ (0,
|
|
37700
|
-
/* @__PURE__ */ (0,
|
|
37776
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
37777
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
37778
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
37701
37779
|
]
|
|
37702
37780
|
}
|
|
37703
37781
|
)
|
|
37704
37782
|
]
|
|
37705
37783
|
}
|
|
37706
37784
|
),
|
|
37707
|
-
/* @__PURE__ */ (0,
|
|
37785
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37708
37786
|
"button",
|
|
37709
37787
|
{
|
|
37710
37788
|
onClick: () => handleCopyHash(txHash),
|
|
@@ -37722,7 +37800,7 @@ function SwapMode({
|
|
|
37722
37800
|
padding: 0,
|
|
37723
37801
|
transition: "color 0.15s"
|
|
37724
37802
|
},
|
|
37725
|
-
children: isCopied ? "Copied!" : /* @__PURE__ */ (0,
|
|
37803
|
+
children: isCopied ? "Copied!" : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37726
37804
|
"svg",
|
|
37727
37805
|
{
|
|
37728
37806
|
style: {
|
|
@@ -37736,7 +37814,7 @@ function SwapMode({
|
|
|
37736
37814
|
strokeLinecap: "round",
|
|
37737
37815
|
strokeLinejoin: "round",
|
|
37738
37816
|
children: [
|
|
37739
|
-
/* @__PURE__ */ (0,
|
|
37817
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37740
37818
|
"rect",
|
|
37741
37819
|
{
|
|
37742
37820
|
x: "9",
|
|
@@ -37747,7 +37825,7 @@ function SwapMode({
|
|
|
37747
37825
|
ry: "2"
|
|
37748
37826
|
}
|
|
37749
37827
|
),
|
|
37750
|
-
/* @__PURE__ */ (0,
|
|
37828
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
37751
37829
|
]
|
|
37752
37830
|
}
|
|
37753
37831
|
)
|
|
@@ -37767,7 +37845,7 @@ function SwapMode({
|
|
|
37767
37845
|
toChainTxUrl
|
|
37768
37846
|
);
|
|
37769
37847
|
const isCopied = copiedHash === destTxHash;
|
|
37770
|
-
return /* @__PURE__ */ (0,
|
|
37848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37771
37849
|
"div",
|
|
37772
37850
|
{
|
|
37773
37851
|
style: {
|
|
@@ -37776,8 +37854,8 @@ function SwapMode({
|
|
|
37776
37854
|
justifyContent: "space-between"
|
|
37777
37855
|
},
|
|
37778
37856
|
children: [
|
|
37779
|
-
/* @__PURE__ */ (0,
|
|
37780
|
-
/* @__PURE__ */ (0,
|
|
37857
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: "Destination tx" }),
|
|
37858
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37781
37859
|
"div",
|
|
37782
37860
|
{
|
|
37783
37861
|
style: {
|
|
@@ -37786,7 +37864,7 @@ function SwapMode({
|
|
|
37786
37864
|
gap: spacing[2]
|
|
37787
37865
|
},
|
|
37788
37866
|
children: [
|
|
37789
|
-
destUrl && /* @__PURE__ */ (0,
|
|
37867
|
+
destUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37790
37868
|
"a",
|
|
37791
37869
|
{
|
|
37792
37870
|
href: destUrl,
|
|
@@ -37806,7 +37884,7 @@ function SwapMode({
|
|
|
37806
37884
|
destTxHash.slice(0, 6),
|
|
37807
37885
|
"\u2026",
|
|
37808
37886
|
destTxHash.slice(-4),
|
|
37809
|
-
/* @__PURE__ */ (0,
|
|
37887
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37810
37888
|
"svg",
|
|
37811
37889
|
{
|
|
37812
37890
|
style: { width: "0.75rem", height: "0.75rem" },
|
|
@@ -37817,16 +37895,16 @@ function SwapMode({
|
|
|
37817
37895
|
strokeLinecap: "round",
|
|
37818
37896
|
strokeLinejoin: "round",
|
|
37819
37897
|
children: [
|
|
37820
|
-
/* @__PURE__ */ (0,
|
|
37821
|
-
/* @__PURE__ */ (0,
|
|
37822
|
-
/* @__PURE__ */ (0,
|
|
37898
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
37899
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
37900
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
37823
37901
|
]
|
|
37824
37902
|
}
|
|
37825
37903
|
)
|
|
37826
37904
|
]
|
|
37827
37905
|
}
|
|
37828
37906
|
),
|
|
37829
|
-
/* @__PURE__ */ (0,
|
|
37907
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37830
37908
|
"button",
|
|
37831
37909
|
{
|
|
37832
37910
|
onClick: () => handleCopyHash(destTxHash),
|
|
@@ -37843,7 +37921,7 @@ function SwapMode({
|
|
|
37843
37921
|
padding: 0,
|
|
37844
37922
|
transition: "color 0.15s"
|
|
37845
37923
|
},
|
|
37846
|
-
children: isCopied ? "Copied!" : /* @__PURE__ */ (0,
|
|
37924
|
+
children: isCopied ? "Copied!" : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37847
37925
|
"svg",
|
|
37848
37926
|
{
|
|
37849
37927
|
style: {
|
|
@@ -37857,7 +37935,7 @@ function SwapMode({
|
|
|
37857
37935
|
strokeLinecap: "round",
|
|
37858
37936
|
strokeLinejoin: "round",
|
|
37859
37937
|
children: [
|
|
37860
|
-
/* @__PURE__ */ (0,
|
|
37938
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37861
37939
|
"rect",
|
|
37862
37940
|
{
|
|
37863
37941
|
x: "9",
|
|
@@ -37868,7 +37946,7 @@ function SwapMode({
|
|
|
37868
37946
|
ry: "2"
|
|
37869
37947
|
}
|
|
37870
37948
|
),
|
|
37871
|
-
/* @__PURE__ */ (0,
|
|
37949
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
37872
37950
|
]
|
|
37873
37951
|
}
|
|
37874
37952
|
)
|
|
@@ -37888,7 +37966,7 @@ function SwapMode({
|
|
|
37888
37966
|
}
|
|
37889
37967
|
)
|
|
37890
37968
|
] }),
|
|
37891
|
-
/* @__PURE__ */ (0,
|
|
37969
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37892
37970
|
"div",
|
|
37893
37971
|
{
|
|
37894
37972
|
style: {
|
|
@@ -37898,7 +37976,7 @@ function SwapMode({
|
|
|
37898
37976
|
gap: spacing[2]
|
|
37899
37977
|
},
|
|
37900
37978
|
children: [
|
|
37901
|
-
/* @__PURE__ */ (0,
|
|
37979
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37902
37980
|
"button",
|
|
37903
37981
|
{
|
|
37904
37982
|
onClick: handleReset,
|
|
@@ -37916,7 +37994,7 @@ function SwapMode({
|
|
|
37916
37994
|
children: "Done"
|
|
37917
37995
|
}
|
|
37918
37996
|
),
|
|
37919
|
-
fromToken && toToken && /* @__PURE__ */ (0,
|
|
37997
|
+
fromToken && toToken && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37920
37998
|
"button",
|
|
37921
37999
|
{
|
|
37922
38000
|
onClick: handleSwapBack,
|
|
@@ -37945,7 +38023,7 @@ function SwapMode({
|
|
|
37945
38023
|
] }) });
|
|
37946
38024
|
}
|
|
37947
38025
|
if (stage === "error") {
|
|
37948
|
-
return /* @__PURE__ */ (0,
|
|
38026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37949
38027
|
ErrorPage,
|
|
37950
38028
|
{
|
|
37951
38029
|
error: mapError(execution.errorMessage),
|
|
@@ -37957,7 +38035,7 @@ function SwapMode({
|
|
|
37957
38035
|
if (stage === "review") {
|
|
37958
38036
|
const reviewToAmount = toAmount ?? displayToAmount;
|
|
37959
38037
|
const reviewToUsd = toUsd > 0 ? toUsd : displayToUsd;
|
|
37960
|
-
return /* @__PURE__ */ (0,
|
|
38038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37961
38039
|
"div",
|
|
37962
38040
|
{
|
|
37963
38041
|
style: {
|
|
@@ -37966,7 +38044,7 @@ function SwapMode({
|
|
|
37966
38044
|
overflowY: "auto"
|
|
37967
38045
|
},
|
|
37968
38046
|
children: [
|
|
37969
|
-
/* @__PURE__ */ (0,
|
|
38047
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
37970
38048
|
"div",
|
|
37971
38049
|
{
|
|
37972
38050
|
style: {
|
|
@@ -37976,7 +38054,7 @@ function SwapMode({
|
|
|
37976
38054
|
marginBottom: spacing[5]
|
|
37977
38055
|
},
|
|
37978
38056
|
children: [
|
|
37979
|
-
/* @__PURE__ */ (0,
|
|
38057
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37980
38058
|
"span",
|
|
37981
38059
|
{
|
|
37982
38060
|
style: {
|
|
@@ -37987,7 +38065,7 @@ function SwapMode({
|
|
|
37987
38065
|
children: "You're swapping"
|
|
37988
38066
|
}
|
|
37989
38067
|
),
|
|
37990
|
-
/* @__PURE__ */ (0,
|
|
38068
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
37991
38069
|
"button",
|
|
37992
38070
|
{
|
|
37993
38071
|
onClick: () => setStage("home"),
|
|
@@ -38002,7 +38080,7 @@ function SwapMode({
|
|
|
38002
38080
|
border: 0,
|
|
38003
38081
|
cursor: "pointer"
|
|
38004
38082
|
},
|
|
38005
|
-
children: /* @__PURE__ */ (0,
|
|
38083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38006
38084
|
"svg",
|
|
38007
38085
|
{
|
|
38008
38086
|
style: {
|
|
@@ -38016,7 +38094,7 @@ function SwapMode({
|
|
|
38016
38094
|
strokeWidth: 2,
|
|
38017
38095
|
strokeLinecap: "round",
|
|
38018
38096
|
strokeLinejoin: "round",
|
|
38019
|
-
children: /* @__PURE__ */ (0,
|
|
38097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
38020
38098
|
}
|
|
38021
38099
|
)
|
|
38022
38100
|
}
|
|
@@ -38024,7 +38102,7 @@ function SwapMode({
|
|
|
38024
38102
|
]
|
|
38025
38103
|
}
|
|
38026
38104
|
),
|
|
38027
|
-
/* @__PURE__ */ (0,
|
|
38105
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38028
38106
|
"div",
|
|
38029
38107
|
{
|
|
38030
38108
|
style: {
|
|
@@ -38033,8 +38111,8 @@ function SwapMode({
|
|
|
38033
38111
|
justifyContent: "space-between"
|
|
38034
38112
|
},
|
|
38035
38113
|
children: [
|
|
38036
|
-
/* @__PURE__ */ (0,
|
|
38037
|
-
/* @__PURE__ */ (0,
|
|
38114
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
38115
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38038
38116
|
"p",
|
|
38039
38117
|
{
|
|
38040
38118
|
style: {
|
|
@@ -38050,7 +38128,7 @@ function SwapMode({
|
|
|
38050
38128
|
]
|
|
38051
38129
|
}
|
|
38052
38130
|
),
|
|
38053
|
-
/* @__PURE__ */ (0,
|
|
38131
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38054
38132
|
"p",
|
|
38055
38133
|
{
|
|
38056
38134
|
style: {
|
|
@@ -38062,7 +38140,7 @@ function SwapMode({
|
|
|
38062
38140
|
}
|
|
38063
38141
|
)
|
|
38064
38142
|
] }),
|
|
38065
|
-
fromToken?.iconUrl && /* @__PURE__ */ (0,
|
|
38143
|
+
fromToken?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38066
38144
|
TokenIcon,
|
|
38067
38145
|
{
|
|
38068
38146
|
icon: fromToken.iconUrl,
|
|
@@ -38073,7 +38151,7 @@ function SwapMode({
|
|
|
38073
38151
|
]
|
|
38074
38152
|
}
|
|
38075
38153
|
),
|
|
38076
|
-
/* @__PURE__ */ (0,
|
|
38154
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38077
38155
|
"div",
|
|
38078
38156
|
{
|
|
38079
38157
|
style: {
|
|
@@ -38081,7 +38159,7 @@ function SwapMode({
|
|
|
38081
38159
|
justifyContent: "center",
|
|
38082
38160
|
margin: `${spacing[3]} 0`
|
|
38083
38161
|
},
|
|
38084
|
-
children: /* @__PURE__ */ (0,
|
|
38162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38085
38163
|
"svg",
|
|
38086
38164
|
{
|
|
38087
38165
|
style: {
|
|
@@ -38095,12 +38173,12 @@ function SwapMode({
|
|
|
38095
38173
|
strokeWidth: 2,
|
|
38096
38174
|
strokeLinecap: "round",
|
|
38097
38175
|
strokeLinejoin: "round",
|
|
38098
|
-
children: /* @__PURE__ */ (0,
|
|
38176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 5v14m-7-7l7 7 7-7" })
|
|
38099
38177
|
}
|
|
38100
38178
|
)
|
|
38101
38179
|
}
|
|
38102
38180
|
),
|
|
38103
|
-
/* @__PURE__ */ (0,
|
|
38181
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38104
38182
|
"div",
|
|
38105
38183
|
{
|
|
38106
38184
|
style: {
|
|
@@ -38109,8 +38187,8 @@ function SwapMode({
|
|
|
38109
38187
|
justifyContent: "space-between"
|
|
38110
38188
|
},
|
|
38111
38189
|
children: [
|
|
38112
|
-
/* @__PURE__ */ (0,
|
|
38113
|
-
/* @__PURE__ */ (0,
|
|
38190
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
38191
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38114
38192
|
"p",
|
|
38115
38193
|
{
|
|
38116
38194
|
style: {
|
|
@@ -38126,7 +38204,7 @@ function SwapMode({
|
|
|
38126
38204
|
]
|
|
38127
38205
|
}
|
|
38128
38206
|
),
|
|
38129
|
-
/* @__PURE__ */ (0,
|
|
38207
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38130
38208
|
"p",
|
|
38131
38209
|
{
|
|
38132
38210
|
style: {
|
|
@@ -38138,7 +38216,7 @@ function SwapMode({
|
|
|
38138
38216
|
}
|
|
38139
38217
|
)
|
|
38140
38218
|
] }),
|
|
38141
|
-
toToken?.iconUrl && /* @__PURE__ */ (0,
|
|
38219
|
+
toToken?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38142
38220
|
TokenIcon,
|
|
38143
38221
|
{
|
|
38144
38222
|
icon: toToken.iconUrl,
|
|
@@ -38149,7 +38227,7 @@ function SwapMode({
|
|
|
38149
38227
|
]
|
|
38150
38228
|
}
|
|
38151
38229
|
),
|
|
38152
|
-
/* @__PURE__ */ (0,
|
|
38230
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38153
38231
|
"button",
|
|
38154
38232
|
{
|
|
38155
38233
|
onClick: () => setShowReviewDetails((v) => !v),
|
|
@@ -38168,13 +38246,13 @@ function SwapMode({
|
|
|
38168
38246
|
padding: 0
|
|
38169
38247
|
},
|
|
38170
38248
|
children: [
|
|
38171
|
-
/* @__PURE__ */ (0,
|
|
38249
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38172
38250
|
"div",
|
|
38173
38251
|
{
|
|
38174
38252
|
style: { flex: 1, height: "1px", backgroundColor: colors.border }
|
|
38175
38253
|
}
|
|
38176
38254
|
),
|
|
38177
|
-
/* @__PURE__ */ (0,
|
|
38255
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38178
38256
|
"span",
|
|
38179
38257
|
{
|
|
38180
38258
|
style: {
|
|
@@ -38186,7 +38264,7 @@ function SwapMode({
|
|
|
38186
38264
|
},
|
|
38187
38265
|
children: [
|
|
38188
38266
|
showReviewDetails ? "Hide details" : "View details",
|
|
38189
|
-
/* @__PURE__ */ (0,
|
|
38267
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38190
38268
|
"svg",
|
|
38191
38269
|
{
|
|
38192
38270
|
style: {
|
|
@@ -38201,10 +38279,10 @@ function SwapMode({
|
|
|
38201
38279
|
strokeWidth: 2,
|
|
38202
38280
|
strokeLinecap: "round",
|
|
38203
38281
|
strokeLinejoin: "round",
|
|
38204
|
-
children: /* @__PURE__ */ (0,
|
|
38282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
38205
38283
|
}
|
|
38206
38284
|
),
|
|
38207
|
-
route.data && /* @__PURE__ */ (0,
|
|
38285
|
+
route.data && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38208
38286
|
"svg",
|
|
38209
38287
|
{
|
|
38210
38288
|
width: "14",
|
|
@@ -38217,7 +38295,7 @@ function SwapMode({
|
|
|
38217
38295
|
marginLeft: "0.125rem"
|
|
38218
38296
|
},
|
|
38219
38297
|
children: [
|
|
38220
|
-
/* @__PURE__ */ (0,
|
|
38298
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38221
38299
|
"circle",
|
|
38222
38300
|
{
|
|
38223
38301
|
cx: "7",
|
|
@@ -38228,7 +38306,7 @@ function SwapMode({
|
|
|
38228
38306
|
strokeWidth: "1.5"
|
|
38229
38307
|
}
|
|
38230
38308
|
),
|
|
38231
|
-
/* @__PURE__ */ (0,
|
|
38309
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38232
38310
|
"circle",
|
|
38233
38311
|
{
|
|
38234
38312
|
cx: "7",
|
|
@@ -38249,7 +38327,7 @@ function SwapMode({
|
|
|
38249
38327
|
]
|
|
38250
38328
|
}
|
|
38251
38329
|
),
|
|
38252
|
-
/* @__PURE__ */ (0,
|
|
38330
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38253
38331
|
"div",
|
|
38254
38332
|
{
|
|
38255
38333
|
style: { flex: 1, height: "1px", backgroundColor: colors.border }
|
|
@@ -38258,7 +38336,7 @@ function SwapMode({
|
|
|
38258
38336
|
]
|
|
38259
38337
|
}
|
|
38260
38338
|
),
|
|
38261
|
-
showReviewDetails && /* @__PURE__ */ (0,
|
|
38339
|
+
showReviewDetails && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38262
38340
|
"div",
|
|
38263
38341
|
{
|
|
38264
38342
|
style: {
|
|
@@ -38269,7 +38347,7 @@ function SwapMode({
|
|
|
38269
38347
|
marginBottom: spacing[2]
|
|
38270
38348
|
},
|
|
38271
38349
|
children: [
|
|
38272
|
-
exchangeRate !== null && /* @__PURE__ */ (0,
|
|
38350
|
+
exchangeRate !== null && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38273
38351
|
ReviewDetailRow,
|
|
38274
38352
|
{
|
|
38275
38353
|
label: "Rate",
|
|
@@ -38277,7 +38355,7 @@ function SwapMode({
|
|
|
38277
38355
|
value: `1 ${fromToken?.symbol} = ${fmtAmount(1 / (exchangeRate ?? 1), 4)} ${toToken?.symbol} ($${fmtAmount(fromTokenPriceUSD, 2)})`
|
|
38278
38356
|
}
|
|
38279
38357
|
),
|
|
38280
|
-
/* @__PURE__ */ (0,
|
|
38358
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38281
38359
|
ReviewDetailRow,
|
|
38282
38360
|
{
|
|
38283
38361
|
label: "Fee",
|
|
@@ -38285,12 +38363,12 @@ function SwapMode({
|
|
|
38285
38363
|
value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
|
|
38286
38364
|
}
|
|
38287
38365
|
),
|
|
38288
|
-
/* @__PURE__ */ (0,
|
|
38366
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38289
38367
|
ReviewDetailRow,
|
|
38290
38368
|
{
|
|
38291
38369
|
label: "Network cost",
|
|
38292
38370
|
tooltip: "Estimated gas fee paid to the blockchain network",
|
|
38293
|
-
value: isGasSponsored ? /* @__PURE__ */ (0,
|
|
38371
|
+
value: isGasSponsored ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38294
38372
|
"span",
|
|
38295
38373
|
{
|
|
38296
38374
|
style: {
|
|
@@ -38299,14 +38377,14 @@ function SwapMode({
|
|
|
38299
38377
|
gap: "0.25rem"
|
|
38300
38378
|
},
|
|
38301
38379
|
children: [
|
|
38302
|
-
/* @__PURE__ */ (0,
|
|
38380
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GasIcon, { size: "0.875rem" }),
|
|
38303
38381
|
fmtLocal(networkCostUsd)
|
|
38304
38382
|
]
|
|
38305
38383
|
}
|
|
38306
38384
|
) : "\u2014"
|
|
38307
38385
|
}
|
|
38308
38386
|
),
|
|
38309
|
-
/* @__PURE__ */ (0,
|
|
38387
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38310
38388
|
ReviewDetailRow,
|
|
38311
38389
|
{
|
|
38312
38390
|
label: "Max slippage",
|
|
@@ -38314,12 +38392,12 @@ function SwapMode({
|
|
|
38314
38392
|
value: `${slippage}%`
|
|
38315
38393
|
}
|
|
38316
38394
|
),
|
|
38317
|
-
(routePath || route.data?.route?.provider) && /* @__PURE__ */ (0,
|
|
38395
|
+
(routePath || route.data?.route?.provider) && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38318
38396
|
ReviewDetailRow,
|
|
38319
38397
|
{
|
|
38320
38398
|
label: "Route",
|
|
38321
38399
|
tooltip: "Protocol or bridge used to execute your swap",
|
|
38322
|
-
value: /* @__PURE__ */ (0,
|
|
38400
|
+
value: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38323
38401
|
"span",
|
|
38324
38402
|
{
|
|
38325
38403
|
style: {
|
|
@@ -38339,7 +38417,7 @@ function SwapMode({
|
|
|
38339
38417
|
]
|
|
38340
38418
|
}
|
|
38341
38419
|
),
|
|
38342
|
-
/* @__PURE__ */ (0,
|
|
38420
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38343
38421
|
SwapActionArea,
|
|
38344
38422
|
{
|
|
38345
38423
|
fromTokenSymbol: fromToken?.symbol ?? "",
|
|
@@ -38363,12 +38441,12 @@ function SwapMode({
|
|
|
38363
38441
|
const ctaDisabled = !hasTokens || !hasAmount || insufficient || isConnected && needsDestAddress && !isValidDestAddress || route.loading || feesExceedOutput;
|
|
38364
38442
|
const ctaAction = !isConnected ? handleConnectAndReview : () => void handleReview();
|
|
38365
38443
|
const showRateRow = hasTokens && exchangeRate !== null;
|
|
38366
|
-
return /* @__PURE__ */ (0,
|
|
38444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetContainer, { theme: resolvedTheme, style, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38367
38445
|
"div",
|
|
38368
38446
|
{
|
|
38369
38447
|
style: { display: "flex", flexDirection: "column", minHeight: "500px" },
|
|
38370
38448
|
children: [
|
|
38371
|
-
/* @__PURE__ */ (0,
|
|
38449
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38372
38450
|
"div",
|
|
38373
38451
|
{
|
|
38374
38452
|
style: {
|
|
@@ -38379,7 +38457,7 @@ function SwapMode({
|
|
|
38379
38457
|
marginBottom: spacing[1]
|
|
38380
38458
|
},
|
|
38381
38459
|
children: [
|
|
38382
|
-
/* @__PURE__ */ (0,
|
|
38460
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38383
38461
|
"span",
|
|
38384
38462
|
{
|
|
38385
38463
|
style: {
|
|
@@ -38393,7 +38471,7 @@ function SwapMode({
|
|
|
38393
38471
|
children: "Swap"
|
|
38394
38472
|
}
|
|
38395
38473
|
),
|
|
38396
|
-
/* @__PURE__ */ (0,
|
|
38474
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38397
38475
|
"div",
|
|
38398
38476
|
{
|
|
38399
38477
|
ref: settingsRef,
|
|
@@ -38404,7 +38482,7 @@ function SwapMode({
|
|
|
38404
38482
|
position: "relative"
|
|
38405
38483
|
},
|
|
38406
38484
|
children: [
|
|
38407
|
-
walletAddress ? /* @__PURE__ */ (0,
|
|
38485
|
+
walletAddress ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38408
38486
|
"button",
|
|
38409
38487
|
{
|
|
38410
38488
|
onClick: handleConnectAndReview,
|
|
@@ -38421,7 +38499,7 @@ function SwapMode({
|
|
|
38421
38499
|
walletAddress.slice(-4)
|
|
38422
38500
|
]
|
|
38423
38501
|
}
|
|
38424
|
-
) : /* @__PURE__ */ (0,
|
|
38502
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38425
38503
|
"button",
|
|
38426
38504
|
{
|
|
38427
38505
|
onClick: handleConnectAndReview,
|
|
@@ -38436,7 +38514,7 @@ function SwapMode({
|
|
|
38436
38514
|
children: "Connect wallet"
|
|
38437
38515
|
}
|
|
38438
38516
|
),
|
|
38439
|
-
/* @__PURE__ */ (0,
|
|
38517
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38440
38518
|
"button",
|
|
38441
38519
|
{
|
|
38442
38520
|
onClick: () => setShowSettings((v) => !v),
|
|
@@ -38454,7 +38532,7 @@ function SwapMode({
|
|
|
38454
38532
|
color: colors.mutedForeground,
|
|
38455
38533
|
padding: 0
|
|
38456
38534
|
},
|
|
38457
|
-
children: /* @__PURE__ */ (0,
|
|
38535
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38458
38536
|
"svg",
|
|
38459
38537
|
{
|
|
38460
38538
|
style: { width: "1rem", height: "1rem" },
|
|
@@ -38465,14 +38543,14 @@ function SwapMode({
|
|
|
38465
38543
|
strokeLinecap: "round",
|
|
38466
38544
|
strokeLinejoin: "round",
|
|
38467
38545
|
children: [
|
|
38468
|
-
/* @__PURE__ */ (0,
|
|
38469
|
-
/* @__PURE__ */ (0,
|
|
38546
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "12", cy: "12", r: "3" }),
|
|
38547
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
38470
38548
|
]
|
|
38471
38549
|
}
|
|
38472
38550
|
)
|
|
38473
38551
|
}
|
|
38474
38552
|
),
|
|
38475
|
-
showSettings && /* @__PURE__ */ (0,
|
|
38553
|
+
showSettings && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38476
38554
|
"div",
|
|
38477
38555
|
{
|
|
38478
38556
|
style: {
|
|
@@ -38488,7 +38566,7 @@ function SwapMode({
|
|
|
38488
38566
|
zIndex: 100
|
|
38489
38567
|
},
|
|
38490
38568
|
children: [
|
|
38491
|
-
/* @__PURE__ */ (0,
|
|
38569
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38492
38570
|
"p",
|
|
38493
38571
|
{
|
|
38494
38572
|
style: {
|
|
@@ -38502,7 +38580,7 @@ function SwapMode({
|
|
|
38502
38580
|
children: "Appearance"
|
|
38503
38581
|
}
|
|
38504
38582
|
),
|
|
38505
|
-
/* @__PURE__ */ (0,
|
|
38583
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38506
38584
|
"div",
|
|
38507
38585
|
{
|
|
38508
38586
|
style: {
|
|
@@ -38511,8 +38589,8 @@ function SwapMode({
|
|
|
38511
38589
|
justifyContent: "space-between"
|
|
38512
38590
|
},
|
|
38513
38591
|
children: [
|
|
38514
|
-
/* @__PURE__ */ (0,
|
|
38515
|
-
/* @__PURE__ */ (0,
|
|
38592
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
38593
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38516
38594
|
"p",
|
|
38517
38595
|
{
|
|
38518
38596
|
style: {
|
|
@@ -38523,7 +38601,7 @@ function SwapMode({
|
|
|
38523
38601
|
children: "Dark mode"
|
|
38524
38602
|
}
|
|
38525
38603
|
),
|
|
38526
|
-
/* @__PURE__ */ (0,
|
|
38604
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38527
38605
|
"p",
|
|
38528
38606
|
{
|
|
38529
38607
|
style: {
|
|
@@ -38535,7 +38613,7 @@ function SwapMode({
|
|
|
38535
38613
|
}
|
|
38536
38614
|
)
|
|
38537
38615
|
] }),
|
|
38538
|
-
/* @__PURE__ */ (0,
|
|
38616
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38539
38617
|
"button",
|
|
38540
38618
|
{
|
|
38541
38619
|
role: "switch",
|
|
@@ -38552,7 +38630,7 @@ function SwapMode({
|
|
|
38552
38630
|
transition: "background-color 0.2s",
|
|
38553
38631
|
flexShrink: 0
|
|
38554
38632
|
},
|
|
38555
|
-
children: /* @__PURE__ */ (0,
|
|
38633
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38556
38634
|
"span",
|
|
38557
38635
|
{
|
|
38558
38636
|
style: {
|
|
@@ -38573,7 +38651,7 @@ function SwapMode({
|
|
|
38573
38651
|
]
|
|
38574
38652
|
}
|
|
38575
38653
|
) }),
|
|
38576
|
-
/* @__PURE__ */ (0,
|
|
38654
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38577
38655
|
"p",
|
|
38578
38656
|
{
|
|
38579
38657
|
style: {
|
|
@@ -38587,8 +38665,8 @@ function SwapMode({
|
|
|
38587
38665
|
children: "Transaction Settings"
|
|
38588
38666
|
}
|
|
38589
38667
|
),
|
|
38590
|
-
/* @__PURE__ */ (0,
|
|
38591
|
-
/* @__PURE__ */ (0,
|
|
38668
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { marginBottom: spacing[4] }, children: [
|
|
38669
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38592
38670
|
"p",
|
|
38593
38671
|
{
|
|
38594
38672
|
style: {
|
|
@@ -38600,8 +38678,8 @@ function SwapMode({
|
|
|
38600
38678
|
children: "Max slippage"
|
|
38601
38679
|
}
|
|
38602
38680
|
),
|
|
38603
|
-
/* @__PURE__ */ (0,
|
|
38604
|
-
[0.1, 0.5, 1].map((v) => /* @__PURE__ */ (0,
|
|
38681
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { display: "flex", gap: spacing[1.5] }, children: [
|
|
38682
|
+
[0.1, 0.5, 1].map((v) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38605
38683
|
"button",
|
|
38606
38684
|
{
|
|
38607
38685
|
onClick: () => {
|
|
@@ -38626,7 +38704,7 @@ function SwapMode({
|
|
|
38626
38704
|
},
|
|
38627
38705
|
v
|
|
38628
38706
|
)),
|
|
38629
|
-
/* @__PURE__ */ (0,
|
|
38707
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { flex: 1.5, position: "relative" }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38630
38708
|
"input",
|
|
38631
38709
|
{
|
|
38632
38710
|
type: "number",
|
|
@@ -38657,7 +38735,7 @@ function SwapMode({
|
|
|
38657
38735
|
}
|
|
38658
38736
|
) })
|
|
38659
38737
|
] }),
|
|
38660
|
-
slippage > 5 && /* @__PURE__ */ (0,
|
|
38738
|
+
slippage > 5 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38661
38739
|
"p",
|
|
38662
38740
|
{
|
|
38663
38741
|
style: {
|
|
@@ -38669,7 +38747,7 @@ function SwapMode({
|
|
|
38669
38747
|
}
|
|
38670
38748
|
)
|
|
38671
38749
|
] }),
|
|
38672
|
-
canSetMaxApproval && /* @__PURE__ */ (0,
|
|
38750
|
+
canSetMaxApproval && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { marginBottom: spacing[4] }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38673
38751
|
"div",
|
|
38674
38752
|
{
|
|
38675
38753
|
style: {
|
|
@@ -38678,8 +38756,8 @@ function SwapMode({
|
|
|
38678
38756
|
justifyContent: "space-between"
|
|
38679
38757
|
},
|
|
38680
38758
|
children: [
|
|
38681
|
-
/* @__PURE__ */ (0,
|
|
38682
|
-
/* @__PURE__ */ (0,
|
|
38759
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { children: [
|
|
38760
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38683
38761
|
"p",
|
|
38684
38762
|
{
|
|
38685
38763
|
style: {
|
|
@@ -38690,7 +38768,7 @@ function SwapMode({
|
|
|
38690
38768
|
children: "Max approval"
|
|
38691
38769
|
}
|
|
38692
38770
|
),
|
|
38693
|
-
/* @__PURE__ */ (0,
|
|
38771
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38694
38772
|
"p",
|
|
38695
38773
|
{
|
|
38696
38774
|
style: {
|
|
@@ -38702,7 +38780,7 @@ function SwapMode({
|
|
|
38702
38780
|
}
|
|
38703
38781
|
)
|
|
38704
38782
|
] }),
|
|
38705
|
-
/* @__PURE__ */ (0,
|
|
38783
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38706
38784
|
"button",
|
|
38707
38785
|
{
|
|
38708
38786
|
role: "switch",
|
|
@@ -38719,7 +38797,7 @@ function SwapMode({
|
|
|
38719
38797
|
transition: "background-color 0.2s",
|
|
38720
38798
|
flexShrink: 0
|
|
38721
38799
|
},
|
|
38722
|
-
children: /* @__PURE__ */ (0,
|
|
38800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38723
38801
|
"span",
|
|
38724
38802
|
{
|
|
38725
38803
|
style: {
|
|
@@ -38740,7 +38818,7 @@ function SwapMode({
|
|
|
38740
38818
|
]
|
|
38741
38819
|
}
|
|
38742
38820
|
) }),
|
|
38743
|
-
/* @__PURE__ */ (0,
|
|
38821
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38744
38822
|
"div",
|
|
38745
38823
|
{
|
|
38746
38824
|
style: {
|
|
@@ -38750,7 +38828,7 @@ function SwapMode({
|
|
|
38750
38828
|
gap: spacing[3]
|
|
38751
38829
|
},
|
|
38752
38830
|
children: [
|
|
38753
|
-
/* @__PURE__ */ (0,
|
|
38831
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38754
38832
|
"p",
|
|
38755
38833
|
{
|
|
38756
38834
|
style: {
|
|
@@ -38762,13 +38840,13 @@ function SwapMode({
|
|
|
38762
38840
|
children: "Display currency"
|
|
38763
38841
|
}
|
|
38764
38842
|
),
|
|
38765
|
-
/* @__PURE__ */ (0,
|
|
38843
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38766
38844
|
"div",
|
|
38767
38845
|
{
|
|
38768
38846
|
ref: currencyDropdownRef,
|
|
38769
38847
|
style: { position: "relative", flexShrink: 0 },
|
|
38770
38848
|
children: [
|
|
38771
|
-
/* @__PURE__ */ (0,
|
|
38849
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38772
38850
|
"button",
|
|
38773
38851
|
{
|
|
38774
38852
|
onClick: () => setShowCurrencyDropdown((v) => !v),
|
|
@@ -38788,9 +38866,9 @@ function SwapMode({
|
|
|
38788
38866
|
whiteSpace: "nowrap"
|
|
38789
38867
|
},
|
|
38790
38868
|
children: [
|
|
38791
|
-
/* @__PURE__ */ (0,
|
|
38792
|
-
/* @__PURE__ */ (0,
|
|
38793
|
-
/* @__PURE__ */ (0,
|
|
38869
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: currencySymbol }),
|
|
38870
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: selectedCurrency }),
|
|
38871
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38794
38872
|
"svg",
|
|
38795
38873
|
{
|
|
38796
38874
|
style: {
|
|
@@ -38806,13 +38884,13 @@ function SwapMode({
|
|
|
38806
38884
|
strokeWidth: 2.5,
|
|
38807
38885
|
strokeLinecap: "round",
|
|
38808
38886
|
strokeLinejoin: "round",
|
|
38809
|
-
children: /* @__PURE__ */ (0,
|
|
38887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
38810
38888
|
}
|
|
38811
38889
|
)
|
|
38812
38890
|
]
|
|
38813
38891
|
}
|
|
38814
38892
|
),
|
|
38815
|
-
showCurrencyDropdown && /* @__PURE__ */ (0,
|
|
38893
|
+
showCurrencyDropdown && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38816
38894
|
"div",
|
|
38817
38895
|
{
|
|
38818
38896
|
style: {
|
|
@@ -38831,7 +38909,7 @@ function SwapMode({
|
|
|
38831
38909
|
},
|
|
38832
38910
|
children: SUPPORTED_CURRENCIES.map((c) => {
|
|
38833
38911
|
const isSelected = selectedCurrency === c.code;
|
|
38834
|
-
return /* @__PURE__ */ (0,
|
|
38912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38835
38913
|
"button",
|
|
38836
38914
|
{
|
|
38837
38915
|
onClick: () => {
|
|
@@ -38854,7 +38932,7 @@ function SwapMode({
|
|
|
38854
38932
|
fontFamily: "inherit"
|
|
38855
38933
|
},
|
|
38856
38934
|
children: [
|
|
38857
|
-
/* @__PURE__ */ (0,
|
|
38935
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38858
38936
|
"span",
|
|
38859
38937
|
{
|
|
38860
38938
|
style: {
|
|
@@ -38865,8 +38943,8 @@ function SwapMode({
|
|
|
38865
38943
|
children: c.symbol
|
|
38866
38944
|
}
|
|
38867
38945
|
),
|
|
38868
|
-
/* @__PURE__ */ (0,
|
|
38869
|
-
/* @__PURE__ */ (0,
|
|
38946
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { flexShrink: 0 }, children: c.code }),
|
|
38947
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38870
38948
|
"span",
|
|
38871
38949
|
{
|
|
38872
38950
|
style: {
|
|
@@ -38901,7 +38979,7 @@ function SwapMode({
|
|
|
38901
38979
|
]
|
|
38902
38980
|
}
|
|
38903
38981
|
),
|
|
38904
|
-
/* @__PURE__ */ (0,
|
|
38982
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { padding: `0 ${spacing[3]}` }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38905
38983
|
"div",
|
|
38906
38984
|
{
|
|
38907
38985
|
onMouseEnter: () => setHoverSell(true),
|
|
@@ -38913,7 +38991,7 @@ function SwapMode({
|
|
|
38913
38991
|
padding: `${spacing[4]} ${spacing[5]} ${spacing[5]}`
|
|
38914
38992
|
},
|
|
38915
38993
|
children: [
|
|
38916
|
-
/* @__PURE__ */ (0,
|
|
38994
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
38917
38995
|
"div",
|
|
38918
38996
|
{
|
|
38919
38997
|
style: {
|
|
@@ -38923,7 +39001,7 @@ function SwapMode({
|
|
|
38923
39001
|
marginBottom: spacing[1]
|
|
38924
39002
|
},
|
|
38925
39003
|
children: [
|
|
38926
|
-
/* @__PURE__ */ (0,
|
|
39004
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38927
39005
|
"span",
|
|
38928
39006
|
{
|
|
38929
39007
|
style: {
|
|
@@ -38934,7 +39012,7 @@ function SwapMode({
|
|
|
38934
39012
|
children: "Sell"
|
|
38935
39013
|
}
|
|
38936
39014
|
),
|
|
38937
|
-
/* @__PURE__ */ (0,
|
|
39015
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38938
39016
|
"div",
|
|
38939
39017
|
{
|
|
38940
39018
|
style: {
|
|
@@ -38945,7 +39023,7 @@ function SwapMode({
|
|
|
38945
39023
|
transition: "opacity 0.2s",
|
|
38946
39024
|
pointerEvents: hoverSell && fromBalance !== null ? "auto" : "none"
|
|
38947
39025
|
},
|
|
38948
|
-
children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ (0,
|
|
39026
|
+
children: PERCENT_OPTIONS.map((p) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
38949
39027
|
"button",
|
|
38950
39028
|
{
|
|
38951
39029
|
onClick: () => {
|
|
@@ -39001,12 +39079,12 @@ function SwapMode({
|
|
|
39001
39079
|
]
|
|
39002
39080
|
}
|
|
39003
39081
|
),
|
|
39004
|
-
/* @__PURE__ */ (0,
|
|
39082
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39005
39083
|
"div",
|
|
39006
39084
|
{
|
|
39007
39085
|
style: { display: "flex", alignItems: "center", gap: spacing[3] },
|
|
39008
39086
|
children: [
|
|
39009
|
-
amountInputMode === "usd" && /* @__PURE__ */ (0,
|
|
39087
|
+
amountInputMode === "usd" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39010
39088
|
"span",
|
|
39011
39089
|
{
|
|
39012
39090
|
style: {
|
|
@@ -39021,7 +39099,7 @@ function SwapMode({
|
|
|
39021
39099
|
children: currencySymbol
|
|
39022
39100
|
}
|
|
39023
39101
|
),
|
|
39024
|
-
/* @__PURE__ */ (0,
|
|
39102
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39025
39103
|
"input",
|
|
39026
39104
|
{
|
|
39027
39105
|
inputMode: "decimal",
|
|
@@ -39047,22 +39125,7 @@ function SwapMode({
|
|
|
39047
39125
|
}
|
|
39048
39126
|
}
|
|
39049
39127
|
),
|
|
39050
|
-
|
|
39051
|
-
"span",
|
|
39052
|
-
{
|
|
39053
|
-
style: {
|
|
39054
|
-
fontSize: scaleFontSize(amount || "0"),
|
|
39055
|
-
fontWeight: fontWeight.medium,
|
|
39056
|
-
letterSpacing: "-0.02em",
|
|
39057
|
-
color: amount ? colors.foreground : `${colors.mutedForeground}80`,
|
|
39058
|
-
transition: "font-size 0.15s ease",
|
|
39059
|
-
flexShrink: 0,
|
|
39060
|
-
userSelect: "none"
|
|
39061
|
-
},
|
|
39062
|
-
children: fromToken.symbol
|
|
39063
|
-
}
|
|
39064
|
-
),
|
|
39065
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
39128
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39066
39129
|
TokenPillButton,
|
|
39067
39130
|
{
|
|
39068
39131
|
token: fromToken,
|
|
@@ -39074,7 +39137,7 @@ function SwapMode({
|
|
|
39074
39137
|
]
|
|
39075
39138
|
}
|
|
39076
39139
|
),
|
|
39077
|
-
/* @__PURE__ */ (0,
|
|
39140
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39078
39141
|
"div",
|
|
39079
39142
|
{
|
|
39080
39143
|
style: {
|
|
@@ -39086,7 +39149,7 @@ function SwapMode({
|
|
|
39086
39149
|
color: colors.mutedForeground
|
|
39087
39150
|
},
|
|
39088
39151
|
children: [
|
|
39089
|
-
/* @__PURE__ */ (0,
|
|
39152
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39090
39153
|
"button",
|
|
39091
39154
|
{
|
|
39092
39155
|
type: "button",
|
|
@@ -39104,8 +39167,8 @@ function SwapMode({
|
|
|
39104
39167
|
fontFamily: "inherit"
|
|
39105
39168
|
},
|
|
39106
39169
|
children: [
|
|
39107
|
-
/* @__PURE__ */ (0,
|
|
39108
|
-
hasFromUsdPrice && /* @__PURE__ */ (0,
|
|
39170
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: amountInputMode === "usd" ? fromToken ? `${fmtAmount(tokenSellNum, 5)} ${fromToken.symbol}` : "0" : hasFromUsdPrice ? fmtLocal(usdSellNum) : "USD pricing unavailable" }),
|
|
39171
|
+
hasFromUsdPrice && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39109
39172
|
"svg",
|
|
39110
39173
|
{
|
|
39111
39174
|
style: { width: "0.75rem", height: "0.75rem" },
|
|
@@ -39115,17 +39178,17 @@ function SwapMode({
|
|
|
39115
39178
|
strokeWidth: 2,
|
|
39116
39179
|
strokeLinecap: "round",
|
|
39117
39180
|
strokeLinejoin: "round",
|
|
39118
|
-
children: /* @__PURE__ */ (0,
|
|
39181
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4" })
|
|
39119
39182
|
}
|
|
39120
39183
|
)
|
|
39121
39184
|
]
|
|
39122
39185
|
}
|
|
39123
39186
|
),
|
|
39124
|
-
fromBalance !== null && fromToken && /* @__PURE__ */ (0,
|
|
39187
|
+
fromBalance !== null && fromToken && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { children: [
|
|
39125
39188
|
fmtAmount(fromBalance, 6),
|
|
39126
39189
|
" ",
|
|
39127
39190
|
fromToken.symbol,
|
|
39128
|
-
balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ (0,
|
|
39191
|
+
balanceUsd !== null && balanceUsd > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { children: [
|
|
39129
39192
|
" \u2248 ",
|
|
39130
39193
|
fmtLocal(balanceUsd)
|
|
39131
39194
|
] })
|
|
@@ -39136,7 +39199,7 @@ function SwapMode({
|
|
|
39136
39199
|
]
|
|
39137
39200
|
}
|
|
39138
39201
|
) }),
|
|
39139
|
-
/* @__PURE__ */ (0,
|
|
39202
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { position: "relative", height: 0, zIndex: 10 }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39140
39203
|
"button",
|
|
39141
39204
|
{
|
|
39142
39205
|
onClick: handleFlip,
|
|
@@ -39157,7 +39220,7 @@ function SwapMode({
|
|
|
39157
39220
|
cursor: lockDestToken ? "default" : "pointer",
|
|
39158
39221
|
opacity: lockDestToken ? 0.4 : 1
|
|
39159
39222
|
},
|
|
39160
|
-
children: /* @__PURE__ */ (0,
|
|
39223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39161
39224
|
"svg",
|
|
39162
39225
|
{
|
|
39163
39226
|
style: {
|
|
@@ -39169,7 +39232,7 @@ function SwapMode({
|
|
|
39169
39232
|
fill: "none",
|
|
39170
39233
|
stroke: "currentColor",
|
|
39171
39234
|
strokeWidth: 2,
|
|
39172
|
-
children: /* @__PURE__ */ (0,
|
|
39235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39173
39236
|
"path",
|
|
39174
39237
|
{
|
|
39175
39238
|
strokeLinecap: "round",
|
|
@@ -39181,7 +39244,7 @@ function SwapMode({
|
|
|
39181
39244
|
)
|
|
39182
39245
|
}
|
|
39183
39246
|
) }),
|
|
39184
|
-
/* @__PURE__ */ (0,
|
|
39247
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { padding: `0 ${spacing[3]}`, marginTop: spacing[3] }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39185
39248
|
"div",
|
|
39186
39249
|
{
|
|
39187
39250
|
style: {
|
|
@@ -39190,7 +39253,7 @@ function SwapMode({
|
|
|
39190
39253
|
padding: `${spacing[5]} ${spacing[5]} ${spacing[5]}`
|
|
39191
39254
|
},
|
|
39192
39255
|
children: [
|
|
39193
|
-
/* @__PURE__ */ (0,
|
|
39256
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39194
39257
|
"span",
|
|
39195
39258
|
{
|
|
39196
39259
|
style: {
|
|
@@ -39201,7 +39264,7 @@ function SwapMode({
|
|
|
39201
39264
|
children: "Buy"
|
|
39202
39265
|
}
|
|
39203
39266
|
),
|
|
39204
|
-
/* @__PURE__ */ (0,
|
|
39267
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39205
39268
|
"div",
|
|
39206
39269
|
{
|
|
39207
39270
|
style: {
|
|
@@ -39211,7 +39274,7 @@ function SwapMode({
|
|
|
39211
39274
|
marginTop: spacing[1]
|
|
39212
39275
|
},
|
|
39213
39276
|
children: [
|
|
39214
|
-
/* @__PURE__ */ (0,
|
|
39277
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39215
39278
|
"div",
|
|
39216
39279
|
{
|
|
39217
39280
|
style: {
|
|
@@ -39224,7 +39287,7 @@ function SwapMode({
|
|
|
39224
39287
|
},
|
|
39225
39288
|
children: displayToAmount !== null ? (() => {
|
|
39226
39289
|
const s = `${isEstimate ? "~" : ""}${fmtAmount(displayToAmount, 5)}`;
|
|
39227
|
-
return /* @__PURE__ */ (0,
|
|
39290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39228
39291
|
"span",
|
|
39229
39292
|
{
|
|
39230
39293
|
style: {
|
|
@@ -39235,7 +39298,7 @@ function SwapMode({
|
|
|
39235
39298
|
children: s
|
|
39236
39299
|
}
|
|
39237
39300
|
);
|
|
39238
|
-
})() : route.loading ? /* @__PURE__ */ (0,
|
|
39301
|
+
})() : route.loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39239
39302
|
"span",
|
|
39240
39303
|
{
|
|
39241
39304
|
style: {
|
|
@@ -39245,7 +39308,7 @@ function SwapMode({
|
|
|
39245
39308
|
},
|
|
39246
39309
|
children: "\u2026"
|
|
39247
39310
|
}
|
|
39248
|
-
) : /* @__PURE__ */ (0,
|
|
39311
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39249
39312
|
"span",
|
|
39250
39313
|
{
|
|
39251
39314
|
style: {
|
|
@@ -39258,7 +39321,7 @@ function SwapMode({
|
|
|
39258
39321
|
},
|
|
39259
39322
|
rateUpdated ? "flash" : "stable"
|
|
39260
39323
|
),
|
|
39261
|
-
/* @__PURE__ */ (0,
|
|
39324
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39262
39325
|
TokenPillButton,
|
|
39263
39326
|
{
|
|
39264
39327
|
token: toToken,
|
|
@@ -39272,7 +39335,7 @@ function SwapMode({
|
|
|
39272
39335
|
]
|
|
39273
39336
|
}
|
|
39274
39337
|
),
|
|
39275
|
-
/* @__PURE__ */ (0,
|
|
39338
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39276
39339
|
"div",
|
|
39277
39340
|
{
|
|
39278
39341
|
style: {
|
|
@@ -39284,8 +39347,8 @@ function SwapMode({
|
|
|
39284
39347
|
color: colors.mutedForeground
|
|
39285
39348
|
},
|
|
39286
39349
|
children: [
|
|
39287
|
-
/* @__PURE__ */ (0,
|
|
39288
|
-
priceImpact !== null && /* @__PURE__ */ (0,
|
|
39350
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children: displayToUsd > 0 ? `${isEstimate ? "~" : ""}${fmtLocal(displayToUsd)}` : "" }),
|
|
39351
|
+
priceImpact !== null && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39289
39352
|
"span",
|
|
39290
39353
|
{
|
|
39291
39354
|
style: {
|
|
@@ -39306,7 +39369,7 @@ function SwapMode({
|
|
|
39306
39369
|
]
|
|
39307
39370
|
}
|
|
39308
39371
|
),
|
|
39309
|
-
needsDestAddress && toChain && /* @__PURE__ */ (0,
|
|
39372
|
+
needsDestAddress && toChain && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39310
39373
|
"div",
|
|
39311
39374
|
{
|
|
39312
39375
|
style: {
|
|
@@ -39315,7 +39378,7 @@ function SwapMode({
|
|
|
39315
39378
|
borderTop: "1px solid hsl(var(--tw-border))"
|
|
39316
39379
|
},
|
|
39317
39380
|
children: [
|
|
39318
|
-
/* @__PURE__ */ (0,
|
|
39381
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39319
39382
|
"p",
|
|
39320
39383
|
{
|
|
39321
39384
|
style: {
|
|
@@ -39330,8 +39393,8 @@ function SwapMode({
|
|
|
39330
39393
|
]
|
|
39331
39394
|
}
|
|
39332
39395
|
),
|
|
39333
|
-
/* @__PURE__ */ (0,
|
|
39334
|
-
/* @__PURE__ */ (0,
|
|
39396
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative" }, children: [
|
|
39397
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39335
39398
|
"input",
|
|
39336
39399
|
{
|
|
39337
39400
|
type: "text",
|
|
@@ -39354,7 +39417,7 @@ function SwapMode({
|
|
|
39354
39417
|
}
|
|
39355
39418
|
}
|
|
39356
39419
|
),
|
|
39357
|
-
/* @__PURE__ */ (0,
|
|
39420
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39358
39421
|
"button",
|
|
39359
39422
|
{
|
|
39360
39423
|
type: "button",
|
|
@@ -39380,7 +39443,7 @@ function SwapMode({
|
|
|
39380
39443
|
}
|
|
39381
39444
|
)
|
|
39382
39445
|
] }),
|
|
39383
|
-
destAddress && !isValidDestAddress && /* @__PURE__ */ (0,
|
|
39446
|
+
destAddress && !isValidDestAddress && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39384
39447
|
"p",
|
|
39385
39448
|
{
|
|
39386
39449
|
style: {
|
|
@@ -39401,7 +39464,7 @@ function SwapMode({
|
|
|
39401
39464
|
]
|
|
39402
39465
|
}
|
|
39403
39466
|
) }),
|
|
39404
|
-
route.error && !route.loading && /* @__PURE__ */ (0,
|
|
39467
|
+
route.error && !route.loading && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39405
39468
|
"p",
|
|
39406
39469
|
{
|
|
39407
39470
|
style: {
|
|
@@ -39414,7 +39477,7 @@ function SwapMode({
|
|
|
39414
39477
|
children: mapError(route.error).message
|
|
39415
39478
|
}
|
|
39416
39479
|
),
|
|
39417
|
-
route.loading && /* @__PURE__ */ (0,
|
|
39480
|
+
route.loading && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39418
39481
|
"div",
|
|
39419
39482
|
{
|
|
39420
39483
|
style: {
|
|
@@ -39426,13 +39489,13 @@ function SwapMode({
|
|
|
39426
39489
|
padding: `0 ${spacing[3]}`
|
|
39427
39490
|
},
|
|
39428
39491
|
children: [
|
|
39429
|
-
/* @__PURE__ */ (0,
|
|
39492
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39430
39493
|
"svg",
|
|
39431
39494
|
{
|
|
39432
39495
|
className: "tw-animate-spin",
|
|
39433
39496
|
style: { width: "0.875rem", height: "0.875rem", flexShrink: 0 },
|
|
39434
39497
|
viewBox: "0 0 88 88",
|
|
39435
|
-
children: /* @__PURE__ */ (0,
|
|
39498
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39436
39499
|
"circle",
|
|
39437
39500
|
{
|
|
39438
39501
|
cx: "44",
|
|
@@ -39447,7 +39510,7 @@ function SwapMode({
|
|
|
39447
39510
|
)
|
|
39448
39511
|
}
|
|
39449
39512
|
),
|
|
39450
|
-
/* @__PURE__ */ (0,
|
|
39513
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39451
39514
|
"span",
|
|
39452
39515
|
{
|
|
39453
39516
|
style: {
|
|
@@ -39462,7 +39525,7 @@ function SwapMode({
|
|
|
39462
39525
|
]
|
|
39463
39526
|
}
|
|
39464
39527
|
),
|
|
39465
|
-
/* @__PURE__ */ (0,
|
|
39528
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { style: { padding: `${spacing[2]} ${spacing[3]} 0` }, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39466
39529
|
"button",
|
|
39467
39530
|
{
|
|
39468
39531
|
disabled: ctaDisabled,
|
|
@@ -39491,7 +39554,7 @@ function SwapMode({
|
|
|
39491
39554
|
children: ctaLabel
|
|
39492
39555
|
}
|
|
39493
39556
|
) }),
|
|
39494
|
-
showRateRow && /* @__PURE__ */ (0,
|
|
39557
|
+
showRateRow && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39495
39558
|
"div",
|
|
39496
39559
|
{
|
|
39497
39560
|
style: {
|
|
@@ -39501,7 +39564,7 @@ function SwapMode({
|
|
|
39501
39564
|
color: colors.mutedForeground
|
|
39502
39565
|
},
|
|
39503
39566
|
children: [
|
|
39504
|
-
/* @__PURE__ */ (0,
|
|
39567
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39505
39568
|
"button",
|
|
39506
39569
|
{
|
|
39507
39570
|
onClick: () => setShowRateDetails((v) => !v),
|
|
@@ -39519,7 +39582,7 @@ function SwapMode({
|
|
|
39519
39582
|
padding: `${spacing[1]} 0`
|
|
39520
39583
|
},
|
|
39521
39584
|
children: [
|
|
39522
|
-
/* @__PURE__ */ (0,
|
|
39585
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { style: { flex: 1, textAlign: "left" }, children: [
|
|
39523
39586
|
"1 ",
|
|
39524
39587
|
toToken?.symbol,
|
|
39525
39588
|
" = ",
|
|
@@ -39527,7 +39590,7 @@ function SwapMode({
|
|
|
39527
39590
|
" ",
|
|
39528
39591
|
fromToken?.symbol
|
|
39529
39592
|
] }),
|
|
39530
|
-
/* @__PURE__ */ (0,
|
|
39593
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39531
39594
|
"span",
|
|
39532
39595
|
{
|
|
39533
39596
|
style: {
|
|
@@ -39537,15 +39600,15 @@ function SwapMode({
|
|
|
39537
39600
|
flexShrink: 0
|
|
39538
39601
|
},
|
|
39539
39602
|
children: [
|
|
39540
|
-
!isGasSponsored && /* @__PURE__ */ (0,
|
|
39541
|
-
/* @__PURE__ */ (0,
|
|
39603
|
+
!isGasSponsored && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GasIcon, {}),
|
|
39604
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39542
39605
|
"span",
|
|
39543
39606
|
{
|
|
39544
39607
|
style: isGasSponsored ? { color: colors.green[500] } : void 0,
|
|
39545
39608
|
children: isGasSponsored ? "\u2726 Sponsored" : networkCostUsd !== null ? fmtLocal(networkCostUsd) : "\u2014"
|
|
39546
39609
|
}
|
|
39547
39610
|
),
|
|
39548
|
-
route.data && /* @__PURE__ */ (0,
|
|
39611
|
+
route.data && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39549
39612
|
"svg",
|
|
39550
39613
|
{
|
|
39551
39614
|
width: "14",
|
|
@@ -39557,7 +39620,7 @@ function SwapMode({
|
|
|
39557
39620
|
opacity: 0.75
|
|
39558
39621
|
},
|
|
39559
39622
|
children: [
|
|
39560
|
-
/* @__PURE__ */ (0,
|
|
39623
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39561
39624
|
"circle",
|
|
39562
39625
|
{
|
|
39563
39626
|
cx: "7",
|
|
@@ -39568,7 +39631,7 @@ function SwapMode({
|
|
|
39568
39631
|
strokeWidth: "1.5"
|
|
39569
39632
|
}
|
|
39570
39633
|
),
|
|
39571
|
-
/* @__PURE__ */ (0,
|
|
39634
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39572
39635
|
"circle",
|
|
39573
39636
|
{
|
|
39574
39637
|
cx: "7",
|
|
@@ -39586,7 +39649,7 @@ function SwapMode({
|
|
|
39586
39649
|
]
|
|
39587
39650
|
}
|
|
39588
39651
|
),
|
|
39589
|
-
/* @__PURE__ */ (0,
|
|
39652
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39590
39653
|
"svg",
|
|
39591
39654
|
{
|
|
39592
39655
|
style: {
|
|
@@ -39601,7 +39664,7 @@ function SwapMode({
|
|
|
39601
39664
|
strokeWidth: 2,
|
|
39602
39665
|
strokeLinecap: "round",
|
|
39603
39666
|
strokeLinejoin: "round",
|
|
39604
|
-
children: /* @__PURE__ */ (0,
|
|
39667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
39605
39668
|
}
|
|
39606
39669
|
)
|
|
39607
39670
|
]
|
|
@@ -39610,7 +39673,7 @@ function SwapMode({
|
|
|
39610
39673
|
]
|
|
39611
39674
|
}
|
|
39612
39675
|
),
|
|
39613
|
-
showRateDetails && /* @__PURE__ */ (0,
|
|
39676
|
+
showRateDetails && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39614
39677
|
"div",
|
|
39615
39678
|
{
|
|
39616
39679
|
style: {
|
|
@@ -39622,18 +39685,18 @@ function SwapMode({
|
|
|
39622
39685
|
gap: spacing[2.5]
|
|
39623
39686
|
},
|
|
39624
39687
|
children: [
|
|
39625
|
-
/* @__PURE__ */ (0,
|
|
39688
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39626
39689
|
RateRow,
|
|
39627
39690
|
{
|
|
39628
39691
|
label: "Fee",
|
|
39629
39692
|
value: protocolFeeUsd !== null ? fmtLocal(protocolFeeUsd) : "Free"
|
|
39630
39693
|
}
|
|
39631
39694
|
),
|
|
39632
|
-
/* @__PURE__ */ (0,
|
|
39695
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39633
39696
|
RateRow,
|
|
39634
39697
|
{
|
|
39635
39698
|
label: "Network cost",
|
|
39636
|
-
value: isGasSponsored ? /* @__PURE__ */ (0,
|
|
39699
|
+
value: isGasSponsored ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SponsoredBadge, {}) : networkCostUsd !== null ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39637
39700
|
"span",
|
|
39638
39701
|
{
|
|
39639
39702
|
style: {
|
|
@@ -39642,19 +39705,19 @@ function SwapMode({
|
|
|
39642
39705
|
gap: "0.25rem"
|
|
39643
39706
|
},
|
|
39644
39707
|
children: [
|
|
39645
|
-
/* @__PURE__ */ (0,
|
|
39708
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GasIcon, { size: "0.75rem" }),
|
|
39646
39709
|
fmtLocal(networkCostUsd)
|
|
39647
39710
|
]
|
|
39648
39711
|
}
|
|
39649
|
-
) : /* @__PURE__ */ (0,
|
|
39712
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
|
|
39650
39713
|
}
|
|
39651
39714
|
),
|
|
39652
|
-
/* @__PURE__ */ (0,
|
|
39653
|
-
/* @__PURE__ */ (0,
|
|
39715
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(RateRow, { label: "Max slippage", value: `${slippage}%` }),
|
|
39716
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39654
39717
|
RateRow,
|
|
39655
39718
|
{
|
|
39656
39719
|
label: "Route",
|
|
39657
|
-
value: routePath ? /* @__PURE__ */ (0,
|
|
39720
|
+
value: routePath ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39658
39721
|
"span",
|
|
39659
39722
|
{
|
|
39660
39723
|
style: {
|
|
@@ -39668,7 +39731,7 @@ function SwapMode({
|
|
|
39668
39731
|
title: routePath,
|
|
39669
39732
|
children: routePath
|
|
39670
39733
|
}
|
|
39671
|
-
) : route.data?.route?.provider ?? /* @__PURE__ */ (0,
|
|
39734
|
+
) : route.data?.route?.provider ?? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: "Available after quote" })
|
|
39672
39735
|
}
|
|
39673
39736
|
)
|
|
39674
39737
|
]
|
|
@@ -39677,7 +39740,7 @@ function SwapMode({
|
|
|
39677
39740
|
]
|
|
39678
39741
|
}
|
|
39679
39742
|
),
|
|
39680
|
-
/* @__PURE__ */ (0,
|
|
39743
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(WidgetSecurityFooter, {})
|
|
39681
39744
|
]
|
|
39682
39745
|
}
|
|
39683
39746
|
) });
|
|
@@ -39712,8 +39775,8 @@ function SwapActionArea({
|
|
|
39712
39775
|
label = "Swap";
|
|
39713
39776
|
}
|
|
39714
39777
|
const isDisabled = isSubmitting || isChecking || isQuoteRefreshing || !hasQuote;
|
|
39715
|
-
return /* @__PURE__ */ (0,
|
|
39716
|
-
isGasSponsored && !isSubmitting && /* @__PURE__ */ (0,
|
|
39778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { marginTop: spacing[6] }, children: [
|
|
39779
|
+
isGasSponsored && !isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39717
39780
|
"div",
|
|
39718
39781
|
{
|
|
39719
39782
|
style: {
|
|
@@ -39724,7 +39787,7 @@ function SwapActionArea({
|
|
|
39724
39787
|
marginBottom: spacing[3]
|
|
39725
39788
|
},
|
|
39726
39789
|
children: [
|
|
39727
|
-
/* @__PURE__ */ (0,
|
|
39790
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39728
39791
|
"svg",
|
|
39729
39792
|
{
|
|
39730
39793
|
style: {
|
|
@@ -39734,10 +39797,10 @@ function SwapActionArea({
|
|
|
39734
39797
|
},
|
|
39735
39798
|
viewBox: "0 0 24 24",
|
|
39736
39799
|
fill: "currentColor",
|
|
39737
|
-
children: /* @__PURE__ */ (0,
|
|
39800
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
|
|
39738
39801
|
}
|
|
39739
39802
|
),
|
|
39740
|
-
/* @__PURE__ */ (0,
|
|
39803
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39741
39804
|
"span",
|
|
39742
39805
|
{
|
|
39743
39806
|
style: {
|
|
@@ -39751,8 +39814,8 @@ function SwapActionArea({
|
|
|
39751
39814
|
]
|
|
39752
39815
|
}
|
|
39753
39816
|
),
|
|
39754
|
-
quoteUnavailable ? /* @__PURE__ */ (0,
|
|
39755
|
-
/* @__PURE__ */ (0,
|
|
39817
|
+
quoteUnavailable ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
39818
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39756
39819
|
"p",
|
|
39757
39820
|
{
|
|
39758
39821
|
style: {
|
|
@@ -39764,7 +39827,7 @@ function SwapActionArea({
|
|
|
39764
39827
|
children: quoteError ?? "This quote expired."
|
|
39765
39828
|
}
|
|
39766
39829
|
),
|
|
39767
|
-
/* @__PURE__ */ (0,
|
|
39830
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39768
39831
|
"button",
|
|
39769
39832
|
{
|
|
39770
39833
|
onClick: onRetryQuote,
|
|
@@ -39782,7 +39845,7 @@ function SwapActionArea({
|
|
|
39782
39845
|
children: "Get a new quote"
|
|
39783
39846
|
}
|
|
39784
39847
|
)
|
|
39785
|
-
] }) : /* @__PURE__ */ (0,
|
|
39848
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39786
39849
|
"button",
|
|
39787
39850
|
{
|
|
39788
39851
|
onClick: onExecute,
|
|
@@ -39805,7 +39868,7 @@ function SwapActionArea({
|
|
|
39805
39868
|
children: label
|
|
39806
39869
|
}
|
|
39807
39870
|
),
|
|
39808
|
-
needsApproval && !isSubmitting && /* @__PURE__ */ (0,
|
|
39871
|
+
needsApproval && !isSubmitting && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39809
39872
|
"p",
|
|
39810
39873
|
{
|
|
39811
39874
|
style: {
|
|
@@ -39837,7 +39900,7 @@ function TokenPillButton({
|
|
|
39837
39900
|
const iconUrl = token?.iconUrl ?? token?.logoURI;
|
|
39838
39901
|
const chainIcon = chain?.chainIconURI;
|
|
39839
39902
|
if (!token) {
|
|
39840
|
-
return /* @__PURE__ */ (0,
|
|
39903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39841
39904
|
"button",
|
|
39842
39905
|
{
|
|
39843
39906
|
onClick: disabled ? void 0 : onClick,
|
|
@@ -39860,7 +39923,7 @@ function TokenPillButton({
|
|
|
39860
39923
|
},
|
|
39861
39924
|
children: [
|
|
39862
39925
|
placeholder,
|
|
39863
|
-
/* @__PURE__ */ (0,
|
|
39926
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39864
39927
|
"svg",
|
|
39865
39928
|
{
|
|
39866
39929
|
style: { width: "1rem", height: "1rem" },
|
|
@@ -39868,7 +39931,7 @@ function TokenPillButton({
|
|
|
39868
39931
|
fill: "none",
|
|
39869
39932
|
stroke: "currentColor",
|
|
39870
39933
|
strokeWidth: 2,
|
|
39871
|
-
children: /* @__PURE__ */ (0,
|
|
39934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39872
39935
|
"path",
|
|
39873
39936
|
{
|
|
39874
39937
|
strokeLinecap: "round",
|
|
@@ -39882,7 +39945,7 @@ function TokenPillButton({
|
|
|
39882
39945
|
}
|
|
39883
39946
|
);
|
|
39884
39947
|
}
|
|
39885
|
-
return /* @__PURE__ */ (0,
|
|
39948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
39886
39949
|
"button",
|
|
39887
39950
|
{
|
|
39888
39951
|
onClick: disabled ? void 0 : onClick,
|
|
@@ -39902,8 +39965,8 @@ function TokenPillButton({
|
|
|
39902
39965
|
opacity: disabled ? 0.85 : 1
|
|
39903
39966
|
},
|
|
39904
39967
|
children: [
|
|
39905
|
-
/* @__PURE__ */ (0,
|
|
39906
|
-
iconUrl ? /* @__PURE__ */ (0,
|
|
39968
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative" }, children: [
|
|
39969
|
+
iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39907
39970
|
"img",
|
|
39908
39971
|
{
|
|
39909
39972
|
src: iconUrl,
|
|
@@ -39915,7 +39978,7 @@ function TokenPillButton({
|
|
|
39915
39978
|
objectFit: "cover"
|
|
39916
39979
|
}
|
|
39917
39980
|
}
|
|
39918
|
-
) : /* @__PURE__ */ (0,
|
|
39981
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39919
39982
|
"div",
|
|
39920
39983
|
{
|
|
39921
39984
|
style: {
|
|
@@ -39927,7 +39990,7 @@ function TokenPillButton({
|
|
|
39927
39990
|
alignItems: "center",
|
|
39928
39991
|
justifyContent: "center"
|
|
39929
39992
|
},
|
|
39930
|
-
children: /* @__PURE__ */ (0,
|
|
39993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39931
39994
|
"span",
|
|
39932
39995
|
{
|
|
39933
39996
|
style: {
|
|
@@ -39940,7 +40003,7 @@ function TokenPillButton({
|
|
|
39940
40003
|
)
|
|
39941
40004
|
}
|
|
39942
40005
|
),
|
|
39943
|
-
chainIcon && /* @__PURE__ */ (0,
|
|
40006
|
+
chainIcon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39944
40007
|
"img",
|
|
39945
40008
|
{
|
|
39946
40009
|
src: chainIcon,
|
|
@@ -39958,7 +40021,7 @@ function TokenPillButton({
|
|
|
39958
40021
|
}
|
|
39959
40022
|
)
|
|
39960
40023
|
] }),
|
|
39961
|
-
/* @__PURE__ */ (0,
|
|
40024
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39962
40025
|
"span",
|
|
39963
40026
|
{
|
|
39964
40027
|
style: {
|
|
@@ -39969,7 +40032,7 @@ function TokenPillButton({
|
|
|
39969
40032
|
children: token.symbol
|
|
39970
40033
|
}
|
|
39971
40034
|
),
|
|
39972
|
-
!disabled && /* @__PURE__ */ (0,
|
|
40035
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39973
40036
|
"svg",
|
|
39974
40037
|
{
|
|
39975
40038
|
style: {
|
|
@@ -39981,7 +40044,7 @@ function TokenPillButton({
|
|
|
39981
40044
|
fill: "none",
|
|
39982
40045
|
stroke: "currentColor",
|
|
39983
40046
|
strokeWidth: 2,
|
|
39984
|
-
children: /* @__PURE__ */ (0,
|
|
40047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
39985
40048
|
"path",
|
|
39986
40049
|
{
|
|
39987
40050
|
strokeLinecap: "round",
|
|
@@ -40002,8 +40065,8 @@ function TokenIcon({
|
|
|
40002
40065
|
}) {
|
|
40003
40066
|
const imgSize = size === "lg" ? "2.75rem" : "2.5rem";
|
|
40004
40067
|
const badgeSize = size === "lg" ? "1.125rem" : "1rem";
|
|
40005
|
-
return /* @__PURE__ */ (0,
|
|
40006
|
-
/* @__PURE__ */ (0,
|
|
40068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { style: { position: "relative", flexShrink: 0 }, children: [
|
|
40069
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40007
40070
|
"img",
|
|
40008
40071
|
{
|
|
40009
40072
|
src: icon,
|
|
@@ -40011,7 +40074,7 @@ function TokenIcon({
|
|
|
40011
40074
|
style: { width: imgSize, height: imgSize, borderRadius: "9999px" }
|
|
40012
40075
|
}
|
|
40013
40076
|
),
|
|
40014
|
-
chainIcon && /* @__PURE__ */ (0,
|
|
40077
|
+
chainIcon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40015
40078
|
"img",
|
|
40016
40079
|
{
|
|
40017
40080
|
src: chainIcon,
|
|
@@ -40043,7 +40106,7 @@ function ReviewDetailRow({
|
|
|
40043
40106
|
setTipPos({ x: r.left + r.width / 2, y: r.top - 8 });
|
|
40044
40107
|
};
|
|
40045
40108
|
const handleMouseLeave = () => setTipPos(null);
|
|
40046
|
-
return /* @__PURE__ */ (0,
|
|
40109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40047
40110
|
"div",
|
|
40048
40111
|
{
|
|
40049
40112
|
style: {
|
|
@@ -40052,7 +40115,7 @@ function ReviewDetailRow({
|
|
|
40052
40115
|
justifyContent: "space-between"
|
|
40053
40116
|
},
|
|
40054
40117
|
children: [
|
|
40055
|
-
/* @__PURE__ */ (0,
|
|
40118
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40056
40119
|
"span",
|
|
40057
40120
|
{
|
|
40058
40121
|
style: {
|
|
@@ -40063,14 +40126,14 @@ function ReviewDetailRow({
|
|
|
40063
40126
|
},
|
|
40064
40127
|
children: [
|
|
40065
40128
|
label,
|
|
40066
|
-
/* @__PURE__ */ (0,
|
|
40129
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40067
40130
|
"span",
|
|
40068
40131
|
{
|
|
40069
40132
|
ref: iconRef,
|
|
40070
40133
|
style: { display: "inline-flex", alignItems: "center" },
|
|
40071
40134
|
onMouseEnter: handleMouseEnter,
|
|
40072
40135
|
onMouseLeave: handleMouseLeave,
|
|
40073
|
-
children: /* @__PURE__ */ (0,
|
|
40136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40074
40137
|
"svg",
|
|
40075
40138
|
{
|
|
40076
40139
|
style: {
|
|
@@ -40086,8 +40149,8 @@ function ReviewDetailRow({
|
|
|
40086
40149
|
strokeLinecap: "round",
|
|
40087
40150
|
strokeLinejoin: "round",
|
|
40088
40151
|
children: [
|
|
40089
|
-
/* @__PURE__ */ (0,
|
|
40090
|
-
/* @__PURE__ */ (0,
|
|
40152
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
40153
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 16v-4M12 8h.01" })
|
|
40091
40154
|
]
|
|
40092
40155
|
}
|
|
40093
40156
|
)
|
|
@@ -40096,9 +40159,9 @@ function ReviewDetailRow({
|
|
|
40096
40159
|
]
|
|
40097
40160
|
}
|
|
40098
40161
|
),
|
|
40099
|
-
/* @__PURE__ */ (0,
|
|
40162
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.foreground, fontWeight: fontWeight.medium }, children: value }),
|
|
40100
40163
|
tooltip && tipPos && typeof document !== "undefined" && import_react_dom.default.createPortal(
|
|
40101
|
-
/* @__PURE__ */ (0,
|
|
40164
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40102
40165
|
"span",
|
|
40103
40166
|
{
|
|
40104
40167
|
style: {
|
|
@@ -40127,7 +40190,7 @@ function ReviewDetailRow({
|
|
|
40127
40190
|
);
|
|
40128
40191
|
}
|
|
40129
40192
|
function GasIcon({ size = "0.875rem" }) {
|
|
40130
|
-
return /* @__PURE__ */ (0,
|
|
40193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40131
40194
|
"svg",
|
|
40132
40195
|
{
|
|
40133
40196
|
style: { width: size, height: size, flexShrink: 0 },
|
|
@@ -40138,16 +40201,16 @@ function GasIcon({ size = "0.875rem" }) {
|
|
|
40138
40201
|
strokeLinecap: "round",
|
|
40139
40202
|
strokeLinejoin: "round",
|
|
40140
40203
|
children: [
|
|
40141
|
-
/* @__PURE__ */ (0,
|
|
40142
|
-
/* @__PURE__ */ (0,
|
|
40143
|
-
/* @__PURE__ */ (0,
|
|
40144
|
-
/* @__PURE__ */ (0,
|
|
40204
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3 22V7a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v15" }),
|
|
40205
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3 11h11" }),
|
|
40206
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M17 5h1a2 2 0 0 1 2 2v2.5a1.5 1.5 0 0 0 3 0V7l-3-3" }),
|
|
40207
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M19 22V12" })
|
|
40145
40208
|
]
|
|
40146
40209
|
}
|
|
40147
40210
|
);
|
|
40148
40211
|
}
|
|
40149
40212
|
function SponsoredBadge() {
|
|
40150
|
-
return /* @__PURE__ */ (0,
|
|
40213
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40151
40214
|
"span",
|
|
40152
40215
|
{
|
|
40153
40216
|
style: {
|
|
@@ -40158,13 +40221,13 @@ function SponsoredBadge() {
|
|
|
40158
40221
|
fontWeight: fontWeight.medium
|
|
40159
40222
|
},
|
|
40160
40223
|
children: [
|
|
40161
|
-
/* @__PURE__ */ (0,
|
|
40224
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40162
40225
|
"svg",
|
|
40163
40226
|
{
|
|
40164
40227
|
style: { width: "0.75rem", height: "0.75rem" },
|
|
40165
40228
|
viewBox: "0 0 24 24",
|
|
40166
40229
|
fill: "currentColor",
|
|
40167
|
-
children: /* @__PURE__ */ (0,
|
|
40230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74z" })
|
|
40168
40231
|
}
|
|
40169
40232
|
),
|
|
40170
40233
|
"Sponsored"
|
|
@@ -40176,7 +40239,7 @@ function SuccessReceiptRow({
|
|
|
40176
40239
|
label,
|
|
40177
40240
|
value
|
|
40178
40241
|
}) {
|
|
40179
|
-
return /* @__PURE__ */ (0,
|
|
40242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40180
40243
|
"div",
|
|
40181
40244
|
{
|
|
40182
40245
|
style: {
|
|
@@ -40185,8 +40248,8 @@ function SuccessReceiptRow({
|
|
|
40185
40248
|
justifyContent: "space-between"
|
|
40186
40249
|
},
|
|
40187
40250
|
children: [
|
|
40188
|
-
/* @__PURE__ */ (0,
|
|
40189
|
-
/* @__PURE__ */ (0,
|
|
40251
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { color: colors.mutedForeground }, children: label }),
|
|
40252
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { style: { fontWeight: fontWeight.medium, color: colors.foreground }, children: value })
|
|
40190
40253
|
]
|
|
40191
40254
|
}
|
|
40192
40255
|
);
|
|
@@ -40200,7 +40263,7 @@ function ProcessingStepNode({
|
|
|
40200
40263
|
const nodeColor = done ? colors.green[500] : active ? `hsl(var(--tw-primary))` : colors.border;
|
|
40201
40264
|
const iconColor = done ? "#fff" : active ? `hsl(var(--tw-primary))` : colors.mutedForeground;
|
|
40202
40265
|
const nodeBg = done ? colors.green[500] : "transparent";
|
|
40203
|
-
const iconEl = icon === "send" ? /* @__PURE__ */ (0,
|
|
40266
|
+
const iconEl = icon === "send" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40204
40267
|
"svg",
|
|
40205
40268
|
{
|
|
40206
40269
|
style: { width: "0.875rem", height: "0.875rem", color: iconColor },
|
|
@@ -40210,9 +40273,9 @@ function ProcessingStepNode({
|
|
|
40210
40273
|
strokeWidth: 2,
|
|
40211
40274
|
strokeLinecap: "round",
|
|
40212
40275
|
strokeLinejoin: "round",
|
|
40213
|
-
children: /* @__PURE__ */ (0,
|
|
40276
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
40214
40277
|
}
|
|
40215
|
-
) : icon === "plus" ? /* @__PURE__ */ (0,
|
|
40278
|
+
) : icon === "plus" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40216
40279
|
"svg",
|
|
40217
40280
|
{
|
|
40218
40281
|
style: { width: "0.875rem", height: "0.875rem", color: iconColor },
|
|
@@ -40222,9 +40285,9 @@ function ProcessingStepNode({
|
|
|
40222
40285
|
strokeWidth: 2,
|
|
40223
40286
|
strokeLinecap: "round",
|
|
40224
40287
|
strokeLinejoin: "round",
|
|
40225
|
-
children: /* @__PURE__ */ (0,
|
|
40288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M12 5v14M5 12h14" })
|
|
40226
40289
|
}
|
|
40227
|
-
) : /* @__PURE__ */ (0,
|
|
40290
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40228
40291
|
"svg",
|
|
40229
40292
|
{
|
|
40230
40293
|
style: { width: "0.875rem", height: "0.875rem", color: iconColor },
|
|
@@ -40235,12 +40298,12 @@ function ProcessingStepNode({
|
|
|
40235
40298
|
strokeLinecap: "round",
|
|
40236
40299
|
strokeLinejoin: "round",
|
|
40237
40300
|
children: [
|
|
40238
|
-
/* @__PURE__ */ (0,
|
|
40239
|
-
/* @__PURE__ */ (0,
|
|
40301
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z" }),
|
|
40302
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: "4", y1: "22", x2: "4", y2: "15" })
|
|
40240
40303
|
]
|
|
40241
40304
|
}
|
|
40242
40305
|
);
|
|
40243
|
-
const doneIcon = /* @__PURE__ */ (0,
|
|
40306
|
+
const doneIcon = /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40244
40307
|
"svg",
|
|
40245
40308
|
{
|
|
40246
40309
|
style: { width: "0.875rem", height: "0.875rem", color: "#fff" },
|
|
@@ -40250,10 +40313,10 @@ function ProcessingStepNode({
|
|
|
40250
40313
|
strokeWidth: 3,
|
|
40251
40314
|
strokeLinecap: "round",
|
|
40252
40315
|
strokeLinejoin: "round",
|
|
40253
|
-
children: /* @__PURE__ */ (0,
|
|
40316
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M20 6L9 17l-5-5" })
|
|
40254
40317
|
}
|
|
40255
40318
|
);
|
|
40256
|
-
return /* @__PURE__ */ (0,
|
|
40319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
40257
40320
|
"div",
|
|
40258
40321
|
{
|
|
40259
40322
|
style: {
|
|
@@ -40264,7 +40327,7 @@ function ProcessingStepNode({
|
|
|
40264
40327
|
maxWidth: "5rem"
|
|
40265
40328
|
},
|
|
40266
40329
|
children: [
|
|
40267
|
-
/* @__PURE__ */ (0,
|
|
40330
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40268
40331
|
"div",
|
|
40269
40332
|
{
|
|
40270
40333
|
style: {
|
|
@@ -40282,7 +40345,7 @@ function ProcessingStepNode({
|
|
|
40282
40345
|
children: done ? doneIcon : iconEl
|
|
40283
40346
|
}
|
|
40284
40347
|
),
|
|
40285
|
-
/* @__PURE__ */ (0,
|
|
40348
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40286
40349
|
"span",
|
|
40287
40350
|
{
|
|
40288
40351
|
style: {
|
|
@@ -40301,7 +40364,7 @@ function ProcessingStepNode({
|
|
|
40301
40364
|
);
|
|
40302
40365
|
}
|
|
40303
40366
|
function ProcessingStepLine({ done }) {
|
|
40304
|
-
return /* @__PURE__ */ (0,
|
|
40367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
40305
40368
|
"div",
|
|
40306
40369
|
{
|
|
40307
40370
|
style: {
|
|
@@ -40315,7 +40378,7 @@ function ProcessingStepLine({ done }) {
|
|
|
40315
40378
|
}
|
|
40316
40379
|
);
|
|
40317
40380
|
}
|
|
40318
|
-
var import_react50, import_react_dom,
|
|
40381
|
+
var import_react50, import_react_dom, import_jsx_runtime56, ConfettiEffect3, QUOTE_TTL, QUOTE_LOADING_MESSAGES, PERCENT_OPTIONS;
|
|
40319
40382
|
var init_SwapMode = __esm({
|
|
40320
40383
|
"src/modes/swap/SwapMode.tsx"() {
|
|
40321
40384
|
"use strict";
|
|
@@ -40338,11 +40401,12 @@ var init_SwapMode = __esm({
|
|
|
40338
40401
|
init_useSwapRoute();
|
|
40339
40402
|
init_useSwapExecution();
|
|
40340
40403
|
init_walletBalance();
|
|
40404
|
+
init_analytics();
|
|
40341
40405
|
init_useForex();
|
|
40342
40406
|
init_SwapTokenSelect();
|
|
40343
40407
|
init_currency();
|
|
40344
40408
|
init_components2();
|
|
40345
|
-
|
|
40409
|
+
import_jsx_runtime56 = require("react/jsx-runtime");
|
|
40346
40410
|
ConfettiEffect3 = (0, import_react50.lazy)(
|
|
40347
40411
|
() => Promise.resolve().then(() => (init_ConfettiEffect(), ConfettiEffect_exports))
|
|
40348
40412
|
);
|
|
@@ -40404,9 +40468,9 @@ function WidgetContent({
|
|
|
40404
40468
|
transactionStatus,
|
|
40405
40469
|
onStateChange
|
|
40406
40470
|
]);
|
|
40407
|
-
return /* @__PURE__ */ (0,
|
|
40408
|
-
showThemeToggle && /* @__PURE__ */ (0,
|
|
40409
|
-
/* @__PURE__ */ (0,
|
|
40471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { style: mergeStyles(widgetContentContainerStyle, style), children: [
|
|
40472
|
+
showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { style: themeToggleContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ThemeToggle, { theme: resolvedTheme, onToggle: toggleTheme }) }),
|
|
40473
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
40410
40474
|
WidgetRouter,
|
|
40411
40475
|
{
|
|
40412
40476
|
currentStep,
|
|
@@ -40428,7 +40492,6 @@ function WidgetInner({
|
|
|
40428
40492
|
const { resolvedTheme } = useDepositUi();
|
|
40429
40493
|
const { status, revalidate, errors } = useTrustware();
|
|
40430
40494
|
const [showConfirmDialog, setShowConfirmDialog] = (0, import_react51.useState)(false);
|
|
40431
|
-
useGTM(GTM_ID);
|
|
40432
40495
|
const handleCloseRequest = (0, import_react51.useCallback)(() => {
|
|
40433
40496
|
if (ACTIVE_TRANSACTION_STATUSES.includes(transactionStatus)) {
|
|
40434
40497
|
setShowConfirmDialog(true);
|
|
@@ -40456,16 +40519,16 @@ function WidgetInner({
|
|
|
40456
40519
|
const handleRefresh = (0, import_react51.useCallback)(() => {
|
|
40457
40520
|
revalidate?.();
|
|
40458
40521
|
}, [revalidate]);
|
|
40459
|
-
return /* @__PURE__ */ (0,
|
|
40460
|
-
/* @__PURE__ */ (0,
|
|
40461
|
-
/* @__PURE__ */ (0,
|
|
40522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
|
|
40523
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(WidgetContainer, { theme: effectiveTheme, style, children: [
|
|
40524
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
40462
40525
|
WidgetContent,
|
|
40463
40526
|
{
|
|
40464
40527
|
onStateChange,
|
|
40465
40528
|
showThemeToggle
|
|
40466
40529
|
}
|
|
40467
40530
|
),
|
|
40468
|
-
/* @__PURE__ */ (0,
|
|
40531
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
40469
40532
|
InitErrorOverlay,
|
|
40470
40533
|
{
|
|
40471
40534
|
open: initBlocked,
|
|
@@ -40476,7 +40539,7 @@ function WidgetInner({
|
|
|
40476
40539
|
}
|
|
40477
40540
|
)
|
|
40478
40541
|
] }),
|
|
40479
|
-
/* @__PURE__ */ (0,
|
|
40542
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
40480
40543
|
ConfirmCloseDialog,
|
|
40481
40544
|
{
|
|
40482
40545
|
open: showConfirmDialog,
|
|
@@ -40487,7 +40550,7 @@ function WidgetInner({
|
|
|
40487
40550
|
)
|
|
40488
40551
|
] });
|
|
40489
40552
|
}
|
|
40490
|
-
var import_react51,
|
|
40553
|
+
var import_react51, import_jsx_runtime57, widgetContentContainerStyle, themeToggleContainerStyle, TrustwareWidgetV2;
|
|
40491
40554
|
var init_TrustwareWidgetV2 = __esm({
|
|
40492
40555
|
"src/widget/TrustwareWidgetV2.tsx"() {
|
|
40493
40556
|
"use strict";
|
|
@@ -40503,10 +40566,9 @@ var init_TrustwareWidgetV2 = __esm({
|
|
|
40503
40566
|
init_provider();
|
|
40504
40567
|
init_manager();
|
|
40505
40568
|
init_useTrustwareConfig();
|
|
40506
|
-
|
|
40507
|
-
init_constants();
|
|
40569
|
+
init_WidgetAnalytics();
|
|
40508
40570
|
init_swap();
|
|
40509
|
-
|
|
40571
|
+
import_jsx_runtime57 = require("react/jsx-runtime");
|
|
40510
40572
|
widgetContentContainerStyle = {
|
|
40511
40573
|
position: "relative",
|
|
40512
40574
|
width: "100%",
|
|
@@ -40560,10 +40622,10 @@ var init_TrustwareWidgetV2 = __esm({
|
|
|
40560
40622
|
if (!isOpen) {
|
|
40561
40623
|
return null;
|
|
40562
40624
|
}
|
|
40563
|
-
|
|
40564
|
-
|
|
40565
|
-
|
|
40566
|
-
|
|
40625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(WidgetAnalytics, { children: config.mode === "swap" ? (
|
|
40626
|
+
// Swap Mode bypasses DepositProvider — fully standalone
|
|
40627
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(SwapMode, { theme, style })
|
|
40628
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DepositProvider, { initialStep: effectiveInitialStep, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
40567
40629
|
WidgetInner,
|
|
40568
40630
|
{
|
|
40569
40631
|
theme,
|
|
@@ -40572,7 +40634,7 @@ var init_TrustwareWidgetV2 = __esm({
|
|
|
40572
40634
|
closeRequestRef,
|
|
40573
40635
|
showThemeToggle
|
|
40574
40636
|
}
|
|
40575
|
-
) });
|
|
40637
|
+
) }) });
|
|
40576
40638
|
});
|
|
40577
40639
|
}
|
|
40578
40640
|
});
|