@lifi/widget 1.32.3 → 1.32.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 (106) hide show
  1. package/AppDrawer.js +2 -1
  2. package/cjs/AppDrawer.js +3 -2
  3. package/cjs/components/ActiveSwaps/ActiveSwapItem.js +6 -4
  4. package/cjs/components/ChainSelect/useChainSelect.js +1 -1
  5. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +2 -2
  6. package/cjs/components/Header/NavigationHeader.js +5 -3
  7. package/cjs/components/Header/WalletHeader.js +8 -4
  8. package/cjs/components/NotFound.js +2 -2
  9. package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +3 -2
  10. package/cjs/components/SendToWallet/SendToWalletButton.js +2 -2
  11. package/cjs/components/Step/CircularProgress.js +8 -5
  12. package/cjs/components/Step/DestinationWalletAddress.js +4 -3
  13. package/cjs/components/Step/GasStepProcess.js +2 -2
  14. package/cjs/components/Step/StepProcess.js +2 -2
  15. package/cjs/components/StepActions/StepActions.js +2 -2
  16. package/cjs/components/SwapRouteCard/SwapRouteCard.js +8 -4
  17. package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
  18. package/cjs/components/SwapRoutes/SwapRoutes.js +2 -2
  19. package/cjs/components/SwapRoutes/SwapRoutes.style.d.ts +1 -2
  20. package/cjs/components/TokenList/TokenNotFound.js +2 -2
  21. package/cjs/config/version.d.ts +1 -1
  22. package/cjs/config/version.js +1 -1
  23. package/cjs/hooks/useRouteExecution.js +1 -1
  24. package/cjs/hooks/useSwapRoutes.d.ts +2 -4
  25. package/cjs/hooks/useSwapRoutes.js +19 -0
  26. package/cjs/hooks/useTokenAddressBalance.js +1 -0
  27. package/cjs/hooks/useTokenBalance.js +7 -10
  28. package/cjs/hooks/useTokenBalances.js +0 -1
  29. package/cjs/hooks/useTokenSearch.js +6 -4
  30. package/cjs/i18n/de.json +89 -82
  31. package/cjs/i18n/es.json +52 -22
  32. package/cjs/i18n/id.json +230 -0
  33. package/cjs/i18n/index.d.ts +4 -1
  34. package/cjs/i18n/index.js +7 -2
  35. package/cjs/i18n/ko.json +230 -0
  36. package/cjs/i18n/tr.json +230 -0
  37. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
  38. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -3
  39. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +6 -3
  40. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +2 -2
  41. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +4 -2
  42. package/cjs/pages/SettingsPage/EnabledToolsButton.js +3 -3
  43. package/cjs/pages/SettingsPage/GasPriceSelect.js +2 -2
  44. package/cjs/pages/SettingsPage/LanguageSelect.js +2 -2
  45. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +2 -2
  46. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
  47. package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  48. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -3
  49. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +2 -2
  50. package/cjs/pages/SwapPage/StatusBottomSheet.js +6 -4
  51. package/cjs/pages/SwapPage/SwapPage.js +2 -2
  52. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +2 -2
  53. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -2
  54. package/components/ActiveSwaps/ActiveSwapItem.js +5 -3
  55. package/components/ChainSelect/useChainSelect.js +1 -1
  56. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +2 -2
  57. package/components/Header/NavigationHeader.js +5 -3
  58. package/components/Header/WalletHeader.js +6 -2
  59. package/components/NotFound.js +1 -1
  60. package/components/ReverseTokensButton/ReverseTokensButton.js +2 -1
  61. package/components/SendToWallet/SendToWalletButton.js +1 -1
  62. package/components/Step/CircularProgress.js +8 -5
  63. package/components/Step/DestinationWalletAddress.js +3 -2
  64. package/components/Step/GasStepProcess.js +2 -2
  65. package/components/Step/StepProcess.js +2 -2
  66. package/components/StepActions/StepActions.js +1 -1
  67. package/components/SwapRouteCard/SwapRouteCard.js +7 -3
  68. package/components/SwapRouteCard/SwapRouteNotFoundCard.js +1 -1
  69. package/components/SwapRoutes/SwapRoutes.js +1 -1
  70. package/components/SwapRoutes/SwapRoutes.style.d.ts +1 -2
  71. package/components/TokenList/TokenNotFound.js +1 -1
  72. package/config/version.d.ts +1 -1
  73. package/config/version.js +1 -1
  74. package/hooks/useRouteExecution.js +1 -1
  75. package/hooks/useSwapRoutes.d.ts +2 -4
  76. package/hooks/useSwapRoutes.js +19 -0
  77. package/hooks/useTokenAddressBalance.js +1 -0
  78. package/hooks/useTokenBalance.js +7 -10
  79. package/hooks/useTokenBalances.js +0 -1
  80. package/hooks/useTokenSearch.js +6 -4
  81. package/i18n/de.json +89 -82
  82. package/i18n/es.json +52 -22
  83. package/i18n/id.json +230 -0
  84. package/i18n/index.d.ts +4 -1
  85. package/i18n/index.js +4 -2
  86. package/i18n/ko.json +230 -0
  87. package/i18n/tr.json +230 -0
  88. package/package.json +11 -11
  89. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +1 -1
  90. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -3
  91. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +6 -3
  92. package/pages/SelectTokenPage/SearchTokenInput.js +1 -1
  93. package/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -1
  94. package/pages/SettingsPage/EnabledToolsButton.js +2 -2
  95. package/pages/SettingsPage/GasPriceSelect.js +1 -1
  96. package/pages/SettingsPage/LanguageSelect.js +1 -1
  97. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  98. package/pages/SwapDetailsPage/SwapDetailsPage.js +3 -2
  99. package/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  100. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -3
  101. package/pages/SwapPage/ExchangeRateBottomSheet.js +2 -2
  102. package/pages/SwapPage/StatusBottomSheet.js +6 -4
  103. package/pages/SwapPage/SwapPage.js +1 -1
  104. package/pages/SwapPage/TokenValueBottomSheet.js +2 -2
  105. package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -2
  106. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -0,0 +1,230 @@
