@lifi/widget 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/cjs/components/Header/NavigationHeader.js +2 -2
  2. package/cjs/components/Header/index.d.ts +0 -1
  3. package/cjs/components/Header/index.js +0 -1
  4. package/cjs/config/version.d.ts +1 -1
  5. package/cjs/config/version.js +1 -1
  6. package/cjs/i18n/en.json +2 -2
  7. package/cjs/i18n/th.json +61 -60
  8. package/cjs/i18n/vi.json +64 -63
  9. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +3 -3
  10. package/cjs/pages/RoutesPage/RoutesPage.js +3 -3
  11. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +3 -3
  12. package/cjs/pages/TransactionDetailsPage/ContactSupportButton.d.ts +5 -0
  13. package/cjs/pages/TransactionDetailsPage/ContactSupportButton.js +25 -0
  14. package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js +5 -4
  15. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +3 -3
  16. package/cjs/pages/TransactionPage/TransactionPage.js +3 -3
  17. package/cjs/stores/StoreProvider.js +2 -1
  18. package/cjs/stores/header/index.d.ts +1 -0
  19. package/cjs/stores/header/index.js +17 -0
  20. package/cjs/{components/Header → stores/header}/types.d.ts +4 -2
  21. package/cjs/stores/header/useHeaderStore.d.ts +8 -0
  22. package/cjs/stores/header/useHeaderStore.js +56 -0
  23. package/cjs/stores/index.d.ts +2 -1
  24. package/cjs/stores/index.js +2 -1
  25. package/cjs/types/events.d.ts +6 -1
  26. package/cjs/types/events.js +1 -0
  27. package/components/Header/NavigationHeader.js +2 -2
  28. package/components/Header/index.d.ts +0 -1
  29. package/components/Header/index.js +0 -1
  30. package/config/version.d.ts +1 -1
  31. package/config/version.js +1 -1
  32. package/i18n/en.json +2 -2
  33. package/i18n/th.json +61 -60
  34. package/i18n/vi.json +64 -63
  35. package/package.json +11 -11
  36. package/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +4 -4
  37. package/pages/RoutesPage/RoutesPage.js +4 -4
  38. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +4 -4
  39. package/pages/TransactionDetailsPage/ContactSupportButton.d.ts +5 -0
  40. package/pages/TransactionDetailsPage/ContactSupportButton.js +21 -0
  41. package/pages/TransactionDetailsPage/TransactionDetailsPage.js +6 -5
  42. package/pages/TransactionHistoryPage/TransactionHistoryPage.js +4 -4
  43. package/pages/TransactionPage/TransactionPage.js +4 -4
  44. package/stores/StoreProvider.js +2 -1
  45. package/stores/header/index.d.ts +1 -0
  46. package/stores/header/index.js +1 -0
  47. package/{components/Header → stores/header}/types.d.ts +4 -2
  48. package/stores/header/useHeaderStore.d.ts +8 -0
  49. package/stores/header/useHeaderStore.js +49 -0
  50. package/stores/index.d.ts +2 -1
  51. package/stores/index.js +2 -1
  52. package/tsconfig.cjs.tsbuildinfo +1 -1
  53. package/types/events.d.ts +6 -1
  54. package/types/events.js +1 -0
  55. package/cjs/components/Header/useHeaderStore.d.ts +0 -2
  56. package/cjs/components/Header/useHeaderStore.js +0 -28
  57. package/components/Header/useHeaderStore.d.ts +0 -2
  58. package/components/Header/useHeaderStore.js +0 -25
  59. /package/cjs/{components/Header → stores/header}/types.js +0 -0
  60. /package/{components/Header → stores/header}/types.js +0 -0
@@ -10,18 +10,18 @@ const react_i18next_1 = require("react-i18next");
10
10
  const react_router_dom_1 = require("react-router-dom");
11
11
  const hooks_1 = require("../../hooks");
12
12
  const providers_1 = require("../../providers");
13
+ const stores_1 = require("../../stores");
13
14
  const types_1 = require("../../types");
14
15
  const utils_1 = require("../../utils");
15
16
  const Header_style_1 = require("./Header.style");
16
17
  const NavigationTabs_1 = require("./NavigationTabs");
17
18
  const WalletHeader_1 = require("./WalletHeader");
