rujira.ui 1.0.18 → 1.0.19

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 (120) hide show
  1. package/lib/cjs/components/bridges/DepositModal.js +18 -1
  2. package/lib/cjs/components/footer/Footer.js +21 -27
  3. package/lib/cjs/components/header/Accounts.js +29 -29
  4. package/lib/cjs/components/header/Header.js +3 -3
  5. package/lib/cjs/components/header/QuickLauncher.js +1 -1
  6. package/lib/cjs/components/icons/Icons.js +5 -2
  7. package/lib/cjs/components/numbers/Decimal.js +16 -10
  8. package/lib/cjs/components/numbers/Fiat.js +17 -11
  9. package/lib/cjs/helpers/index.js +31 -0
  10. package/lib/cjs/helpers/number.js +2 -2
  11. package/lib/cjs/i18n/config.js +9 -0
  12. package/lib/cjs/i18n/locales/de/borrow.json +24 -10
  13. package/lib/cjs/i18n/locales/de/common.json +10 -8
  14. package/lib/cjs/i18n/locales/de/header.json +13 -3
  15. package/lib/cjs/i18n/locales/de/home.json +3 -2
  16. package/lib/cjs/i18n/locales/de/leagues.json +1 -1
  17. package/lib/cjs/i18n/locales/de/lending.json +4 -0
  18. package/lib/cjs/i18n/locales/de/liquidate.json +4 -0
  19. package/lib/cjs/i18n/locales/de/portfolio.json +7 -4
  20. package/lib/cjs/i18n/locales/de/strategies.json +2 -0
  21. package/lib/cjs/i18n/locales/de/swap.json +6 -6
  22. package/lib/cjs/i18n/locales/de/trade.json +41 -31
  23. package/lib/cjs/i18n/locales/en/borrow.json +24 -10
  24. package/lib/cjs/i18n/locales/en/common.json +10 -6
  25. package/lib/cjs/i18n/locales/en/header.json +12 -2
  26. package/lib/cjs/i18n/locales/en/home.json +3 -2
  27. package/lib/cjs/i18n/locales/en/leagues.json +1 -1
  28. package/lib/cjs/i18n/locales/en/lending.json +4 -0
  29. package/lib/cjs/i18n/locales/en/liquidate.json +4 -0
  30. package/lib/cjs/i18n/locales/en/portfolio.json +7 -4
  31. package/lib/cjs/i18n/locales/en/strategies.json +2 -0
  32. package/lib/cjs/i18n/locales/en/swap.json +6 -6
  33. package/lib/cjs/i18n/locales/en/trade.json +41 -31
  34. package/lib/esm/components/bridges/DepositModal.js +18 -1
  35. package/lib/esm/components/footer/Footer.d.ts.map +1 -1
  36. package/lib/esm/components/footer/Footer.js +21 -27
  37. package/lib/esm/components/header/Accounts.d.ts.map +1 -1
  38. package/lib/esm/components/header/Accounts.js +29 -29
  39. package/lib/esm/components/header/Header.d.ts.map +1 -1
  40. package/lib/esm/components/header/Header.js +4 -4
  41. package/lib/esm/components/header/QuickLauncher.js +1 -1
  42. package/lib/esm/components/icons/Icons.d.ts +1 -0
  43. package/lib/esm/components/icons/Icons.d.ts.map +1 -1
  44. package/lib/esm/components/icons/Icons.js +3 -0
  45. package/lib/esm/components/notices/Warning.d.ts +1 -1
  46. package/lib/esm/components/notices/Warning.d.ts.map +1 -1
  47. package/lib/esm/components/numbers/Decimal.d.ts +2 -1
  48. package/lib/esm/components/numbers/Decimal.d.ts.map +1 -1
  49. package/lib/esm/components/numbers/Decimal.js +18 -12
  50. package/lib/esm/components/numbers/Fiat.d.ts +2 -1
  51. package/lib/esm/components/numbers/Fiat.d.ts.map +1 -1
  52. package/lib/esm/components/numbers/Fiat.js +19 -13
  53. package/lib/esm/helpers/index.d.ts +5 -0
  54. package/lib/esm/helpers/index.d.ts.map +1 -1
  55. package/lib/esm/helpers/index.js +30 -0
  56. package/lib/esm/helpers/number.d.ts +1 -1
  57. package/lib/esm/helpers/number.d.ts.map +1 -1
  58. package/lib/esm/helpers/number.js +2 -2
  59. package/lib/esm/i18n/config.d.ts.map +1 -1
  60. package/lib/esm/i18n/config.js +9 -0
  61. package/lib/esm/i18n/locales/de/borrow.json +24 -10
  62. package/lib/esm/i18n/locales/de/common.json +10 -8
  63. package/lib/esm/i18n/locales/de/header.json +13 -3
  64. package/lib/esm/i18n/locales/de/home.json +3 -2
  65. package/lib/esm/i18n/locales/de/leagues.json +1 -1
  66. package/lib/esm/i18n/locales/de/lending.json +4 -0
  67. package/lib/esm/i18n/locales/de/liquidate.json +4 -0
  68. package/lib/esm/i18n/locales/de/portfolio.json +7 -4
  69. package/lib/esm/i18n/locales/de/strategies.json +2 -0
  70. package/lib/esm/i18n/locales/de/swap.json +6 -6
  71. package/lib/esm/i18n/locales/de/trade.json +41 -31
  72. package/lib/esm/i18n/locales/en/borrow.json +24 -10
  73. package/lib/esm/i18n/locales/en/common.json +10 -6
  74. package/lib/esm/i18n/locales/en/header.json +12 -2
  75. package/lib/esm/i18n/locales/en/home.json +3 -2
  76. package/lib/esm/i18n/locales/en/leagues.json +1 -1
  77. package/lib/esm/i18n/locales/en/lending.json +4 -0
  78. package/lib/esm/i18n/locales/en/liquidate.json +4 -0
  79. package/lib/esm/i18n/locales/en/portfolio.json +7 -4
  80. package/lib/esm/i18n/locales/en/strategies.json +2 -0
  81. package/lib/esm/i18n/locales/en/swap.json +6 -6
  82. package/lib/esm/i18n/locales/en/trade.json +41 -31
  83. package/package.json +1 -1
  84. package/src/components/bridges/DepositModal.tsx +32 -13
  85. package/src/components/footer/Footer.tsx +21 -27
  86. package/src/components/header/Accounts.tsx +74 -59
  87. package/src/components/header/Header.tsx +71 -33
  88. package/src/components/header/QuickLauncher.tsx +1 -1
  89. package/src/components/icons/Icons.tsx +9 -0
  90. package/src/components/notices/Warning.tsx +1 -1
  91. package/src/components/numbers/Decimal.tsx +37 -18
  92. package/src/components/numbers/Fiat.tsx +37 -21
  93. package/src/helpers/index.ts +33 -0
  94. package/src/helpers/number.ts +3 -3
  95. package/src/i18n/config.ts +10 -0
  96. package/src/i18n/locales/de/borrow.json +24 -10
  97. package/src/i18n/locales/de/common.json +10 -8
  98. package/src/i18n/locales/de/header.json +13 -3
  99. package/src/i18n/locales/de/home.json +3 -2
  100. package/src/i18n/locales/de/leagues.json +1 -1
  101. package/src/i18n/locales/de/lending.json +4 -0
  102. package/src/i18n/locales/de/liquidate.json +4 -0
  103. package/src/i18n/locales/de/portfolio.json +7 -4
  104. package/src/i18n/locales/de/strategies.json +2 -0
  105. package/src/i18n/locales/de/swap.json +6 -6
  106. package/src/i18n/locales/de/trade.json +41 -31
  107. package/src/i18n/locales/en/borrow.json +24 -10
  108. package/src/i18n/locales/en/common.json +10 -6
  109. package/src/i18n/locales/en/header.json +12 -2
  110. package/src/i18n/locales/en/home.json +3 -2
  111. package/src/i18n/locales/en/leagues.json +1 -1
  112. package/src/i18n/locales/en/lending.json +4 -0
  113. package/src/i18n/locales/en/liquidate.json +4 -0
  114. package/src/i18n/locales/en/portfolio.json +7 -4
  115. package/src/i18n/locales/en/strategies.json +2 -0
  116. package/src/i18n/locales/en/swap.json +6 -6
  117. package/src/i18n/locales/en/trade.json +41 -31
  118. package/src/scss/base/_display.scss +9 -2
  119. package/src/scss/components/_header.scss +81 -2
  120. package/src/scss/components/_warning.scss +10 -0