1
+ {
2
+ "button": {
3
+ "auto": "Otomatik",
4
+ "cancel": "İptal",
5
+ "connectWallet": "Cüzdanı Bağla",
6
+ "contactSupport": "Destek Ekibine Ulaş",
7
+ "continue": "Devam et",
8
+ "copyAddress": "Adresi Kopyala",
9
+ "dark": "Koyu",
10
+ "delete": "Sil",
11
+ "disconnect": "Bağlantıyı Kes",
12
+ "done": "Tamamlandı",
13
+ "getGas": "Gaz al",
14
+ "hide": "Gizle",
15
+ "lifiSwap": "LI.FI Takas",
16
+ "light": "Açık",
17
+ "max": "maksimum",
18
+ "ok": "Tamam",
19
+ "okay": "Tamam",
20
+ "removeSwap": "Takas işlemini kaldır",
21
+ "reset": "Sıfırla",
22
+ "resetSettings": "Ayarları Sıfırla",
23
+ "restartSwap": "Takası yeniden başlat",
24
+ "reviewGasSwap": "Gaz takasını incele",
25
+ "reviewSwap": "Takas işlemini incele",
26
+ "seeDetails": "Detayları Gör",
27
+ "showAll": "Tümünü Göster",
28
+ "startGasSwap": "Gaz takasını başlat",
29
+ "startSwap": "Takas işlemini başlat",
30
+ "swap": "Takas et",
31
+ "tryAgain": "Tekrar Deneyin",
32
+ "viewOnExplorer": "Tarayıcıda Görüntüle"
33
+ },
34
+ "format": {
35
+ "currency": "{{value, currency(currency: USD)}}",
36
+ "number": "{{value, number(maximumFractionDigits: 9)}}"
37
+ },
38
+ "header": {
39
+ "activeSwaps": "Aktif takas işlemleri",
40
+ "checkout": "Ödeme yap",
41
+ "from": "Şundan takas et",
42
+ "gas": "Gaz",
43
+ "gasSwap": "Gaz takası",
44
+ "routes": "Alacağınız",
45
+ "selectChain": "Zincir Seç",
46
+ "selectWallet": "Bir Cüzdan Seçin",
47
+ "settings": "Ayarlar",
48
+ "swap": "Takas",
49
+ "swapDetails": "Takas detayları",
50
+ "swapHistory": "Takas geçmişi",
51
+ "to": "Şuna takas et",
52
+ "walletConnected": "Cüzdan Bağlandı"
53
+ },
54
+ "language": {
55
+ "name": "Türkçe",
56
+ "title": "Dil"
57
+ },
58
+ "settings": {
59
+ "enabledBridges": "Etkin Köprüler",
60
+ "enabledExchanges": "Etkin platformlar",
61
+ "gasPrice": {
62
+ "fast": "Hızlı",
63
+ "normal": "Standard",
64
+ "slow": "Yavaş",
65
+ "title": "Gaz ücreti"
66
+ },
67
+ "routePriority": "Rota önceliği",
68
+ "showDestinationWallet": "Hedef Adresi Göster",
69
+ "slippage": "Slipaj"
70
+ },
71
+ "swap": {
72
+ "crossStepDetails": "{{from}} ile {{to}} ağları arasında {{tool}} ile gönderim sağlayın",
73
+ "currentAmount": "Geçerli miktar",
74
+ "error": {
75
+ "message": {
76
+ "slippageThreshold": "Slipaj, tanımlanan eşikten daha büyük. Yeni bir fiyat teklifi almak için lütfen yeni bir rota isteyin.",
77
+ "transactionFailed": "Daha fazla bilgi için ağ tarayıcısını kontrol edin.",
78
+ "transactionNotSent": "İşlem gönderilmedi. {{chainName}} üzerinde {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} cüzdanınızda bulunmaktadır.",
79
+ "transactionRejected": "İşlemi tamamlamak için imzanız gerekiyor. {{chainName}} üzerinde {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} cüzdanınızda bulunmaktadır.",
80
+ "unknown": "Lütfen tekrar deneyin veya desteğe başvurun."
81
+ },
82
+ "title": {
83
+ "balanceIsTooLow": "Bakiye çok düşük",
84
+ "chainSwitch": "Lütfen ağı değiştirin",
85
+ "failed": "İşlem Başarısız",
86
+ "gasLimitIsTooLow": "Gaz limiti çok düşük",
87
+ "slippageNotMet": "Slipaj koşulları karşılanmadı",
88
+ "transactionCanceled": "İşlem iptal edildi",
89
+ "transactionFailed": "İşlem başarısız",
90
+ "transactionRejected": "İmza gerekiyor",
91
+ "transactionUnderpriced": "İşlemin değeri düşük",
92
+ "transactionUnprepared": "İşlem başlatılamıyor",
93
+ "unknown": "Bir sorun oluştu",
94
+ "walletAddressInvalid": "Cüzdan adresi geçersizdir.",
95
+ "walletAddressRequired": "Cüzdan adresi gereklidir.",
96
+ "walletEnsAddressInvalid": "Cüzdan adresi geçerli değil veya ağ ENS desteklemiyor."
97
+ }
98
+ },
99
+ "estimatedTime": "{{value}} dakika",
100
+ "featuredTokens": "Öne çıkan jetonlar",
101
+ "from": "Gönderen",
102
+ "fromAmount": "Ödediğiniz",
103
+ "gasCost": "Gaz Bedeli",
104
+ "gasFeeEstimated": "Tahmini Gaz Ücreti",
105
+ "gasFeePaid": "Ödenen Gaz ücreti",
106
+ "inProgress": "işlem devam ediyor",
107
+ "info": {
108
+ "message": {
109
+ "emptyActiveSwaps": "Devam eden işlemler burada görünecek. Tamamlandığında, işlem geçmişinden bulabilirsiniz",
110
+ "emptySwapHistory": "İşlem geçmişi yalnızca yerel olarak saklanır ve tarayıcı verilerinizi temizlerseniz silinir.",
111
+ "emptyTokenList": "{{chainName}} zincirinde token bulamadık veya sizde hiç token yok. Lütfen tekrar aramayı deneyin veya başka bir zincir seçin.",
112
+ "routeNotFound": "Başka bir token kombinasyonu deneyin"
113
+ },
114
+ "title": {
115
+ "emptyActiveSwaps": "Aktif işlem bulunamadı",
116
+ "emptySwapHistory": "Yakın zamanda işlem bulunamadı",
117
+ "routeNotFound": "Kullanılabilir bir yol bulunamadı"
118
+ }
119
+ },
120
+ "nftStepDetails": "{{tool}} aracılığıyla NFT satın alın",
121
+ "onChain": "{{chainName}} üzerinde",
122
+ "otherTokens": "Diğer jetonlar",
123
+ "ownedBy": "Tarafından sahip olunan",
124
+ "payWith": "Şununla öde",
125
+ "process": {
126
+ "crossChain": {
127
+ "actionRequired": "Lütfen işlemi onaylayın",
128
+ "done": "Köprü işlemi teyit edildi",
129
+ "pending": "Köprü işlemi bekleniyor",
130
+ "started": "Köprü işlemi hazırlanıyor"
131
+ },
132
+ "receivingChain": {
133
+ "done": "Köprü işlemi tamamlandı",
134
+ "partial": "Köprü işlemi kısmen tamamlandı",
135
+ "pending": "Hedef zincir bekleniyor",
136
+ "refunded": "Köprü işlemi iade edildi"
137
+ },
138
+ "swap": {
139
+ "actionRequired": "Lütfen işlemi onaylayın",
140
+ "done": "Takas işlemi tamamlandı",
141
+ "pending": "Takas işlemi bekleniyor",
142
+ "started": "Takas işlemi hazırlanıyor"
143
+ },
144
+ "switchChain": {
145
+ "actionRequired": "Lütfen ağı değiştirin",
146
+ "done": "Ağ başarıyla değiştirildi"
147
+ },
148
+ "tokenAllowance": {
149
+ "done": "Jeton izni onaylandı",
150
+ "pending": "Jeton izni bekleniyor",
151
+ "started": "Jeton izni ayarlanıyor"
152
+ }
153
+ },
154
+ "quotedAmount": "Teklif edilen tutar",
155
+ "rateChange": "Değişiklik oranı",
156
+ "receiving": "Alınıyor",
157
+ "routes": "Alacağınız",
158
+ "selectChain": "Zincir",
159
+ "selectChainAndToken": "Ağı ve jetonu seçin",
160
+ "selectToken": "Jeton",
161
+ "sendToAddress": "Bu adrese gönder: {{address}}",
162
+ "sendToWallet": "Farklı bir cüzdana gönder",
163
+ "sentToAddress": "Bu adrese gönderildi: {{address}}",
164
+ "stepBridge": "Köprüle",
165
+ "stepSwap": "Takas et",
166
+ "stepSwapAndBridge": "Takas et ve Köprüle",
167
+ "success": {
168
+ "message": {
169
+ "swapPartiallySuccessful": "Takas işlemini tamamlamaya çalıştık, ancak {{tool}} içerisinde, {{tokenSymbol}} için likidite bulunmuyor.",
170
+ "swapSuccessful": "Şu anda {{chainName}} ağındaki {{walletAddress}} adresli cüzdanda {{amount, number(maximumFractionDigits: 9)}} adet {{tokenSymbol}} bulunmaktadır."
171
+ },
172
+ "title": {
173
+ "gasSwapSuccessful": "Gaz takası başarılı",
174
+ "refundIssued": "Geri ödeme yapıldı",
175
+ "swapPartiallySuccessful": "Takas işlemi kısmen başarılı",
176
+ "swapSuccessful": "Takas başarılı"
177
+ }
178
+ },
179
+ "supportId": "Destek",
180
+ "swapStepDetails": "{{chain}} üzerinde {{tool}} aracılığıyla takas et",
181
+ "swapping": "Takas ediliyor",
182
+ "tags": {
183
+ "ALTERNATIVE": "ALTERNATİF",
184
+ "CHEAPEST": "UCUZ",
185
+ "FASTEST": "HIZLI",
186
+ "RECOMMENDED": "TAVSİYE EDİLEN",
187
+ "SAFEST": "GÜVENLİ"
188
+ },
189
+ "to": "Şuna",
190
+ "tokenOnChain": "{{chainName}} üzerindeki {{tokenSymbol}}",
191
+ "tokenOnChainAmount": "{{chainName}} üzerindeki {{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}}",
192
+ "tokenSearch": "Varlıklarınızı arayın",
193
+ "valueLoss": "Değer kaybı",
194
+ "walletAddressOrEns": "Cüzdan adresi veya ENS alan adı",
195
+ "warning": {
196
+ "message": {
197
+ "deleteActiveSwaps": "Etkin takaslar yalnızca yerel olarak depolanır ve silerseniz kurtarılamaz.",
198
+ "deleteSwapHistory": "Takas geçmişi yalnızca yerel olarak depolanır ve silerseniz kurtarılamaz.",
199
+ "highValueLoss": "Elde edilecek varlıkların değeri, takas edilen varlıklardan ve işlem maliyetinden önemli ölçüde düşüktür.",
200
+ "insufficientFunds": "Takas işlemini gerçekleştirmek için yeterli bakiyeniz bulunmamaktadır.",
201
+ "insufficientGas": "En azından şunları eklemelisiniz:",
202
+ "rateChanged": "Takas oranı değişti. İşleme devam ederek yeni oranı kabul etmiş olursunuz.",
203
+ "resetSettings": "Bu, rota önceliğinizi, slipajı, gaz fiyatını, etkin köprüleri ve takasları sıfırlayacaktır."
204
+ },
205
+ "title": {
206
+ "deleteActiveSwaps": "Tüm aktif takasları silmek istiyor musunuz?",
207
+ "deleteSwap": "Bu takası silmek istiyor musunuz?",
208
+ "deleteSwapHistory": "Takas geçmişini silmek istiyor musunuz?",
209
+ "highValueLoss": "Yüksek değer kaybı",
210
+ "insufficientGas": "Yetersiz gaz",
211
+ "rateChanged": "Oran değişti",
212
+ "resetSettings": "Ayarları sıfırla?"
213
+ }
214
+ }
215
+ },
216
+ "tooltip": {
217
+ "estimatedNetworkFee": "Tahmini ağ ücreti.",
218
+ "estimatedTime": "Dakika cinsinden tahmini işlem süresi.",
219
+ "notFound": {
220
+ "text": "Aradığınız sayfayı bulamadık.",
221
+ "title": "404"
222
+ },
223
+ "numberOfSteps": "İşlem birkaç adımdan oluşmaktadır. Her adım, imza gerektiren 1-2 işlem içerebilir.",
224
+ "progressToNextUpdate": "Görüntülenen veriler, {{value}} saniye sonra otomatik olarak yenilenecektir. Manuel olarak güncellemek için burayı tıklayın.",
225
+ "settingsModified": "Ayarlar (değiştirilen)"
226
+ },
227
+ "wallet": {
228
+ "extensionNotFound": "Lütfen bu cüzdanı seçmeden önce yalnızca {{name}} tarayıcı uzantısının etkin olduğundan emin olun."
229
+ }
230
+ }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActiveSwapsEmpty = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const SwapHoriz_1 = require("@mui/icons-material/SwapHoriz");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const ActiveSwapsEmpty = () => {
@@ -14,6 +14,6 @@ const ActiveSwapsEmpty = () => {
14
14
  alignItems: 'center',
15
15
  justifyContent: 'center',
16
16
  paddingY: 12,
17
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(icons_material_1.SwapHoriz, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('swap.info.title.emptyActiveSwaps') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('swap.info.message.emptyActiveSwaps') })] }));
17
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(SwapHoriz_1.default, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('swap.info.title.emptyActiveSwaps') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('swap.info.message.emptyActiveSwaps') })] }));
18
18
  };
