@xswap-link/sdk 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/index.css +20 -21
  3. package/dist/index.d.mts +24 -13
  4. package/dist/index.d.ts +24 -13
  5. package/dist/index.js +747 -527
  6. package/dist/index.mjs +645 -425
  7. package/package.json +1 -1
  8. package/src/components/TxConfigForm/FeesDetails.tsx +55 -37
  9. package/src/components/TxConfigForm/Form.tsx +30 -7
  10. package/src/components/TxConfigForm/History.tsx +31 -4
  11. package/src/components/TxConfigForm/Summary.tsx +28 -11
  12. package/src/components/TxConfigForm/SwapPanel.tsx +5 -1
  13. package/src/components/TxConfigForm/TopBar.tsx +8 -3
  14. package/src/components/TxConfigForm/UsdPrice.tsx +14 -1
  15. package/src/components/TxConfigForm/index.tsx +10 -10
  16. package/src/components/TxStatusButton/index.tsx +21 -13
  17. package/src/components/UnknownTokenLogo/UnknownTokenLogo.tsx +14 -0
  18. package/src/components/WaitingForInit/index.tsx +20 -0
  19. package/src/components/global.css +1 -1
  20. package/src/config/init.tsx +75 -0
  21. package/src/constants/index.ts +1 -0
  22. package/src/index.ts +9 -1
  23. package/src/models/Route.ts +6 -2
  24. package/src/models/TokenData.ts +1 -1
  25. package/src/models/TransactionHistory.ts +12 -8
  26. package/src/models/payloads/GetRoutePayload.ts +1 -0
  27. package/src/models/payloads/GetSwapTxPayload.ts +1 -0
  28. package/src/services/api.ts +9 -0
  29. package/src/services/blockchain.ts +49 -0
  30. package/src/services/index.ts +1 -0
  31. package/src/services/integrations/monitoring.ts +34 -14
  32. package/src/services/integrations/transactions.ts +8 -3
  33. package/src/utils/contracts.ts +2 -4
  34. package/src/utils/strings.ts +4 -0
  35. package/tailwind.config.js +2 -2
  36. package/src/config/init.ts +0 -35
package/dist/index.js CHANGED
@@ -35,12 +35,13 @@ __export(src_exports, {
35
35
  Environment: () => Environment,
36
36
  Web3Environment: () => Web3Environment,
37
37
  XSwapCallType: () => XSwapCallType,
38
- getSwapTx: () => getSwapTx,
39
- monitorTransactionStatus: () => monitorTransactionStatus
38
+ default: () => src_default,
39
+ openTransactionModal: () => openTransactionModal,
40
+ renderTxStatus: () => renderTxStatus
40
41
  });
41
42
  module.exports = __toCommonJS(src_exports);
42
43
 
43
- // src/config/init.ts
44
+ // src/config/init.tsx
44
45
  var import_client = require("react-dom/client");
45
46
 
46
47
  // xswap.config.ts
@@ -58,74 +59,92 @@ var xswap_config_default = {
58
59
  };
59
60
 
60
61
  // package.json
61
- var version = "0.2.3";
62
+ var version = "0.2.5";
62
63
 
63
- // src/config/init.ts
64
+ // src/components/WaitingForInit/index.tsx
65
+ var import_jsx_runtime = require("react/jsx-runtime");
66
+ var WaitingForInit = () => {
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
68
+ "div",
69
+ {
70
+ style: {
71
+ zIndex: 10,
72
+ top: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ left: 0,
76
+ backgroundColor: "rgba(0,0,0,0.8)",
77
+ position: "fixed",
78
+ display: "flex",
79
+ alignItems: "center",
80
+ justifyContent: "center"
81
+ },
82
+ children: "Waiting for XPay initialization ..."
83
+ }
84
+ );
85
+ };
86
+
87
+ // src/config/init.tsx
88
+ var import_jsx_runtime2 = require("react/jsx-runtime");
89
+ var initIndicatorRoot;
64
90
  var xswapRoot;
65
91
  var txStatusRoot;