@@ -68,6 +68,21 @@ const Confirm = ({ asset, balance, targets, target: target_, Submit, onSuccess,
68
68
  const canSwap = asset.chain !== account?.asset.chain ||
69
69
  asset.metadata.symbol !== account.asset.metadata.symbol;
70
70
  const shouldSwap = canSwap && !direct;
71
+ const standardChain = (0, rujira_js_1.networkLabel)(asset.chain);
72
+ const directChain = account?.asset ? (0, rujira_js_1.networkLabel)(account.asset.chain) : "";
73
+ const directAsset = account?.asset.metadata.symbol || asset.metadata.symbol;
74
+ const directAssetChain = account?.asset.chain;
75
+ const nonStandardDepositWarning = direct
76
+ ? t("directDepositWarning", {
77
+ asset: directAsset,
78
+ standardChain,
79
+ directChain,
80
+ })
81
+ : t("nonStandardDepositWarning", {
82
+ asset: directAsset,
83
+ standardChain,
84
+ directChain,
85
+ });
71
86
  // Determine the actual destination address
72
87
  const destination = target === "custom" ? custom : target;
73
88
  const isCustomAddressInvalid = target === "custom" && custom !== "" && !(0, rujira_js_1.validateAddress)(rujira_js_1.THOR, custom);
@@ -130,7 +145,9 @@ const Confirm = ({ asset, balance, targets, target: target_, Submit, onSuccess,
130
145
  "w-2 h-2": true,
131
146
  "filter-grey": !hoverAd,
132
147
  "filter-white": hoverAd,
133
- }) }), advanced ? t("hideAdvancedOptions") : t("showAdvancedOptions")] })] }), advanced && ((0, jsx_runtime_1.jsxs)("div", { className: "br-1 p-2 bg-black mt-1 row wrap condensed fs-14 px-2 gap-y-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("destination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsxs)(Select_1.Select, { containerClassName: "fs-14", className: "select--inline text-right", value: target, onChange: (e) => setTarget(e.currentTarget.value), children: [targets.map((x) => ((0, jsx_runtime_1.jsx)("option", { value: x.address, className: "bg-darkGrey", children: x.address }, x.address))), (0, jsx_runtime_1.jsx)("option", { className: "bg-darkGrey", value: "custom", children: t("customAddress") })] }) }), target === "custom" && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("customDestination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(Input_1.Input, { containerClassName: "fs-14", value: custom, onChange: (e) => setCustom(e.currentTarget.value), className: "input--inline text-right", innerRef: ref }) })] })), canSwap && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [asset.chain === rujira_js_1.THOR ? null : ((0, jsx_runtime_1.jsx)("div", { className: "col-12 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(__1.Toggle, { className: "toggle--xs", label: `Deposit ${account?.asset.chain}.${account?.asset.metadata.symbol} directly`, checked: direct, onChange: () => setDirect((prev) => !prev) }) })), direct && ((0, jsx_runtime_1.jsxs)(__1.Warning, { className: "warning--sm condensed flex ai-c mt-1", color: "orange", children: [(0, jsx_runtime_1.jsx)("img", { src: swap_gif_1.default, alt: "", className: "filter-orange block no-shrink", style: { width: "2.5rem", height: "2.5rem" } }), (0, jsx_runtime_1.jsxs)("small", { className: "text-left fs-14", children: ["You are depositing a version of", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: asset.metadata.symbol }), " ", "that is not the standard on Rujira. Our products use the", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: "Ethereum" }), " version of", " ", (0, jsx_runtime_1.jsx)("span", { className: "color-white", children: asset.metadata.symbol }), "."] })] }))] })), isCustomAddressInvalid && ((0, jsx_runtime_1.jsx)("div", { className: "flex dir-r jc-c grow mt-1", children: (0, jsx_runtime_1.jsxs)(__1.Warning, { color: "red", className: "condensed iflex grow", children: [(0, jsx_runtime_1.jsx)(__1.Icons.ExclamationTriangle, { className: "color-red" }), (0, jsx_runtime_1.jsx)("span", { className: "warning__msg", children: t("invalidThorAddress") })] }) }))] })), (0, jsx_runtime_1.jsx)(Submit, { selected: account, amount: amount, target: target !== "custom" ? target : custom, swapMemo: "memo", onSuccess: onSuccess, disabled: isCustomAddressInvalid, isDangerous: false, quote: quote, shouldSwap: shouldSwap })] }));
148
+ }) }), advanced ? t("hideAdvancedOptions") : t("showAdvancedOptions")] })] }), advanced && ((0, jsx_runtime_1.jsxs)("div", { className: "br-1 p-2 bg-black mt-1 row wrap condensed fs-14 px-2 gap-y-1", children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("destination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsxs)(Select_1.Select, { containerClassName: "fs-14", className: "select--inline text-right", value: target, onChange: (e) => setTarget(e.currentTarget.value), children: [targets.map((x) => ((0, jsx_runtime_1.jsx)("option", { value: x.address, className: "bg-darkGrey", children: x.address }, x.address))), (0, jsx_runtime_1.jsx)("option", { className: "bg-darkGrey", value: "custom", children: t("customAddress") })] }) }), target === "custom" && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-4 text-center text-xs-left color-grey fw-500", children: t("customDestination") }), (0, jsx_runtime_1.jsx)("div", { className: "col-12 col-xs-8 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(Input_1.Input, { containerClassName: "fs-14", value: custom, onChange: (e) => setCustom(e.currentTarget.value), className: "input--inline text-right", innerRef: ref }) })] })), canSwap && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [asset.chain === rujira_js_1.THOR ? null : ((0, jsx_runtime_1.jsx)("div", { className: "col-12 text-center text-xs-right", children: (0, jsx_runtime_1.jsx)(__1.Toggle, { className: "toggle--xs", checked: direct, onChange: () => setDirect((prev) => !prev), children: (0, jsx_runtime_1.jsxs)("span", { className: "toggle__label", children: [t("depositAssetOnChain"), " ", directAsset, directAssetChain && ((0, jsx_runtime_1.jsxs)("span", { className: "color-grey", children: [".", directAssetChain] }))] }) }) })), asset.chain !== rujira_js_1.THOR && ((0, jsx_runtime_1.jsxs)(__1.Warning, { className: "warning--sm condensed flex ai-c mt-1", color: "orange", children: [(0, jsx_runtime_1.jsx)("img", { src: swap_gif_1.default, alt: "", className: "filter-orange block no-shrink", style: { width: "2.5rem", height: "2.5rem" } }), (0, jsx_runtime_1.jsx)("small", { className: "text-left fs-14", dangerouslySetInnerHTML: {
149
+ __html: nonStandardDepositWarning,
150
+ } })] }))] })), isCustomAddressInvalid && ((0, jsx_runtime_1.jsx)("div", { className: "flex dir-r jc-c grow mt-1", children: (0, jsx_runtime_1.jsxs)(__1.Warning, { color: "red", className: "condensed iflex grow", children: [(0, jsx_runtime_1.jsx)(__1.Icons.ExclamationTriangle, { className: "color-red" }), (0, jsx_runtime_1.jsx)("span", { className: "warning__msg", children: t("invalidThorAddress") })] }) }))] })), (0, jsx_runtime_1.jsx)(Submit, { selected: account, amount: amount, target: target !== "custom" ? target : custom, swapMemo: "memo", onSuccess: onSuccess, disabled: isCustomAddressInvalid, isDangerous: false, quote: quote, shouldSwap: shouldSwap })] }));
134
151
  };