19
19
  exports.ActiveSwapsEmpty = ActiveSwapsEmpty;
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActiveSwapsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- /* eslint-disable consistent-return */
6
- const icons_material_1 = require("@mui/icons-material");
5
+ const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
7
6
  const material_1 = require("@mui/material");
8
7
  const react_1 = require("react");
9
8
  const react_i18next_1 = require("react-i18next");
@@ -24,7 +23,7 @@ const ActiveSwapsPage = () => {
24
23
  }, []);
25
24
  (0, react_1.useEffect)(() => {
26
25
  if (executingRoutes.length) {
27
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) }));
26
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
28
27
  }
29
28
  }, [executingRoutes.length, toggleDialog]);
30
29
  if (!executingRoutes.length) {
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SelectEnabledToolsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const CheckBox_1 = require("@mui/icons-material/CheckBox");
6
+ const CheckBoxOutlineBlankOutlined_1 = require("@mui/icons-material/CheckBoxOutlineBlankOutlined");
7
+ const CheckBoxOutlined_1 = require("@mui/icons-material/CheckBoxOutlined");
8
+ const IndeterminateCheckBoxOutlined_1 = require("@mui/icons-material/IndeterminateCheckBoxOutlined");
6
9
  const material_1 = require("@mui/material");
7
10
  const Header_1 = require("../../components/Header");
8
11
  const react_1 = require("react");
@@ -41,11 +44,11 @@ const SelectEnabledToolsPage = ({ type }) => {
41
44
  setTools(type, toolKeys, toolKeys);
42
45
  }
43
46
  };