92
+ var initCompleted = false;
66
93
  var initDocument = () => {
67
94
  if (typeof document === "undefined") {
68
95
  throw new Error("Can't render XPay components from server side.");
69
96
  }
70
- const cssRequestParams = new URLSearchParams({
71
- data: JSON.stringify({ version })
97
+ createInitIndicatorRoot();
98
+ Promise.all([
99
+ createStyleElement(),
100
+ createXSwapRoot(),
101
+ createTxStatusRoot()
102
+ ]).then(() => {
103
+ initCompleted = true;
72
104
  });
73
- fetch(`${xswap_config_default.apiUrl}/sdk/css?${cssRequestParams}`).then(
74
- async (css) => {
75
- const style = document.createElement("style");
76
- style.textContent = await css.text();
77
- document.body.appendChild(style);
105
+ };
106
+ var waitForInitialization = async () => {
107
+ if (!initCompleted) {
108
+ displayInitIndicator(true);
109
+ while (!initCompleted) {
110
+ await new Promise((resolve) => setTimeout(resolve, 10));
78
111
  }
112
+ displayInitIndicator(false);
113
+ }
114
+ };
115
+ var createStyleElement = async () => {
116
+ const css = await fetch(
117
+ `${xswap_config_default.apiUrl}/sdk/css?${new URLSearchParams({
118
+ data: JSON.stringify({ version })
119
+ })}`
79
120
  );
121
+ const text = await css.text();
122
+ const style = document.createElement("style");
123
+ style.textContent = text;
124
+ document.body.appendChild(style);
125
+ };
126
+ var createXSwapRoot = async () => {
80
127
  const xswapElement = document.createElement("div");
81
128
  xswapElement.setAttribute("id", "xswap-modal");
82
129
  document.body.appendChild(xswapElement);
83
130
  xswapRoot = (0, import_client.createRoot)(xswapElement);
131
+ };
132
+ var createTxStatusRoot = async () => {
84
133
  const txStatusElement = document.createElement("div");
85
134
  txStatusElement.setAttribute("id", "xswap-tx-status");
86
135
  txStatusElement.setAttribute("class", "xswap-tx-status");
87
136
  document.body.appendChild(txStatusElement);
88
137
  txStatusRoot = (0, import_client.createRoot)(txStatusElement);
89
138
  };
90
-
91
- // src/models/Addresses.ts
92
- var ContractName = /* @__PURE__ */ ((ContractName2) => {
93
- ContractName2["BatchQuery"] = "BatchQuery";
94
- ContractName2["FeeCollector"] = "FeeCollector";
95
- ContractName2["XSwapRouter"] = "XSwapRouter";
96
- return ContractName2;
97
- })(ContractName || {});
98
-
99
- // src/models/Ecosystem.ts
100
- var Ecosystem = /* @__PURE__ */ ((Ecosystem2) => {
101
- Ecosystem2["EVM"] = "evm";
102
- return Ecosystem2;
103
- })(Ecosystem || {});
104
-
105
- // src/models/Environment.ts
106
- var Environment = /* @__PURE__ */ ((Environment2) => {
107
- Environment2["PROD"] = "production";
108
- Environment2["DEV"] = "develop";
109
- Environment2["LOCAL"] = "local";
110
- return Environment2;
111
- })(Environment || {});
112
-
113
- // src/models/Web3Environment.ts
114
- var Web3Environment = /* @__PURE__ */ ((Web3Environment2) => {
115
- Web3Environment2["DEVNET"] = "devnet";
116
- Web3Environment2["TESTNET"] = "testnet";
117
- Web3Environment2["MAINNET"] = "mainnet";
118
- return Web3Environment2;
119
- })(Web3Environment || {});
120
-
121
- // src/models/XSwapCallType.ts
122
- var XSwapCallType = /* @__PURE__ */ ((XSwapCallType2) => {
123
- XSwapCallType2[XSwapCallType2["DEFAULT"] = 0] = "DEFAULT";
124
- XSwapCallType2[XSwapCallType2["FULL_TOKEN_BALANCE"] = 1] = "FULL_TOKEN_BALANCE";
125
- XSwapCallType2[XSwapCallType2["FULL_NATIVE_BALANCE"] = 2] = "FULL_NATIVE_BALANCE";
126
- XSwapCallType2[XSwapCallType2["COLLECT_TOKEN_BALANCE"] = 3] = "COLLECT_TOKEN_BALANCE";
127
- return XSwapCallType2;
128
- })(XSwapCallType || {});
139
+ var createInitIndicatorRoot = () => {
140
+ const initIndicatorElement = document.createElement("div");
141
+ initIndicatorElement.setAttribute("id", "xswap-init-indicator");
142
+ document.body.appendChild(initIndicatorElement);
143
+ initIndicatorRoot = (0, import_client.createRoot)(initIndicatorElement);
144
+ };
145
+ var displayInitIndicator = (display) => {
146
+ display ? initIndicatorRoot.render(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(WaitingForInit, {})) : initIndicatorRoot.render("");
147
+ };
129
148
 
130
149
  // src/services/api.ts
131
150
  async function _sendRequest(urlPath, options) {
@@ -169,36 +188,59 @@ async function getPrices(payload) {
169
188
  })}`
170
189
  );
171
190
  }
191
+ async function getTxStatus(payload) {
192
+ return await _sendRequest(
193
+ `/getTxStatus?${new URLSearchParams({
194
+ data: JSON.stringify(payload)
195
+ // todo remove once gcp starts working
196
+ })}`
197
+ );
198
+ }
172
199
 
173
200
  // src/services/integrations/customCalls/staking.ts
174
201
  var import_ethers3 = require("ethers");
175
202
 
176
- // src/utils/contracts.ts
177
- var import_ethers2 = require("ethers");
203
+ // src/models/Addresses.ts
204
+ var ContractName = /* @__PURE__ */ ((ContractName2) => {
205
+ ContractName2["BatchQuery"] = "BatchQuery";
206
+ ContractName2["FeeCollector"] = "FeeCollector";
207
+ ContractName2["XSwapRouter"] = "XSwapRouter";
208
+ return ContractName2;
209
+ })(ContractName || {});
178
210
 
179
- // src/utils/numbers.ts
180
- var import_bignumber = require("bignumber.js");
211
+ // src/models/Ecosystem.ts
212
+ var Ecosystem = /* @__PURE__ */ ((Ecosystem2) => {
213
+ Ecosystem2["EVM"] = "evm";
214
+ return Ecosystem2;
215
+ })(Ecosystem || {});
216
+
217
+ // src/models/Environment.ts
218
+ var Environment = /* @__PURE__ */ ((Environment2) => {
219
+ Environment2["PROD"] = "production";
220
+ Environment2["DEV"] = "develop";
221
+ Environment2["LOCAL"] = "local";
222
+ return Environment2;
223
+ })(Environment || {});
224
+
225
+ // src/models/Web3Environment.ts
226
+ var Web3Environment = /* @__PURE__ */ ((Web3Environment2) => {
227
+ Web3Environment2["DEVNET"] = "devnet";
228
+ Web3Environment2["TESTNET"] = "testnet";
229
+ Web3Environment2["MAINNET"] = "mainnet";
230
+ return Web3Environment2;
231
+ })(Web3Environment || {});
232
+
233
+ // src/models/XSwapCallType.ts
234
+ var XSwapCallType = /* @__PURE__ */ ((XSwapCallType2) => {
235
+ XSwapCallType2[XSwapCallType2["DEFAULT"] = 0] = "DEFAULT";
236
+ XSwapCallType2[XSwapCallType2["FULL_TOKEN_BALANCE"] = 1] = "FULL_TOKEN_BALANCE";
237
+ XSwapCallType2[XSwapCallType2["FULL_NATIVE_BALANCE"] = 2] = "FULL_NATIVE_BALANCE";
238
+ XSwapCallType2[XSwapCallType2["COLLECT_TOKEN_BALANCE"] = 3] = "COLLECT_TOKEN_BALANCE";
239
+ return XSwapCallType2;
240
+ })(XSwapCallType || {});
241
+
242
+ // src/utils/contracts.ts
181
243
  var import_ethers = require("ethers");
182
- var safeBigNumberFrom = (value) => {
183
- import_bignumber.BigNumber.config({ DECIMAL_PLACES: 0 });
184
- return import_ethers.BigNumber.from(new import_bignumber.BigNumber(value).div(1).toFixed());
185
- };
186
- var weiToHumanReadable = ({
187
- amount,
188
- decimals,
189
- precisionFractionalPlaces,
190
- prettifySmallNumber = false
191
- }) => {
192
- const decimalsFactor = Math.pow(10, decimals);
193
- import_bignumber.BigNumber.config({ DECIMAL_PLACES: precisionFractionalPlaces });
194
- const res = new import_bignumber.BigNumber(amount).div(decimalsFactor).toFixed();
195
- if (prettifySmallNumber && res === "0" && amount !== "0") {
196
- return `<${(1 / 10 ** precisionFractionalPlaces).toFixed(
197
- precisionFractionalPlaces
198
- )}`;
199
- }
200
- return res;
201
- };
202
244
 
203
245
  // src/contracts/abi/BatchQuery.json
204
246
  var BatchQuery_default = [
@@ -528,6 +570,7 @@ var NUMBER_INPUT_REGEX = /^[0-9]*[.,]?[0-9]*$/;
528
570
  var SLIPPAGE_PRESETS = [0.5, 1.5, 3];
529
571
  var DELIVERY_TIME = 30 * 1e3 * 60;
530
572
  var EXPRESS_DELIVERY_TIME = 30 * 1e3;
573
+ var EXPRESS_DELIVERY_LIMIT = 1e3;
531
574
  var BALANCES_CHUNK_SIZE = 500;
532
575
  var ROUTE_TIMEOUT_MS = 5e3;
533
576
  var MINIMUM_DISPLAYED_TOKEN_AMOUNT = 1e-4;
@@ -544,7 +587,7 @@ var MSG_RECEIVED_EVENT_ABI = [
544
587
  ];
545
588
 
546
589
  // src/utils/contracts.ts
547
- var IERC20 = new import_ethers2.ethers.utils.Interface(ERC20Abi);
590
+ var IERC20 = new import_ethers.ethers.utils.Interface(ERC20Abi);
548
591
  var getBalances = async (chain, wallet) => {
549
592
  return {
550
593
  ...await getNativeBalance(chain, wallet),
@@ -553,10 +596,10 @@ var getBalances = async (chain, wallet) => {
553
596
  };
554
597
  var getNativeBalance = async (chain, wallet) => {
555
598
  const native = chain.tokens.find(
556
- ({ address }) => address === import_ethers2.ethers.constants.AddressZero
599
+ ({ address }) => address === import_ethers.ethers.constants.AddressZero
557
600
  );
558
601
  if (native) {
559
- const provider = import_ethers2.ethers.getDefaultProvider(chain.publicRpcUrls[0]);
602
+ const provider = import_ethers.ethers.getDefaultProvider(chain.publicRpcUrls[0]);
560
603
  const balance = await provider.getBalance(wallet);
561
604
  return {
562
605
  [native.address]: balance
@@ -566,7 +609,7 @@ var getNativeBalance = async (chain, wallet) => {
566
609
  };
567
610
  var getErc20Balances = async (chain, wallet) => {
568
611
  const erc20Tokens = chain.tokens.filter(
569
- ({ address }) => address !== import_ethers2.ethers.constants.AddressZero
612
+ ({ address }) => address !== import_ethers.ethers.constants.AddressZero
570
613
  );
571
614
  const tokenChunks = chunkArray(erc20Tokens, BALANCES_CHUNK_SIZE);
572
615
  const promises = tokenChunks.map(async (tokenChunk) => {
@@ -577,17 +620,17 @@ var getErc20Balances = async (chain, wallet) => {
577
620
  const contractAddress = ADDRESSES[chain.chainId]?.BatchQuery;
578
621
  const rpcUrl = chain.publicRpcUrls[0];
579
622
  if (contractAddress && rpcUrl) {
580
- const contract = new import_ethers2.ethers.Contract(
623
+ const contract = new import_ethers.ethers.Contract(
581
624
  contractAddress,
582
625
  BatchQueryAbi,
583
- import_ethers2.ethers.getDefaultProvider(rpcUrl)
626
+ import_ethers.ethers.getDefaultProvider(rpcUrl)
584
627
  );
585
628
  return await contract["batchQuery"](tokenAddresses, calldatas);
586
629
  }
587
630
  return Promise.resolve();
588
631
  });
589
632
  const tokenBalances = (await Promise.all(promises)).flat().map(
590
- (encodedBalance) => import_ethers2.ethers.utils.defaultAbiCoder.decode(["uint256"], encodedBalance)[0]
633
+ (encodedBalance) => import_ethers.ethers.utils.defaultAbiCoder.decode(["uint256"], encodedBalance)[0]
591
634
  );
592
635
  const balances = {};
593
636
  erc20Tokens.forEach((token, index) => {
@@ -596,6 +639,30 @@ var getErc20Balances = async (chain, wallet) => {
596
639
  return balances;
597
640
  };
598
641
 
642
+ // src/utils/numbers.ts
643
+ var import_bignumber = require("bignumber.js");
644
+ var import_ethers2 = require("ethers");
645
+ var safeBigNumberFrom = (value) => {
646
+ import_bignumber.BigNumber.config({ DECIMAL_PLACES: 0 });
647
+ return import_ethers2.BigNumber.from(new import_bignumber.BigNumber(value).div(1).toFixed());
648
+ };
649
+ var weiToHumanReadable = ({
650
+ amount,
651
+ decimals,
652
+ precisionFractionalPlaces,
653
+ prettifySmallNumber = false
654
+ }) => {
655
+ const decimalsFactor = Math.pow(10, decimals);
656
+ import_bignumber.BigNumber.config({ DECIMAL_PLACES: precisionFractionalPlaces });
657
+ const res = new import_bignumber.BigNumber(amount).div(decimalsFactor).toFixed();
658
+ if (prettifySmallNumber && res === "0" && amount !== "0") {
659
+ return `<${(1 / 10 ** precisionFractionalPlaces).toFixed(
660
+ precisionFractionalPlaces
661
+ )}`;
662
+ }
663
+ return res;
664
+ };
665
+
599
666
  // src/utils/strings.ts
600
667
  var shortAddress = (address) => {
601
668
  return `${address?.substring(0, 5)}...${address?.substring(
@@ -603,6 +670,9 @@ var shortAddress = (address) => {
603
670
  address.length
604
671
  )}`;
605
672
  };
673
+ var isETHAddressValid = (address) => {
674
+ return /^0x[a-fA-F0-9]{40}$/.test(address);
675
+ };
606
676
 
607
677
  // src/utils/index.ts
608
678
  var import_date_fns = require("date-fns");
@@ -631,19 +701,19 @@ var getDate = (blockTimestamp) => {
631
701
  };
632
702
 
633
703
  // src/services/integrations/monitoring.ts
634
- var import_ethers5 = require("ethers");
704
+ var import_ethers6 = require("ethers");
635
705
 
636
706
  // src/components/Alert/index.tsx
637
- var import_jsx_runtime = require("react/jsx-runtime");
707
+ var import_jsx_runtime3 = require("react/jsx-runtime");
638
708
  var Alert = ({ desc }) => {
639
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "border border-solid border-x_alert rounded-3xl text-x_alert_light text-xs py-0.5 px-2", children: [
709
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "border border-solid border-x_alert rounded-3xl text-x_alert_light text-xs py-0.5 px-2", children: [
640
710
  "\u26A0\uFE0F ",
641
711
  desc
642
712
  ] });
643
713
  };
644
714
 
645
715
  // src/components/TxConfigForm/index.tsx
646
- var import_react11 = require("react");
716
+ var import_react12 = require("react");
647
717
  var import_react_query = require("@tanstack/react-query");
648
718
  var import_wagmi3 = require("wagmi");
649
719
 
@@ -683,45 +753,24 @@ var mapTransports = (chains) => {
683
753
  return transports;
684
754
  };
685
755
 
686
- // src/components/icons/CloseIcon.tsx
687
- var import_jsx_runtime2 = require("react/jsx-runtime");
688
- var CloseIcon = () => {
689
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
690
- "svg",
691
- {
692
- height: "18",
693
- width: "18",
694
- xmlns: "http://www.w3.org/2000/svg",
695
- viewBox: "0 0 10.312 8.319",
696
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
697
- "path",
698
- {
699
- fill: "white",
700
- d: "M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"
701
- }
702
- )
703
- }
704
- );
705
- };
706
-
707
756
  // src/components/icons/ArrowRightIcon.tsx
708
- var import_jsx_runtime3 = require("react/jsx-runtime");
757
+ var import_jsx_runtime4 = require("react/jsx-runtime");
709
758
  var ArrowRightIcon = () => {
710
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
759
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
711
760
  "svg",
712
761
  {
713
762
  xmlns: "http://www.w3.org/2000/svg",
714
763
  viewBox: "0 0 448 512",
715
764
  fill: "currentColor",
716
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z" })
765
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z" })
717
766
  }
718
767
  );
719
768
  };
720
769
 
721
770
  // src/components/icons/ArrowDownIcon.tsx
722
- var import_jsx_runtime4 = require("react/jsx-runtime");
771
+ var import_jsx_runtime5 = require("react/jsx-runtime");
723
772
  var ArrowDownIcon = () => {
724
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
773
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
725
774
  "svg",
726
775
  {
727
776
  width: "20",
@@ -729,7 +778,7 @@ var ArrowDownIcon = () => {
729
778
  viewBox: "0 0 20 20",
730
779
  fill: "none",
731
780
  xmlns: "http://www.w3.org/2000/svg",
732
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
781
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
733
782
  "path",
734
783
  {
735
784
  d: "M12 2.45932L12 12.8957L15.8625 9.15023L18 11.1866L10.5 18.4593L3 11.1866L5.1375 9.15023L9 12.8957L9 2.45932L12 2.45932Z",
@@ -741,9 +790,9 @@ var ArrowDownIcon = () => {
741
790
  };
742
791
 
743
792
  // src/components/icons/ArrowLeftIcon.tsx
744
- var import_jsx_runtime5 = require("react/jsx-runtime");
793
+ var import_jsx_runtime6 = require("react/jsx-runtime");
745
794
  var ArrowLeftIcon = () => {
746
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
795
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
747
796
  "svg",
748
797
  {
749
798
  width: "10",
@@ -751,7 +800,7 @@ var ArrowLeftIcon = () => {
751
800
  viewBox: "0 0 10 16",
752
801
  fill: "none",
753
802
  xmlns: "http://www.w3.org/2000/svg",
754
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
803
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
755
804
  "path",
756
805
  {
757
806
  d: "M0.5 8L8.13251 15.5L9.5 14.1562L3.20318 8L9.4682 1.84375L8.10071 0.5L0.5 8Z",
@@ -763,44 +812,44 @@ var ArrowLeftIcon = () => {
763
812
  };
764
813
 
765
814
  // src/components/icons/ArrowUpRightIcon.tsx
766
- var import_jsx_runtime6 = require("react/jsx-runtime");
815
+ var import_jsx_runtime7 = require("react/jsx-runtime");
767
816
  var ArrowUpRightIcon = () => {
768
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
817
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
769
818
  "svg",
770
819
  {
771
820
  xmlns: "http://www.w3.org/2000/svg",
772
821
  viewBox: "0 0 512 512",
773
822
  fill: "currentColor",
774
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" })
823
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z" })
775
824
  }
776
825
  );
777
826
  };
778
827
 
779
828
  // src/components/icons/CheckIcon.tsx
780
- var import_jsx_runtime7 = require("react/jsx-runtime");
829
+ var import_jsx_runtime8 = require("react/jsx-runtime");
781
830
  var CheckIcon = () => {
782
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
831
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
783
832
  "svg",
784
833
  {
785
834
  xmlns: "http://www.w3.org/2000/svg",
786
835
  viewBox: "0 0 448 512",
787
836
  fill: "currentColor",
788
- children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" })
837
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" })
789
838
  }
790
839
  );
791
840
  };
792
841
 
793
842
  // src/components/icons/ChevronDownIcon.tsx
794
- var import_jsx_runtime8 = require("react/jsx-runtime");
843
+ var import_jsx_runtime9 = require("react/jsx-runtime");
795
844
  var ChevronDownIcon = () => {
796
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
845
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
797
846
  "svg",
798
847
  {
799
848
  width: "12",
800
849
  height: "12",
801
850
  xmlns: "http://www.w3.org/2000/svg",
802
851
  viewBox: "0 0 512 512",
803
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
852
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
804
853
  "path",
805
854
  {
806
855
  fill: "currentColor",
@@ -812,9 +861,9 @@ var ChevronDownIcon = () => {
812
861
  };
813
862
 
814
863
  // src/components/icons/ChevronUpIcon.tsx
815
- var import_jsx_runtime9 = require("react/jsx-runtime");
864
+ var import_jsx_runtime10 = require("react/jsx-runtime");
816
865
  var ChevronUpIcon = () => {
817
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
866
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
818
867
  "path",
819
868
  {
820
869
  fill: "currentColor",
@@ -824,9 +873,9 @@ var ChevronUpIcon = () => {
824
873
  };
825
874
 
826
875
  // src/components/icons/CircularProgressIcon.tsx
827
- var import_jsx_runtime10 = require("react/jsx-runtime");
876
+ var import_jsx_runtime11 = require("react/jsx-runtime");
828
877
  var CircularProgressIcon = () => {
829
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
878
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
830
879
  "svg",
831
880
  {
832
881
  className: "animate-spin-slow text-white",
@@ -836,7 +885,7 @@ var CircularProgressIcon = () => {
836
885
  fill: "none",
837
886
  xmlns: "http://www.w3.org/2000/svg",
838
887
  children: [
839
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
888
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
840
889
  "circle",
841
890
  {
842
891
  cx: "16.5",
@@ -847,16 +896,37 @@ var CircularProgressIcon = () => {
847
896
  strokeWidth: "2"
848
897
  }
849
898
  ),
850
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M1 16C1 7.71573 7.71573 1 16 1", stroke: "white", strokeWidth: "2" })
899
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M1 16C1 7.71573 7.71573 1 16 1", stroke: "white", strokeWidth: "2" })
851
900
  ]
852
901
  }
853
902
  );
854
903
  };
855
904
 
905
+ // src/components/icons/CloseIcon.tsx
906
+ var import_jsx_runtime12 = require("react/jsx-runtime");
907
+ var CloseIcon = () => {
908
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
909
+ "svg",
910
+ {
911
+ height: "18",
912
+ width: "18",
913
+ xmlns: "http://www.w3.org/2000/svg",
914
+ viewBox: "0 0 10.312 8.319",
915
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
916
+ "path",
917
+ {
918
+ fill: "white",
919
+ d: "M6.073 4.078 10.151 0H9.093A1.87 1.87 0 0 0 7.77.548L5.157 3.162 2.543.548A1.87 1.87 0 0 0 1.22 0H.161L4.24 4.078 0 8.318h1.058a1.87 1.87 0 0 0 1.322-.547l2.777-2.777 2.776 2.777a1.869 1.869 0 0 0 1.322.548h1.058Z"
920
+ }
921
+ )
922
+ }
923
+ );
924
+ };
925
+
856
926
  // src/components/icons/CoinsIcon.tsx
857
- var import_jsx_runtime11 = require("react/jsx-runtime");
927
+ var import_jsx_runtime13 = require("react/jsx-runtime");
858
928
  var CoinsIcon = () => {
859
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
929
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
860
930
  "svg",
861
931
  {
862
932
  width: "24",
@@ -864,7 +934,7 @@ var CoinsIcon = () => {
864
934
  viewBox: "0 0 24 24",
865
935
  fill: "none",
866
936
  xmlns: "http://www.w3.org/2000/svg",
867
- children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
937
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
868
938
  "path",
869
939
  {
870
940
  d: "M15 20C12.7667 20 10.875 19.225 9.325 17.675C7.775 16.125 7 14.2333 7 12C7 9.76667 7.775 7.875 9.325 6.325C10.875 4.775 12.7667 4 15 4C17.2333 4 19.125 4.775 20.675 6.325C22.225 7.875 23 9.76667 23 12C23 14.2333 22.225 16.125 20.675 17.675C19.125 19.225 17.2333 20 15 20ZM7 19.75C5.23333 19.2833 3.79167 18.3333 2.675 16.9C1.55833 15.4667 1 13.8333 1 12C1 10.1667 1.55833 8.53333 2.675 7.1C3.79167 5.66667 5.23333 4.71667 7 4.25V6.35C5.8 6.76667 4.83333 7.49167 4.1 8.525C3.36667 9.55833 3 10.7167 3 12C3 13.2833 3.36667 14.4417 4.1 15.475C4.83333 16.5083 5.8 17.2333 7 17.65V19.75ZM15 18C16.6667 18 18.0833 17.4167 19.25 16.25C20.4167 15.0833 21 13.6667 21 12C21 10.3333 20.4167 8.91667 19.25 7.75C18.0833 6.58333 16.6667 6 15 6C13.3333 6 11.9167 6.58333 10.75 7.75C9.58333 8.91667 9 10.3333 9 12C9 13.6667 9.58333 15.0833 10.75 16.25C11.9167 17.4167 13.3333 18 15 18Z",
@@ -877,9 +947,9 @@ var CoinsIcon = () => {
877
947
  };
878
948
 
879
949
  // src/components/icons/DownArrorIcon.tsx
880
- var import_jsx_runtime12 = require("react/jsx-runtime");
950
+ var import_jsx_runtime14 = require("react/jsx-runtime");
881
951
  var DownArrowIcon = () => {
882
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
952
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
883
953
  "svg",
884
954
  {
885
955
  width: 16,
@@ -887,7 +957,7 @@ var DownArrowIcon = () => {
887
957
  viewBox: "0 0 16 16",
888
958
  fill: "none",
889
959
  xmlns: "http://www.w3.org/2000/svg",
890
- children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
960
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
891
961
  "path",
892
962
  {
893
963
  d: "M8.00008 9.76921L5.06421 6.83334H10.9359L8.00008 9.76921Z",
@@ -900,9 +970,9 @@ var DownArrowIcon = () => {
900
970
  };
901
971
 
902
972
  // src/components/icons/HistoryIcon.tsx
903
- var import_jsx_runtime13 = require("react/jsx-runtime");
973
+ var import_jsx_runtime15 = require("react/jsx-runtime");
904
974
  var HistoryIcon = () => {
905
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
975
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
906
976
  "svg",
907
977
  {
908
978
  width: "20",
@@ -910,7 +980,7 @@ var HistoryIcon = () => {
910
980
  viewBox: "0 0 20 20",
911
981
  fill: "none",
912
982
  xmlns: "http://www.w3.org/2000/svg",
913
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
983
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
914
984
  "path",
915
985
  {
916
986
  d: "M9.98413 17.5C8.1633 17.5 6.57667 16.8646 5.22424 15.5938C3.8718 14.3229 3.09663 12.7361 2.89871 10.8333H4.52163C4.70635 12.2778 5.3166 13.4722 6.35236 14.4167C7.38812 15.3611 8.59871 15.8333 9.98413 15.8333C11.5279 15.8333 12.8374 15.2674 13.9128 14.1354C14.9881 13.0035 15.5258 11.625 15.5258 10C15.5258 8.375 14.9881 6.99653 13.9128 5.86458C12.8374 4.73264 11.5279 4.16667 9.98413 4.16667C9.07371 4.16667 8.22267 4.38889 7.43101 4.83333C6.63934 5.27778 5.97302 5.88889 5.43205 6.66667H7.60913V8.33333H2.85913V3.33333H4.44246V5.29167C5.11538 4.40278 5.93673 3.71528 6.90653 3.22917C7.87632 2.74306 8.90219 2.5 9.98413 2.5C10.9737 2.5 11.9006 2.69792 12.7649 3.09375C13.6291 3.48958 14.3812 4.02431 15.0211 4.69792C15.661 5.37153 16.169 6.16319 16.5451 7.07292C16.9211 7.98264 17.1091 8.95833 17.1091 10C17.1091 11.0417 16.9211 12.0174 16.5451 12.9271C16.169 13.8368 15.661 14.6285 15.0211 15.3021C14.3812 15.9757 13.6291 16.5104 12.7649 16.9062C11.9006 17.3021 10.9737 17.5 9.98413 17.5ZM12.2008 13.5L9.19246 10.3333V5.83333H10.7758V9.66667L13.3091 12.3333L12.2008 13.5Z",
@@ -922,12 +992,12 @@ var HistoryIcon = () => {
922
992
  };
923
993
 
924
994
  // src/components/icons/HourGlassIcon.tsx
925
- var import_jsx_runtime14 = require("react/jsx-runtime");
995
+ var import_jsx_runtime16 = require("react/jsx-runtime");
926
996
 
927
997
  // src/components/icons/SearchIcon.tsx
928
- var import_jsx_runtime15 = require("react/jsx-runtime");
998
+ var import_jsx_runtime17 = require("react/jsx-runtime");
929
999
  var SearchIcon = () => {
930
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1000
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
931
1001
  "svg",
932
1002
  {
933
1003
  xmlns: "http://www.w3.org/2000/svg",
@@ -935,18 +1005,18 @@ var SearchIcon = () => {
935
1005
  width: "24",
936
1006
  viewBox: "0 -960 960 960",
937
1007
  fill: "#ffffffc0",
938
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
1008
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z" })
939
1009
  }
940
1010
  );
941
1011
  };
942
1012
 
943
1013
  // src/components/icons/XMarkIcon.tsx
944
- var import_jsx_runtime16 = require("react/jsx-runtime");
1014
+ var import_jsx_runtime18 = require("react/jsx-runtime");
945
1015
 
946
1016
  // src/components/icons/PercentageIcon.tsx
947
- var import_jsx_runtime17 = require("react/jsx-runtime");
1017
+ var import_jsx_runtime19 = require("react/jsx-runtime");
948
1018
  var PercentageIcon = () => {
949
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1019
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
950
1020
  "svg",
951
1021
  {
952
1022
  width: "12",
@@ -955,14 +1025,14 @@ var PercentageIcon = () => {
955
1025
  fill: "none",
956
1026
  xmlns: "http://www.w3.org/2000/svg",
957
1027
  children: [
958
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1028
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
959
1029
  "path",
960
1030
  {
961
1031
  d: "M3.00008 5.33329C2.35564 5.33329 1.80564 5.10552 1.35008 4.64996C0.894526 4.1944 0.666748 3.6444 0.666748 2.99996C0.666748 2.35551 0.894526 1.80551 1.35008 1.34996C1.80564 0.894404 2.35564 0.666626 3.00008 0.666626C3.64453 0.666626 4.19453 0.894404 4.65008 1.34996C5.10564 1.80551 5.33342 2.35551 5.33342 2.99996C5.33342 3.6444 5.10564 4.1944 4.65008 4.64996C4.19453 5.10552 3.64453 5.33329 3.00008 5.33329ZM3.00008 3.99996C3.27786 3.99996 3.51397 3.90274 3.70841 3.70829C3.90286 3.51385 4.00008 3.27774 4.00008 2.99996C4.00008 2.72218 3.90286 2.48607 3.70841 2.29163C3.51397 2.09718 3.27786 1.99996 3.00008 1.99996C2.7223 1.99996 2.48619 2.09718 2.29175 2.29163C2.0973 2.48607 2.00008 2.72218 2.00008 2.99996C2.00008 3.27774 2.0973 3.51385 2.29175 3.70829C2.48619 3.90274 2.7223 3.99996 3.00008 3.99996ZM9.00008 11.3333C8.35564 11.3333 7.80564 11.1055 7.35008 10.65C6.89453 10.1944 6.66675 9.6444 6.66675 8.99996C6.66675 8.35552 6.89453 7.80552 7.35008 7.34996C7.80564 6.8944 8.35564 6.66663 9.00008 6.66663C9.64453 6.66663 10.1945 6.8944 10.6501 7.34996C11.1056 7.80552 11.3334 8.35552 11.3334 8.99996C11.3334 9.6444 11.1056 10.1944 10.6501 10.65C10.1945 11.1055 9.64453 11.3333 9.00008 11.3333ZM9.00008 9.99996C9.27786 9.99996 9.51397 9.90274 9.70842 9.70829C9.90286 9.51385 10.0001 9.27774 10.0001 8.99996C10.0001 8.72218 9.90286 8.48607 9.70842 8.29163C9.51397 8.09718 9.27786 7.99996 9.00008 7.99996C8.7223 7.99996 8.48619 8.09718 8.29175 8.29163C8.0973 8.48607 8.00008 8.72218 8.00008 8.99996C8.00008 9.27774 8.0973 9.51385 8.29175 9.70829C8.48619 9.90274 8.7223 9.99996 9.00008 9.99996ZM1.60008 11.3333L0.666748 10.4L10.4001 0.666626L11.3334 1.59996L1.60008 11.3333Z",
962
1032
  fill: "url(#paint0_linear_32_1164)"
963
1033
  }
964
1034
  ),
965
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1035
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
966
1036
  "linearGradient",
967
1037
  {
968
1038
  id: "paint0_linear_32_1164",
@@ -972,8 +1042,8 @@ var PercentageIcon = () => {
972
1042
  y2: "1.31767",
973
1043
  gradientUnits: "userSpaceOnUse",
974
1044
  children: [
975
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("stop", { stopColor: "#3681C6" }),
976
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("stop", { offset: "1", stopColor: "#2B4A9D" })
1045
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("stop", { stopColor: "#3681C6" }),
1046
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("stop", { offset: "1", stopColor: "#2B4A9D" })
977
1047
  ]
978
1048
  }
979
1049
  ) })
@@ -983,9 +1053,9 @@ var PercentageIcon = () => {
983
1053
  };
984
1054
 
985
1055
  // src/components/icons/TimerIcon.tsx
986
- var import_jsx_runtime18 = require("react/jsx-runtime");
1056
+ var import_jsx_runtime20 = require("react/jsx-runtime");
987
1057
  var TimerIcon = () => {
988
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1058
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
989
1059
  "svg",
990
1060
  {
991
1061
  xmlns: "http://www.w3.org/2000/svg",
@@ -993,15 +1063,15 @@ var TimerIcon = () => {
993
1063
  viewBox: "0 -960 960 960",
994
1064
  width: "16",
995
1065
  fill: "currentColor",
996
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z" })
1066
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("path", { d: "M360-840v-80h240v80H360Zm80 440h80v-240h-80v240Zm40 320q-74 0-139.5-28.5T226-186q-49-49-77.5-114.5T120-440q0-74 28.5-139.5T226-694q49-49 114.5-77.5T480-800q62 0 119 20t107 58l56-56 56 56-56 56q38 50 58 107t20 119q0 74-28.5 139.5T734-186q-49 49-114.5 77.5T480-80Zm0-80q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-280Z" })
997
1067
  }
998
1068
  );
999
1069
  };
1000
1070
 
1001
1071
  // src/components/icons/InfoIcon.tsx
1002
- var import_jsx_runtime19 = require("react/jsx-runtime");
1072
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1003
1073
  var InfoIcon = () => {
1004
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1074
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1005
1075
  "svg",
1006
1076
  {
1007
1077
  width: "28",
@@ -1009,15 +1079,15 @@ var InfoIcon = () => {
1009
1079
  viewBox: "0 0 28 28",
1010
1080
  xmlns: "http://www.w3.org/2000/svg",
1011
1081
  fill: "currentColor",
1012
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M12.6667 20.6666H15.3334V12.6666H12.6667V20.6666ZM14.0001 9.99996C14.3779 9.99996 14.6945 9.87218 14.9501 9.61663C15.2056 9.36107 15.3334 9.0444 15.3334 8.66663C15.3334 8.28885 15.2056 7.97218 14.9501 7.71663C14.6945 7.46107 14.3779 7.33329 14.0001 7.33329C13.6223 7.33329 13.3056 7.46107 13.0501 7.71663C12.7945 7.97218 12.6667 8.28885 12.6667 8.66663C12.6667 9.0444 12.7945 9.36107 13.0501 9.61663C13.3056 9.87218 13.6223 9.99996 14.0001 9.99996ZM14.0001 27.3333C12.1556 27.3333 10.4223 26.9833 8.80008 26.2833C7.17786 25.5833 5.76675 24.6333 4.56675 23.4333C3.36675 22.2333 2.41675 20.8222 1.71675 19.2C1.01675 17.5777 0.666748 15.8444 0.666748 14C0.666748 12.1555 1.01675 10.4222 1.71675 8.79996C2.41675 7.17774 3.36675 5.76663 4.56675 4.56663C5.76675 3.36663 7.17786 2.41663 8.80008 1.71663C10.4223 1.01663 12.1556 0.666626 14.0001 0.666626C15.8445 0.666626 17.5779 1.01663 19.2001 1.71663C20.8223 2.41663 22.2334 3.36663 23.4334 4.56663C24.6334 5.76663 25.5834 7.17774 26.2834 8.79996C26.9834 10.4222 27.3334 12.1555 27.3334 14C27.3334 15.8444 26.9834 17.5777 26.2834 19.2C25.5834 20.8222 24.6334 22.2333 23.4334 23.4333C22.2334 24.6333 20.8223 25.5833 19.2001 26.2833C17.5779 26.9833 15.8445 27.3333 14.0001 27.3333ZM14.0001 24.6666C16.9779 24.6666 19.5001 23.6333 21.5667 21.5666C23.6334 19.5 24.6667 16.9777 24.6667 14C24.6667 11.0222 23.6334 8.49996 21.5667 6.43329C19.5001 4.36663 16.9779 3.33329 14.0001 3.33329C11.0223 3.33329 8.50008 4.36663 6.43341 6.43329C4.36675 8.49996 3.33341 11.0222 3.33341 14C3.33341 16.9777 4.36675 19.5 6.43341 21.5666C8.50008 23.6333 11.0223 24.6666 14.0001 24.6666Z" })
1082
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M12.6667 20.6666H15.3334V12.6666H12.6667V20.6666ZM14.0001 9.99996C14.3779 9.99996 14.6945 9.87218 14.9501 9.61663C15.2056 9.36107 15.3334 9.0444 15.3334 8.66663C15.3334 8.28885 15.2056 7.97218 14.9501 7.71663C14.6945 7.46107 14.3779 7.33329 14.0001 7.33329C13.6223 7.33329 13.3056 7.46107 13.0501 7.71663C12.7945 7.97218 12.6667 8.28885 12.6667 8.66663C12.6667 9.0444 12.7945 9.36107 13.0501 9.61663C13.3056 9.87218 13.6223 9.99996 14.0001 9.99996ZM14.0001 27.3333C12.1556 27.3333 10.4223 26.9833 8.80008 26.2833C7.17786 25.5833 5.76675 24.6333 4.56675 23.4333C3.36675 22.2333 2.41675 20.8222 1.71675 19.2C1.01675 17.5777 0.666748 15.8444 0.666748 14C0.666748 12.1555 1.01675 10.4222 1.71675 8.79996C2.41675 7.17774 3.36675 5.76663 4.56675 4.56663C5.76675 3.36663 7.17786 2.41663 8.80008 1.71663C10.4223 1.01663 12.1556 0.666626 14.0001 0.666626C15.8445 0.666626 17.5779 1.01663 19.2001 1.71663C20.8223 2.41663 22.2334 3.36663 23.4334 4.56663C24.6334 5.76663 25.5834 7.17774 26.2834 8.79996C26.9834 10.4222 27.3334 12.1555 27.3334 14C27.3334 15.8444 26.9834 17.5777 26.2834 19.2C25.5834 20.8222 24.6334 22.2333 23.4334 23.4333C22.2334 24.6333 20.8223 25.5833 19.2001 26.2833C17.5779 26.9833 15.8445 27.3333 14.0001 27.3333ZM14.0001 24.6666C16.9779 24.6666 19.5001 23.6333 21.5667 21.5666C23.6334 19.5 24.6667 16.9777 24.6667 14C24.6667 11.0222 23.6334 8.49996 21.5667 6.43329C19.5001 4.36663 16.9779 3.33329 14.0001 3.33329C11.0223 3.33329 8.50008 4.36663 6.43341 6.43329C4.36675 8.49996 3.33341 11.0222 3.33341 14C3.33341 16.9777 4.36675 19.5 6.43341 21.5666C8.50008 23.6333 11.0223 24.6666 14.0001 24.6666Z" })
1013
1083
  }
1014
1084
  );
1015
1085
  };
1016
1086
 
1017
1087
  // src/components/icons/SettingsIcon.tsx
1018
- var import_jsx_runtime20 = require("react/jsx-runtime");
1088
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1019
1089
  var SettingsIcon = () => {
1020
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1090
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1021
1091
  "svg",
1022
1092
  {
1023
1093
  width: "18",
@@ -1025,7 +1095,7 @@ var SettingsIcon = () => {
1025
1095
  viewBox: "0 0 18 18",
1026
1096
  fill: "none",
1027
1097
  xmlns: "http://www.w3.org/2000/svg",
1028
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1098
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1029
1099
  "path",
1030
1100
  {
1031
1101
  d: "M6.62325 17.5L6.26504 14.78C6.07101 14.7092 5.88818 14.6242 5.71653 14.525C5.54489 14.4258 5.37698 14.3196 5.2128 14.2063L2.54862 15.2688L0.0859375 11.2312L2.39191 9.57375C2.37698 9.47458 2.36952 9.37896 2.36952 9.28687V8.71313C2.36952 8.62104 2.37698 8.52542 2.39191 8.42625L0.0859375 6.76875L2.54862 2.73125L5.2128 3.79375C5.37698 3.68042 5.54862 3.57417 5.72773 3.475C5.90683 3.37583 6.08594 3.29083 6.26504 3.22L6.62325 0.5H11.5486L11.9068 3.22C12.1009 3.29083 12.2837 3.37583 12.4553 3.475C12.627 3.57417 12.7949 3.68042 12.9591 3.79375L15.6233 2.73125L18.0859 6.76875L15.78 8.42625C15.7949 8.52542 15.8024 8.62104 15.8024 8.71313V9.28687C15.8024 9.37896 15.7874 9.47458 15.7576 9.57375L18.0635 11.2312L15.6009 15.2688L12.9591 14.2063C12.7949 14.3196 12.6233 14.4258 12.4441 14.525C12.265 14.6242 12.0859 14.7092 11.9068 14.78L11.5486 17.5H6.62325ZM9.13071 11.975C9.99639 11.975 10.7352 11.6846 11.3471 11.1038C11.9591 10.5229 12.265 9.82167 12.265 9C12.265 8.17833 11.9591 7.47708 11.3471 6.89625C10.7352 6.31542 9.99639 6.025 9.13071 6.025C8.25012 6.025 7.50758 6.31542 6.9031 6.89625C6.29862 7.47708 5.99639 8.17833 5.99639 9C5.99639 9.82167 6.29862 10.5229 6.9031 11.1038C7.50758 11.6846 8.25012 11.975 9.13071 11.975ZM9.13071 10.275C8.75758 10.275 8.44042 10.151 8.17922 9.90312C7.91803 9.65521 7.78743 9.35417 7.78743 9C7.78743 8.64583 7.91803 8.34479 8.17922 8.09688C8.44042 7.84896 8.75758 7.725 9.13071 7.725C9.50385 7.725 9.82101 7.84896 10.0822 8.09688C10.3434 8.34479 10.474 8.64583 10.474 9C10.474 9.35417 10.3434 9.65521 10.0822 9.90312C9.82101 10.151 9.50385 10.275 9.13071 10.275ZM8.19042 15.8H9.95907L10.2725 13.5475C10.7352 13.4342 11.1643 13.2677 11.5598 13.0481C11.9553 12.8285 12.3173 12.5629 12.6456 12.2513L14.8621 13.1225L15.7352 11.6775L13.8098 10.2963C13.8844 10.0979 13.9367 9.88896 13.9665 9.66938C13.9964 9.44979 14.0113 9.22667 14.0113 9C14.0113 8.77333 13.9964 8.55021 13.9665 8.33063C13.9367 8.11104 13.8844 7.90208 13.8098 7.70375L15.7352 6.3225L14.8621 4.8775L12.6456 5.77C12.3173 5.44417 11.9553 5.17146 11.5598 4.95188C11.1643 4.73229 10.7352 4.56583 10.2725 4.4525L9.98146 2.2H8.2128L7.89937 4.4525C7.43668 4.56583 7.00758 4.73229 6.61206 4.95188C6.21653 5.17146 5.85459 5.43708 5.52624 5.74875L3.30982 4.8775L2.43668 6.3225L4.36206 7.6825C4.28743 7.895 4.23519 8.1075 4.20534 8.32C4.17549 8.5325 4.16056 8.75917 4.16056 9C4.16056 9.22667 4.17549 9.44625 4.20534 9.65875C4.23519 9.87125 4.28743 10.0837 4.36206 10.2963L2.43668 11.6775L3.30982 13.1225L5.52624 12.23C5.85459 12.5558 6.21653 12.8285 6.61206 13.0481C7.00758 13.2677 7.43668 13.4342 7.89937 13.5475L8.19042 15.8Z",
@@ -1037,9 +1107,9 @@ var SettingsIcon = () => {
1037
1107
  };
1038
1108
 
1039
1109
  // src/components/icons/XSwapBadgeIcon.tsx
1040
- var import_jsx_runtime21 = require("react/jsx-runtime");
1110
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1041
1111
  var XSwapBadgeIcon = () => {
1042
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1112
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1043
1113
  "svg",
1044
1114
  {
1045
1115
  version: "1.2",
@@ -1048,8 +1118,8 @@ var XSwapBadgeIcon = () => {
1048
1118
  width: "80",
1049
1119
  height: "27",
1050
1120
  children: [
1051
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("title", { children: "xswap-badge" }),
1052
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1121
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("title", { children: "xswap-badge" }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1053
1123
  "image",
1054
1124
  {
1055
1125
  width: "80",
@@ -1058,17 +1128,17 @@ var XSwapBadgeIcon = () => {
1058
1128
  href: "data:image/png;base64,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"
1059
1129
  }
1060
1130
  ) }),
1061
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("style", {}),
1062
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("use", { id: "Background", href: "#img1iVBORw0KGgoAAAANSUhEUgAAAF", x: "0", y: "1" })
1131
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("style", {}),
1132
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("use", { id: "Background", href: "#img1iVBORw0KGgoAAAANSUhEUgAAAF", x: "0", y: "1" })
1063
1133
  ]
1064
1134
  }
1065
1135
  );
1066
1136
  };
1067
1137
 
1068
1138
  // src/components/icons/ChainlinkCCIPIcon.tsx
1069
- var import_jsx_runtime22 = require("react/jsx-runtime");
1139
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1070
1140
  var ChainlinkCCIPIcon = () => {
1071
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1141
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1072
1142
  "svg",
1073
1143
  {
1074
1144
  version: "1.2",
@@ -1077,8 +1147,8 @@ var ChainlinkCCIPIcon = () => {
1077
1147
  width: "67",
1078
1148
  height: "27",
1079
1149
  children: [
1080
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("title", { children: "chainlink-CCIP" }),
1081
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1150
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("title", { children: "chainlink-CCIP" }),
1151
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1082
1152
  "image",
1083
1153
  {
1084
1154
  width: "67",
@@ -1087,17 +1157,17 @@ var ChainlinkCCIPIcon = () => {
1087
1157
  href: "data:image/png;base64,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"
1088
1158
  }
1089
1159
  ) }),
1090
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("style", {}),
1091
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("use", { id: "Background", href: "#imgiVBORw0KGgoAAA", x: "0", y: "0" })
1160
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("style", {}),
1161
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("use", { id: "Background", href: "#imgiVBORw0KGgoAAA", x: "0", y: "0" })
1092
1162
  ]
1093
1163
  }
1094
1164
  );
1095
1165
  };
1096
1166
 
1097
1167
  // src/components/icons/XSwapLogo.tsx
1098
- var import_jsx_runtime23 = require("react/jsx-runtime");
1168
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1099
1169
  var XSwapLogo = () => {
1100
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1170
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1101
1171
  "svg",
1102
1172
  {
1103
1173
  version: "1.1",
@@ -1107,7 +1177,7 @@ var XSwapLogo = () => {
1107
1177
  y: "0px",
1108
1178
  viewBox: "0 0 50 50",
1109
1179
  enableBackground: "new 0 0 50 50",
1110
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1180
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1111
1181
  "image",
1112
1182
  {
1113
1183
  id: "image0",
@@ -1121,18 +1191,18 @@ var XSwapLogo = () => {
1121
1191
  };
1122
1192
 
1123
1193
  // src/components/TxConfigForm/PoweredBy.tsx
1124
- var import_jsx_runtime24 = require("react/jsx-runtime");
1194
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1125
1195
  var PoweredBy = () => {
1126
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex justify-center items-center gap-2 my-3", children: [
1127
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-x_grey", children: "Powered by" }),
1128
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(XSwapBadgeIcon, {}),
1129
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: "\u2715" }),
1130
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChainlinkCCIPIcon, {})
1196
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-center items-center gap-2 my-3", children: [
1197
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-x_grey", children: "Powered by" }),
1198
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(XSwapBadgeIcon, {}),
1199
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "\u2715" }),
1200
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChainlinkCCIPIcon, {})
1131
1201
  ] });
1132
1202
  };
1133
1203
 
1134
1204
  // src/components/TxConfigForm/Form.tsx
1135
- var import_react10 = require("react");
1205
+ var import_react11 = require("react");
1136
1206
  var import_ethers4 = require("ethers");
1137
1207
  var import_wagmi2 = require("wagmi");
1138
1208
 
@@ -1159,7 +1229,7 @@ var import_bignumber2 = __toESM(require("bignumber.js"));
1159
1229
 
1160
1230
  // src/components/TxConfigForm/HistoryCard.tsx
1161
1231
  var import_react2 = require("react");
1162
- var import_jsx_runtime25 = require("react/jsx-runtime");
1232
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1163
1233
  var HistoryCard = ({ transaction, supportedChains }) => {
1164
1234
  const date = getDate(transaction.timestamp);
1165
1235
  const supportedTokens = (0, import_react2.useMemo)(() => {
@@ -1205,14 +1275,14 @@ var HistoryCard = ({ transaction, supportedChains }) => {
1205
1275
  const targetChainData = supportedChains.find(
1206
1276
  (chain) => chain.chainId === transaction.targetChainId
1207
1277
  );
1208
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col globalBorder rounded-xl bg-[rgb(15,15,15)] text-white text-xs sm:text-sm p-4 gap-3 mb-2", children: [
1209
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
1210
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-sm sm:text-base", children: date }),
1211
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1212
- transaction.status === "IN_PROGRESS" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-[rgb(250,200,100)]", children: "In progress" }) }),
1213
- transaction.status === "DONE" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-[rgb(100,200,100)]", children: "Done" }) }),
1214
- transaction.status === "REVERTED" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-[rgb(255,100,100)]", children: "Reverted" }) }),
1215
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1278
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col globalBorder rounded-xl bg-[rgb(15,15,15)] text-white text-xs sm:text-sm p-4 gap-3 mb-2", children: [
1279
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
1280
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-sm sm:text-base", children: date }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1282
+ transaction.status === "IN_PROGRESS" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-[rgb(250,200,100)]", children: "In progress" }) }),
1283
+ transaction.status === "DONE" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-[rgb(100,200,100)]", children: "Done" }) }),
1284
+ transaction.status === "REVERTED" && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-[rgb(255,100,100)]", children: "Reverted" }) }),
1285
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1216
1286
  "a",
1217
1287
  {
1218
1288
  href: `${supportedChains.find(
@@ -1222,15 +1292,15 @@ var HistoryCard = ({ transaction, supportedChains }) => {
1222
1292
  rel: "noreferrer",
1223
1293
  className: "ml-2 no-underline",
1224
1294
  "aria-label": "Show the transaction in the chain explorer",
1225
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArrowUpRightIcon, {}) })
1295
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArrowUpRightIcon, {}) })
1226
1296
  }