135
152
  const Success = ({ tx, dismiss, }) => {
136
153
  const { t } = (0, i18n_1.useTranslation)("common");
@@ -6,7 +6,6 @@ const clsx_1 = require("clsx");
6
6
  const ResolveLink_1 = require("../header/ResolveLink");
7
7
  const Icons_1 = require("../icons/Icons");
8
8
  const RujiraLogo_1 = require("../logos/RujiraLogo");
9
- const SITE_URL = "https://rujira.network";
10
9
  const DOCS_URL = "https://docs.rujira.network";
11
10
  const DISCORD_URL = "https://discord.com/invite/XPvsxhWKfb";
12
11
  const TELEGRAM_URL = "https://t.me/Rujira_Community";
@@ -18,7 +17,7 @@ const footerSections = [
18
17
  { kind: "internal", label: "Cross-chain Swaps", to: "swap" },
19
18
  { kind: "internal", label: "Orderbook DEX", to: "trade" },
20
19
  { kind: "internal", label: "Earn Opportunities", to: "strategies" },
21
- { kind: "internal", label: "Money Market", to: "borrow" },
20
+ { kind: "internal", label: "Money Market", to: "/borrow/BTC/USDC" },
22
21
  {
23
22
  kind: "internal",
24
23
  label: "Automated Trading",
@@ -27,41 +26,33 @@ const footerSections = [
27
26
  {
28
27
  kind: "internal",
29
28
  label: "bRUNE",
30
- to: "/strategies/staking/bRUNE",
29
+ to: "/stake/bRUNE",
31
30
  },
32
31
  { kind: "internal", label: "Indices", to: "index" },
33
32
  { kind: "internal", label: "Recurring Buys", to: "trade" },
33
+ { kind: "static", label: "Analytics", to: "/analytics" },
34
34
  ],
35
35
  },
36
36
  {
37
37
  title: "Learn",
38
38
  links: [
39
- {
40
- kind: "external",
41
- label: "Architecture",
42
- href: `${SITE_URL}/architecture`,
43
- },
44
- { kind: "external", label: "RUJI Token", href: `${SITE_URL}/rujitoken` },
45
- {
46
- kind: "external",
47
- label: "Enshrined Oracles",
48
- href: `${SITE_URL}/enshrined-oracles`,
49
- },
50
- {
51
- kind: "external",
52
- label: "Secured Assets",
53
- href: `${SITE_URL}/secured-assets`,
54
- },
55
- { kind: "internal", label: "FAQ", to: "faq" },
56
- { kind: "internal", label: "Articles", to: "articles" },
57
- { kind: "external", label: "Roadmap", href: `${SITE_URL}/roadmap` },
58
- { kind: "external", label: "Documentation", href: DOCS_URL },
39
+ { kind: "static", label: "Discover Rujira", to: "/discover-rujira" },
40
+ { kind: "static", label: "Architecture", to: "/architecture" },
41
+ { kind: "static", label: "RUJI Token", to: "/ruji-token" },
42
+ { kind: "static", label: "Enshrined Oracles", to: "/enshrined-oracles" },
43
+ { kind: "static", label: "Secured Assets", to: "/secured-assets" },
44
+ { kind: "static", label: "Cypherpunk", to: "/cypherpunk" },
45
+ { kind: "static", label: "Omnichain", to: "/omnichain" },
46
+ { kind: "static", label: "Security", to: "/security" },
47
+ { kind: "static", label: "Articles", to: "/articles" },
48
+ { kind: "static", label: "Roadmap", to: "/roadmap" },
49
+ { kind: "external", label: "Product Docs", href: DOCS_URL },
59
50
  ],
60
51
  },
61
52
  {
62
53
  title: "Ecosystem",
63
54
  links: [
64
- { kind: "internal", label: "Ecosystem", to: "ecosystem" },
55
+ { kind: "static", label: "Ecosystem", to: "/ecosystem" },
65
56
  {
66
57
  kind: "external",
67
58
  label: "Deving Zone",
@@ -95,8 +86,8 @@ const footerSections = [
95
86
  },
96
87
  {
97
88
  kind: "external",
98
- label: "Documentation",
99
- href: DOCS_URL,
89
+ label: "Developer docs",
90
+ href: `${DOCS_URL}/developers`,
100
91
  },
101
92
  {
102
93
  kind: "external",
@@ -113,7 +104,10 @@ const footerSections = [
113
104
  {
114
105
  title: "Support",
115
106
  links: [
116
- { kind: "internal", label: "Knowledge Hub", to: "support" },
107
+ { kind: "static", label: "Get Started", to: "/get-started" },
108
+ { kind: "static", label: "Knowledge Hub", to: "/support" },
109
+ { kind: "static", label: "FAQ", to: "/faq" },
110
+ { kind: "static", label: "Deposit", to: "/deposit" },
117
111
  {
118
112
  kind: "external",
119
113
  label: "Developer Help",
@@ -6,6 +6,7 @@ const clsx_1 = require("clsx");
6
6
  const react_1 = require("motion/react");
7
7
  const react_2 = require("react");
8
8
  const react_hot_toast_1 = require("react-hot-toast");
9
+ const react_router_dom_1 = require("react-router-dom");
9
10
  const react_tooltip_1 = require("react-tooltip");
10
11
  const rujira_js_1 = require("rujira.js");
11
12
  const __1 = require("../..");
@@ -18,7 +19,7 @@ const Icons_1 = require("../icons/Icons");
18
19
  const NetworkIcon_1 = require("../icons/NetworkIcon");
19
20
  const Fiat_1 = require("../numbers/Fiat");
20
21
  const ResolveLink_1 = require("./ResolveLink");
21
- let referral = typeof window !== "undefined" ? localStorage.getItem("referral") : null;
22
+ let referral = localStorage.getItem("referral");
22
23
  const Accounts = ({ provider, routingElement, wallets, ProviderIcon, getValue, customActions, }) => {
23
24
  const { t } = (0, i18n_1.useTranslation)("header");
24
25
  const { accounts: allAccounts, disconnectAll, selected } = provider;
@@ -36,7 +37,7 @@ const Accounts = ({ provider, routingElement, wallets, ProviderIcon, getValue, c
36
37
  }, children: (0, jsx_runtime_1.jsx)(__1.Input, { value: `https://rujira.network/?ref=${referral}`, readOnly: true, label: t("clickToCopy") }) }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 color-grey mt-2", children: t("referralValidUntil") }), (0, jsx_runtime_1.jsx)("div", { className: "modal__footer mt-4 px-3 py-2 text-right", children: (0, jsx_runtime_1.jsx)(__1.Button, { label: t("close"), onClick: hideModal }) })] })),
37
38
  });
38
39
  };
39
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !accounts || accounts.length === 0 ? ((0, jsx_runtime_1.jsx)(ConnectAnimation, { routingElement: routingElement, children: (0, jsx_runtime_1.jsx)(exports.Wallets, { provider: provider, wallets: wallets, routingElement: routingElement }) })) : ((0, jsx_runtime_1.jsxs)(MyAccount, { routingElement: routingElement, provider: provider, value: selected ? getValue(rujira_js_1.Account.fromAddress(selected.address)) : false, onHide: () => setShowBlur(false), children: [selected ? ((0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, to: "portfolio", className: "balance", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex ai-b", children: showBalance === "true" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Fiat_1.Fiat, { amount: getValue(rujira_js_1.Account.fromAddress(selected.address)), decimals: 12, symbol: "~$", padSymbol: false, className: "color-white fs-26 condensed" }), (0, jsx_runtime_1.jsx)("button", { className: "transparent ml-1 color-grey hover-white", onClick: (e) => {
40
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !accounts || accounts.length === 0 ? ((0, jsx_runtime_1.jsx)(ConnectAnimation, { children: (0, jsx_runtime_1.jsx)(exports.Wallets, { provider: provider, wallets: wallets, routingElement: routingElement }) })) : ((0, jsx_runtime_1.jsxs)(MyAccount, { routingElement: routingElement, provider: provider, value: selected ? getValue(rujira_js_1.Account.fromAddress(selected.address)) : false, onHide: () => setShowBlur(false), children: [selected ? ((0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, to: "portfolio", className: "balance", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex ai-b", children: showBalance === "true" ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Fiat_1.Fiat, { amount: getValue(rujira_js_1.Account.fromAddress(selected.address)), decimals: 12, symbol: "~$", padSymbol: false, className: "color-white fs-26 condensed" }), (0, jsx_runtime_1.jsx)("button", { className: "transparent ml-1 color-grey hover-white", onClick: (e) => {
40
41
  e.stopPropagation();
41
42
  e.preventDefault();
42
43
  setShowBalance("false");
@@ -47,49 +48,48 @@ const Accounts = ({ provider, routingElement, wallets, ProviderIcon, getValue, c
47
48
  setShowBalance("true");
48
49
  return false;
49
50
  }, style: { marginRight: "-1rem" }, children: (0, jsx_runtime_1.jsx)(Icons_1.EyeSlash, { className: "w-2 h-2" }) })] })) }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 condensed color-grey mt-0.5", children: t("viewPortfolio") })] })) : null, accounts.map((account) => ((0, jsx_runtime_1.jsx)(AddressC, { provider: provider, ProviderIcon: ProviderIcon, account: account, selected: selected?.address.address === account.address.address &&
50
- selected.provider === account.provider }, `${account.address.address}:${account.provider}`))), (0, jsx_runtime_1.jsxs)("nav", { className: "actions", children: [referral && ((0, jsx_runtime_1.jsxs)("button", { className: "action transparent", onClick: ReferralModal, children: [(0, jsx_runtime_1.jsx)(Icons_1.Users, {}), (0, jsx_runtime_1.jsx)("span", { children: t("referralLink") })] })), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, className: "action transparent", to: "connect", children: [(0, jsx_runtime_1.jsx)(Icons_1.Plus, {}), (0, jsx_runtime_1.jsx)("span", { children: t("connectAnotherWallet") })] }), customActions &&
51
+ selected.provider === account.provider }, `${account.address.address}:${account.provider}`))), (0, jsx_runtime_1.jsxs)("nav", { className: "actions", children: [referral && ((0, jsx_runtime_1.jsxs)("button", { className: "action transparent", onClick: ReferralModal, children: [(0, jsx_runtime_1.jsx)(Icons_1.Users, {}), (0, jsx_runtime_1.jsx)("span", { children: t("referralLink") })] })), (0, jsx_runtime_1.jsxs)(react_router_dom_1.Link, { className: "action transparent", to: "connect", children: [(0, jsx_runtime_1.jsx)(Icons_1.Plus, {}), (0, jsx_runtime_1.jsx)("span", { children: t("connectAnotherWallet") })] }), customActions &&
51
52
  customActions.map((e, index) => (0, react_2.cloneElement)(e, { key: index })), (0, jsx_runtime_1.jsxs)("button", { className: "action transparent", onClick: disconnectAll, children: [(0, jsx_runtime_1.jsx)(Icons_1.LinkDisconnect, {}), (0, jsx_runtime_1.jsx)("span", { children: t("disconnectAll") })] })] }), showBlur && (0, jsx_runtime_1.jsx)("div", { className: "blur" })] })) }));