44
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleCheckboxes, children: allToolsSelected ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlined, {})) : enabledTools.length ? ((0, jsx_runtime_1.jsx)(icons_material_1.IndeterminateCheckBoxOutlined, {})) : ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlineBlankOutlined, {})) }));
47
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleCheckboxes, children: allToolsSelected ? ((0, jsx_runtime_1.jsx)(CheckBoxOutlined_1.default, {})) : enabledTools.length ? ((0, jsx_runtime_1.jsx)(IndeterminateCheckBoxOutlined_1.default, {})) : ((0, jsx_runtime_1.jsx)(CheckBoxOutlineBlankOutlined_1.default, {})) }));
45
48
  }, [enabledTools.length, setTools, tools, type, typeKey]);
46
49
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
47
50
  paddingLeft: 1.5,
48
51
  paddingRight: 1.5,
49
- }, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: tool.logoURI, alt: tool.name, children: tool.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: tool.name }), enabledTools?.includes(tool.key) ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBox, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlineBlankOutlined, {}))] }, tool.name))) }) }));
52
+ }, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: tool.logoURI, alt: tool.name, children: tool.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: tool.name }), enabledTools?.includes(tool.key) ? ((0, jsx_runtime_1.jsx)(CheckBox_1.default, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(CheckBoxOutlineBlankOutlined_1.default, {}))] }, tool.name))) }) }));
50
53
  };