1227
1297
  )
1228
1298
  ] })
1229
1299
  ] }),
1230
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between flex-wrap gap-2", children: [
1231
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1232
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1233
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1300
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex justify-between flex-wrap gap-2", children: [
1301
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1302
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1303
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1234
1304
  "img",
1235
1305
  {
1236
1306
  src: sourceChainData?.image,
@@ -1238,11 +1308,11 @@ var HistoryCard = ({ transaction, supportedChains }) => {
1238
1308
  className: "w-5 h-5 mr-1"
1239
1309
  }
1240
1310
  ),
1241
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: sourceChainData?.displayName })
1311
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: sourceChainData?.displayName })
1242
1312
  ] }),
1243
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArrowRightIcon, {}) }),
1244
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1245
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1313
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArrowRightIcon, {}) }),
1314
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1315
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1246
1316
  "img",
1247
1317
  {
1248
1318
  src: targetChainData?.image,
@@ -1250,35 +1320,35 @@ var HistoryCard = ({ transaction, supportedChains }) => {
1250
1320
  className: "w-5 h-5 mr-1"
1251
1321
  }
1252
1322
  ),
1253
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { children: targetChainData?.displayName })
1323
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: targetChainData?.displayName })
1254
1324
  ] })
1255
1325
  ] }),