18
- const useHeaderStore_1 = require("./useHeaderStore");
19
19
  const NavigationHeader = () => {
20
20
  const { t } = (0, react_i18next_1.useTranslation)();
21
21
  const { subvariant, hiddenUI } = (0, providers_1.useWidgetConfig)();
22
22
  const { navigate, navigateBack } = (0, hooks_1.useNavigateBack)();
23
23
  const { account } = (0, providers_1.useWallet)();
24
- const { element, title } = (0, useHeaderStore_1.useHeaderStore)();
24
+ const { element, title } = (0, stores_1.useHeaderStore)((state) => state);
25
25
  const { pathname } = (0, react_router_dom_1.useLocation)();
26
26
  const cleanedPathname = pathname.endsWith('/')
27
27
  ? pathname.slice(0, -1)
@@ -1,2 +1 @@
1
1
  export * from './Header';
2
- export * from './useHeaderStore';
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Header"), exports);
18
- __exportStar(require("./useHeaderStore"), exports);
@@ -1,2 +1,2 @@
1
1
  export declare const name = "@lifi/widget";
2
- export declare const version = "2.0.1";
2
+ export declare const version = "2.1.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = exports.name = void 0;
4
4
  exports.name = '@lifi/widget';
5
- exports.version = '2.0.1';
5
+ exports.version = '2.1.0';
package/cjs/i18n/en.json CHANGED
@@ -69,9 +69,9 @@
69
69
  "message": {
70
70
  "autoRefuel": "You're low on {{chainName}} gas. By continuing, you'll get enough gas to complete the transaction.",
71
71
  "emptyActiveTransactions": "Transactions in progress will appear here. Once completed, find them in transaction history.",
72
- "emptyTokenList": "We couldn't find tokens on {{chainName}} chain or you don't have any. Please try search again or choose another chain.",
72
+ "emptyTokenList": "We couldn't find tokens on {{chainName}} chain or you don't have any. Please search by contract address if your token doesn't appear or choose another chain.",
73
73
  "emptyTransactionHistory": "Transaction history is only stored locally and will be deleted if you clear your browser data.",
74
- "routeNotFound": "Try another token combination."
74
+ "routeNotFound": "Reasons for that could be: low liquidity, amount selected is too low, gas costs are too high or there are no routes for the selected combination."
75
75
  },
76
76
  "title": {
77
77
  "autoRefuel": "Get gas",
package/cjs/i18n/th.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
+ "language": {
3
+ "name": "ภาษาไทย",
4
+ "title": "ภาษา"
5
+ },
6
+ "format": {
7
+ "currency": "{{value, currency(currency: USD)}}",
8
+ "number": "{{value, number(maximumFractionDigits: 9)}}"
9
+ },
2
10
  "button": {
3
11
  "auto": "อัตโนมัติ",
12
+ "bridge": "บริดจ์",
4
13
  "buy": "ซื้อ",
5
14
  "buyNow": "ซื้อตอนนี้",
6
15
  "cancel": "ยกเลิก",
@@ -12,94 +21,74 @@
12
21
  "delete": "ลบ",
13
22
  "disconnect": "ยกเลิกการเชื่อมต่อ",
14
23
  "done": "เสร็จสิ้น",
24
+ "exchange": "แลกเปลี่ยน",
15
25
  "getGas": "รับแก็ส",
16
26
  "hide": "ซ่อน",
17
27
  "learnMore": "เรียนรู้เพิ่มเติม",
18
- "lifiSwap": "การแลกเปลี่ยนของ LI.FI",
28
+ "lifiCheckout": "Li.Fi. ตรวจสอบ",
29
+ "lifiExchange": "LI.FI Exchange",
19
30
  "light": "สว่าง",
20
31
  "max": "สูงสุด",
21
32
  "ok": "ตกลง",
22
- "okay": "ตกลง",
23
- "removeSwap": "ยกเลิกการแลกเปลี่ยน",
33
+ "removeTransaction": "นำรายการออก",
24
34
  "reset": "ล้างข้อมูล",
25
35
  "resetSettings": "รีเซ็ตการตั้งค่า",
26
- "restartSwap": "เริ่มต้นการแลกเปลี่ยนใหม่",
27
- "reviewGasSwap": "ตรวจสอบแก๊สในการแลกเปลี่ยน",
36
+ "reviewBridge": "ตรวจสอบบริดจ์",
28
37
  "reviewPurchase": "ตรวจสอบการสั่งซื้อ",
29
38
  "reviewSwap": "ตรวจสอบการแลกเปลี่ยน",
30
39
  "seeDetails": "ดูรายละเอียด",
31
40
  "showAll": "แสดงทั้งหมด",
32
- "startGasSwap": "เริ่มต้นแก๊สในการแลกเปลี่ยน",
33
- "startSwap": "เริ่มต้นการแลกเปลี่ยน",
41
+ "startBridging": "เริ่มต้นการบริดจ์",
42
+ "startSwapping": "เริ่มต้นการแลกเปลี่ยน",
34
43
  "swap": "การแลกเปลี่ยน",
35
44
  "tryAgain": "ลองใหม่",
36
45
  "viewCoverage": "ดูความคุ้มครอง",
37
46
  "viewOnExplorer": "ดูในการสำรวจ"
38
47
  },
39
- "format": {
40
- "currency": "{{value, currency(currency: USD)}}",
41
- "number": "{{value, number(maximumFractionDigits: 9)}}"
42
- },
43
48
  "header": {
44
- "activeSwaps": "เปิดการใช้งาน การแลกเปลี่ยน",
49
+ "activeTransactions": "ธุรกรรมมีผล",
45
50
  "bridge": "บริดจ์",
46
51
  "checkout": "เช็คเอาท์",
52
+ "exchange": "แลกเปลี่ยน",
47
53
  "from": "แลกเปลี่ยนจาก",
48
54
  "gas": "แก็ส",
49
- "gasSwap": "แก็สในการแลกเปลี่ยน",
50
55
  "payWith": "ชำระด้วย",
51
56
  "purchase": "ซื้อ",
52
57
  "purchaseDetails": "รายละเอียดการซื้อ",
53
- "routes": "คุณได้รับ",
54
58
  "selectChain": "เลือกเชน",
55
59
  "selectWallet": "เลือกกระเป๋าของคุณ",
56
60
  "settings": "ตั้งค่า",
57
61
  "swap": "แลกเปลี่ยน",
58
- "swapDetails": "รายละเอียดการแลกเปลี่ยน",
59
- "swapHistory": "ประวัติการแลกเปลี่ยน",
60
62
  "to": "แลกเปลี่ยนเป็น",
61
- "walletConnected": "กระเป๋าถูกเชื่อมต่อแล้ว"
62
- },
63
- "language": {
64
- "name": "ภาษาไทย",
65
- "title": "ภาษา"
66
- },
67
- "settings": {
68
- "enabledBridges": "เปิดการใช้งานบริดจ์",
69
- "enabledExchanges": "เปิดการใช้งาน การแลกเปลี่ยน",
70
- "gasPrice": {
71
- "fast": "รวดเร็ว",
72
- "normal": "ปกติ",
73
- "slow": "ช้า",
74
- "title": "ค่าแก็ส"
75
- },
76
- "routePriority": "ลำดับสำคัญของเส้นทาง",
77
- "showDestinationWallet": "แสดงกระเป๋าปลายทาง",
78
- "slippage": "ความคลาดเคลื่อน"
63
+ "transactionDetails": "รายละเอียดของธุรกรรม",
64
+ "transactionHistory": "ประวัติการซื้อขาย",
65
+ "walletConnected": "กระเป๋าถูกเชื่อมต่อแล้ว",
66
+ "youGet": "คุณได้รับ"
79
67
  },
80
68
  "info": {
81
69
  "message": {
82
70
  "autoRefuel": "คุณใช้แก็ส {{chainName}} เหลือน้อย เมื่อดำเนินการต่อ คุณจะได้รับแก็สเพียงพอสำหรับการแลกเปลี่ยนให้เสร็จสมบูรณ์",
83
- "emptyActiveSwaps": "การแลกเปลี่ยนที่กำลังดำเนินการจะปรากฏที่นี่. เมื่อเสร็จสิ้น, จะพบประวัติการแลกเปลี่ยน.",
84
- "emptySwapHistory": "ประวัติการแลกเปลี่ยนจะถูกเก็บไว้ในเครื่องเท่านั้นและจะถูกลบหากคุณล้างข้อมูลเบราว์เซอร์ของคุณ.",
71
+ "emptyActiveTransactions": "การแลกเปลี่ยนที่กำลังดำเนินการจะปรากฏที่นี่. เมื่อเสร็จสิ้น, จะพบประวัติการแลกเปลี่ยน.",
85
72
  "emptyTokenList": "เราไม่พบโทเค็นใน {{chainName}} เชนหรือคุณไม่มีโทเค็น. โปรดลองอีกครั้งหรือเลือกเชนอื่น.",
73
+ "emptyTransactionHistory": "ประวัติการแลกเปลี่ยนจะถูกเก็บไว้ในเครื่องเท่านั้นและจะถูกลบหากคุณล้างข้อมูลเบราว์เซอร์ของคุณ.",
86
74
  "routeNotFound": "ลองจับคู่แลกเปลี่ยนโทเค็นใหม่."
87
75
  },
88
76
  "title": {
89
77
  "autoRefuel": "รับแก็ส",
90
- "emptyActiveSwaps": "ไม่พบการแลกเปลี่ยนที่ใช้งานอยู่.",
91
- "emptySwapHistory": "ไม่พบการแลกเปลี่ยนล่าสุด.",
78
+ "emptyActiveTransactions": "ไม่มีธุรกรรมที่มีผล",
79
+ "emptyTransactionHistory": "ไม่มีธุรกรรมล่าสุด",
92
80
  "routeNotFound": "ไม่พบเส้นทาง"
93
81
  }
94
82
  },
95
83
  "success": {
96
84
  "message": {
97
- "swapPartiallySuccessful": "เราได้พยายามดำเนินการแลกเปลี่ยนให้เสร็จสมบูรณ์แต่ {{tool}} ขาดสภาพคล่องสำหรับโทเค็น {{tokenSymbol}}",
98
- "purchaseSuccessful": "คุณมี {{assetName}} ใน{{walletAddress}} กระเป๋า บน{{chainName}} เครือข่าย",
99
- "swapSuccessful": "ตอนนี้มี {{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}} ใน {{walletAddress}} กระเป๋าบน {{chainName}} เชน."
85
+ "exchangePartiallySuccessful": "เราได้พยายามดำเนินการแลกเปลี่ยนให้เสร็จสมบูรณ์แต่ {{tool}} ขาดสภาพคล่องสำหรับโทเค็น {{tokenSymbol}}",
86
+ "exchangeSuccessful": "ตอนนี้มี {{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}} ใน {{walletAddress}} กระเป๋าบน {{chainName}} เชน.",
87
+ "purchaseSuccessful": "คุณมี {{assetName}} ใน{{walletAddress}} กระเป๋า บน{{chainName}} เครือข่าย"
100
88
  },
101
89
  "title": {
102
- "gasSwapSuccessful": "แลกเปลี่ยนแก็สสำเร็จ",
90
+ "bridgePartiallySuccessful": "แลกเปลี่ยนสำเร็จบางส่วน",
91
+ "bridgeSuccessful": "บริดจ์สำเร็จ",
103
92
  "purchaseSuccessful": "การซื้อเสร็จสมบูรณ์",
104
93
  "refundIssued": "คืนเงินแล้ว",
105
94
  "swapPartiallySuccessful": "แลกเปลี่ยนสำเร็จบางส่วน",
@@ -108,8 +97,8 @@
108
97
  },
109
98
  "warning": {
110
99
  "message": {
111
- "deleteActiveSwaps": "การแลกเปลี่ยนที่ใช้งานอยู่จะถูกจัดเก็บไว้ในเครื่องเท่านั้นและไม่สามารถกู้คืนได้หากคุณลบออก.",
112
- "deleteSwapHistory": "ประวัติการแลกเปลี่ยนจะถูกจัดเก็บไว้ในเครื่องเท่านั้นและไม่สามารถกู้คืนได้หากคุณลบออก",
100
+ "deleteActiveTransactions": "การแลกเปลี่ยนที่ใช้งานอยู่จะถูกจัดเก็บไว้ในเครื่องเท่านั้นและไม่สามารถกู้คืนได้หากคุณลบออก.",
101
+ "deleteTransactionHistory": "ประวัติการแลกเปลี่ยนจะถูกจัดเก็บไว้ในเครื่องเท่านั้นและไม่สามารถกู้คืนได้หากคุณลบออก",
113
102
  "highValueLoss": "มูลค่าของโทเค็นที่ได้รับนั้นต่ำกว่าโทเค็นที่แลกเปลี่ยนและต้นทุนการทำธุรกรรมอย่างมาก.",
114
103
  "insufficientFunds": "คุณมีเงินไม่เพียงพอที่จะดำเนินการแลกเปลี่ยน.",
115
104
  "insufficientGas": "คุณมีแก๊สไม่เพียงพอที่จะแลกเปลี่ยนให้เสร็จสมบูรณ์ คุณต้องเพิ่มอย่างน้อย:",
@@ -117,9 +106,9 @@
117
106
  "resetSettings": "การดำเนินการนี้จะรีเซ็ตลำดับความสำคัญของเส้นทาง การคลาดเลื่อน ค่าแก็ส บริดจ์ที่เปิดใช้งานและการแลกเปลี่ยน"
118
107
  },
119
108
  "title": {
120
- "deleteActiveSwaps": "ลบการแลกเปลี่ยนที่เกิดขึ้นอยู่ทั้งหมด?",
121
- "deleteSwap": "ลบการแลกเปลี่ยนในครั้งนี้?",
122
- "deleteSwapHistory": "ลบประวัติการแลกเปลี่ยน?",
109
+ "deleteActiveTransactions": "ลบ​รายการธุรกรรม​ทั้งหมด?",
110
+ "deleteTransaction": "ต้องการลบธุรกรรมนี้?",
111
+ "deleteTransactionHistory": "ต้องการลบประวัติการทำธุรกรรม?",
123
112
  "highValueLoss": "สูญเสียมูลค่าสูง",
124
113
  "insufficientGas": "ค่าแก็สไม่พอ",
125
114
  "rateChanged": "อัตราการแลกเปลี่ยนถูกเปลี่ยน",
@@ -140,7 +129,6 @@
140
129
  "allowanceRequired": "การอนุญาตไม่เพียงพอ",
141
130
  "balanceIsTooLow": "ยอดคงเหลือต่ำเกินไป",
142
131
  "chainSwitch": "จำเป็นต้องเปลี่ยนเชน",
143
- "failed": "การแลกเปลี่ยนล้มเหลว",
144
132
  "gasLimitIsTooLow": "แก๊สคงเหลือต่ำเกินไป",
145
133
  "insufficientFunds": "ยอดคงเหลือไม่เพียงพอ",
146
134
  "slippageNotMet": "ความคลาดเคลื่อนของราคาไม่เป็นไปตามเงื่อนไข.",
@@ -155,6 +143,19 @@
155
143
  "walletEnsAddressInvalid": "ที่อยู่กระเป๋าเงินไม่ถูกต้องหรือเครือข่ายไม่รองรับ ENS."
156
144
  }
157
145
  },
146
+ "tooltip": {
147
+ "additionalProviderFee": "บริดจ์เพิ่มเติม DEX และค่าบริการ",
148
+ "estimatedNetworkFee": "ค่าธรรรมเนียมโดยประมาณของเครือข่าย",
149
+ "estimatedTime": "เวลาดำเนินการแลกเปลี่ยนโดยประมาณเป็นนาที.",
150
+ "notFound": {
151
+ "text": "เราไม่พบหน้านี้.",
152
+ "title": "404"
153
+ },
154
+ "numberOfSteps": "ขั้นตอนการแลกเปลี่ยนหลายขั้นตอน แต่ละขั้นตอนสามารถมี 1-2 รายการที่ต้องใช้ลายเซ็น.",
155
+ "progressToNextUpdate": "ข้อมูลที่แสดงจะรีเฟรชอัตโนมัติหลังจาก {{value}} วินาที คลิกที่นี่เพื่ออัปเดตด้วยตนเอง",
156
+ "recommended": "เส้นทางที่ถูกมียอดคงเหลือที่เพียงพอและง่ายต่องการใช้งาน",
157
+ "settingsModified": "การตั้งค่า (แก้ไข)"
158
+ },
158
159
  "main": {
159
160
  "crossStepDetails": "บริดจ์จาก{{from}} to {{to}} โดย {{tool}}",
160
161
  "currentAmount": "จำนวนเงินปัจจุบัน",
@@ -211,6 +212,7 @@
211
212
  "selectToken": "เลือกโทเคน",
212
213
  "sendToAddress": "ส่งไปยัง {{address}}",
213
214
  "sendToWallet": "ส่งไปยังกระเป๋าเงินอื่น",
215
+ "sending": "กำลังส่ง",
214
216
  "sentToAddress": "ส่งไปยัง {{address}}",
215
217
  "stepBridge": "บริดจ์",
216
218
  "stepBridgeAndBuy": "บริดจ์และซื้อ",
@@ -220,7 +222,6 @@
220
222
  "stepSwapAndBuy": "แลกเปลี่ยน และ ซื้อ",
221
223
  "supportId": "หมายเลขที่สนับสนุน",
222
224
  "swapStepDetails": "แลกเปลี่ยนบน {{chain}} ผ่าน {{tool}}",
223
- "swapping": "การแลกเปลี่ยน",
224
225
  "tags": {
225
226
  "cheapest": "ราคาถูก",
226
227
  "fastest": "รวดเร็ว",
@@ -243,18 +244,18 @@
243
244
  "insured": "คุณได้ประกัน<0>{{amount, number(maximumFractionDigits: 9)}}{{tokenSymbol}}</0> ในการขนส่ง",
244
245
  "slippageError": "เกิดข้อผิดพลาดในการคลาดเคลื่อนของโทเค็นที่ได้รับ"
245
246
  },
246
- "tooltip": {
247
- "additionalProviderFee": "บริดจ์เพิ่มเติม DEX และค่าบริการ",
248
- "estimatedNetworkFee": "ค่าธรรรมเนียมโดยประมาณของเครือข่าย",
249
- "estimatedTime": "เวลาดำเนินการแลกเปลี่ยนโดยประมาณเป็นนาที.",
250
- "notFound": {
251
- "text": "เราไม่พบหน้านี้.",
252
- "title": "404"
247
+ "settings": {
248
+ "enabledBridges": "เปิดการใช้งานบริดจ์",
249
+ "enabledExchanges": "เปิดการใช้งาน การแลกเปลี่ยน",
250
+ "gasPrice": {
251
+ "fast": "รวดเร็ว",
252
+ "normal": "ปกติ",
253
+ "slow": "ช้า",
254
+ "title": "ค่าแก็ส"
253
255
  },
254
- "numberOfSteps": "ขั้นตอนการแลกเปลี่ยนหลายขั้นตอน แต่ละขั้นตอนสามารถมี 1-2 รายการที่ต้องใช้ลายเซ็น.",
255
- "progressToNextUpdate": "ข้อมูลที่แสดงจะรีเฟรชอัตโนมัติหลังจาก {{value}} วินาที คลิกที่นี่เพื่ออัปเดตด้วยตนเอง",
256
- "recommended": "เส้นทางที่ถูกมียอดคงเหลือที่เพียงพอและง่ายต่องการใช้งาน",
257
- "settingsModified": "การตั้งค่า (แก้ไข)"
256
+ "routePriority": "ลำดับสำคัญของเส้นทาง",
257
+ "showDestinationWallet": "แสดงกระเป๋าปลายทาง",
258
+ "slippage": "ความคลาดเคลื่อน"
258
259
  },
259
260
  "wallet": {
260
261
  "extensionNotFound": "โปรดตรวจสอบว่ามีเพียงส่วนขยายของเบราว์เซอร์ {{name}} เท่านั้นที่ใช้งานได้ก่อนที่จะเลือกกระเป๋าเงินนี้."
package/cjs/i18n/vi.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
+ "language": {
3
+ "name": "Tiếng Việt",
4
+ "title": "Ngôn ngữ"
5
+ },
6
+ "format": {
7
+ "currency": "{{value, currency(currency: USD)}}",
8
+ "number": "{{value, number(maximumFractionDigits: 9)}}"
9
+ },
2
10
  "button": {
3
11
  "auto": "Tự động",
12
+ "bridge": "Cầu",
4
13
  "buy": "Mua",
5
14
  "buyNow": "Mua ngay bây giờ",
6
15
  "cancel": "Huỷ bỏ",
@@ -12,94 +21,74 @@
12
21
  "delete": "Xóa",
13
22
  "disconnect": "Ngắt kết nối",
14
23
  "done": "Hoàn thành",
24
+ "exchange": "Hoán đổi",
15
25
  "getGas": "Thiết lập gas",
16
26
  "hide": "Ẩn",
17
27
  "learnMore": "Xem thêm",
18
- "lifiSwap": "LI.FI Swap",
28
+ "lifiCheckout": "LI.FI Checkout",
29
+ "lifiExchange": "LI.FI Exchange",
19
30
  "light": "Sáng",
20
31
  "max": "Tối đa",
21
32
  "ok": "Ok",
22
- "okay": "Okay",
23
- "removeSwap": "Xoá",
33
+ "removeTransaction": "Xoá giao dịch",
24
34
  "reset": "Đặt lại",
25
35
  "resetSettings": "Đặt lại cài đặt",
26
- "restartSwap": "Thiết lập lại",
27
- "reviewGasSwap": "Xem lại gas swap",
36
+ "reviewBridge": "Xem xét cầu",
28
37
  "reviewPurchase": "Đánh giá thanh toán",
29
38
  "reviewSwap": "Xem lại Swap",
30
39
  "seeDetails": "Xem chi tiết",
31
40
  "showAll": "Hiển thị tất cả",
32
- "startGasSwap": "Start gas swap",
33
- "startSwap": "Bắt đầu Swap",
41
+ "startBridging": "Bắt đầu đi cầu",
42
+ "startSwapping": "Bắt đầu Swap",
34
43
  "swap": "Swap",
35
44
  "tryAgain": "Thử lại",
36
45
  "viewCoverage": "Xem phạm vi bảo hiểm",
37
46
  "viewOnExplorer": "Xem tại Explorer"
38
47
  },
39
- "format": {
40
- "currency": "{{value, currency(currency: USD)}}",
41
- "number": "{{value, number(maximumFractionDigits: 9)}}"
42
- },
43
48
  "header": {
44
- "activeSwaps": "Active swaps",
45
- "bridge": "Bridge",
49
+ "activeTransactions": "Các giao dịch hiện tại",
50
+ "bridge": "Cầu",
46
51
  "checkout": "Thanh toán",
52
+ "exchange": "Hoán đổi",
47
53
  "from": "Swap từ",
48
54
  "gas": "Gas",
49
- "gasSwap": "Gas swap",
50
55
  "payWith": "Thanh toán bằng",
51
56
  "purchase": "Thanh toán",
52
57
  "purchaseDetails": "Thông tin chi tiết",
53
- "routes": "Kết quả",
54
58
  "selectChain": "Chọn chain",
55
59
  "selectWallet": "Chọn ví",
56
60
  "settings": "Cài đặt",
57
61
  "swap": "Swap",
58
- "swapDetails": "Thông tin swap",
59
- "swapHistory": "Lịch sử Swap",
60
62
  "to": "Swap từ",
61
- "walletConnected": "Wallet connected"
62
- },
63
- "language": {
64
- "name": "Tiếng Việt",
65
- "title": "Ngôn ngữ"
66
- },
67
- "settings": {
68
- "enabledBridges": "Số lượng cầu khả dụng",
69
- "enabledExchanges": "Số lượng sàn giao dịch khả dụng",
70
- "gasPrice": {
71
- "fast": "Nhanh",
72
- "normal": "Bình thường",
73
- "slow": "Chậm",
74
- "title": "Giá gas"
75
- },
76
- "routePriority": "Tuyền đường ưu tiên",
77
- "showDestinationWallet": "Hiển thị địa chỉ ví nhận",
78
- "slippage": "Trượt giá"
63
+ "transactionDetails": "Chi tiết giao dịch",
64
+ "transactionHistory": "Lịch sử giao dịch",
65
+ "walletConnected": "Wallet connected",
66
+ "youGet": "Bạn nhận"
79
67
  },
80
68
  "info": {
81
69
  "message": {
82
70
  "autoRefuel": "Gas trên {{chainName}} chain của bạn đang thấp. Để tiếp tục, bạn nên có thêm gas để hoàn thành việc swap.",
83
- "emptyActiveSwaps": "Các lệnh swap đang xử lý sẽ được hiện ở đây. Khi nào lệnh hoàn tất, bạn có thể kiểm tra lại tại mục lịch sử swap.",
84
- "emptySwapHistory": "Lịch sử Swap chỉ được lưu trữ cục bộ và sẽ bị xóa nếu bạn xóa dữ liệu trình duyệt của mình.",
71
+ "emptyActiveTransactions": "Các lệnh swap đang xử lý sẽ được hiện ở đây. Khi nào lệnh hoàn tất, bạn có thể kiểm tra lại tại mục lịch sử swap.",
85
72
  "emptyTokenList": "Chúng tôi không thể tìm được Token ở {{chainName}} chain hoặc số dư của bạn không có. Vui lòng thử tìm kiếm lại hoặc chọn một chain khác.",
73
+ "emptyTransactionHistory": "Lịch sử Swap chỉ được lưu trữ cục bộ và sẽ bị xóa nếu bạn xóa dữ liệu trình duyệt của mình.",
86
74
  "routeNotFound": "Vui lòng chọn lại cặp token khác."
87
75
  },
88
76
  "title": {
89
77
  "autoRefuel": "Thiết lập Gas",
90
- "emptyActiveSwaps": "Swap hiện không hoạt động",
91
- "emptySwapHistory": "Khônglệnh Swap gần đây",
78
+ "emptyActiveTransactions": "Không thông tin giao dịch hiện tại",
79
+ "emptyTransactionHistory": "Chưagiao dịch",
92
80
  "routeNotFound": "Không có đường đi"
93
81
  }
94
82
  },
95
83
  "success": {
96
84
  "message": {
97
- "swapPartiallySuccessful": "Chúng tôi đã cố gắng hoàn thành việc hoán đổi, nhưng {{tool}} đã cạn thanh khoản cho token {{tokenSymbol}}.",
98
- "purchaseSuccessful": "Hiện tại bạn đang nắm giữ {{assetName}} tại ví {{walletAddress}} trên chain {{chainName}}.",
99
- "swapSuccessful": "Hiện tại {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} trong ví {{walletAddress}} tại {{chainName}} chain."
85
+ "exchangePartiallySuccessful": "Chúng tôi đã cố gắng hoàn thành việc hoán đổi, nhưng {{tool}} đã cạn thanh khoản cho token {{tokenSymbol}}.",
86
+ "exchangeSuccessful": "Hiện tại {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} trong ví {{walletAddress}} tại {{chainName}} chain.",
87
+ "purchaseSuccessful": "Hiện tại bạn đang nắm giữ {{assetName}} tại ví {{walletAddress}} trên chain {{chainName}}."
100
88
  },
101
89
  "title": {
102
- "gasSwapSuccessful": "Gas Swap thành công",
90
+ "bridgePartiallySuccessful": "Swap thành công một phần",
91
+ "bridgeSuccessful": "Bridge thành công",
103
92
  "purchaseSuccessful": "Mua thành công",
104
93
  "refundIssued": "Đã Refund",
105
94
  "swapPartiallySuccessful": "Swap thành công một phần",
@@ -108,8 +97,8 @@
108
97
  },
109
98
  "warning": {
110
99
  "message": {
111
- "deleteActiveSwaps": "Các giao dịch đang hoạt động chỉ được lưu trữ cục bộ và không thể phục hồi nếu bạn xóa chúng.",
112
- "deleteSwapHistory": "Lịch sử Swap chỉ lưu trữ cục bộ và không thể phục hồi khi bạn xoá chúng.",
100
+ "deleteActiveTransactions": "Các giao dịch đang hoạt động chỉ được lưu trữ cục bộ và không thể phục hồi nếu bạn xóa chúng.",
101
+ "deleteTransactionHistory": "Lịch sử Swap chỉ lưu trữ cục bộ và không thể phục hồi khi bạn xoá chúng.",
113
102
  "highValueLoss": "Giá trị của token nhận được đang thấp hơn rất nhiều so với token được swap và chi phí giao dịch.",
114
103
  "insufficientFunds": "Bạn không có đủ tiền để thực hiện tác vụ này.",
115
104
  "insufficientGas": "Bạn không đủ gas để thực hiện swap. Bạn cần thêm ít nhất:",
@@ -117,9 +106,9 @@
117
106
  "resetSettings": "Thao tác này sẽ đặt lại mức độ ưu tiên của tuyến đường, độ trượt giá, giá gas, bridge và sàn giao dịch."
118
107
  },
119
108
  "title": {
120
- "deleteActiveSwaps": "Xoá tất cả các lệnh swap đang hoạt động?",
121
- "deleteSwap": "Xoá lệnh swap?",
122
- "deleteSwapHistory": "Xoá lịch sử Swap?",
109
+ "deleteActiveTransactions": "Xóa tất cả giao dịch đang thực hiện?",
110
+ "deleteTransaction": "Xóa giao dịch này?",
111
+ "deleteTransactionHistory": "Xoá lịch sử giao dịch?",
123
112
  "highValueLoss": "Tổn thất lớn",
124
113
  "insufficientGas": "Không đủ gas",
125
114
  "rateChanged": "Tỉ giá đã thay đổi",
@@ -140,7 +129,6 @@
140
129
  "allowanceRequired": "Sự cho phép không đủ",
141
130
  "balanceIsTooLow": "Số dư quá thấp",
142
131
  "chainSwitch": "Yêu cầu đổi chain",
143
- "failed": "Việc Swap thất bại",
144
132
  "gasLimitIsTooLow": "Giới hạn gas quá thấp",
145
133
  "insufficientFunds": "Không đủ tài sản",
146
134
  "slippageNotMet": "Điều kiện trượt giá không được đáp ứng",
@@ -155,6 +143,19 @@
155
143
  "walletEnsAddressInvalid": "Địa chỉ ví không hợp lệ hoặc mạng lưới không hỗ trợ ENS."
156
144
  }
157
145
  },
146
+ "tooltip": {
147
+ "additionalProviderFee": "Cầu bổ sung, DEX và phí dịch vụ.",
148
+ "estimatedNetworkFee": "Phí mạng ước tính.",
149
+ "estimatedTime": "Thời gian thực hiện lệnh swap (phút).",
150
+ "notFound": {
151
+ "text": "Chúng tôi không thể tìm thấy trang này.",
152
+ "title": "404"
153
+ },
154
+ "numberOfSteps": "Một số bước swap. Mỗi bước có thể chứa 1-2 giao dịch yêu cầu chữ ký.",
155
+ "progressToNextUpdate": "Thông tin hiển thị sẽ tự động làm mới sau {{value}} giây. Bấm vào đây để cập nhật thủ công.",
156
+ "recommended": "Một tuyến đường giá rẻ cân bằng giữa sự phức tạp và dễ sử dụng.",
157
+ "settingsModified": "Thiết lập (Đã điều chỉnh)"
158
+ },
158
159
  "main": {
159
160
  "crossStepDetails": "Chuyển từ {{from}} đến {{to}} thông qua {{tool}}",
160
161
  "currentAmount": "Số lượng hiện tại",
@@ -211,16 +212,16 @@
211
212
  "selectToken": "Chọn Token",
212
213
  "sendToAddress": "Gửi đến {{address}}",
213
214
  "sendToWallet": "Gửi đến địa chỉ khác",
215
+ "sending": "Đang gửi",
214
216
  "sentToAddress": "Gửi đến {{address}}",
215
- "stepBridge": "Bridge",
217
+ "stepBridge": "Cầu",
216
218
  "stepBridgeAndBuy": "Chuyển và mua",
217
219
  "stepDetails": "{{tool}} thông qua LI.FI",
218
220
  "stepSwap": "Swap",
219
221
  "stepSwapAndBridge": "Swap và Bridge",
220
222
  "stepSwapAndBuy": "Hoán đổi và mua",
221
- "supportId": "Support ID",
223
+ "supportId": " ID yêu cầu hỗ trợ",
222
224
  "swapStepDetails": "Swap tại {{chain}} thông qua {{tool}}",
223
- "swapping": "Đang Swap",
224
225
  "tags": {
225
226
  "cheapest": "Rẻ",
226
227
  "fastest": "Nhanh",
@@ -243,18 +244,18 @@
243
244
  "insured": "Bạn đã bảo hiểm <0>{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}}</0> trong quá trình vận chuyển:",
244
245
  "slippageError": "Lỗi trượt giá đối với token nhận được"
245
246
  },
246
- "tooltip": {
247
- "additionalProviderFee": "Cầu bổ sung, DEX và phí dịch vụ.",
248
- "estimatedNetworkFee": "Phí mạng ước tính.",
249
- "estimatedTime": "Thời gian thực hiện lệnh swap (phút).",
250
- "notFound": {
251
- "text": "Chúng tôi không thể tìm thấy trang này.",
252
- "title": "404"
247
+ "settings": {
248
+ "enabledBridges": "Số lượng cầu khả dụng",
249
+ "enabledExchanges": "Số lượng sàn giao dịch khả dụng",
250
+ "gasPrice": {
251
+ "fast": "Nhanh",
252
+ "normal": "Bình thường",
253
+ "slow": "Chậm",
254
+ "title": "Giá gas"
253
255
  },
254
- "numberOfSteps": "Một số bước swap. Mỗi bước có thể chứa 1-2 giao dịch yêu cầu chữ ký.",
255
- "progressToNextUpdate": "Thông tin hiển thị sẽ tự động làm mới sau {{value}} giây. Bấm vào đây để cập nhật thủ công.",
256
- "recommended": "Một tuyến đường giá rẻ cân bằng giữa sự phức tạp và dễ sử dụng.",
257
- "settingsModified": "Thiết lập (Đã điều chỉnh)"
256
+ "routePriority": "Tuyền đường ưu tiên",
257
+ "showDestinationWallet": "Hiển thị địa chỉ nhận",
258
+ "slippage": "Trượt giá"
258
259
  },
259
260
  "wallet": {
260
261
  "extensionNotFound": "Chắc chắn rằng tiện ích trên trình duyệt {{name}} đã được kích hoạt tước khi chọn ví này."
@@ -8,7 +8,6 @@ const react_1 = require("react");
8
8
  const react_i18next_1 = require("react-i18next");
9
9
  const ActiveTransactions_1 = require("../../components/ActiveTransactions");
10
10
  const Dialog_1 = require("../../components/Dialog");
11
- const Header_1 = require("../../components/Header");
12
11
  const providers_1 = require("../../providers");
13
12
  const stores_1 = require("../../stores");
14
13
  const ActiveTransactionsEmpty_1 = require("./ActiveTransactionsEmpty");
@@ -17,15 +16,16 @@ const ActiveTransactionsPage = () => {
17
16
  const { account } = (0, providers_1.useWallet)();
18
17
  const executingRoutes = (0, stores_1.useExecutingRoutesIds)(account.address);
19
18
  const deleteRoutes = (0, stores_1.useRouteExecutionStore)((store) => store.deleteRoutes);
19
+ const headerStoreContext = (0, stores_1.useHeaderStoreContext)();
20
20
  const [open, setOpen] = (0, react_1.useState)(false);
21
21
  const toggleDialog = (0, react_1.useCallback)(() => {
22
22
  setOpen((open) => !open);
23
23
  }, []);
24
24
  (0, react_1.useEffect)(() => {
25
25
  if (executingRoutes.length) {
26
- return Header_1.useHeaderStore.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, {}) }));
26
+ return headerStoreContext.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, {}) }));
27
27
  }
28
- }, [executingRoutes.length, toggleDialog]);
28
+ }, [executingRoutes.length, headerStoreContext, toggleDialog]);
29
29
  if (!executingRoutes.length) {
30
30
  return (0, jsx_runtime_1.jsx)(ActiveTransactionsEmpty_1.ActiveTransactionsEmpty, {});
31
31
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RoutesPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const Header_1 = require("../../components/Header");
7
6
  const ProgressToNextUpdate_1 = require("../../components/ProgressToNextUpdate");
8
7
  const RouteCard_1 = require("../../components/RouteCard");
9
8
  const hooks_1 = require("../../hooks");
@@ -14,6 +13,7 @@ const RoutesPage = () => {
14
13
  const { navigateBack, navigate } = (0, hooks_1.useNavigateBack)();
15
14
  const { routes, isLoading, isFetching, dataUpdatedAt, refetchTime, refetch } = (0, hooks_1.useRoutes)();
16
15
  const setExecutableRoute = (0, stores_1.useSetExecutableRoute)();
16
+ const headerStoreContext = (0, stores_1.useHeaderStoreContext)();
17
17
  const handleRouteClick = (route) => {
18
18
  setExecutableRoute(route);
19
19
  navigate(utils_1.navigationRoutes.transactionExecution, {
@@ -28,10 +28,10 @@ const RoutesPage = () => {
28
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
29
29
  }, []);
30
30
  (0, react_1.useEffect)(() => {
31
- return Header_1.useHeaderStore
31
+ return headerStoreContext
32
32
  .getState()
33
33
  .setAction((0, jsx_runtime_1.jsx)(ProgressToNextUpdate_1.ProgressToNextUpdate, { updatedAt: dataUpdatedAt || new Date().getTime(), timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: { marginRight: -1 }, size: "medium", edge: "end" }));
34
- }, [dataUpdatedAt, isFetching, refetch, refetchTime]);
34
+ }, [dataUpdatedAt, headerStoreContext, isFetching, refetch, refetchTime]);
35
35
  const routeNotFound = !routes?.length && !isLoading && !isFetching;
36
36
  return ((0, jsx_runtime_1.jsx)(RoutesPage_style_1.Stack, { direction: "column", spacing: 2, flex: 1, children: routeNotFound ? ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteNotFoundCard, {})) : isLoading ? (Array.from({ length: 3 }).map((_, index) => ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteCardSkeleton, {}, index)))) : (routes?.map((route, index) => ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteCard, { route: route, onClick: () => handleRouteClick(route), active: index === 0, expanded: routes?.length <= 2 }, route.id)))) }));