51
54
  exports.SelectEnabledToolsPage = SelectEnabledToolsPage;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchTokenInput = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const Search_1 = require("@mui/icons-material/Search");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_1 = require("react");
8
8
  const react_hook_form_1 = require("react-hook-form");
@@ -16,7 +16,7 @@ const SearchTokenInput = () => {
16
16
  (0, react_1.useEffect)(() => () => {
17
17
  setValue(providers_1.SwapFormKey.TokenSearchFilter, '');
18
18
  }, [setValue]);
19
- return ((0, jsx_runtime_1.jsx)(Card_1.Card, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(SearchTokenInput_style_1.Input, { size: "small", placeholder: t(`swap.tokenSearch`), defaultValue: "", endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(icons_material_1.Search, {}) }), inputProps: {
19
+ return ((0, jsx_runtime_1.jsx)(Card_1.Card, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(SearchTokenInput_style_1.Input, { size: "small", placeholder: t(`swap.tokenSearch`), defaultValue: "", endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) }), inputProps: {
20
20
  inputMode: 'search',
21
21
  ...register(providers_1.SwapFormKey.TokenSearchFilter),
22
22
  }, autoComplete: "off" }) }) }));
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ColorSchemeButtonGroup = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const Brightness4_1 = require("@mui/icons-material/Brightness4");
6
+ const DarkMode_1 = require("@mui/icons-material/DarkMode");
7
+ const LightMode_1 = require("@mui/icons-material/LightMode");
6
8
  const material_1 = require("@mui/material");
7
9
  const react_i18next_1 = require("react-i18next");
8
10
  const providers_1 = require("../../providers");
@@ -20,6 +22,6 @@ const ColorSchemeButtonGroup = () => {
20
22
  if (value) {
21
23
  setAppearance(value);
22
24
  }
23
- }, exclusive: true, fullWidth: true, children: [(0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "light", children: [(0, jsx_runtime_1.jsx)(icons_material_1.LightMode, { sx: { marginRight: 1 } }), t('button.light')] }), (0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "dark", children: [(0, jsx_runtime_1.jsx)(icons_material_1.DarkMode, { sx: { marginRight: 1 } }), t('button.dark')] }), (0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "auto", children: [(0, jsx_runtime_1.jsx)(icons_material_1.Brightness4, { sx: { marginRight: 1 } }), t('button.auto')] })] }) }));
25
+ }, exclusive: true, fullWidth: true, children: [(0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "light", children: [(0, jsx_runtime_1.jsx)(LightMode_1.default, { sx: { marginRight: 1 } }), t('button.light')] }), (0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "dark", children: [(0, jsx_runtime_1.jsx)(DarkMode_1.default, { sx: { marginRight: 1 } }), t('button.dark')] }), (0, jsx_runtime_1.jsxs)(ColorSchemeButtonGroup_style_1.ToggleButton, { value: "auto", children: [(0, jsx_runtime_1.jsx)(Brightness4_1.default, { sx: { marginRight: 1 } }), t('button.auto')] })] }) }));
24
26
  };
25
27
  exports.ColorSchemeButtonGroup = ColorSchemeButtonGroup;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EnabledToolsButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const ChevronRight_1 = require("@mui/icons-material/ChevronRight");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const react_router_dom_1 = require("react-router-dom");