1256
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center mb-2 last:mb-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center flex-wrap", children: [
1257
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1326
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center mb-2 last:mb-0", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center flex-wrap", children: [
1327
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1258
1328
  Number(transferredAmount) < MINIMUM_DISPLAYED_TOKEN_AMOUNT ? `<${MINIMUM_DISPLAYED_TOKEN_AMOUNT}` : transferredAmount,
1259
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "ml-1", children: tokenData?.symbol }),
1260
- tokenData?.image ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1329
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ml-1", children: tokenData?.symbol }),
1330
+ tokenData?.image ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1261
1331
  "img",
1262
1332
  {
1263
1333
  src: tokenData?.image,
1264
1334
  alt: tokenData?.name || "",
1265
1335
  className: "w-5 h-5 ml-1"
1266
1336
  }
1267
- ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
1337
+ ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
1268
1338
  ] }),
1269
- transaction.tokenOutAddress && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
1270
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ArrowRightIcon, {}) }),
1271
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center", children: [
1339
+ transaction.tokenOutAddress && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
1340
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-3.5 h-3.5 my-0 mx-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ArrowRightIcon, {}) }),
1341
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex items-center", children: [
1272
1342
  Number(receivedAmount) < 1e-4 ? "<0.0001" : receivedAmount,
1273
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "ml-1", children: tokenOutData?.symbol }),
1274
- tokenOutData?.image ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1343
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "ml-1", children: tokenOutData?.symbol }),
1344
+ tokenOutData?.image ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1275
1345
  "img",
1276
1346
  {
1277
1347
  src: tokenOutData?.image,
1278
1348
  alt: tokenOutData?.name || "",
1279
1349
  className: "w-5 h-5 ml-1"
1280
1350
  }
1281
- ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
1351
+ ) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "flex items-center justify-center w-5 h-5 text-[10px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: tokenData?.symbol.substring(0, 1) })
1282
1352
  ] })
1283
1353
  ] })
1284
1354
  ] }) })
@@ -1287,7 +1357,7 @@ var HistoryCard = ({ transaction, supportedChains }) => {
1287
1357
  };
1288
1358
 
1289
1359
  // src/components/TxConfigForm/History.tsx
1290
- var import_jsx_runtime26 = require("react/jsx-runtime");
1360
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1291
1361
  var History = ({ signer, supportedChains }) => {
1292
1362
  const [fetchedHistory, setFetchedHistory] = (0, import_react3.useState)();
1293
1363
  const [historyLoadedOnce, setHistoryLoadedOnce] = (0, import_react3.useState)(false);
@@ -1297,15 +1367,35 @@ var History = ({ signer, supportedChains }) => {
1297
1367
  const fetchedTransactions = [];
1298
1368
  if (downloadedHistory) {
1299
1369
  for (const entry of downloadedHistory.history) {
1370
+ let status = "IN_PROGRESS";
1300
1371
  if (!entry.source) {
1301
1372
  continue;
1302
1373
  }
1303
- let status;
1304
- if (entry.failed) status = "REVERTED";
1374
+ if (entry.failed) {
1375
+ status = "REVERTED";
1376
+ }
1305
1377
  if (!!entry.target) {
1306
1378
  status = "DONE";
1307
- } else {
1308
- status = "IN_PROGRESS";
1379
+ }
1380
+ if (entry.transferType === "SINGLE_CHAIN") {
1381
+ if (!entry.target) {
1382
+ continue;
1383
+ }
1384
+ const blockTimestampMs2 = new Date(entry.target.blockTime).getTime();
1385
+ const estimatedDeliveryTimestamp2 = blockTimestampMs2 / 1e3;
1386
+ fetchedTransactions.push({
1387
+ hash: entry.target.transactionHash,
1388
+ timestamp: blockTimestampMs2 / 1e3,
1389
+ sourceChainId: entry.target.blockchainId,
1390
+ targetChainId: entry.target.blockchainId,
1391
+ amountWei: entry.source.tokenAmount,
1392
+ tokenAddress: entry.source.tokenAddress,
1393
+ tokenOutAddress: entry.target?.tokenAmount,
1394
+ tokenOutAmount: entry.target?.tokenAmount,
1395
+ estimatedDeliveryTimestamp: estimatedDeliveryTimestamp2,
1396
+ status
1397
+ });
1398
+ continue;
1309
1399
  }
1310
1400
  const blockTimestampMs = new Date(entry.source.blockTime).getTime();
1311
1401
  const estimatedDeliveryTimestamp = new import_bignumber2.default(
@@ -1339,11 +1429,11 @@ var History = ({ signer, supportedChains }) => {
1339
1429
  return () => clearInterval(timer);
1340
1430
  }, [signer, fetchHistory, getHistory, historyLoadedOnce]);
1341
1431
  if (!signer)
1342
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex items-center justify-center w-full h-[30vh]", children: "Connect a wallet to browse history" });
1343
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full h-96 overflow-scroll overflow-x-hidden", children: [
1344
- fetchedHistory?.length === 0 && historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "w-full text-center py-4 px-0 text-[rgb(158,158,158)]", children: "Your history is empty..." }),
1345
- !fetchedHistory && !historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex w-full h-full items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(CircularProgressIcon, {}) }),
1346
- fetchedHistory?.map((transaction, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1432
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex items-center justify-center w-full h-[30vh]", children: "Connect a wallet to browse history" });
1433
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "w-full h-96 overflow-scroll overflow-x-hidden", children: [
1434
+ fetchedHistory?.length === 0 && historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "w-full text-center py-4 px-0 text-[rgb(158,158,158)]", children: "Your history is empty..." }),
1435
+ !fetchedHistory && !historyLoadedOnce && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex w-full h-full items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CircularProgressIcon, {}) }),
1436
+ fetchedHistory?.map((transaction, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1347
1437
  HistoryCard,
1348
1438
  {
1349
1439
  transaction,
@@ -1355,39 +1445,41 @@ var History = ({ signer, supportedChains }) => {
1355
1445
  };
1356
1446
 
1357
1447
  // src/components/TxConfigForm/TopBar.tsx
1358
- var import_jsx_runtime27 = require("react/jsx-runtime");
1448
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1359
1449
  var TopBar = ({
1360
1450
  signer,
1361
1451
  setSettingsShown,
1362
1452
  setHistoryTabShown,
1363
- historyTabShown
1453
+ historyTabShown,
1454
+ onClose
1364
1455
  }) => {
1365
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex w-full justify-between items-center mx-auto sm:pl-4 pr-8 pt-2", children: [
1366
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "rounded-lg text-[rgba(255,255,255,0.6)] text-xs sm:text-base whitespace-nowrap", children: signer ? `Connected wallet: ${shortAddress(signer)}` : `Wallet disconnected` }),
1367
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex gap-2", children: [
1368
- !historyTabShown && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1456
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full justify-between items-center mx-auto p-2", children: [
1457
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "rounded-lg text-[rgba(255,255,255,0.6)] text-xs sm:text-base whitespace-nowrap", children: signer ? `Connected wallet: ${shortAddress(signer)}` : `Wallet disconnected` }),
1458
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex gap-2 justify-center items-center", children: [
1459
+ !historyTabShown && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1369
1460
  "div",
1370
1461
  {
1371
1462
  onClick: () => setSettingsShown(true),
1372
1463
  className: "flex items-center text-xs gap-1 cursor-pointer",
1373
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SettingsIcon, {}) })
1464
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SettingsIcon, {}) })
1374
1465
  }
1375
1466
  ),
1376
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1467
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1377
1468
  "div",
1378
1469
  {
1379
1470
  onClick: () => setHistoryTabShown((x) => !x),
1380
1471
  className: "flex items-center text-sm gap-1 cursor-pointer",
1381
- children: !historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(HistoryIcon, {}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: "Back" })
1472
+ children: !historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "w-7 h-7 rounded-full bg-gradient-to-r from-x_blue_light to-x_blue_dark flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HistoryIcon, {}) }) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: "Back" })
1382
1473
  }
1383
- )
1474
+ ),
1475
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "cursor-pointer text-white", onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CloseIcon, {}) })
1384
1476
  ] })
1385
1477
  ] });
1386
1478
  };
1387
1479
 
1388
1480
  // src/components/TxConfigForm/Settings.tsx
1389
1481
  var import_react4 = require("react");
1390
- var import_jsx_runtime28 = require("react/jsx-runtime");
1482
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1391
1483
  var Settings = ({
1392
1484
  setSlippage,
1393
1485
  setSettingsShown,
@@ -1404,22 +1496,22 @@ var Settings = ({
1404
1496
  );
1405
1497
  }
1406
1498
  }, [slippageActivePresetIndex, usingSlippageInput]);
1407
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute w-[310px] right-0 top-[46px] z-10 bg-black border border-solid border-[rgba(54,129,198,1)] p-4 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-4 justify-between", children: [
1408
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex justify-between", children: [
1409
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-base", children: "Settings" }),
1410
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1499
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "absolute w-[310px] right-0 top-[46px] z-10 bg-black border border-solid border-[rgba(54,129,198,1)] p-4 rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-4 justify-between", children: [
1500
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex justify-between", children: [
1501
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-base", children: "Settings" }),
1502
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1411
1503
  "div",
1412
1504
  {
1413
1505
  className: "cursor-pointer",
1414
1506
  onClick: () => setSettingsShown(false),
1415
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CloseIcon, {})
1507
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CloseIcon, {})
1416
1508
  }
1417
1509
  )
1418
1510
  ] }),
1419
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
1420
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-2 items-center", children: [
1421
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-sm text-[rgba(255,255,255,0.6)]", children: "Express delivery" }),
1422
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1511
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
1512
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2 items-center", children: [
1513
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-sm text-[rgba(255,255,255,0.6)]", children: "Express delivery" }),
1514
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
1423
1515
  "span",