52
53
  };
53
54
  exports.Accounts = Accounts;
54
55
  /* const Component = forwardRef<HTMLAnchorElement, ComponentProps<typeof Link>>((props, ref) => {
55
56
  return <Link {...props} ref={ref} />;
56
57
  }); */
57
- const ConnectAnimation = ({ children, routingElement }) => {
58
+ const ConnectAnimation = ({ children }) => {
58
59
  const { t } = (0, i18n_1.useTranslation)("header");
59
60
  const [show, setShow] = (0, react_2.useState)(false);
60
- return ((0, jsx_runtime_1.jsxs)("div", { className: "relative py-q1 no-underline", onMouseOver: () => setShow(true), onMouseOut: () => setShow(false), children: [(0, jsx_runtime_1.jsxs)("div", { className: "rujira-header__connect", children: [(0, jsx_runtime_1.jsx)("div", { className: "fs-14 fw-500 fs-15 condensed", children: t("connect") }), (0, jsx_runtime_1.jsx)("img", { className: "w-3 h-3 filter-white", src: show ? connect_gif_1.default : connect_png_1.default, alt: "Connect" })] }), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { children: show && ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { className: "rujira-header__popup right condensed w-32 text-center p-2", initial: { opacity: 0, marginTop: -4 }, animate: { opacity: 1, marginTop: 4 }, exit: { opacity: 0, marginTop: -4 }, children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, className: "flex dir-c action transparent", to: "connect", children: [(0, jsx_runtime_1.jsx)("p", { className: "color-white", children: t("connectYourWallet") }), (0, jsx_runtime_1.jsx)("small", { className: "color-grey mb-1", children: t("createOrConnectWallet") })] }), children] })) })] }));
61
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "relative py-q1 no-underline", onMouseOver: () => setShow(true), onMouseOut: () => setShow(false), children: [(0, jsx_runtime_1.jsxs)("div", { className: "rujira-header__connect", children: [(0, jsx_runtime_1.jsx)("div", { className: "fs-14 fw-500 fs-15 condensed", children: t("connect") }), (0, jsx_runtime_1.jsx)("img", { className: "w-3 h-3 filter-white", src: show ? connect_gif_1.default : connect_png_1.default, alt: "Connect" })] }), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { children: show && ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { className: "rujira-header__popup right condensed w-32 text-center p-2", initial: { opacity: 0, marginTop: -4 }, animate: { opacity: 1, marginTop: 4 }, exit: { opacity: 0, marginTop: -4 }, children: [(0, jsx_runtime_1.jsxs)(react_router_dom_1.Link, { className: "flex dir-c action transparent", to: "connect", children: [(0, jsx_runtime_1.jsx)("p", { className: "color-white", children: t("connectYourWallet") }), (0, jsx_runtime_1.jsx)("small", { className: "color-grey", children: t("createOrConnectWallet") })] }), children] })) })] }));
61
62
  };