37
37
  };
@@ -7,7 +7,6 @@ const CheckBoxOutlineBlankOutlined_1 = require("@mui/icons-material/CheckBoxOutl
7
7
  const CheckBoxOutlined_1 = require("@mui/icons-material/CheckBoxOutlined");
8
8
  const IndeterminateCheckBoxOutlined_1 = require("@mui/icons-material/IndeterminateCheckBoxOutlined");
9
9
  const material_1 = require("@mui/material");
10
- const Header_1 = require("../../components/Header");
11
10
  const react_1 = require("react");
12
11
  const shallow_1 = require("zustand/shallow");
13
12
  const ListItemText_1 = require("../../components/ListItemText");
@@ -18,6 +17,7 @@ const SelectEnabledToolsPage = ({ type }) => {
18
17
  const typeKey = type.toLowerCase();
19
18
  const { tools } = (0, hooks_1.useTools)();
20
19
  const [enabledTools, setTools] = (0, stores_1.useSettingsStore)((state) => [state[`enabled${type}`], state.setTools], shallow_1.shallow);
20
+ const headerStoreContext = (0, stores_1.useHeaderStoreContext)();
21
21
  const handleClick = (key) => {
22
22
  if (!tools) {
23
23
  return;
@@ -44,8 +44,8 @@ const SelectEnabledToolsPage = ({ type }) => {
44
44
  setTools(type, toolKeys, toolKeys);
45
45
  }
46
46
  };
47
- return Header_1.useHeaderStore.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, {})) }));
48
- }, [enabledTools.length, setTools, tools, type, typeKey]);
47
+ return headerStoreContext.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, {})) }));
48
+ }, [enabledTools.length, headerStoreContext, setTools, tools, type, typeKey]);
49
49
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
50
50
  paddingLeft: 1.5,
51
51
  paddingRight: 1.5,