1424
1516
  {
1425
1517
  className: "inline-flex w-14 h-9 p-3 relative align-middle box-border overflow-hidden cursor-pointer",
@@ -1427,8 +1519,8 @@ var Settings = ({
1427
1519
  setExpressChecked((x) => !x);
1428
1520
  },
1429
1521
  children: [
1430
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "h-full, w-full rounded-lg bg-[rgba(255,255,255,0.3)]" }),
1431
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1522
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-full, w-full rounded-lg bg-[rgba(255,255,255,0.3)]" }),
1523
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1432
1524
  "span",
1433
1525
  {
1434
1526
  className: `transition-all w-5 h-5 rounded-full absolute translate-y-[-4px]
@@ -1439,15 +1531,15 @@ var Settings = ({
1439
1531
  }
1440
1532
  ) })
1441
1533
  ] }),
1442
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-4", children: [
1443
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(InfoIcon, {}) }),
1444
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-xs text-left", children: "Express delivery is a special feature of XSwap that reduces transaction time across chains to around 30 seconds. It is currently available for swaps below a value of $ 1000 USD." })
1534
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-4", children: [
1535
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(InfoIcon, {}) }),
1536
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-xs text-left", children: "Express delivery is a special feature of XSwap that reduces transaction time across chains to around 30 seconds. It is currently available for swaps below a value of $ 1000 USD." })
1445
1537
  ] })
1446
1538
  ] }),
1447
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col gap-2 ", children: [
1448
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: " text-[rgba(255,255,255,0.6)] text-sm", children: "Slippage" }),
1449
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-2", children: [
1450
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex items-center bg-[rgba(15,15,15,1)] p-1 globalBorder rounded-xl", children: SLIPPAGE_PRESETS.map((preset, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1539
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col gap-2 ", children: [
1540
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: " text-[rgba(255,255,255,0.6)] text-sm", children: "Slippage" }),
1541
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-2", children: [
1542
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center bg-[rgba(15,15,15,1)] p-1 globalBorder rounded-xl", children: SLIPPAGE_PRESETS.map((preset, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1451
1543
  "div",
1452
1544
  {
1453
1545
  className: `transition-all cursor-pointer block rounded-lg p-2 border-none text-sm leading-[10px] ${index === slippageActivePresetIndex && !usingSlippageInput ? "text-white" : "text-[rgba(255,255,255,0.2)]"} ${index === slippageActivePresetIndex && !usingSlippageInput ? "bg-gradient-to-r from-[#3681c6] to-[#2b4a9d]" : ""}`,
@@ -1459,8 +1551,8 @@ var Settings = ({
1459
1551
  },
1460
1552
  index
1461
1553
  )) }),
1462
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "bg-[rgba(39,39,39,1)] p-2 border border-solid border-[rgba(82,82,82,1)] rounded-xl text-white flex items-center", children: [
1463
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1554
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "bg-[rgba(39,39,39,1)] p-2 border border-solid border-[rgba(82,82,82,1)] rounded-xl text-white flex items-center", children: [
1555
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1464
1556
  "input",
1465
1557
  {
1466
1558
  className: "text-white border-none bg-[rgba(39,39,39,1)] w-10 placeholder:text-[rgba(255,255,255,0.2)] focus:outline-none text-sm leading-none",
@@ -1479,16 +1571,16 @@ var Settings = ({
1479
1571
  }
1480
1572
  }
1481
1573
  ),
1482
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PercentageIcon, {})
1574
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PercentageIcon, {})
1483
1575
  ] })
1484
1576
  ] }),
1485
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex gap-4", children: [
1486
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(InfoIcon, {}) }),
1487
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "text-xs text-left", children: [
1577
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex gap-4", children: [
1578
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "min-w-[26px] min-h-[26px] text-[#ffa726]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(InfoIcon, {}) }),
1579
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "text-xs text-left", children: [
1488
1580
  "Slippage is the price variation you are willing to accept in the event that the price of the trade changes while it is processing.",
1489
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("br", {}),
1581
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("br", {}),
1490
1582
  " ",
1491
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("br", {}),
1583
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("br", {}),
1492
1584
  "If the trade fails due to too-low slippage, you will receive USDC on the destination chain."
1493
1585
  ] })
1494
1586
  ] })
@@ -1497,23 +1589,28 @@ var Settings = ({
1497
1589
  };
1498
1590
 
1499
1591
  // src/components/TxConfigForm/FeesDetails.tsx
1500
- var import_jsx_runtime29 = require("react/jsx-runtime");
1592
+ var import_react5 = require("react");
1593
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1501
1594
  var FeesDetails = ({
1502
1595
  isGettingRoute,
1503
1596
  route,
1504
1597
  paymentToken,
1505
1598
  dstToken,
1506
1599
  expressChecked,
1600
+ exceedsExpressDeliveryLimit,
1507
1601
  slippage,
1508
1602
  feesDetailsShown,
1509
1603
  setFeesDetailsShown
1510
1604
  }) => {
1511
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col gap-3 globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4 mb-1", children: [
1512
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-center justify-between text-xs sm:text-sm ", children: [
1513
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-1 font-medium text-white opacity-60", children: [
1514
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CoinsIcon, {}),
1515
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mr-1", children: "Fees:" }),
1516
- isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "bg-current rounded animate-pulse w-20 h-4" }) : ` ${weiToHumanReadable({
1605
+ const isExpressDeliveryPossible = (0, import_react5.useMemo)(() => {
1606
+ return expressChecked && !exceedsExpressDeliveryLimit;
1607
+ }, [expressChecked, exceedsExpressDeliveryLimit]);
1608
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-3 globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-2 sm:p-4 mb-1", children: [
1609
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full items-center justify-between text-xs sm:text-sm", children: [
1610
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-1 font-medium text-white opacity-60", children: [
1611
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CoinsIcon, {}),
1612
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "mr-1", children: "Fees:" }),
1613
+ isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Skeleton, { width: "w-20", height: "h-4" }) : ` ${weiToHumanReadable({
1517
1614
  amount: safeBigNumberFrom(
1518
1615
  route?.xSwapFees.xSwapFee.nativeFee || "0"
1519
1616
  ).add(safeBigNumberFrom(route?.xSwapFees.ccipFee || "0")).add(
@@ -1523,61 +1620,62 @@ var FeesDetails = ({
1523
1620
  precisionFractionalPlaces: 5
1524
1621
  })} ${paymentToken?.symbol}`
1525
1622
  ] }),
1526
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex gap-1 items-center", children: [
1527
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
1623
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-1 items-center", children: [
1624
+ route?.xSwapFees.expressDeliveryFee && !isGettingRoute && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
1528
1625
  "div",
1529
1626
  {
1530
- className: `flex gap-1 items-center font-medium ${expressChecked ? "text-x_green" : "text-white opacity-60"}`,
1627
+ className: `flex gap-1 items-center font-medium ${isExpressDeliveryPossible ? "text-x_green" : "text-white opacity-60"}`,
1531
1628
  children: [
1532
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TimerIcon, {}),
1533
- expressChecked ? "Fast ~ 30sec " : "Normal ~ 30min"
1629
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimerIcon, {}),
1630
+ isExpressDeliveryPossible ? "Fast ~ 30sec " : "Normal ~ 30min"
1534
1631
  ]
1535
1632
  }
1536
1633
  ),
1537
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1634
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1538
1635
  "div",
1539
1636
  {
1540
1637
  onClick: () => setFeesDetailsShown((x) => !x),
1541
1638
  className: "font-medium text-white opacity-60 cursor-pointer flex items-center w-[15px] h-[9px]",
1542
- children: feesDetailsShown ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronUpIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ChevronDownIcon, {})
1639
+ children: feesDetailsShown ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronUpIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ChevronDownIcon, {})
1543
1640
  }
1544
1641
  )
1545
1642
  ] })
1546
1643
  ] }),
1547
- feesDetailsShown && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex w-full items-center justify-between ", children: [
1548
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
1549
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
1550
- "CCIP Fee:",
1551
- ` ${weiToHumanReadable({
1644
+ feesDetailsShown && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex w-full items-center justify-between gap-2", children: [
1645
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
1646
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between font-medium text-white opacity-60 gap-1", children: [
1647
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "CCIP Fee:" }),
1648
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "whitespace-nowrap", children: ` ${weiToHumanReadable({
1552
1649
  amount: route?.xSwapFees.ccipFee || "0",
1553
1650
  decimals: 18,
1554
1651
  precisionFractionalPlaces: 5
1555
- })} ${paymentToken?.symbol}`
1652
+ })} ${paymentToken?.symbol}` })
1556
1653
  ] }),
1557
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
1558
- "Native Fee:",
1559
- ` ${weiToHumanReadable({
1654
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between font-medium text-white opacity-60 gap-1", children: [
1655
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "Native Fee:" }),
1656
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "whitespace-nowrap", children: ` ${weiToHumanReadable({
1560
1657
  amount: route?.xSwapFees.xSwapFee.nativeFee || "0",
1561
1658
  decimals: 18,
1562
1659
  precisionFractionalPlaces: 5
1563
- })} ${paymentToken?.symbol}`
1660
+ })} ${paymentToken?.symbol}` })
1564
1661
  ] })
1565
1662
  ] }),
1566
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
1567
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
1568
- "Slippage: ",
1569
- `${slippage}%`
1663
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col text-[10px] gap-1", children: [
1664
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between font-medium text-white opacity-60 gap-1", children: [
1665
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "Slippage:" }),
1666
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "whitespace-nowrap", children: `${slippage}%` })
1570
1667
  ] }),
1571
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "font-medium text-white opacity-60", children: [
1572
- "Min amount out:",
1573
- " ",
1574
- weiToHumanReadable({
1575
- amount: route?.minAmountOut || "0",
1576
- decimals: dstToken?.decimals || 18,
1577
- precisionFractionalPlaces: 5
1578
- }),
1579
- " ",
1580
- dstToken?.symbol
1668
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between font-medium text-white opacity-60 gap-1", children: [
1669
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: "Min amount out:" }),
1670
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "whitespace-nowrap", children: [
1671
+ weiToHumanReadable({
1672
+ amount: route?.minAmountOut || "0",
1673
+ decimals: dstToken?.decimals || 18,
1674
+ precisionFractionalPlaces: 5
1675
+ }),
1676
+ " ",
1677
+ dstToken?.symbol
1678
+ ] })
1581
1679
  ] })
1582
1680
  ] })
1583
1681
  ] })
@@ -1585,36 +1683,56 @@ var FeesDetails = ({
1585
1683
  };
1586
1684
 
1587
1685
  // src/components/TxConfigForm/Summary.tsx
1588
- var import_react6 = require("react");
1686
+ var import_react7 = require("react");
1589
1687
 
1590
1688
  // src/components/TxConfigForm/UsdPrice.tsx
1591
- var import_react5 = require("react");
1592
- var import_jsx_runtime30 = require("react/jsx-runtime");
1689
+ var import_react6 = require("react");
1690
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1593
1691
  var UsdPrice = ({
1594
1692
  prices,
1595
1693
  token,
1596
1694
  amount = "0",
1597
- loading = false
1695
+ loading = false,
1696
+ type,
1697
+ setExceedsExpressDeliveryLimit
1598
1698
  }) => {
1599
- const [usdPrice, setUsdPrice] = (0, import_react5.useState)("0.00");
1600
- (0, import_react5.useEffect)(() => {
1699
+ const [usdPrice, setUsdPrice] = (0, import_react6.useState)("0.00");
1700
+ (0, import_react6.useEffect)(() => {
1601
1701
  if (token && prices && prices[token.address]) {
1602
- setUsdPrice((Number(amount) * Number(prices[token.address])).toFixed(2));
1702
+ const newUsdPrice = (Number(amount) * Number(prices[token.address])).toFixed(2);
1703
+ if (type === "src" && setExceedsExpressDeliveryLimit) {
1704
+ setExceedsExpressDeliveryLimit(
1705
+ Number(newUsdPrice) > EXPRESS_DELIVERY_LIMIT
1706
+ );
1707
+ }
1708
+ setUsdPrice(newUsdPrice);
1603
1709
  }
1604
1710
  }, [token, prices, amount]);
1605
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "opacity-60 py-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Skeleton, { width: "w-12", height: "h-4" }) : token ? prices && prices[token.address] ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: `$${usdPrice}` }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Alert, { desc: "Unknown price" }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: "$0.00" }) });
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "opacity-60 py-4", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Skeleton, { width: "w-12", height: "h-4" }) : token ? prices && prices[token.address] ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: `$${usdPrice}` }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Alert, { desc: "Unknown price" }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: "$0.00" }) });
1712
+ };
1713
+
1714
+ // src/components/UnknownTokenLogo/UnknownTokenLogo.tsx
1715
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1716
+ var UnknownTokenLogo = ({ tokenName, className }) => {
1717
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1718
+ "div",
1719
+ {
1720
+ className: `w-5 h-5 rounded-full bg-white shadow-sm flex items-center justify-center text-black ${className}`,
1721
+ children: tokenName.substring(0, 1)
1722
+ }
1723
+ );
1606
1724
  };
1607
1725
 
1608
1726
  // src/components/TxConfigForm/Summary.tsx
1609
- var import_jsx_runtime31 = require("react/jsx-runtime");
1727
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1610
1728
  var Summary = ({
1611
1729
  isGettingRoute,
1612
1730
  route,
1613
1731
  dstToken,
1614
1732
  dstChain
1615
1733
  }) => {
1616
- const [prices, setPrices] = (0, import_react6.useState)();
1617
- const amountReadable = (0, import_react6.useMemo)(
1734
+ const [prices, setPrices] = (0, import_react7.useState)();
1735
+ const amountReadable = (0, import_react7.useMemo)(
1618
1736
  () => weiToHumanReadable({
1619
1737
  amount: route?.estAmountOut || "0",
1620
1738
  decimals: dstToken?.decimals || 18,
@@ -1622,58 +1740,74 @@ var Summary = ({
1622
1740
  }),
1623
1741
  [route, dstToken]
1624
1742
  );
1625
- (0, import_react6.useEffect)(() => {
1743
+ (0, import_react7.useEffect)(() => {
1626
1744
  if (dstChain) {
1627
1745
  getPrices({ chainId: dstChain.chainId, currency: "USD" }).then(
1628
1746
  (prices2) => setPrices(prices2)
1629
1747
  );
1630
1748
  }
1631
1749
  }, [dstChain]);
1632
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4 relative", children: [
1633
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex justify-between", children: [
1634
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-1", children: [
1635
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-sm", children: "You receive" }),
1636
- isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1750
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4 relative", children: [
1751
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-between", children: [
1752
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col gap-1", children: [
1753
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-sm", children: "You receive" }),
1754
+ isGettingRoute ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1637
1755
  Skeleton,
1638
1756
  {
1639
1757
  width: "w-[100px]",
1640
1758
  height: "h-[36px]",
1641
1759
  other: "sm:w-[190px]"
1642
1760
  }
1643
- ) : /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-2 items-center text-white text-xl sm:text-3xl", children: [
1644
- amountReadable,
1645
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-4 sm:w-6 h-4 sm:h-6", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { src: dstToken?.image, alt: dstToken?.name }) }),
1646
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-base sm:text-xl", children: dstToken?.symbol })
1647
- ] })
1761
+ ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex gap-2 items-center text-white text-xl sm:text-3xl", children: amountReadable })
1648
1762
  ] }),
1649
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex flex-col gap-1 text-sm", children: [
1650
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-right", children: "on chain:" }),
1651
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-1 text-white", children: [
1652
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "w-4 h-4", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("img", { src: dstChain?.image, alt: dstChain?.name }) }),
1653
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: dstChain?.displayName })
1763
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex flex-col items-end gap-1 text-sm", children: [
1764
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-center items-center gap-1", children: [
1765
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-5 h-5", children: dstToken?.image ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1766
+ "img",
1767
+ {
1768
+ className: "w-5 h-5",
1769
+ src: dstToken?.image,
1770
+ alt: dstToken?.name
1771
+ }
1772
+ ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1773
+ UnknownTokenLogo,
1774
+ {
1775
+ tokenName: "?",
1776
+ className: "token-select__generated-logo"
1777
+ }
1778
+ ) }),
1779
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-base sm:text-xl", children: dstToken?.name })
1780
+ ] }),
1781
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-center items-center gap-1", children: [
1782
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-[rgba(255,255,255,0.6)] text-right", children: "on " }),
1783
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1 text-white", children: [
1784
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-4 h-4", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: dstChain?.image, alt: dstChain?.name }) }),
1785
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: dstChain?.displayName })
1786
+ ] })
1654
1787
  ] })
1655
1788
  ] })
1656
1789
  ] }),
1657
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
1790
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1658
1791
  UsdPrice,
1659
1792
  {
1660
1793
  prices,
1661
1794
  token: dstToken,
1662
1795
  amount: amountReadable,
1663
- loading: isGettingRoute
1796
+ loading: isGettingRoute,
1797
+ type: "dst"
1664
1798
  }
1665
1799
  ),
1666
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "absolute right-[50%] top-0 translate-x-1/2 translate-y-[-60%] globalBorder rounded-xl p-[5px] bg-[rgba(15,15,15,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: " flex items-center justify-center rounded-lg w-8 h-8 bg-gradient-to-l from-[rgba(54,129,198,1)] to-[rgba(43,74,157,1)] ", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ArrowDownIcon, {}) }) })
1800
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute right-[50%] top-0 translate-x-1/2 translate-y-[-60%] globalBorder rounded-xl p-[5px] bg-[rgba(15,15,15,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: " flex items-center justify-center rounded-lg w-8 h-8 bg-gradient-to-l from-[rgba(54,129,198,1)] to-[rgba(43,74,157,1)] ", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ArrowDownIcon, {}) }) })
1667
1801
  ] });
1668
1802
  };
1669
1803
 
1670
1804
  // src/components/TxConfigForm/SwapPanel.tsx
1671
- var import_react9 = require("react");
1805
+ var import_react10 = require("react");
1672
1806
 
1673
1807
  // src/components/TxConfigForm/TokenPicker.tsx
1674
- var import_react7 = require("react");
1808
+ var import_react8 = require("react");
1675
1809
  var import_react_dom = require("react-dom");