62
63
  const Wallets = ({ modalLayout = false, provider, wallets, routingElement, }) => {
63
64
  const { t } = (0, i18n_1.useTranslation)("header");
64
65
  const { connect, isAvailable } = provider;
65
66
  const { hideModal } = (0, GlobalModal_1.useGlobalModalContext)();
66
- const [first, ...rest] = wallets;
67
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "rujira-header__wallets", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)({
68
- "flex w-full ai-c jc-c wrap": true,
69
- "mb-1": modalLayout,
70
- }), children: (0, jsx_runtime_1.jsx)("button", { id: "connect-station", "data-tooltip-content": "Coming Soon...", "data-tooltip-id": "wallet-tip", className: (0, clsx_1.default)({
71
- "transparent block pointer medium": true,
72
- "desaturate opacity-10": !first?.provider,
73
- }), disabled: !first?.provider, onClick: () => {
74
- first?.provider && connect(first?.provider).then(hideModal);
75
- }, children: first?.icon }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex w-full ai-c jc-c wrap", children: rest.map((x) => {
76
- const disabled = x.provider ? !isAvailable(x.provider) : true;
77
- return ((0, jsx_runtime_1.jsx)("button", { id: `connect-${x.label}`, "data-tooltip-content": x.label, "data-tooltip-id": "wallet-tip", className: (0, clsx_1.default)({
78
- "transparent block pointer": true,
79
- medium: modalLayout,
80
- "desaturate opacity-10": disabled,
81
- }), onClick: () => {
82
- if (disabled && x.url) {
83
- window.open(x.url, "_blank");
84
- return;
85
- }
86
- x.provider && connect(x.provider).then(hideModal);
87
- }, children: x.icon }, x.label));
88
- }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { as: routingElement, to: "/tou", className: "terms mb-1", children: "By connecting a wallet, you agree to Rujira's Terms of Use." }), (0, jsx_runtime_1.jsx)("hr", { className: (0, clsx_1.default)({
67
+ const rujiraWalletOrder = ["vultisig", "keplr"];
68
+ const rujiraWallets = wallets
69
+ .filter((wallet) => rujiraWalletOrder.includes(wallet.key))
70
+ .sort((a, b) => rujiraWalletOrder.indexOf(a.key) - rujiraWalletOrder.indexOf(b.key));
71
+ const otherWallets = wallets.filter((wallet) => !rujiraWalletOrder.includes(wallet.key));
72
+ const walletButton = (wallet) => {
73
+ const disabled = wallet.provider ? !isAvailable(wallet.provider) : true;
74
+ return ((0, jsx_runtime_1.jsx)("button", { id: `connect-${wallet.label}`, "data-tooltip-content": wallet.label, "data-tooltip-id": "wallet-tip", className: (0, clsx_1.default)({
75
+ "transparent block pointer": true,
76
+ medium: modalLayout,
77
+ "desaturate opacity-10": disabled,
78
+ }), onClick: () => {
79
+ if (disabled && wallet.url) {
80
+ window.open(wallet.url, "_blank");
81
+ return;
82
+ }
83
+ wallet.provider && connect(wallet.provider).then(hideModal);
84
+ }, children: wallet.icon }, wallet.label));
85
+ };
86
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)("rujira-header__wallets", {
87
+ "rujira-header__wallets--modal": modalLayout,
88
+ }), children: [(0, jsx_runtime_1.jsx)("span", { className: "tag tag--borderless tag--primary no-shrink rujira-header__wallets-support", "data-support-tooltip": t("rujiraSupportTooltip"), children: t("rujiraSupport") }), (0, jsx_runtime_1.jsx)("div", { className: "rujira-header__wallets-row", children: rujiraWallets.map(walletButton) }), (0, jsx_runtime_1.jsx)("hr", { className: "rujira-header__wallets-divider" }), (0, jsx_runtime_1.jsx)("span", { className: "tag tag--borderless tag--orange no-shrink rujira-header__wallets-support", "data-support-tooltip": t("limitedSupportTooltip"), children: t("limitedSupport") }), (0, jsx_runtime_1.jsx)("div", { className: "rujira-header__wallets-row", children: otherWallets.map(walletButton) }), (0, jsx_runtime_1.jsx)("hr", { className: (0, clsx_1.default)({
89
89
  hr: true,
90
90
  "mt-0 mb-1": !modalLayout,
91
91
  "my-2": modalLayout,
92
- }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { as: routingElement, to: "ecosystem/wallets", onClick: hideModal, children: t("needHelpDeciding") })] }), (0, jsx_runtime_1.jsx)(react_tooltip_1.Tooltip, { id: "wallet-tip", className: "tooltip" })] }));
92
+ }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Link, { to: "/tou", className: "terms mb-1", children: "By connecting a wallet, you agree to Rujira's Terms of Use." }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { as: routingElement, to: "/connect", onClick: hideModal, children: t("needHelpDeciding") })] }), (0, jsx_runtime_1.jsx)(react_tooltip_1.Tooltip, { id: "wallet-tip", className: "tooltip" })] }));
93
93
  };
94
94
  exports.Wallets = Wallets;
95
95
  const MyAccount = ({ provider, children, onHide, routingElement, value, }) => {
@@ -183,11 +183,11 @@ const SubTrade = ({ domain, routingElement, useRef, className, staticRoutes, })
183
183
  };
184
184
  const SubEarn = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
185
185
  const { t } = (0, i18n_1.useTranslation)("header");
186
- return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("strategies/staking/RUJI"), domain: domain, to: "strategies/staking/RUJI", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Stake, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("stake") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("stakeDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("strategies"), domain: domain, to: "strategies", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Building, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("strategies") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("strategiesDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("liquidate"), domain: domain, to: "liquidate", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Gavel, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("liquidate") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("liquidateDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("launchpad"), domain: domain, to: "launchpad", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Seedling, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600 flex ai-c", children: t("launchpad") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("launchpadDesc") })] })] })] }) }));
186
+ return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("stake/RUJI"), domain: domain, to: "stake/RUJI", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Stake, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("stake") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("stakeDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("trade"), domain: domain, to: "/trade/BTC/USDC?orders=range", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Binary, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("algorithmicTrading") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("algorithmicTradingDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("lending"), domain: domain, to: "lend", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Lend, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("lending") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("lendingDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("liquidate"), domain: domain, to: "liquidate", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Gavel, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("liquidate") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("liquidateDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("strategies"), domain: domain, to: "strategies", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Building, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("strategies") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("strategiesDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("launchpad"), domain: domain, to: "launchpad", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Seedling, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600 flex ai-c", children: t("launchpad") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("launchpadDesc") })] })] })] }) }));
187
187
  };
188
188
  const SubBorrow = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
189
189
  const { t } = (0, i18n_1.useTranslation)("header");
190
- return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("borrow"), domain: domain, to: "borrow", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.MoneyTransfer, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600 flex ai-c", children: t("borrowMenu") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("borrowDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("mint"), domain: domain, to: "mint", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Deposit, { className: "color-grey h-a w-3 block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("mintStablecoin") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("mintStablecoinDesc") })] })] })] }) }));
190
+ return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("borrow"), domain: domain, to: "/borrow/BTC/USDC", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.MoneyTransfer, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600 flex ai-c", children: t("borrowMenu") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("borrowDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("mint"), domain: domain, to: "mint", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Deposit, { className: "color-grey h-a w-3 block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("mintStablecoin") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("mintStablecoinDesc") })] })] })] }) }));
191
191
  };
192
192
  const SubUtilities = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
193
193
  const { t } = (0, i18n_1.useTranslation)("header");
@@ -199,5 +199,5 @@ const SubEntertainment = ({ domain, routingElement, useRef, className, staticRou
199
199
  };
200
200
  const SubLearn = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
201
201
  const { t } = (0, i18n_1.useTranslation)("header");
202
- return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("get-started"), domain: domain, to: "/get-started", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("getStarted") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("support") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "/faq", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "/articles", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("articles") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] })] }) }));
202
+ return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: true, domain: domain, to: "/get-started", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("getStarted") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: true, domain: domain, to: "/discover-rujira", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Home, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("discoverRujira") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("discoverRujiraDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("support") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "/faq", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "/articles", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("articles") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] })] }) }));
203
203
  };