@@ -15,11 +15,11 @@ const EnabledToolsButton = ({ type }) => {
15
15
  const navigate = (0, react_router_dom_1.useNavigate)();
16
16
  const [enabledTools, tools] = (0, stores_1.useSettingsStore)((state) => {
17
17
  const enabledTools = Object.values(state[`_enabled${type}`] ?? {});
18
- return [enabledTools.filter((tool) => tool).length, enabledTools.length];
18
+ return [enabledTools.filter(Boolean).length, enabledTools.length];
19
19
  }, shallow_1.shallow);
20
20
  const handleClick = () => {
21
21
  navigate(utils_1.navigationRoutes[type.toLowerCase()]);
22
22
  };
23
- return ((0, jsx_runtime_1.jsxs)(EnabledToolsButton_style_1.ListItemButton, { onClick: handleClick, children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: t(`settings.enabled${type}`) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: `${enabledTools}/${tools}` }), (0, jsx_runtime_1.jsx)(icons_material_1.ChevronRight, {})] })] }));
23
+ return ((0, jsx_runtime_1.jsxs)(EnabledToolsButton_style_1.ListItemButton, { onClick: handleClick, children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: t(`settings.enabled${type}`) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_style_1.ListItemText, { primary: `${enabledTools}/${tools}` }), (0, jsx_runtime_1.jsx)(ChevronRight_1.default, {})] })] }));
24
24
  };
25
25
  exports.EnabledToolsButton = EnabledToolsButton;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GasPriceSelect = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const KeyboardArrowDown_1 = require("@mui/icons-material/KeyboardArrowDown");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const Card_1 = require("../../components/Card");
@@ -12,6 +12,6 @@ const GasPriceSelect = () => {
12
12
  const { t } = (0, react_i18next_1.useTranslation)();
13
13
  const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
14
14
  const { gasPrice } = (0, stores_1.useSettings)(['gasPrice']);
15
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { flex: 1, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.gasPrice.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsxs)(Select_1.Select, { MenuProps: { elevation: 2 }, value: gasPrice, onChange: (event) => setValue('gasPrice', event.target.value), IconComponent: icons_material_1.KeyboardArrowDown, dense: true, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "slow", children: t(`settings.gasPrice.slow`) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "normal", children: t(`settings.gasPrice.normal`) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "fast", children: t(`settings.gasPrice.fast`) })] }) })] }));
15
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { flex: 1, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.gasPrice.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsxs)(Select_1.Select, { MenuProps: { elevation: 2 }, value: gasPrice, onChange: (event) => setValue('gasPrice', event.target.value), IconComponent: KeyboardArrowDown_1.default, dense: true, children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "slow", children: t(`settings.gasPrice.slow`) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "normal", children: t(`settings.gasPrice.normal`) }), (0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: "fast", children: t(`settings.gasPrice.fast`) })] }) })] }));
16
16
  };
17
17
  exports.GasPriceSelect = GasPriceSelect;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LanguageSelect = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const KeyboardArrowDown_1 = require("@mui/icons-material/KeyboardArrowDown");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const Card_1 = require("../../components/Card");
@@ -30,7 +30,7 @@ const LanguageSelect = () => {
30
30
  const value = filteredLanguages.includes(language || i18n.resolvedLanguage)
31
31
  ? language || i18n.resolvedLanguage
32
32
  : languages?.default || languages?.allow?.[0];
33
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { mb: 2, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`language.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: handleChangeLanguage, IconComponent: icons_material_1.KeyboardArrowDown, dense: true, children: filteredLanguages.map((lng) => {
33
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { mb: 2, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`language.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: handleChangeLanguage, IconComponent: KeyboardArrowDown_1.default, dense: true, children: filteredLanguages.map((lng) => {
34
34
  return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: lng, children: t('language.name', { lng }) }, lng));
35
35
  }) }) })] }));
36
36
  };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RoutePrioritySelect = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const sdk_1 = require("@lifi/sdk");
6
- const icons_material_1 = require("@mui/icons-material");
6
+ const KeyboardArrowDown_1 = require("@mui/icons-material/KeyboardArrowDown");
7
7
  const material_1 = require("@mui/material");
8
8
  const react_i18next_1 = require("react-i18next");
9
9
  const Card_1 = require("../../components/Card");
@@ -14,7 +14,7 @@ const RoutePrioritySelect = () => {
14
14
  const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
15
15
  const { routePriority } = (0, stores_1.useSettings)(['routePriority']);
16
16
  const value = routePriority ?? '';
17
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: icons_material_1.KeyboardArrowDown, dense: true, children: sdk_1.Orders.map((order) => {
17
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: KeyboardArrowDown_1.default, dense: true, children: sdk_1.Orders.map((order) => {
18
18
  const tag = t(`swap.tags.${order.toUpperCase()}`);
19
19
  const tagName = `${tag[0]}${tag.slice(1).toLowerCase()}`;
20
20
  return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: order, children: tagName }, order));
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwapDetailsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const ContentCopy_1 = require("@mui/icons-material/ContentCopy");
6
+ const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
6
7
  const material_1 = require("@mui/material");
7
8
  const react_1 = require("react");
8
9
  const react_i18next_1 = require("react-i18next");
@@ -40,7 +41,7 @@ const SwapDetailsPage = () => {
40
41
  await navigator.clipboard.writeText(supportId);
41
42
  };
42
43
  (0, react_1.useEffect)(() => {
43
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) }));
44
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
44
45
  }, [toggleDialog]);