1676
- var import_jsx_runtime32 = require("react/jsx-runtime");
1810
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1677
1811
  var TokenPicker = ({
1678
1812
  onCloseClick,
1679
1813
  tokens,
@@ -1682,7 +1816,7 @@ var TokenPicker = ({
1682
1816
  signer,
1683
1817
  balances
1684
1818
  }) => {
1685
- const [searchValue, setSearchValue] = (0, import_react7.useState)("");
1819
+ const [searchValue, setSearchValue] = (0, import_react8.useState)("");
1686
1820
  const modalRoot = document.querySelector("#xswap-modal");
1687
1821
  const onBackdropClick = (e) => {
1688
1822
  e.stopPropagation();
@@ -1691,7 +1825,7 @@ var TokenPicker = ({
1691
1825
  onCloseClick();
1692
1826
  }
1693
1827
  };
1694
- const filteredTokens = (0, import_react7.useMemo)(() => {
1828
+ const filteredTokens = (0, import_react8.useMemo)(() => {
1695
1829
  const isMatch = (value, searchValue2) => value.toLowerCase().indexOf(searchValue2.toLowerCase()) > -1;
1696
1830
  return tokens?.filter(
1697
1831
  (token) => isMatch(token.symbol, searchValue) || isMatch(token.name, searchValue) || token.address === searchValue.toLowerCase()
@@ -1700,24 +1834,24 @@ var TokenPicker = ({
1700
1834
  );
1701
1835
  }, [searchValue, tokens]);
1702
1836
  return modalRoot ? (0, import_react_dom.createPortal)(
1703
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1837
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1704
1838
  "div",
1705
1839
  {
1706
1840
  onClick: onBackdropClick,
1707
1841
  className: "box-border fixed h-full w-full z-[999] top-0 left-0 bg-[rgba(0,0,0,0.8)] flex items-center justify-center p-5",
1708
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative bg-black rounded-3xl p-6 max-h-[70%] flex flex-col text-base text-white w-[452px] h-[70%] border border-solid border-[rgba(255,255,255,0.2)]", children: [
1709
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1842
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "relative bg-black rounded-3xl p-6 max-h-[70%] flex flex-col text-base text-white w-[452px] h-[70%] border border-solid border-[rgba(255,255,255,0.2)]", children: [
1843
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1710
1844
  "div",
1711
1845
  {
1712
1846
  onClick: onCloseClick,
1713
1847
  className: "absolute top-4 right-4 cursor-pointer",
1714
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CloseIcon, {})
1848
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CloseIcon, {})
1715
1849
  }
1716
1850
  ),
1717
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-base mb-4", children: "Pick a token" }),
1718
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex items-center border border-solid border-[rgba(255,255,255,0.1)] rounded-lg py-0 px-3 gap-2 bg-[rgba(15,15,15,1)]", children: [
1719
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SearchIcon, {}) }),
1720
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1851
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-base mb-4", children: "Pick a token" }),
1852
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center border border-solid border-[rgba(255,255,255,0.1)] rounded-lg py-0 px-3 gap-2 bg-[rgba(15,15,15,1)]", children: [
1853
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-6 h-6", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SearchIcon, {}) }),
1854
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1721
1855
  "input",
1722
1856
  {
1723
1857
  placeholder: "Search name or paste address",
@@ -1727,7 +1861,7 @@ var TokenPicker = ({
1727
1861
  }
1728
1862
  )
1729
1863
  ] }),
1730
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "my-4 mx-0 flex flex-wrap gap-3", children: tokens?.filter((token) => token?.quickPick).map((token) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1864
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "my-4 mx-0 flex flex-wrap gap-3", children: tokens?.filter((token) => token?.quickPick).map((token) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1731
1865
  "div",
1732
1866
  {
1733
1867
  className: `flex gap-2 py-1 px-2 items-center bg-[rgb(15,15,15)] rounded-2xl border border-solid border-[rgba(255,255,255,0.1)] hover:bg-[rgb(25,25,25)] hover:cursor-pointer ${token.address === selectedToken?.address ? "bg-[rgb(35, 35, 35)]" : ""}`,
@@ -1736,14 +1870,14 @@ var TokenPicker = ({
1736
1870
  onCloseClick();
1737
1871
  },
1738
1872
  children: [
1739
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("img", { src: token.image, alt: token.name, className: "w-5" }),
1740
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-sm", children: token.symbol })
1873
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("img", { src: token.image, alt: token.name, className: "w-5" }),
1874
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-sm", children: token.symbol })
1741
1875
  ]
1742
1876
  },
1743
1877
  token.address
1744
1878
  )) }),
1745
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "h-[2px] my-0 mx-[-24px] w-[100%+48px] px-12 bg-[rgba(255,255,255,0.1)]" }),
1746
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-y-scroll h-full mx-[-24px] w-[100%+48px] flex flex-col", children: filteredTokens && filteredTokens.length > 0 ? filteredTokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
1879
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "h-[2px] my-0 mx-[-24px] w-[100%+48px] px-12 bg-[rgba(255,255,255,0.1)]" }),
1880
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "overflow-y-scroll h-full mx-[-24px] w-[100%+48px] flex flex-col", children: filteredTokens && filteredTokens.length > 0 ? filteredTokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1747
1881
  "div",
1748
1882
  {
1749
1883
  className: `flex gap-3 py-2 px-[24px] w-full items-center hover:bg-[rgb(25,25,25)] hover:cursor-pointer ${token.address === selectedToken?.address ? "bg-[rgb(35,35,35)]" : ""}`,
@@ -1752,29 +1886,29 @@ var TokenPicker = ({
1752
1886
  onCloseClick();
1753
1887
  },
1754
1888
  children: [
1755
- token.image ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1889
+ token.image ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1756
1890
  "img",
1757
1891
  {
1758
1892
  src: token.image,
1759
1893
  alt: token.name,
1760
1894
  className: "token-picker__all__logo"
1761
1895
  }
1762
- ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex items-center justify-center w-9 h-9 text-[15px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: token?.symbol.substring(0, 1) }),
1763
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex justify-between items-center gap-1 overflow-hidden grow", children: [
1764
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-col leading-[16px]", children: [
1765
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-hidden whitespace-nowrap text-ellipsis text-[15px]", children: token.name }),
1766
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-[#888] text-[11px]", children: token.symbol })
1896
+ ) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center justify-center w-9 h-9 text-[15px] ml-1 rounded-full bg-[#272e40] text-[#e0e7fa]", children: token?.symbol.substring(0, 1) }),
1897
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-between items-center gap-1 overflow-hidden grow", children: [
1898
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col leading-[16px]", children: [
1899
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "overflow-hidden whitespace-nowrap text-ellipsis text-[15px]", children: token.name }),
1900
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-[#888] text-[11px]", children: token.symbol })
1767
1901
  ] }),
1768
- signer && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: balances && balances[token.address] && token.decimals ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-xs", children: weiToHumanReadable({
1902
+ signer && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_jsx_runtime35.Fragment, { children: balances && balances[token.address] && token.decimals ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-xs", children: weiToHumanReadable({
1769
1903
  amount: balances[token.address]?.toString() || "0",
1770
1904
  decimals: token.decimals,
1771
1905
  precisionFractionalPlaces: 4
1772
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Skeleton, { width: "w-12", height: "h-3" }) })
1906
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Skeleton, { width: "w-12", height: "h-3" }) })
1773
1907
  ] })
1774
1908
  ]
1775
1909
  },
1776
1910
  `${index}_${token.address}`
1777
- )) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm text-white", children: "No tokens found." }) }) })
1911
+ )) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-4 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-sm text-white", children: "No tokens found." }) }) })
1778
1912
  ] })
1779
1913
  }
1780
1914
  ),
@@ -1783,7 +1917,7 @@ var TokenPicker = ({
1783
1917
  };
1784
1918
 
1785
1919
  // src/components/TxConfigForm/ChainListElement.tsx
1786
- var import_jsx_runtime33 = require("react/jsx-runtime");
1920
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1787
1921
  var ChainListElement = ({
1788
1922
  chain,
1789
1923
  setSrcChain,
@@ -1791,8 +1925,8 @@ var ChainListElement = ({
1791
1925
  index,
1792
1926
  length
1793
1927
  }) => {
1794
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { children: [
1795
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
1928
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { children: [
1929
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
1796
1930
  "li",
1797
1931
  {
1798
1932
  className: "bg-transparent border-none flex gap-1 items-center cursor-pointer py-2 w-full",
@@ -1801,21 +1935,21 @@ var ChainListElement = ({
1801
1935
  setChainListShown(false);
1802
1936
  },
1803
1937
  children: [
1804
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { width: 12, height: 12, src: chain.image, alt: chain.displayName }),
1938
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("img", { width: 12, height: 12, src: chain.image, alt: chain.displayName }),
1805
1939
  chain.displayName
1806
1940
  ]
1807
1941
  }
1808
1942
  ),
1809
- index !== length - 1 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "h-px mx-2 bg-[rgba(255,255,255,0.15)]" })
1943
+ index !== length - 1 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-px mx-2 bg-[rgba(255,255,255,0.15)]" })
1810
1944
  ] }, `${chain.ecosystem}-${chain.chainId}`);
1811
1945
  };
1812
1946
 
1813
1947
  // src/components/TxConfigForm/BalanceComponent.tsx
1814
- var import_react8 = require("react");
1948
+ var import_react9 = require("react");
1815
1949
  var import_bignumber3 = __toESM(require("bignumber.js"));
1816
- var import_jsx_runtime34 = require("react/jsx-runtime");
1950
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1817
1951
  var BalanceComponent = ({ srcToken, balances }) => {
1818
- const balanceText = (0, import_react8.useMemo)(() => {
1952
+ const balanceText = (0, import_react9.useMemo)(() => {
1819
1953
  if (!balances || !srcToken) return "0";
1820
1954
  if (balances[srcToken.address]?.toString() === "0") return "0";
1821
1955
  const fullHumanReadable = weiToHumanReadable({
@@ -1833,7 +1967,7 @@ var BalanceComponent = ({ srcToken, balances }) => {
1833
1967
  precisionFractionalPlaces: 5
1834
1968
  });
1835
1969
  }, [srcToken, balances]);
1836
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
1970
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
1837
1971
  "Balance:",
1838
1972
  " ",
1839
1973
  srcToken && balances ? weiToHumanReadable({
@@ -1841,12 +1975,12 @@ var BalanceComponent = ({ srcToken, balances }) => {
1841
1975
  decimals: srcToken.decimals,
1842
1976
  precisionFractionalPlaces: 4
1843
1977
  }) : 0,
1844
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "bg-gradient-to-r from-x_blue_light to-x_blue_dark bg-clip-text text-transparent", children: "Max" })
1978
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "bg-gradient-to-r from-x_blue_light to-x_blue_dark bg-clip-text text-transparent", children: "Max" })
1845
1979
  ] });
1846
1980
  };
1847
1981
 
1848
1982
  // src/components/TxConfigForm/SwapPanel.tsx
1849
- var import_jsx_runtime35 = require("react/jsx-runtime");
1983
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1850
1984
  var SwapPanel = ({
1851
1985
  amount,
1852
1986
  setAmount,
@@ -1857,12 +1991,13 @@ var SwapPanel = ({
1857
1991
  signer,
1858
1992
  balances,
1859
1993
  prices,
1860
- supportedChains
1994
+ supportedChains,
1995
+ setExceedsExpressDeliveryLimit
1861
1996
  }) => {
1862
- const [chainListShown, setChainListShown] = (0, import_react9.useState)(false);
1863
- const [tokenListShown, setTokenListShown] = (0, import_react9.useState)(false);
1864
- const listRef = (0, import_react9.useRef)(null);
1865
- const buttonRef = (0, import_react9.useRef)(null);
1997
+ const [chainListShown, setChainListShown] = (0, import_react10.useState)(false);
1998
+ const [tokenListShown, setTokenListShown] = (0, import_react10.useState)(false);
1999
+ const listRef = (0, import_react10.useRef)(null);
2000
+ const buttonRef = (0, import_react10.useRef)(null);
1866
2001
  const handleClickOutside = (event) => {
1867
2002
  if (listRef.current && buttonRef.current) {
1868
2003
  const listElement = listRef.current;
@@ -1877,25 +2012,25 @@ var SwapPanel = ({
1877
2012
  weiToHumanReadable({
1878
2013
  amount: balances[srcToken.address]?.toString() || "0",
1879
2014
  decimals: srcToken.decimals,
1880
- precisionFractionalPlaces: 4
2015
+ precisionFractionalPlaces: srcToken.decimals
1881
2016
  })
1882
2017
  );
1883
2018
  };
1884
- (0, import_react9.useEffect)(() => {
2019
+ (0, import_react10.useEffect)(() => {
1885
2020
  if (chainListShown) {
1886
2021
  document.addEventListener("mousedown", handleClickOutside);
1887
2022
  return () => document.removeEventListener("mousedown", handleClickOutside);
1888
2023
  }
1889
2024
  }, [chainListShown]);
1890
- const chainListOptions = (0, import_react9.useMemo)(
2025
+ const chainListOptions = (0, import_react10.useMemo)(
1891
2026
  () => supportedChains.filter((chain) => chain.chainId !== srcChain?.chainId),
1892
2027
  [supportedChains, srcChain]
1893
2028
  );
1894
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex justify-between globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4", children: [
1895
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col justify-between gap-2 overflow-hidden w-1/2", children: [
1896
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-1", children: [
1897
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-white opacity-60 text-xs sm:text-sm font-medium", children: "You pay" }),
1898
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2029
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex justify-between globalBorder rounded-lg bg-[rgba(15,15,15,1)] p-4", children: [
2030
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col justify-between gap-2 overflow-hidden w-1/2", children: [
2031
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-1", children: [
2032
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-white opacity-60 text-xs sm:text-sm font-medium", children: "You pay" }),
2033
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1899
2034
  "input",
1900
2035
  {
1901
2036
  className: "p-0 border-none outline-none bg-transparent text-2xl overflow-ellipsis",
@@ -1914,18 +2049,20 @@ var SwapPanel = ({
1914
2049
  }
1915
2050
  )
1916
2051
  ] }),
1917
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center text-sm text-[rgba(255,255,255,0.6)]", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2052
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center text-sm text-[rgba(255,255,255,0.6)]", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1918
2053
  UsdPrice,
1919
2054
  {
1920
2055
  prices,
1921
2056
  token: srcToken,
1922
2057
  amount,
1923
- loading: false
2058
+ loading: false,
2059
+ type: "src",
2060
+ setExceedsExpressDeliveryLimit
1924
2061
  }
1925
2062
  ) })
1926
2063
  ] }),
1927
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col relative items-end gap-2.5 w-1/2 text-xs", children: [
1928
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2064
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col relative items-end gap-2.5 w-1/2 text-xs", children: [
2065
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
1929
2066
  "div",
1930
2067
  {
1931
2068
  className: "flex gap-2 items-center p-2 max-w-full cursor-pointer bg-black text-white globalBorder rounded-3xl whitespace-nowrap",
@@ -1933,7 +2070,7 @@ var SwapPanel = ({
1933
2070
  setTokenListShown((state) => !state);
1934
2071
  },
1935
2072
  children: [
1936
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2073
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1937
2074
  "img",
1938
2075
  {
1939
2076
  height: 16,
@@ -1942,12 +2079,12 @@ var SwapPanel = ({
1942
2079
  alt: srcToken?.name
1943
2080
  }
1944
2081
  ),
1945
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: srcToken?.symbol }),
1946
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DownArrowIcon, {})
2082
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: srcToken?.symbol }),
2083
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DownArrowIcon, {})
1947
2084
  ]
1948
2085
  }
1949
2086
  ),
1950
- tokenListShown && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2087
+ tokenListShown && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1951
2088
  TokenPicker,
1952
2089
  {
1953
2090
  onCloseClick: () => setTokenListShown(false),
@@ -1958,22 +2095,22 @@ var SwapPanel = ({
1958
2095
  balances
1959
2096
  }
1960
2097
  ),
1961
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2098
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1962
2099
  "div",
1963
2100
  {
1964
2101
  onClick: handleMaxClick,
1965
2102
  className: "flex gap-1 items-center font-medium text-white opacity-60 py-0.5 cursor-pointer",
1966
- children: signer && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BalanceComponent, { balances, srcToken })
2103
+ children: signer && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(BalanceComponent, { balances, srcToken })
1967
2104
  }
1968
2105
  ),
1969
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2106
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
1970
2107
  "div",
1971
2108
  {
1972
2109
  ref: buttonRef,
1973
2110
  className: "bg-black globalBorder rounded-2xl whitespace-nowrap flex items-center p-2 cursor-pointer gap-2",
1974
2111
  onClick: () => setChainListShown((prev) => !prev),
1975
2112
  children: [
1976
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2113
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1977
2114
  "img",
1978
2115
  {
1979
2116
  width: "16",
@@ -1982,17 +2119,17 @@ var SwapPanel = ({
1982
2119
  alt: srcChain?.name
1983
2120
  }
1984
2121
  ),
1985
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { children: srcChain?.displayName }),
1986
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DownArrowIcon, {})
2122
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: srcChain?.displayName }),
2123
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DownArrowIcon, {})
1987
2124
  ]