@@ -10,6 +10,6 @@ const ResolveLink_1 = require("./ResolveLink");
10
10
  const QuickLauncher = ({ domain, routingElement, }) => {
11
11
  const { t } = (0, i18n_1.useTranslation)("header");
12
12
  const [showMenu, setShowMenu] = (0, react_2.useState)(false);
13
- return ((0, jsx_runtime_1.jsxs)("div", { className: "rujira-header__quick", onMouseOver: () => setShowMenu(true), onMouseOut: () => setShowMenu(false), children: [(0, jsx_runtime_1.jsx)(Icons_1.Grid, {}), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { children: showMenu && ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { className: "rujira-header__popup sub-nav fw-400 px-2 py-1.5", initial: { opacity: 0, marginTop: -4 }, animate: { opacity: 1, marginTop: 0 }, exit: { opacity: 0, marginTop: -4 }, children: [(0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "buy", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("buyCrypto") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "swap", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("tokenSwap") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "trade", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("spotTrading") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "options", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("options") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "/perps", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("perps") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "strategies/staking/RUJI", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("stake") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "lp", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("liquidityPools") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "money-market", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("lendAndBorrow") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "liquidate", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("liquidate") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "ventures", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("ventures") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "nfts", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("collections") }) })] })) })] }));
13
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "rujira-header__quick", onMouseOver: () => setShowMenu(true), onMouseOut: () => setShowMenu(false), children: [(0, jsx_runtime_1.jsx)(Icons_1.Grid, {}), (0, jsx_runtime_1.jsx)(react_1.AnimatePresence, { children: showMenu && ((0, jsx_runtime_1.jsxs)(react_1.motion.div, { className: "rujira-header__popup sub-nav fw-400 px-2 py-1.5", initial: { opacity: 0, marginTop: -4 }, animate: { opacity: 1, marginTop: 0 }, exit: { opacity: 0, marginTop: -4 }, children: [(0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "buy", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("buyCrypto") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "swap", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("tokenSwap") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "trade", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("spotTrading") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "options", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("options") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "/perps", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("perps") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "stake/RUJI", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("stake") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "lp", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("liquidityPools") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "money-market", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("lendAndBorrow") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "liquidate", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("liquidate") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "ventures", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("ventures") }) }), (0, jsx_runtime_1.jsx)(ResolveLink_1.ResolveLink, { domain: domain, as: routingElement, to: "nfts", children: (0, jsx_runtime_1.jsx)("span", { className: "fs-12 fw-500", children: t("collections") }) })] })) })] }));
14
14
  };
15
15
  exports.QuickLauncher = QuickLauncher;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GitLab = exports.GitHub = exports.Gear = exports.Gavel = exports.Gamepad = exports.Eye = exports.EyeSlash = exports.ExclamationTriangle = exports.ExclamationCircle = exports.External = exports.Ellipsis = exports.Edit = exports.Earth = exports.Discord = exports.Deposit = exports.CreditCard = exports.Combine = exports.Copy = exports.Coins = exports.Code = exports.ClaimSolid = exports.ClaimAll = exports.Claim = exports.CirclesXMark = exports.CircleXMark = exports.CircleUser = exports.CirclePen = exports.Check = exports.ChartUser = exports.ChartUp = exports.ChartUpDown = exports.ChartMixed = exports.Chart = exports.Building = exports.Bolt = exports.Book = exports.BinarySlash = exports.Binary = exports.ArrowUpRight = exports.ArrowUp = exports.ArrowRight = exports.ArrowRightLeft = exports.ArrowLeft = exports.ArrowDown = exports.AngleUpDown = exports.AngleUp = exports.AnglesRight = exports.AngleRight = exports.AngleLeft = exports.AngleDown = void 0;
4
- exports.Star = exports.StarSolid = exports.Stake = exports.StakePlus = exports.StakeMinus = exports.Split = exports.SortUp = exports.SortDown = exports.SortDesc = exports.Sliders = exports.Sort = exports.ShieldX = exports.ShieldCheck = exports.Share = exports.Seedling = exports.Rotate = exports.Rocket = exports.Rabbit = exports.Plus = exports.Play = exports.PieChart = exports.Pause = exports.Orca = exports.NFT = exports.NoGas = exports.Nodes = exports.MoneyTransfer = exports.MinusCircle = exports.Minus = exports.MessageCode = exports.Merge = exports.YouTube = exports.TikTok = exports.Reddit = exports.LinkedIn = exports.Instagram = exports.Medium = exports.Locked = exports.LinkConnect = exports.LinkDisconnect = exports.LinkAngle = exports.Key = exports.Info = exports.Href = exports.Home = exports.History = exports.Grid = exports.Graduate = exports.Glass = exports.GlassChart = void 0;
5
- exports.Xmark = exports.X = exports.Withdraw = exports.Wink = exports.Window = exports.Wallet = exports.Users = exports.Unlocked = exports.Undo = exports.Trophy = exports.TrendUp = exports.TrendDown = exports.Tortoise = exports.Timer = exports.Terminal = exports.Telegram = exports.Swap = exports.Support = exports.Stopwatch = exports.StarAlt = void 0;
4
+ exports.StarSolid = exports.Stake = exports.StakePlus = exports.StakeMinus = exports.Split = exports.SortUp = exports.SortDown = exports.SortDesc = exports.Sliders = exports.Sort = exports.ShieldX = exports.ShieldCheck = exports.Share = exports.Seedling = exports.Rotate = exports.Rocket = exports.Rabbit = exports.Plus = exports.Play = exports.PieChart = exports.Pause = exports.Orca = exports.NFT = exports.NoGas = exports.Nodes = exports.MoneyTransfer = exports.MinusCircle = exports.Minus = exports.MessageCode = exports.Merge = exports.YouTube = exports.TikTok = exports.Reddit = exports.LinkedIn = exports.Instagram = exports.Medium = exports.Locked = exports.Lend = exports.LinkConnect = exports.LinkDisconnect = exports.LinkAngle = exports.Key = exports.Info = exports.Href = exports.Home = exports.History = exports.Grid = exports.Graduate = exports.Glass = exports.GlassChart = void 0;
5
+ exports.Xmark = exports.X = exports.Withdraw = exports.Wink = exports.Window = exports.Wallet = exports.Users = exports.Unlocked = exports.Undo = exports.Trophy = exports.TrendUp = exports.TrendDown = exports.Tortoise = exports.Timer = exports.Terminal = exports.Telegram = exports.Swap = exports.Support = exports.Stopwatch = exports.StarAlt = exports.Star = void 0;
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("react");
8
8
  const SVG = ({ d, children, ...rest }) => ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", ...rest, children: [d && (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", fillRule: "nonzero", d: d }), children] }));
@@ -192,6 +192,9 @@ exports.LinkDisconnect.displayName = "LinkDisconnect";
192
192
  const _LinkConnect = (props) => ((0, jsx_runtime_1.jsx)(SVG, { ...props, d: "M128 128C57.3 128 0 185.3 0 256s57.3 128 128 128h32c8.8 0 16-7.2 16-16s-7.2-16-16-16h-32c-53 0-96-43-96-96s43-96 96-96h176.1c52.9 0 95.9 42.9 95.9 95.9 0 50.3-38.9 92-89 95.6l-8.1.6c-8.8.6-15.4 8.3-14.8 17.1.6 8.8 8.3 15.4 17.1 14.8l8.1-.6c66.9-4.8 118.7-60.5 118.7-127.5 0-70.7-57.2-127.9-127.9-127.9H128Zm384 384c70.7 0 128-57.3 128-128s-57.3-128-128-128h-32c-8.8 0-16 7.2-16 16s7.2 16 16 16h32c53 0 96 43 96 96s-43 96-96 96H335.9c-52.9 0-95.9-42.9-95.9-95.9 0-50.3 38.9-92 89-95.6l8.1-.6c8.8-.6 15.4-8.3 14.8-17.1-.6-8.8-8.3-15.4-17.1-14.8l-8.1.6C259.8 261.4 208 317.1 208 384.1c0 70.7 57.2 127.9 127.9 127.9H512Z" }));
193
193
  exports.LinkConnect = (0, react_1.memo)(_LinkConnect);
194
194
  exports.LinkConnect.displayName = "LinkConnect";