45
46
  const startedAt = new Date(routeExecution?.route.steps[0].execution?.process[0].startedAt ?? 0);
46
47
  return ((0, jsx_runtime_1.jsxs)(SwapDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
@@ -52,6 +53,6 @@ const SwapDetailsPage = () => {
52
53
  }).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
53
54
  display: 'flex',
54
55
  flex: 1,
55
- }, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('swap.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { href: "https://discord.com/channels/849912621360218112/863689862514343946", target: "_blank", rel: "nofollow noreferrer", fullWidth: true, children: t('button.contactSupport') }) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwap') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwapHistory') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: handleDeleteRoute, autoFocus: true, children: t('button.delete') })] })] })] }));
56
+ }, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('swap.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(ContentCopy_1.default, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { href: "https://discord.com/channels/849912621360218112/863689862514343946", target: "_blank", rel: "nofollow noreferrer", fullWidth: true, children: t('button.contactSupport') }) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwap') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwapHistory') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: handleDeleteRoute, autoFocus: true, children: t('button.delete') })] })] })] }));
56
57
  };
57
58
  exports.SwapDetailsPage = SwapDetailsPage;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwapHistoryEmpty = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const ReceiptLongRounded_1 = require("@mui/icons-material/ReceiptLongRounded");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const SwapHistoryEmpty = () => {
@@ -14,6 +14,6 @@ const SwapHistoryEmpty = () => {
14
14
  alignItems: 'center',
15
15
  justifyContent: 'center',
16
16
  paddingY: 12,
17
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(icons_material_1.ReceiptLongRounded, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('swap.info.title.emptySwapHistory') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('swap.info.message.emptySwapHistory') })] }));
17
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(ReceiptLongRounded_1.default, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('swap.info.title.emptySwapHistory') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('swap.info.message.emptySwapHistory') })] }));
18
18
  };
19
19
  exports.SwapHistoryEmpty = SwapHistoryEmpty;
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwapHistoryPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- /* eslint-disable consistent-return */
6
- const icons_material_1 = require("@mui/icons-material");
5
+ const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
7
6
  const material_1 = require("@mui/material");
8
7
  const react_1 = require("react");
9
8
  const react_i18next_1 = require("react-i18next");
@@ -25,7 +24,7 @@ const SwapHistoryPage = () => {
25
24
  }, []);
26
25
  (0, react_1.useEffect)(() => {
27
26
  if (swaps.length) {
28
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) }));
27
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
29
28
  }
30
29
  }, [swaps.length, toggleDialog]);
31
30
  if (!swaps.length) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTokenValueLossThreshold = exports.ExchangeRateBottomSheet = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const WarningRounded_1 = require("@mui/icons-material/WarningRounded");
6
6
  const material_1 = require("@mui/material");
7
7
  const big_js_1 = require("big.js");
8
8
  const react_1 = require("react");