1988
2125
  }
1989
2126
  ),
1990
- chainListShown && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2127
+ chainListShown && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1991
2128
  "ul",
1992
2129
  {
1993
2130
  ref: listRef,
1994
2131
  className: "bg-black globalBorder rounded-lg whitespace-nowrap z-1 right-0 top-10 px-2 max-w-full max-h-[40vh] overflow-auto absolute text-sm z-20",
1995
- children: chainListOptions.map((chain, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2132
+ children: chainListOptions.map((chain, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1996
2133
  ChainListElement,
1997
2134
  {
1998
2135
  index,
@@ -2009,9 +2146,9 @@ var SwapPanel = ({
2009
2146
  };
2010
2147
 
2011
2148
  // src/components/TxConfigForm/ErrorField.tsx
2012
- var import_jsx_runtime36 = require("react/jsx-runtime");
2149
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2013
2150
  var ErrorField = ({ error }) => {
2014
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2151
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2015
2152
  "div",
2016
2153
  {
2017
2154
  className: `flex justify-center mb-1 items-center w-full rounded-2xl bg-x_error_background border border-solid ${error.length > 0 ? "border-x_error_border" : "border-transparent"}`,
@@ -2021,15 +2158,15 @@ var ErrorField = ({ error }) => {
2021
2158
  };
2022
2159
 
2023
2160
  // src/components/TxConfigForm/Description.tsx
2024
- var import_jsx_runtime37 = require("react/jsx-runtime");
2161
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2025
2162
  var Description = ({ description }) => {
2026
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col items-start rounded-lg px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "w-full flex gap-4 items-start justify-between text-xl", children: description }) });
2163
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "flex flex-col items-start rounded-lg px-4 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full flex gap-4 items-start justify-between text-xl", children: description }) });
2027
2164
  };
2028
2165
 
2029
2166
  // src/components/TxConfigForm/Button.tsx
2030
- var import_jsx_runtime38 = require("react/jsx-runtime");
2167
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2031
2168
  var Button = ({ children, onClick, type, disabled }) => {
2032
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2169
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2033
2170
  "button",
2034
2171
  {
2035
2172
  className: "text-white border-none rounded-2xl text-xl py-4 cursor-pointer w-full bg-gradient-to-r from-[#3681c6] to-[#2b4a9d] disabled:opacity-25",
@@ -2042,39 +2179,42 @@ var Button = ({ children, onClick, type, disabled }) => {
2042
2179
  };
2043
2180
 
2044
2181
  // src/components/TxConfigForm/Form.tsx
2045
- var import_jsx_runtime39 = require("react/jsx-runtime");
2182
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2046
2183
  var Form = ({
2184
+ integratorId,
2047
2185
  dstChainId,
2048
2186
  dstTokenAddr,
2049
2187
  customContractCalls,
2050
2188
  desc,
2051
2189
  supportedChains,
2052
- onSubmit
2190
+ onSubmit,
2191
+ onClose
2053
2192
  }) => {
2054
- const [signer, setSigner] = (0, import_react10.useState)();
2055
- const [dstChain, setDstChain] = (0, import_react10.useState)();
2056
- const [dstToken, setDstToken] = (0, import_react10.useState)();
2057
- const [srcChain, setSrcChain] = (0, import_react10.useState)();
2058
- const [srcToken, setSrcToken] = (0, import_react10.useState)();
2059
- const [amount, setAmount] = (0, import_react10.useState)("");
2060
- const [paymentToken, setPaymentToken] = (0, import_react10.useState)();
2061
- const [route, setRoute] = (0, import_react10.useState)();
2062
- const [expressChecked, setExpressChecked] = (0, import_react10.useState)(true);
2063
- const [historyTabShown, setHistoryTabShown] = (0, import_react10.useState)(false);
2064
- const [isGettingRoute, setIsGettingRoute] = (0, import_react10.useState)(false);
2065
- const [prices, setPrices] = (0, import_react10.useState)();
2066
- const [balances, setBalances] = (0, import_react10.useState)();
2067
- const [settingsShown, setSettingsShown] = (0, import_react10.useState)(false);
2068
- const [formError, setFormError] = (0, import_react10.useState)("");
2069
- const [slippage, setSlippage] = (0, import_react10.useState)("1.5");
2070
- const [feesDetailsShown, setFeesDetailsShown] = (0, import_react10.useState)(false);
2193
+ const [signer, setSigner] = (0, import_react11.useState)();
2194
+ const [dstChain, setDstChain] = (0, import_react11.useState)();
2195
+ const [dstToken, setDstToken] = (0, import_react11.useState)();
2196
+ const [srcChain, setSrcChain] = (0, import_react11.useState)();
2197
+ const [srcToken, setSrcToken] = (0, import_react11.useState)();
2198
+ const [amount, setAmount] = (0, import_react11.useState)("");
2199
+ const [paymentToken, setPaymentToken] = (0, import_react11.useState)();
2200
+ const [route, setRoute] = (0, import_react11.useState)();
2201
+ const [expressChecked, setExpressChecked] = (0, import_react11.useState)(true);
2202
+ const [historyTabShown, setHistoryTabShown] = (0, import_react11.useState)(false);
2203
+ const [isGettingRoute, setIsGettingRoute] = (0, import_react11.useState)(false);
2204
+ const [prices, setPrices] = (0, import_react11.useState)();
2205
+ const [balances, setBalances] = (0, import_react11.useState)();
2206
+ const [settingsShown, setSettingsShown] = (0, import_react11.useState)(false);
2207
+ const [formError, setFormError] = (0, import_react11.useState)("");
2208
+ const [slippage, setSlippage] = (0, import_react11.useState)("1.5");
2209
+ const [feesDetailsShown, setFeesDetailsShown] = (0, import_react11.useState)(false);
2210
+ const [exceedsExpressDeliveryLimit, setExceedsExpressDeliveryLimit] = (0, import_react11.useState)(false);
2071
2211
  const debouncedAmount = useDebounce(amount, 1e3);
2072
2212
  const account = (0, import_wagmi2.useAccount)();
2073
2213
  const { switchChainAsync } = (0, import_wagmi2.useSwitchChain)();
2074
- (0, import_react10.useEffect)(() => {
2214
+ (0, import_react11.useEffect)(() => {
2075
2215
  setSigner(account.address);
2076
2216
  }, [account.address]);
2077
- (0, import_react10.useEffect)(() => {
2217
+ (0, import_react11.useEffect)(() => {
2078
2218
  const defaultChain = supportedChains.find(
2079
2219
  ({ chainId }) => chainId === account.chainId?.toString()
2080
2220
  );
@@ -2084,18 +2224,28 @@ var Form = ({
2084
2224
  )
2085
2225
  );
2086
2226
  }, [account.chainId]);
2087
- (0, import_react10.useEffect)(() => {
2227
+ (0, import_react11.useEffect)(() => {
2088
2228
  setDstChain(supportedChains.find((chain) => chain.chainId === dstChainId));
2089
2229
  }, [supportedChains, dstChainId]);
2090
- (0, import_react10.useEffect)(() => {
2091
- setDstToken(
2092
- dstChain?.tokens.find(
2230
+ (0, import_react11.useEffect)(() => {
2231
+ (async () => {
2232
+ if (!dstChain) {
2233
+ return;
2234
+ }
2235
+ let dstTokenResult = dstChain?.tokens.find(
2093
2236
  (token) => token.address.toLowerCase() === dstTokenAddr.toLowerCase()
2094
- )
2095
- );
2237
+ );
2238
+ if (!dstTokenResult) {
2239
+ dstTokenResult = await getCustomTokenData(
2240
+ dstChain,
2241
+ dstTokenAddr.toLowerCase()
2242
+ );
2243
+ }
2244
+ setDstToken(dstTokenResult);
2245
+ })();
2096
2246
  }, [dstChain]);
2097
- (0, import_react10.useEffect)(() => {
2098
- if (srcChain && srcToken && dstChain && debouncedAmount && paymentToken && slippage) {
2247
+ (0, import_react11.useEffect)(() => {
2248
+ if (integratorId && srcChain && srcToken && dstChain && debouncedAmount && paymentToken && slippage) {
2099
2249
  setFormError("");
2100
2250
  const timeout = setTimeout(() => {
2101
2251
  setFormError("Getting Route is taking longer than usually");
@@ -2107,6 +2257,7 @@ var Form = ({
2107
2257
  `Configuration error: selected token ($${srcToken.symbol} ${srcToken.name}) has unknown decimals param.`
2108
2258
  );
2109
2259
  getRoute({
2260
+ integratorId,
2110
2261
  fromAmount: import_ethers4.ethers.utils.parseUnits(debouncedAmount, srcToken.decimals).toString(),
2111
2262
  fromAddress: signer || ADDRESSES[srcChain.chainId].FeeCollector,
2112
2263
  fromChain: srcChain.chainId,
@@ -2116,7 +2267,7 @@ var Form = ({
2116
2267
  toToken: dstTokenAddr,
2117
2268
  paymentToken: paymentToken.address,
2118
2269
  slippage: Number(slippage),
2119
- expressDelivery: expressChecked,
2270
+ expressDelivery: expressChecked && !exceedsExpressDeliveryLimit,
2120
2271
  customContractCalls
2121
2272
  }).then((response) => {
2122
2273
  setRoute(response);
@@ -2137,7 +2288,7 @@ var Form = ({
2137
2288
  slippage,
2138
2289
  expressChecked
2139
2290
  ]);
2140
- (0, import_react10.useEffect)(() => {
2291
+ (0, import_react11.useEffect)(() => {
2141
2292
  if (srcChain) {
2142
2293
  setPaymentToken(
2143
2294
  srcChain.tokens.find(
@@ -2146,21 +2297,21 @@ var Form = ({
2146
2297
  );
2147
2298
  }
2148
2299
  }, [srcChain]);
2149
- (0, import_react10.useEffect)(() => {
2300
+ (0, import_react11.useEffect)(() => {
2150
2301
  setAmount("");
2151
2302
  setFormError("");
2152
2303
  }, [srcToken]);
2153
- (0, import_react10.useEffect)(() => {
2304
+ (0, import_react11.useEffect)(() => {
2154
2305
  setSrcToken(srcChain?.tokens[0]);
2155
2306
  }, [srcChain]);
2156
- (0, import_react10.useEffect)(() => {
2307
+ (0, import_react11.useEffect)(() => {
2157
2308
  if (srcChain) {
2158
2309
  getPrices({ chainId: srcChain.chainId, currency: "USD" }).then(
2159
2310
  (prices2) => setPrices(prices2)
2160
2311
  );
2161
2312
  }
2162
2313
  }, [srcChain]);
2163
- (0, import_react10.useEffect)(() => {
2314
+ (0, import_react11.useEffect)(() => {
2164
2315
  if (srcChain && signer) {
2165
2316
  getBalances(srcChain, signer).then((balances2) => setBalances(balances2));
2166
2317
  }
@@ -2172,22 +2323,23 @@ var Form = ({
2172
2323
  const handleSwitchChain = async () => {
2173
2324
  await switchChainAsync({ chainId: Number(srcChain?.chainId) });
2174
2325
  };
2175
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2326
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
2176
2327
  "form",
2177
2328
  {
2178
- className: "flex flex-col gap-2 z-10 my-0 mx-auto p-4 rounded-3xl overflow-hidden font-light w-x_mobile sm:w-x_desktop",
2329
+ className: "flex flex-col gap-2 z-10 my-0 p-2 md:p-4 rounded-3xl overflow-hidden font-light sm:w-x_desktop",
2179
2330
  onSubmit: handleSubmit,
2180
2331
  children: [
2181
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2332
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2182
2333
  TopBar,
2183
2334
  {
2184
2335
  signer,
2185
2336
  historyTabShown,
2186
2337
  setHistoryTabShown,
2187
- setSettingsShown
2338
+ setSettingsShown,
2339
+ onClose
2188
2340
  }
2189
2341
  ),
2190
- settingsShown && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2342
+ settingsShown && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2191
2343
  Settings,
2192
2344
  {
2193
2345
  expressChecked,
@@ -2197,9 +2349,9 @@ var Form = ({
2197
2349
  setSlippage
2198
2350
  }
2199
2351
  ),
2200
- historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(History, { signer, supportedChains }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-2", children: [
2201
- desc && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Description, { description: desc }),
2202
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2352
+ historyTabShown ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(History, { signer, supportedChains }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-2", children: [
2353
+ desc && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Description, { description: desc }),
2354
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2203
2355
  SwapPanel,
2204
2356
  {
2205
2357
  amount,
@@ -2211,10 +2363,11 @@ var Form = ({
2211
2363
  balances,
2212
2364
  prices,
2213
2365
  supportedChains,
2214
- setSrcChain
2366
+ setSrcChain,
2367
+ setExceedsExpressDeliveryLimit
2215
2368
  }
2216
2369
  ),
2217
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2370
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2218
2371
  Summary,
2219
2372
  {
2220
2373
  isGettingRoute,
@@ -2223,7 +2376,7 @@ var Form = ({
2223
2376
  dstChain
2224
2377
  }
2225
2378
  ),
2226
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2379
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2227
2380
  FeesDetails,
2228
2381
  {
2229
2382
  route,
@@ -2231,13 +2384,14 @@ var Form = ({
2231
2384
  paymentToken,
2232
2385
  dstToken,
2233
2386
  expressChecked,
2387
+ exceedsExpressDeliveryLimit,
2234
2388
  slippage,
2235
2389
  feesDetailsShown,
2236
2390
  setFeesDetailsShown
2237
2391
  }
2238
2392
  ),
2239
- formError.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ErrorField, { error: formError }),
2240
- signer && srcChain && srcChain.chainId !== account.chainId?.toString() ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { type: "button", onClick: handleSwitchChain, children: "Switch chain" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2393
+ formError.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorField, { error: formError }),
2394
+ signer && srcChain && srcChain.chainId !== account.chainId?.toString() ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { type: "button", onClick: handleSwitchChain, children: "Switch chain" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2241
2395
  Button,
2242
2396
  {
2243
2397
  type: "submit",
@@ -2252,8 +2406,9 @@ var Form = ({
2252
2406
  };
2253
2407
 
2254
2408
  // src/components/TxConfigForm/index.tsx
2255
- var import_jsx_runtime40 = require("react/jsx-runtime");
2409
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2256
2410
  var TxConfigForm = ({
2411
+ integratorId,
2257
2412
  dstChainId,
2258
2413
  dstTokenAddr,
2259
2414
  customContractCalls,
@@ -2270,41 +2425,36 @@ var TxConfigForm = ({
2270
2425
  }
2271
2426
  };
2272
2427
  const queryClient = new import_react_query.QueryClient();
2273
- const wagmiConfig = (0, import_react11.useMemo)(
2428
+ const wagmiConfig = (0, import_react12.useMemo)(
2274
2429
  () => getWagmiConfig(supportedChains),
2275
2430
  supportedChains
2276
2431
  );
2277
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2432
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react_query.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2278
2433
  "div",
2279
2434
  {
2280
2435
  className: "top-0 left-0 right-0 bottom-0 bg-[rgba(0,0,0,0.8)] fixed flex items-center justify-center z-10",
2281
2436
  onClick: onBackdropClick,
2282
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative bg-black rounded-3xl w-lg overflow-auto text-white border-2 border-solid border-[rgba(255,255,255,0.1)]", children: [
2283
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2437
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative bg-black rounded-3xl overflow-auto text-white border-2 border-solid border-[rgba(255,255,255,0.1)]", children: [
2438
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2284
2439
  Form,
2285
2440
  {
2441
+ integratorId,
2286
2442
  dstChainId,
2287
2443
  dstTokenAddr,
2288
2444
  customContractCalls,
2289
2445
  desc,
2290
2446
  supportedChains,
2291
- onSubmit
2292
- }
2293
- ),
2294
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2295
- "div",
2296
- {
2297
- className: "absolute top-7 right-4 cursor-pointer text-white",
2298
- onClick: onClose,
2299
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CloseIcon, {})
2447
+ onSubmit,
2448
+ onClose
2300
2449
  }
2301
2450
  ),
2302
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(PoweredBy, {})
2451
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PoweredBy, {})
2303
2452
  ] })
2304
2453
  }
2305
2454
  ) }) });
2306
2455
  };
2307
2456
  var openTxConfigForm = async ({
2457
+ integratorId,
2308
2458
  dstChainId,
2309
2459
  dstTokenAddr,
2310
2460
  customContractCalls,
@@ -2312,11 +2462,13 @@ var openTxConfigForm = async ({
2312
2462
  supportedChains
2313
2463
  }) => {
2314
2464
  try {
2315
- return await new Promise((resolve) => {
2465
+ return await new Promise(async (resolve) => {
2466
+ await waitForInitialization();
2316
2467
  xswapRoot.render(
2317
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2468
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
2318
2469
  TxConfigForm,
2319
2470
  {
2471
+ integratorId,
2320
2472
  dstChainId,
2321
2473
  dstTokenAddr,
2322
2474
  customContractCalls,
@@ -2339,39 +2491,38 @@ var openTxConfigForm = async ({
2339
2491
  };
2340
2492
 
2341
2493
  // src/components/TxStatusButton/index.tsx
2342
- var import_react12 = require("react");
2343
- var import_jsx_runtime41 = require("react/jsx-runtime");
2494
+ var import_react13 = require("react");
2495
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2344
2496
  var TxStatusButton = ({ transaction }) => {
2345
2497
  const {
2346
- fromChain,
2347
- fromChainImage,
2348
- fromToken,
2349
- fromTokenImage,
2350
- fromAmount,
2351
- toChain,
2352
- toChainImage,
2498
+ srcChain: fromChain,
2499
+ srcChainImage: fromChainImage,
2500
+ srcToken: fromToken,
2501
+ srcTokenImage: fromTokenImage,
2502
+ srcAmount: fromAmount,
2503
+ dstChain: toChain,
2504
+ dstChainImage: toChainImage,
2353
2505
  isDone,
2354
- txHash,
2355
2506
  explorer
2356
2507
  } = transaction;
2357
- const [isWide, setIsWide] = (0, import_react12.useState)(false);
2358
- const background = (0, import_react12.useMemo)(
2508
+ const [isWide, setIsWide] = (0, import_react13.useState)(false);
2509
+ const background = (0, import_react13.useMemo)(
2359
2510
  () => isDone ? "bg-[rgba(2,2,2,1)] bg-gradient-to-r from-[rgba(76,175,80,0.2)] to-[rgba(46,125,50,0.2)]" : "bg-[rgba(2,2,2,1)] bg-gradient-to-r from-[rgba(54,129,198,0.2)] to-[rgba(43,74,157,0.2)]",
2360
2511
  [isDone]
2361
2512
  );
2362
- const border = (0, import_react12.useMemo)(
2513
+ const border = (0, import_react13.useMemo)(
2363
2514
  () => isDone ? "border border-solid border-x_green_dark" : "border border-solid border-x_blue_dark",
2364
2515
  [isDone]
2365
2516
  );
2366
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-2", onClick: () => setIsWide((x) => !x), children: [
2367
- isWide && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
2517
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex gap-2", onClick: () => setIsWide((x) => !x), children: [
2518
+ isWide && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
2368
2519
  "div",
2369
2520
  {
2370
2521
  className: `flex items-center min-w-60 sm:w-[520px] text-white h-14 px-4 text-sm gap-3 rounded-xl ${background} ${border}`,
2371
2522
  children: [
2372
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-between flex-col gap-2 sm:gap-5 sm:flex-row w-full", children: [
2373
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
2374
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2523
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex justify-between flex-col gap-2 sm:gap-5 sm:flex-row w-full", children: [
2524
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
2525
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2375
2526
  "img",
2376
2527
  {
2377
2528
  className: "w-5 h-5",
@@ -2379,26 +2530,32 @@ var TxStatusButton = ({ transaction }) => {
2379
2530
  alt: "source chain"
2380
2531
  }
2381
2532
  ),
2382
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: fromChain }),
2383
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ArrowRightIcon, {}) }),
2384
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { className: "w-5 h-5", src: toChainImage, alt: "to chain" }),
2385
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: toChain })
2533
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: fromChain }),
2534
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowRightIcon, {}) }),
2535
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("img", { className: "w-5 h-5", src: toChainImage, alt: "to chain" }),
2536
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: toChain })
2386
2537
  ] }),
2387
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
2388
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: "Sent" }),
2389
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: fromAmount }),
2390
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { children: fromToken }),
2391
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2538
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
2539
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: "Sent" }),
2540
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: fromAmount }),
2541
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { children: fromToken }),
2542
+ fromTokenImage ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2392
2543
  "img",
2393
2544
  {
2394
2545
  className: "w-5 h-5",
2395
2546
  src: fromTokenImage,
2396
2547
  alt: "source token"
2397
2548
  }
2549
+ ) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2550
+ UnknownTokenLogo,
2551
+ {
2552
+ tokenName: "?",
2553
+ className: "token-select__generated-logo"
2554
+ }
2398
2555
  )
2399
2556
  ] })
2400
2557
  ] }),
2401
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2558
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2402
2559
  "a",
2403
2560
  {
2404
2561
  href: explorer,
@@ -2406,21 +2563,21 @@ var TxStatusButton = ({ transaction }) => {
2406
2563
  rel: "noreferrer",
2407
2564
  className: "no-underline cursor-pointer",
2408
2565
  "aria-label": "Show the transaction in the chain explorer",
2409
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ArrowUpRightIcon, {}) })
2566
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-3.5 h-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowUpRightIcon, {}) })
2410
2567
  }
2411
2568
  )
2412
2569
  ]
2413
2570
  }
2414
2571
  ),
2415
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2572
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2416
2573
  "div",
2417
2574
  {
2418
2575
  className: `text-white rounded-xl cursor-pointer ${background} ${border}`,
2419
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex gap-2 items-center h-14 w-20 justify-center", children: [
2420
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ArrowLeftIcon, {}),
2421
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative flex items-center justify-center w-9 h-9", children: isDone ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-x_green w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CheckIcon, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
2422
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(XSwapLogo, {}) }),
2423
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute flex items-center justify-center top-0 left-0 right-0 bottom-0 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CircularProgressIcon, {}) })
2576
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex gap-2 items-center h-14 w-20 justify-center", children: [
2577
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ArrowLeftIcon, {}),
2578
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "relative flex items-center justify-center w-9 h-9", children: isDone ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "text-x_green w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckIcon, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
2579
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "w-5 h-5", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(XSwapLogo, {}) }),
2580
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "absolute flex items-center justify-center top-0 left-0 right-0 bottom-0 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CircularProgressIcon, {}) })
2424
2581
  ] }) })