195
+ const _Lend = (props) => ((0, jsx_runtime_1.jsx)(SVG, { ...props, d: "M304 320c61.856 0 112-50.144 112-112S365.856 96 304 96s-112 50.144-112 112 50.144 112 112 112Zm0-256c79.529 0 144 64.471 144 144s-64.471 144-144 144-144-64.471-144-144S224.471 64 304 64Zm-23.2 111.4c-.4.7-.9 1.6-.8 3.6v.1c0 .4 0 1.9 4.8 4.5 5.6 3 13.5 5.2 23.9 8.2h.2c9.3 2.6 21.1 6 30.5 11.5 10.2 6 20 16.1 20.5 32.3.5 18.2-9.7 30.4-21.7 36.9-5.8 3.1-12.1 5.1-18.3 6.2v10.8c0 8.8-7.2 16-16 16s-16-7.2-16-16v-11.4c-8.6-1.7-16.7-4.3-23.7-6.6-1.7-.6-3.4-1.1-5-1.6-8.4-2.6-13.1-11.6-10.5-20 2.6-8.4 11.6-13.1 20-10.5 2 .6 3.9 1.2 5.8 1.8 11.5 3.6 20.4 6.5 29.9 6.8 6.7.2 13.8-1.1 18.5-3.6 2.2-1.2 3.4-2.4 4-3.3.5-.8 1.1-2.1 1-4.5 0-1.4-.2-3-4.7-5.6-5.3-3.1-12.9-5.4-23.2-8.3l-1.8-.5c-8.9-2.5-19.8-5.6-28.6-10.3-9.9-5.3-20.6-14.7-21.6-30.7-1.2-18.8 10-30.9 21.8-37.2 5.7-3.1 12-5.1 18-6.3v-9.5c0-8.8 7.2-16 16-16s16 7.2 16 16v9.4c6.3.9 12.3 2.3 17.9 3.7 8.6 2.1 13.8 10.8 11.7 19.4-2.1 8.6-10.8 13.8-19.4 11.7-9.3-2.3-18.2-4-26.4-4.1-6.2-.1-13.6 1.3-18.7 4-2.4 1.3-3.6 2.5-4.2 3.4l.1-.3Zm-97.8 206c13.1-8.8 28.6-13.4 44.4-13.4H376c30.9 0 56 25.1 56 56 0 8.6-1.9 16.7-5.4 24h5.6l94.7-56.4c8.3-4.9 17.8-7.6 27.5-7.6h1.3c28.9 0 52.3 23.4 52.3 52.3 0 17.7-9 34.2-23.8 43.8l-119.6 77.8c-18.2 11.8-39.4 18.1-61 18.1H48c-8.8 0-16-7.2-16-16s7.2-16 16-16h355.5c15.5 0 30.6-4.5 43.6-12.9l119.6-77.8c5.8-3.7 9.2-10.2 9.2-17 0-11.2-9.1-20.3-20.3-20.3h-1.3c-3.9 0-7.7 1.1-11.1 3l-98.5 58.7c-2.5 1.5-5.3 2.3-8.2 2.3H288c-8.8 0-16-7.2-16-16s7.2-16 16-16h88c13.3 0 24-10.7 24-24s-10.7-24-24-24H227.4c-9.5 0-18.7 2.8-26.6 8.1l-79.9 53.2c-2.6 1.8-5.7 2.7-8.9 2.7H48c-8.8 0-16-7.2-16-16s7.2-16 16-16h59.2l75.8-50.6Z" }));
196
+ exports.Lend = (0, react_1.memo)(_Lend);
197
+ exports.Lend.displayName = "Lend";
195
198
  const _Locked = (props) => ((0, jsx_runtime_1.jsx)(SVG, { ...props, d: "M320 96c53 0 96 43 96 96v64H224v-64c0-53 43-96 96-96Zm-128 96v64h-16c-44.2 0-80 35.8-80 80v160c0 44.2 35.8 80 80 80h288c44.2 0 80-35.8 80-80V336c0-44.2-35.8-80-80-80h-16v-64c0-70.7-57.3-128-128-128s-128 57.3-128 128Zm-16 96h288c26.5 0 48 21.5 48 48v160c0 26.5-21.5 48-48 48H176c-26.5 0-48-21.5-48-48V336c0-26.5 21.5-48 48-48Zm160 88c0-8.8-7.2-16-16-16s-16 7.2-16 16v80c0 8.8 7.2 16 16 16s16-7.2 16-16v-80Z" }));
196
199
  exports.Locked = (0, react_1.memo)(_Locked);
197
200
  exports.Locked.displayName = "Locked";
@@ -4,9 +4,23 @@ exports.Decimal = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const clsx_1 = require("clsx");
6
6
  const helpers_1 = require("../../helpers");
7
- const Decimal = ({ amount, decimals = 8, round = 6, symbol, symbolLeft, padSymbol = true, className, onClick, as: Component = "div", symbolClassName, subscript, }) => {
7
+ const Decimal = ({ amount, decimals = 8, round = 6, symbol, symbolLeft, padSymbol = true, className, onClick, as: Component = "div", symbolClassName, subscript, clip = false, }) => {
8
8
  const normalizedAmount = typeof amount === "bigint" ? amount : BigInt(amount || 0);
9
9
  const normalizedDecimals = Number(decimals) || 0;
10
+ const componentClass = (0, clsx_1.default)({
11
+ decimal: true,
12
+ "decimal--label-left": symbolLeft,
13
+ "decimal--no-pad": !padSymbol,
14
+ [`${className}`]: className,
15
+ });
16
+ const symbolEl = symbol && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)({
17
+ decimal__symbol: true,
18
+ [`${symbolClassName}`]: symbolClassName,
19
+ }), children: symbol }));
20
+ if (clip) {
21
+ const { intStr, sep, decStr } = (0, helpers_1.clipAmount)(normalizedAmount, normalizedDecimals);
22
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: componentClass, onClick: onClick, children: [(0, jsx_runtime_1.jsxs)("span", { className: "decimal__int", children: [intStr, sep && (0, helpers_1.whatDecimalSeparator)()] }), sep && (0, jsx_runtime_1.jsx)("span", { className: "decimal__dec", children: decStr }), symbolEl] }));
23
+ }
10
24
  const scale = 10n ** BigInt(normalizedDecimals);
11
25
  const dec = normalizedAmount % scale;
12
26
  const int = normalizedAmount / scale;
@@ -20,14 +34,6 @@ const Decimal = ({ amount, decimals = 8, round = 6, symbol, symbolLeft, padSymbo
20
34
  }
21
35
  const truncated = subscript && needsSubscript ? (0, helpers_1.compress)(padded) : padded;
22
36
  const trimmed = truncated.substring(0, round);
23
- return ((0, jsx_runtime_1.jsxs)(Component, { className: (0, clsx_1.default)({
24
- decimal: true,
25
- "decimal--label-left": symbolLeft,
26
- "decimal--no-pad": !padSymbol,
27
- [`${className}`]: className,
28
- }), onClick: onClick, children: [(0, jsx_runtime_1.jsxs)("span", { className: "decimal__int", children: [(int || "0").toLocaleString(), round > 0 && (0, helpers_1.whatDecimalSeparator)()] }), dec.toString().length && round > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "decimal__dec", children: trimmed })), symbol && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)({
29
- decimal__symbol: true,
30
- [`${symbolClassName}`]: symbolClassName,
31
- }), children: symbol }))] }));
37
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: componentClass, onClick: onClick, children: [(0, jsx_runtime_1.jsxs)("span", { className: "decimal__int", children: [(int || "0").toLocaleString(), round > 0 && (0, helpers_1.whatDecimalSeparator)()] }), dec.toString().length && round > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "decimal__dec", children: trimmed })), symbolEl] }));
32
38
  };
33
39
  exports.Decimal = Decimal;
@@ -4,19 +4,25 @@ exports.Fiat = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const clsx_1 = require("clsx");
6
6
  const helpers_1 = require("../../helpers");