@@ -47,7 +47,7 @@ const ExchangeRateBottomSheetContent = ({ data, onCancel, onContinue }) => {
47
47
  const { t } = (0, react_i18next_1.useTranslation)();
48
48
  const ref = (0, react_1.useRef)();
49
49
  (0, hooks_1.useSetContentHeight)(ref);
50
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, ref: ref, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, { status: "warning", mb: 1, children: (0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('swap.warning.title.rateChanged') })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: t('swap.warning.message.rateChanged') }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.quotedAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [t('format.number', {
50
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, ref: ref, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, { status: "warning", mb: 1, children: (0, jsx_runtime_1.jsx)(WarningRounded_1.default, { color: "warning" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('swap.warning.title.rateChanged') })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: t('swap.warning.message.rateChanged') }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.quotedAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [t('format.number', {
51
51
  value: (0, utils_1.formatTokenAmount)(data?.oldToAmount, data?.toToken.decimals, 5),
52
52
  }), ' ', data?.toToken.symbol] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.currentAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [t('format.number', {
53
53
  value: (0, utils_1.formatTokenAmount)(data?.newToAmount, data?.toToken.decimals, 5),
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StatusBottomSheet = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- /* eslint-disable consistent-return */
6
- const icons_material_1 = require("@mui/icons-material");
5
+ const Done_1 = require("@mui/icons-material/Done");
6
+ const ErrorRounded_1 = require("@mui/icons-material/ErrorRounded");
7
+ const InfoRounded_1 = require("@mui/icons-material/InfoRounded");
8
+ const WarningRounded_1 = require("@mui/icons-material/WarningRounded");
7
9
  const material_1 = require("@mui/material");
8
10
  const react_1 = require("react");
9
11
  const react_hook_form_1 = require("react-hook-form");
@@ -140,8 +142,8 @@ const StatusBottomSheet = ({ status, route, }) => {
140
142
  ref.current?.open();
141
143
  }
142
144
  }, [refetch, refetchNewBalance, status]);
143
- return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, { ref: ref, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconCircle, { status: status, mb: 1, children: [status === stores_1.RouteExecutionStatus.Idle ? ((0, jsx_runtime_1.jsx)(icons_material_1.InfoRounded, { color: "primary" })) : null, status === stores_1.RouteExecutionStatus.Done ? ((0, jsx_runtime_1.jsx)(icons_material_1.Done, { color: "success" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Partial) ||
144
- (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Refunded) ? ((0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Failed) ? ((0, jsx_runtime_1.jsx)(icons_material_1.ErrorRounded, { color: "error" })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: title }), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, py: 1, disableDescription: true })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: primaryMessage }), secondaryMessage ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: secondaryMessage })) : null, (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsxs)(material_1.Button, { variant: "contained", fullWidth: true, onClick: handlePrimaryButton, children: [status === stores_1.RouteExecutionStatus.Idle ? t('button.ok') : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done)
145
+ return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, { ref: ref, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconCircle, { status: status, mb: 1, children: [status === stores_1.RouteExecutionStatus.Idle ? ((0, jsx_runtime_1.jsx)(InfoRounded_1.default, { color: "primary" })) : null, status === stores_1.RouteExecutionStatus.Done ? ((0, jsx_runtime_1.jsx)(Done_1.default, { color: "success" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Partial) ||
146
+ (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Refunded) ? ((0, jsx_runtime_1.jsx)(WarningRounded_1.default, { color: "warning" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Failed) ? ((0, jsx_runtime_1.jsx)(ErrorRounded_1.default, { color: "error" })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: title }), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, py: 1, disableDescription: true })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: primaryMessage }), secondaryMessage ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: secondaryMessage })) : null, (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsxs)(material_1.Button, { variant: "contained", fullWidth: true, onClick: handlePrimaryButton, children: [status === stores_1.RouteExecutionStatus.Idle ? t('button.ok') : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done)
145
147
  ? t('button.done')
146
148
  : null, status === stores_1.RouteExecutionStatus.Failed
147
149
  ? t('button.seeDetails')
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SwapPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const Delete_1 = require("@mui/icons-material/Delete");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_1 = require("react");
8
8
  const react_hook_form_1 = require("react-hook-form");
@@ -71,6 +71,6 @@ const SwapPage = () => {
71
71
  status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, { route: route, mt: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 2, display: "flex", children: [(0, jsx_runtime_1.jsx)(StartSwapButton_1.StartSwapButton, { text: getSwapButtonText(), onClick: handleSwapClick, currentRoute: route }), status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t('button.removeSwap'), placement: "bottom-end", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleRemoveRoute, sx: {
72
72
  minWidth: 48,
73
73
  marginLeft: 1,
74
- }, children: (0, jsx_runtime_1.jsx)(icons_material_1.Delete, {}) }) })) : null] })] })) : null, route && status ? ((0, jsx_runtime_1.jsx)(StatusBottomSheet_1.StatusBottomSheet, { status: status, route: route })) : null, route ? ((0, jsx_runtime_1.jsx)(TokenValueBottomSheet_1.TokenValueBottomSheet, { route: route, ref: tokenValueBottomSheetRef, onContinue: handleExecuteRoute })) : null, route ? ((0, jsx_runtime_1.jsx)(ExchangeRateBottomSheet_1.ExchangeRateBottomSheet, { ref: exchangeRateBottomSheetRef })) : null] }));
74
+ }, children: (0, jsx_runtime_1.jsx)(Delete_1.default, {}) }) })) : null] })] })) : null, route && status ? ((0, jsx_runtime_1.jsx)(StatusBottomSheet_1.StatusBottomSheet, { status: status, route: route })) : null, route ? ((0, jsx_runtime_1.jsx)(TokenValueBottomSheet_1.TokenValueBottomSheet, { route: route, ref: tokenValueBottomSheetRef, onContinue: handleExecuteRoute })) : null, route ? ((0, jsx_runtime_1.jsx)(ExchangeRateBottomSheet_1.ExchangeRateBottomSheet, { ref: exchangeRateBottomSheetRef })) : null] }));
75
75
  };
76
76
  exports.SwapPage = SwapPage;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getTokenValueLossThreshold = exports.TokenValueBottomSheet = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const icons_material_1 = require("@mui/icons-material");
5
+ const WarningRounded_1 = require("@mui/icons-material/WarningRounded");
6
6
  const material_1 = require("@mui/material");
7
7
  const big_js_1 = require("big.js");
8
8
  const react_1 = require("react");
@@ -21,7 +21,7 @@ const TokenValueBottomSheetContent = ({ route, onCancel, onContinue, }) => {
21
21
  const { t } = (0, react_i18next_1.useTranslation)();
22
22
  const ref = (0, react_1.useRef)();
23
23
  (0, hooks_1.useSetContentHeight)(ref);
24
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, ref: ref, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, { status: "warning", mb: 1, children: (0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('swap.warning.title.highValueLoss') })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: t('swap.warning.message.highValueLoss') }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.swapping') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.fromAmountUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.gasCost') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.gasCostUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.receiving') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.toAmountUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.valueLoss') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [(0, big_js_1.default)(route.toAmountUSD || 0)
24
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, ref: ref, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, { status: "warning", mb: 1, children: (0, jsx_runtime_1.jsx)(WarningRounded_1.default, { color: "warning" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('swap.warning.title.highValueLoss') })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: t('swap.warning.message.highValueLoss') }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.swapping') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.fromAmountUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.gasCost') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.gasCostUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.receiving') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 600, children: t('format.currency', { value: route.toAmountUSD }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.valueLoss') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [(0, big_js_1.default)(route.toAmountUSD || 0)
25
25
  .div((0, big_js_1.default)(route.fromAmountUSD || 0).plus((0, big_js_1.default)(route.gasCostUSD || 0)))
26
26
  .minus(1)
27
27
  .mul(100)