2425
2582
  ] })
2426
2583
  }
@@ -2447,25 +2604,66 @@ var updateTransactionDoneInRenderedTransactions = (txHash) => {
2447
2604
  }
2448
2605
  };
2449
2606
  var renderTxStatusButtons = () => {
2450
- const buttons = renderedTransactions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TxStatusButton, { transaction: item }, item.txHash));
2607
+ const buttons = renderedTransactions.map((item) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(TxStatusButton, { transaction: item }, item.txHash));
2451
2608
  txStatusRoot.render(buttons);
2452
2609
  };
2453
2610
 
2454
2611
  // src/components/Skeleton/index.tsx
2455
- var import_jsx_runtime42 = require("react/jsx-runtime");
2612
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2456
2613
  var Skeleton = ({ width, height }) => {
2457
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `bg-current rounded animate-pulse ${width} ${height}` });
2614
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `bg-current rounded animate-pulse ${width} ${height}` });
2458
2615
  };
2459
2616
 
2460
2617
  // src/services/integrations/monitoring.ts
2461
2618
  var import_async_retry = __toESM(require("async-retry"));
2462
- var monitorTransactionStatus = async (txChainId, txHash) => {
2619
+
2620
+ // src/services/blockchain.ts
2621
+ var import_ethers5 = require("ethers");
2622
+ var getCustomTokenData = async (chain, tokenAddress) => {
2623
+ const rpcUrl = chain.publicRpcUrls[0];
2624
+ const customTokenContract = new import_ethers5.ethers.Contract(
2625
+ tokenAddress.toLowerCase(),
2626
+ ERC20Abi,
2627
+ import_ethers5.ethers.getDefaultProvider(rpcUrl)
2628
+ );
2629
+ try {
2630
+ const query = async (contract, method, args = []) => {
2631
+ if (contract?.provider) {
2632
+ const response = await contract[method](...args);
2633
+ return response;
2634
+ }
2635
+ return null;
2636
+ };
2637
+ const responses = await Promise.all([
2638
+ query(customTokenContract, "decimals"),
2639
+ query(customTokenContract, "name"),
2640
+ query(customTokenContract, "symbol")
2641
+ ]);
2642
+ const [decimals, name, symbol] = responses;
2643
+ return {
2644
+ address: tokenAddress,
2645
+ symbol,
2646
+ name,
2647
+ decimals,
2648
+ quickPick: false,
2649
+ supported: true,
2650
+ priority: 0
2651
+ };
2652
+ } catch (_) {
2653
+ throw new Error(
2654
+ `Provided token ${tokenAddress} does not exists on chain ${chain.displayName}`
2655
+ );
2656
+ }
2657
+ };
2658
+
2659
+ // src/services/integrations/monitoring.ts
2660
+ var renderTxStatus = async (txChainId, txHash) => {
2463
2661
  const txReceipt = await getTxReceipt(txChainId, txHash);
2464
2662
  const supportedChains = (await getChains()).filter(
2465
2663
  ({ web3Environment, swapSupported }) => web3Environment === "mainnet" /* MAINNET */ && swapSupported
2466
2664
  );
2467
2665
  const messageSentEvent = txReceipt.logs?.find((log) => {
2468
- return log.topics[0] === import_ethers5.ethers.utils.id(MSG_SENT_EVENT_SIG);
2666
+ return log.topics[0] === import_ethers6.ethers.utils.id(MSG_SENT_EVENT_SIG);
2469
2667
  });
2470
2668
  if (!messageSentEvent) {
2471
2669
  throw new Error(
@@ -2473,7 +2671,7 @@ var monitorTransactionStatus = async (txChainId, txHash) => {
2473
2671
  );
2474
2672
  }
2475
2673
  const messageId = messageSentEvent?.topics[1];
2476
- const iface = new import_ethers5.ethers.utils.Interface(MSG_SENT_EVENT_ABI);
2674
+ const iface = new import_ethers6.ethers.utils.Interface(MSG_SENT_EVENT_ABI);
2477
2675
  const decodedMessageSentEvent = iface.parseLog(messageSentEvent);
2478
2676
  if (!decodedMessageSentEvent) {
2479
2677
  throw new Error(
@@ -2483,9 +2681,16 @@ var monitorTransactionStatus = async (txChainId, txHash) => {
2483
2681
  const srcChain = supportedChains.find(
2484
2682
  (chain) => chain.chainId === txChainId.toString()
2485
2683
  );
2486
- const srcToken = srcChain?.tokens.find(
2684
+ if (!srcChain) {
2685
+ throw new Error(`Unknown src chain ${txChainId}`);
2686
+ }
2687
+ const tokenAddress = decodedMessageSentEvent.args?.token.toString();
2688
+ let srcToken = srcChain.tokens.find(
2487
2689
  (token) => token.address === decodedMessageSentEvent.args?.token.toString()
2488
2690
  );
2691
+ if (!srcToken) {
2692
+ srcToken = await getCustomTokenData(srcChain, tokenAddress);
2693
+ }
2489
2694
  const dstChain = supportedChains.find(
2490
2695
  (chain) => chain.ccipChainId === decodedMessageSentEvent.args?.destinationChainSelector?.toString()
2491
2696
  );
@@ -2493,19 +2698,20 @@ var monitorTransactionStatus = async (txChainId, txHash) => {
2493
2698
  if (!dstChainId) {
2494
2699
  throw new Error(`Unknown destination chain!`);
2495
2700
  }
2701
+ const tokenAmount = weiToHumanReadable({
2702
+ amount: decodedMessageSentEvent.args?.tokenAmount.toString(),
2703
+ decimals: srcToken?.decimals || 18,
2704
+ precisionFractionalPlaces: 4
2705
+ });
2496
2706
  const transaction = {
2497
2707
  txHash,
2498
- fromChain: srcChain?.displayName,
2499
- fromChainImage: srcChain?.image,
2500
- toChain: dstChain.displayName,
2501
- toChainImage: dstChain.image,
2502
- fromToken: srcToken?.symbol,
2503
- fromTokenImage: srcToken?.image,
2504
- fromAmount: weiToHumanReadable({
2505
- amount: decodedMessageSentEvent.args?.tokenAmount.toString(),
2506
- decimals: srcToken?.decimals || 18,
2507
- precisionFractionalPlaces: 4
2508
- }),
2708
+ srcChain: srcChain.displayName,
2709
+ srcChainImage: srcChain.image,
2710
+ dstChain: dstChain.displayName,
2711
+ dstChainImage: dstChain.image,
2712
+ srcToken: srcToken?.symbol,
2713
+ srcTokenImage: srcToken?.image,
2714
+ srcAmount: tokenAmount === "0" ? "<0.0001" : tokenAmount,
2509
2715
  isDone: false,
2510
2716
  explorer: `${CCIP_EXPLORER}/tx/${txHash}`
2511
2717
  };
@@ -2515,16 +2721,16 @@ var monitorTransactionStatus = async (txChainId, txHash) => {
2515
2721
  if (!xSwapRouterOnDestinationAddress) {
2516
2722
  throw new Error(`Unknown destination XSwapRouter!`);
2517
2723
  }
2518
- const xSwapRouterOnDestination = new import_ethers5.ethers.Contract(
2724
+ const xSwapRouterOnDestination = new import_ethers6.ethers.Contract(
2519
2725
  xSwapRouterOnDestinationAddress,
2520
2726
  MSG_RECEIVED_EVENT_ABI,
2521
- import_ethers5.ethers.getDefaultProvider(
2727
+ import_ethers6.ethers.getDefaultProvider(
2522
2728
  supportedChains.find((chain) => chain.chainId === dstChainId)?.publicRpcUrls[0]
2523
2729
  )
2524
2730
  );
2525
2731
  const msgReceivedEventFilter = {
2526
2732
  address: xSwapRouterOnDestinationAddress,
2527
- topics: [import_ethers5.ethers.utils.id(MSG_RECEIVED_EVENT_SIG), messageId]
2733
+ topics: [import_ethers6.ethers.utils.id(MSG_RECEIVED_EVENT_SIG), messageId]
2528
2734
  };
2529
2735
  const onSuccess = async () => {
2530
2736
  updateTransactionDoneInRenderedTransactions(txHash);
@@ -2535,6 +2741,11 @@ var monitorTransactionStatus = async (txChainId, txHash) => {
2535
2741
  removeTransactionFromRenderedTransactions(txHash);
2536
2742
  renderTxStatusButtons();
2537
2743
  };
2744
+ getTxStatus({ transferId: messageId }).then((response) => {
2745
+ if (response.status === "DONE") {
2746
+ onSuccess();
2747
+ }
2748
+ });
2538
2749
  xSwapRouterOnDestination.once(msgReceivedEventFilter, () => onSuccess());
2539
2750
  };
2540
2751
  var getTxReceipt = async (txChainId, txHash) => {
@@ -2542,7 +2753,7 @@ var getTxReceipt = async (txChainId, txHash) => {
2542
2753
  const chain = (await getChains()).find(
2543
2754
  (chain2) => chain2.chainId === txChainId
2544
2755
  );
2545
- const provider = new import_ethers5.ethers.providers.JsonRpcProvider(
2756
+ const provider = new import_ethers6.ethers.providers.JsonRpcProvider(
2546
2757
  chain?.publicRpcUrls[0]
2547
2758
  );
2548
2759
  return await (0, import_async_retry.default)(async () => {
@@ -2560,7 +2771,8 @@ var getTxReceipt = async (txChainId, txHash) => {
2560
2771
  };
2561
2772
 
2562
2773
  // src/services/integrations/transactions.ts
2563
- var getSwapTx = async ({
2774
+ var openTransactionModal = async ({
2775
+ integratorId,
2564
2776
  dstChain,
2565
2777
  dstToken,
2566
2778
  customContractCalls = [],
@@ -2571,6 +2783,7 @@ var getSwapTx = async ({
2571
2783
  );
2572
2784
  validateSwapTxData(supportedChains, dstChain, dstToken);
2573
2785
  const route = await openTxConfigForm({
2786
+ integratorId,
2574
2787
  dstChainId: dstChain,
2575
2788
  dstTokenAddr: dstToken,
2576
2789
  customContractCalls,
@@ -2586,13 +2799,20 @@ var validateSwapTxData = (supportedChains, dstChain, dstToken) => {
2586
2799
  if (!supportedDstChain) {
2587
2800
  throw new Error(`Provided chain '${dstChain}' is not supported`);
2588
2801
  }
2589
- if (!supportedDstChain.tokens.some(({ address }) => address === dstToken)) {
2590
- throw new Error(`Provided token '${dstToken}' is not supported`);
2802
+ if (!isETHAddressValid(dstToken)) {
2803
+ throw new Error(
2804
+ `Provided token address ${dstToken} on chain ${dstChain} is not correct`
2805
+ );
2591
2806
  }
2592
2807
  };
2593
2808
 
2594
2809
  // src/index.ts
2595
2810
  initDocument();
2811
+ var XPay = {
2812
+ openTransactionModal,
2813
+ renderTxStatus
2814
+ };
2815
+ var src_default = XPay;
2596
2816
  // Annotate the CommonJS export names for ESM import in node:
2597
2817
  0 && (module.exports = {
2598
2818
  ContractName,
@@ -2600,6 +2820,6 @@ initDocument();
2600
2820
  Environment,
2601
2821
  Web3Environment,
2602
2822
  XSwapCallType,
2603
- getSwapTx,
2604
- monitorTransactionStatus
2823
+ openTransactionModal,
2824
+ renderTxStatus
2605
2825
  });