7
- const Fiat = ({ amount, decimals = 2, symbol, className, symbolRight = false, padSymbol = true, symbolSmall = false, as: Component = "div", }) => {
7
+ const Fiat = ({ amount, decimals = 2, symbol, className, symbolRight = false, padSymbol = true, symbolSmall = false, as: Component = "div", clip = false, }) => {
8
+ const componentClass = (0, clsx_1.default)({
9
+ fiat: true,
10
+ "fiat--symbol-right": symbolRight,
11
+ [`${className}`]: className,
12
+ });
13
+ const symbolEl = symbol && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)({
14
+ fiat__symbol: true,
15
+ "fiat__symbol--small": symbolSmall,
16
+ "mr-0.5": padSymbol && !symbolRight,
17
+ "ml-0.5": padSymbol && symbolRight,
18
+ }), children: symbol }));
19
+ if (clip) {
20
+ const { intStr, sep, decStr } = (0, helpers_1.clipAmount)(amount, decimals);
21
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: componentClass, children: [(0, jsx_runtime_1.jsxs)("span", { className: "fiat__int", children: [intStr, sep && (0, helpers_1.whatDecimalSeparator)()] }), sep && (0, jsx_runtime_1.jsx)("span", { className: "fiat__dec", children: decStr }), symbolEl] }));
22
+ }
8
23
  const dec = amount % BigInt(10 ** decimals);
9
24
  const int = BigInt(Math.floor(Number(amount - dec) / 10 ** decimals));
10
25
  const round = 2;
11
- return ((0, jsx_runtime_1.jsxs)(Component, { className: (0, clsx_1.default)({
12
- fiat: true,
13
- "fiat--symbol-right": symbolRight,
14
- [`${className}`]: className,
15
- }), children: [(0, jsx_runtime_1.jsxs)("span", { className: "fiat__int", children: [(int || "0").toLocaleString(), (0, helpers_1.whatDecimalSeparator)()] }), (0, jsx_runtime_1.jsx)("span", { className: "fiat__dec", children: dec.toString().padStart(decimals, "0").substring(0, round) }), symbol && ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)({
16
- fiat__symbol: true,
17
- "fiat__symbol--small": symbolSmall,
18
- "mr-0.5": padSymbol && !symbolRight,
19
- "ml-0.5": padSymbol && symbolRight,
20
- }), children: symbol }))] }));
26
+ return ((0, jsx_runtime_1.jsxs)(Component, { className: componentClass, children: [(0, jsx_runtime_1.jsxs)("span", { className: "fiat__int", children: [(int || "0").toLocaleString(), (0, helpers_1.whatDecimalSeparator)()] }), (0, jsx_runtime_1.jsx)("span", { className: "fiat__dec", children: dec.toString().padStart(decimals, "0").substring(0, round) }), symbolEl] }));
21
27
  };
22
28
  exports.Fiat = Fiat;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.bigIntToDecimalString = exports.floatToSubscript = exports.compress = exports.classApr = exports.formatApr = exports.nFormatterInt = exports.nFormatter = exports.uuidv4 = exports.isEmpty = exports.whatDecimalSeparator = exports.getLang = void 0;
4
+ exports.clipAmount = clipAmount;
4
5
  const getLang = () => {
5
6
  if (navigator.languages != undefined)
6
7
  return navigator.languages[0];
@@ -151,6 +152,36 @@ const floatToSubscript = (floatValue, rounding, fractionDigits) => {
151
152
  return intPart + separator + trimmed;
152
153
  };
153
154
  exports.floatToSubscript = floatToSubscript;
155
+ function clipAmount(amount, decimals) {
156
+ const scale = 10n ** BigInt(decimals);
157
+ const intPart = amount / scale;
158
+ const fracPart = amount % scale;
159
+ const fracStr = fracPart.toString().padStart(decimals, "0");
160
+ const intNum = Number(intPart);
161
+ const withDec = (raw, int = String(intNum)) => ({
162
+ intStr: int,
163
+ sep: true,
164
+ decStr: raw,
165
+ });
166
+ if (intNum >= 1000)
167
+ return { intStr: (intPart || "0").toLocaleString(), sep: false, decStr: "" };
168
+ if (intNum >= 100)
169
+ return withDec(fracStr.substring(0, 1));
170
+ if (intNum >= 10)
171
+ return withDec(fracStr.substring(0, 2));
172
+ if (intNum >= 1)
173
+ return withDec(fracStr.substring(0, 3));
174
+ if (fracPart === 0n)
175
+ return { intStr: "0", sep: false, decStr: "" };
176
+ const leadingZeros = (fracStr.match(/^(0*)/) ?? ["", ""])[1].length;
177
+ if (leadingZeros === 0)
178
+ return withDec(fracStr.substring(0, 4), "0");
179
+ // < 0.1: 4 significant figures
180
+ const sigFigStr = fracStr.substring(0, leadingZeros + 4);
181
+ if (leadingZeros > 3)
182
+ return { intStr: "0", sep: true, decStr: (0, exports.compress)(sigFigStr) };
183
+ return { intStr: "0", sep: true, decStr: sigFigStr };
184
+ }
154
185
  /**
155
186
  * A function that uses string manipulation to convert a bigint into a floating point number,
156
187
  * avoiding the floating points maths issues that sometimes arise when generating this number
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  // Add the method to the Number prototype
3
- Number.prototype.toLocaleDecimal = function (decimals = 0) {
3
+ Number.prototype.toLocaleDecimal = function (decimals = 0, shrink = false) {
4
4
  return this.toLocaleString(undefined, {
5
5
  maximumFractionDigits: decimals,
6
- minimumFractionDigits: decimals,
6
+ minimumFractionDigits: shrink ? 0 : decimals,
7
7
  });
8
8
  };
@@ -16,6 +16,8 @@ const portfolio_json_1 = require("./locales/de/portfolio.json");
16
16
  const strategies_json_1 = require("./locales/de/strategies.json");
17
17
  const swap_json_1 = require("./locales/de/swap.json");
18
18
  const trade_json_1 = require("./locales/de/trade.json");
19
+ const lending_json_1 = require("./locales/de/lending.json");
20
+ const liquidate_json_1 = require("./locales/de/liquidate.json");
19
21
  const borrow_json_2 = require("./locales/en/borrow.json");
20
22
  const common_json_2 = require("./locales/en/common.json");
21
23
  const ecosystem_json_2 = require("./locales/en/ecosystem.json");
@@ -28,6 +30,8 @@ const portfolio_json_2 = require("./locales/en/portfolio.json");
28
30
  const strategies_json_2 = require("./locales/en/strategies.json");
29
31
  const swap_json_2 = require("./locales/en/swap.json");
30
32
  const trade_json_2 = require("./locales/en/trade.json");
33
+ const lending_json_2 = require("./locales/en/lending.json");
34
+ const liquidate_json_2 = require("./locales/en/liquidate.json");
31
35
  const STORAGE_KEY = "language";
32
36
  const SUPPORTED_LANGUAGES = ["en", "de"];
33
37
  exports.SUPPORTED_LANGUAGES = SUPPORTED_LANGUAGES;
@@ -69,6 +73,8 @@ i18next_1.default.use(react_i18next_1.initReactI18next).init({
69
73
  ecosystem: ecosystem_json_2.default,
70
74
  merge: merge_json_2.default,
71
75
  leagues: leagues_json_2.default,
76
+ lending: lending_json_2.default,
77
+ liquidate: liquidate_json_2.default,
72
78
  },
73
79
  de: {
74
80
  swap: swap_json_1.default,
@@ -83,6 +89,8 @@ i18next_1.default.use(react_i18next_1.initReactI18next).init({
83
89
  ecosystem: ecosystem_json_1.default,
84
90
  merge: merge_json_1.default,
85
91
  leagues: leagues_json_1.default,
92
+ lending: lending_json_1.default,
93
+ liquidate: liquidate_json_1.default,
86
94
  },
87
95
  },
88
96
  lng: detectLanguage(),
@@ -101,6 +109,7 @@ i18next_1.default.use(react_i18next_1.initReactI18next).init({
101
109
  "ecosystem",
102
110
  "merge",
103
111
  "leagues",
112
+ "lending",
104
113
  ],
105
114
  interpolation: {
106
115
  escapeValue: false,