@multiversx/sdk-dapp-liquidity 1.0.12 → 1.0.14

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 (302) hide show
  1. package/ConstantsUtil-BinYIDR2.mjs +8 -0
  2. package/ConstantsUtil-CbnVdQ5P.js +8 -0
  3. package/add-D-ECcdUh.mjs +19 -0
  4. package/add-Diz8heiY.js +20 -0
  5. package/all-wallets-_iOQf3bl.js +11 -0
  6. package/all-wallets-puIIQy3Y.mjs +10 -0
  7. package/app-store-BGTKFL27.js +22 -0
  8. package/app-store-Bsf7w3pv.mjs +21 -0
  9. package/apple-Cw8e8IGH.mjs +22 -0
  10. package/apple-DF7n_Yzl.js +23 -0
  11. package/arrow-bottom-Cp2C4fQv.mjs +12 -0
  12. package/arrow-bottom-DTvIR3s3.js +13 -0
  13. package/arrow-bottom-circle-CN6i5mHz.mjs +15 -0
  14. package/arrow-bottom-circle-CzPwiwWH.js +16 -0
  15. package/arrow-left-9VFYHQSW.js +13 -0
  16. package/arrow-left-BDQHoEvX.mjs +12 -0
  17. package/arrow-right-BxkuSpWU.mjs +12 -0
  18. package/arrow-right-DBLQ6w92.js +13 -0
  19. package/arrow-top-BiQd5Aey.js +13 -0
  20. package/arrow-top-BrLVX4Rj.mjs +12 -0
  21. package/bank-B7EC6Kdz.mjs +18 -0
  22. package/bank-CvPn9sfV.js +19 -0
  23. package/{bignumber-CKZkoo0g.mjs → bignumber-2Z7uapuD.mjs} +6 -6
  24. package/{bignumber-B8vjg9qn.js → bignumber-D1Wl54dL.js} +6 -6
  25. package/bin-BXO1kNZh.js +9 -0
  26. package/bin-CwiYVJ1L.mjs +8 -0
  27. package/bitcoin-C3kBVar_.mjs +17 -0
  28. package/bitcoin-DAvQGpeP.js +3251 -0
  29. package/bitcoin-dNBGbS2B.mjs +3251 -0
  30. package/bitcoin-k6bvmzMA.js +18 -0
  31. package/browser-ShRLuKKz.mjs +18 -0
  32. package/browser-t7nfT7HL.js +19 -0
  33. package/card-BJg5bdoM.mjs +18 -0
  34. package/card-hxUDXttT.js +19 -0
  35. package/checkmark-BpR0Yy93.mjs +15 -0
  36. package/checkmark-D9AVWgl5.js +16 -0
  37. package/checkmark-bold-D3Xcby1U.mjs +12 -0
  38. package/checkmark-bold-De02hde8.js +13 -0
  39. package/chevron-bottom-DcBf7T5F.js +13 -0
  40. package/chevron-bottom-DfGpWIz7.mjs +12 -0
  41. package/chevron-left-BKvYVnUo.js +13 -0
  42. package/chevron-left-DGSG9WJQ.mjs +12 -0
  43. package/chevron-right-BLgYIEeO.js +13 -0
  44. package/chevron-right-C2nsTx_Y.mjs +12 -0
  45. package/chevron-top-CwFOEFy8.js +13 -0
  46. package/chevron-top-vk-9DvUU.mjs +12 -0
  47. package/chrome-store-4H_ie3vA.mjs +65 -0
  48. package/chrome-store-BWarxVMl.js +66 -0
  49. package/circle-BtqWJU0_.mjs +8 -0
  50. package/circle-DYjG6o7-.js +9 -0
  51. package/clock-Ba5SM-pl.mjs +12 -0
  52. package/clock-DPzNREdU.js +13 -0
  53. package/close-CJHKFOyp.mjs +12 -0
  54. package/close-DDWnJdJe.js +13 -0
  55. package/coinPlaceholder-Cbba3D1H.mjs +12 -0
  56. package/coinPlaceholder-DdxQIc2D.js +13 -0
  57. package/compass-CugCxeSC.js +13 -0
  58. package/compass-DbN5DkTl.mjs +12 -0
  59. package/copy-CHSZprYJ.mjs +19 -0
  60. package/copy-En5h5Uhu.js +20 -0
  61. package/cursor-DCRkvEhr.mjs +7 -0
  62. package/cursor-DnEQtrUK.js +8 -0
  63. package/cursor-transparent-CU8lk-xg.js +17 -0
  64. package/cursor-transparent-CliETg4d.mjs +16 -0
  65. package/desktop-BgD7aypB.js +14 -0
  66. package/desktop-Cg5I32-p.mjs +13 -0
  67. package/disconnect-CCyMbAdw.js +13 -0
  68. package/disconnect-Cp2vRWB2.mjs +12 -0
  69. package/discord-B1d-qeSk.mjs +21 -0
  70. package/discord-BEB5klec.js +22 -0
  71. package/email-CorlePKz.js +873 -0
  72. package/email-Znno7H8_.mjs +878 -0
  73. package/embedded-wallet-B9ro9Tel.js +549 -0
  74. package/embedded-wallet-CnTWeseG.mjs +552 -0
  75. package/ethereum-BRcsRjUU.mjs +14 -0
  76. package/ethereum-CZ_xe09e.js +15 -0
  77. package/etherscan-BZKGpKp8.mjs +10 -0
  78. package/etherscan-DtLi-C3z.js +11 -0
  79. package/exclamation-triangle-BLNnBLEc.js +9 -0
  80. package/exclamation-triangle-CFThXxRT.mjs +8 -0
  81. package/extension-CwUepr-W.mjs +12 -0
  82. package/extension-DOD67G1k.js +13 -0
  83. package/external-link-CZkQS5XK.js +13 -0
  84. package/external-link-ClYNKSPt.mjs +12 -0
  85. package/facebook-CFjrd4my.mjs +30 -0
  86. package/facebook-CbE6K6AK.js +31 -0
  87. package/farcaster-Ba7_C-Vm.js +17 -0
  88. package/farcaster-DyVJtVS9.mjs +16 -0
  89. package/filters-CpHaFNjT.mjs +12 -0
  90. package/filters-w5LC-r6e.js +13 -0
  91. package/github-CeO70C3E.mjs +22 -0
  92. package/github-uLFBWAa5.js +23 -0
  93. package/google-CyOdUlbw.mjs +22 -0
  94. package/google-ILGK-opP.js +23 -0
  95. package/help-circle-Dh3dRNoB.mjs +16 -0
  96. package/help-circle-HUMbz_KN.js +17 -0
  97. package/id-Cy3Qkrvb.js +17 -0
  98. package/id-D-Q0uPFM.mjs +16 -0
  99. package/if-defined-CJ5EZLw2.js +815 -0
  100. package/if-defined-DjC5UMfF.mjs +815 -0
  101. package/image-BTGOf8bb.mjs +8 -0
  102. package/image-WFQO5bWa.js +9 -0
  103. package/index--O5ypTeK.mjs +70 -0
  104. package/index--Vg7VI9t.js +173 -0
  105. package/index-2iRSO1sa.mjs +9964 -0
  106. package/index-42Rpweo5.mjs +95 -0
  107. package/index-70kjE43k.mjs +90 -0
  108. package/index-8VyNYS01.js +273 -0
  109. package/index-B-dx8l0g.mjs +82 -0
  110. package/index-BB0nW9RB.mjs +198 -0
  111. package/index-BBwuv2SS.js +97 -0
  112. package/index-BIe-kofv.mjs +273 -0
  113. package/index-BQf6VHil.js +278 -0
  114. package/index-BWIZXhFv.mjs +630 -0
  115. package/index-BXkamf-I.js +337 -0
  116. package/index-BYTxCmKH.js +64 -0
  117. package/index-BYoOxo0S.js +218 -0
  118. package/index-Ba0tVdql.js +200 -0
  119. package/index-BdOAPWyt.mjs +210 -0
  120. package/index-BirWzf8c.mjs +71 -0
  121. package/index-BnCJUHtW.mjs +346 -0
  122. package/index-BuL2FC61.mjs +216 -0
  123. package/index-BxSUTfaY.js +88 -0
  124. package/index-C49C5Rxf.js +743 -0
  125. package/index-CNMDBpW7.js +346 -0
  126. package/index-CP0CGjqQ.mjs +263 -0
  127. package/index-CQaHcTZM.mjs +86 -0
  128. package/index-CRGXQei1.js +178 -0
  129. package/index-CSykUIfV.mjs +176 -0
  130. package/index-CWIHaLkQ.mjs +101 -0
  131. package/index-CZSDJd0P.mjs +1070 -0
  132. package/index-CZaV8JgR.mjs +49 -0
  133. package/index-CZjdy6QP.js +101 -0
  134. package/index-C_lIGGlC.js +632 -0
  135. package/index-CcgeRPs2.mjs +57 -0
  136. package/index-CeY_DRuc.js +566 -0
  137. package/index-ChFNkSxT.js +92 -0
  138. package/index-CkjZc20w.js +677 -0
  139. package/index-CtFcWwAd.js +72 -0
  140. package/index-D0mOfznC.mjs +362 -0
  141. package/index-DAtWLY21.js +84 -0
  142. package/index-DEs8H3w2.js +262 -0
  143. package/index-DLnxotbC.mjs +566 -0
  144. package/index-DN4fGDgg.mjs +743 -0
  145. package/index-DT_mc1hV.mjs +335 -0
  146. package/index-DZEwxUMS.js +59 -0
  147. package/index-DaRH_4bD.js +9939 -0
  148. package/index-Daok2ZKn.js +73 -0
  149. package/index-DomzHmwk.js +210 -0
  150. package/index-Dx7NyDyv.mjs +101 -0
  151. package/index-DyGir6_2.mjs +675 -0
  152. package/index-GglJmM2C.js +2237 -0
  153. package/index-H5b7UTeJ.mjs +173 -0
  154. package/index-NNZ1lNuc.mjs +168 -0
  155. package/index-RJd-gQcv.mjs +2235 -0
  156. package/index-dnFzVpGy.js +103 -0
  157. package/index-kwVLu8EV.js +168 -0
  158. package/index-miQwZPmn.js +51 -0
  159. package/index-oCj_SpOa.mjs +62 -0
  160. package/index-pNK-h_x9.js +1069 -0
  161. package/index-r6Kre1rx.js +362 -0
  162. package/index-xBD0nXoB.mjs +276 -0
  163. package/index.js +3 -3
  164. package/index.mjs +3 -3
  165. package/info-BKNAiN0k.js +8 -0
  166. package/info-DQE0s-A4.mjs +7 -0
  167. package/info-circle-C3uTocjH.js +17 -0
  168. package/info-circle-CIn6yeQo.mjs +16 -0
  169. package/lightbulb-CB-BmIop.js +8 -0
  170. package/lightbulb-Gv7IbnzO.mjs +7 -0
  171. package/mail-CFYm95wn.mjs +12 -0
  172. package/mail-GEwk-Fzr.js +13 -0
  173. package/mobile-CZ7ZBfa5.js +14 -0
  174. package/mobile-OIbnpFsU.mjs +13 -0
  175. package/more-C8N_RV55.mjs +15 -0
  176. package/more-CiQpPZwq.js +16 -0
  177. package/network-placeholder-CxEcczEx.mjs +18 -0
  178. package/network-placeholder-DwR8E8hP.js +19 -0
  179. package/nftPlaceholder-BFexVcGX.js +13 -0
  180. package/nftPlaceholder-MiYL110I.mjs +12 -0
  181. package/off-BNiMlpUU.mjs +8 -0
  182. package/off-iJHSK3Z7.js +9 -0
  183. package/onramp-Bs8HHFFY.js +1474 -0
  184. package/onramp-C6fuQfX7.mjs +1480 -0
  185. package/package.json +11 -11
  186. package/play-store-B4ssIYUA.js +37 -0
  187. package/play-store-D6nmQXhX.mjs +36 -0
  188. package/plus-Bh7z7Oc0.js +18 -0
  189. package/plus-C8ioZuCD.mjs +17 -0
  190. package/qr-code-CSVwaBLf.mjs +10 -0
  191. package/qr-code-YgtXPokK.js +11 -0
  192. package/react-BWxe90Ar.mjs +6342 -0
  193. package/react-BzZcQig5.js +6342 -0
  194. package/react-C_wTMVq_.js +23003 -0
  195. package/react-M-DnxvZl.mjs +23003 -0
  196. package/reactjs/components/BridgeForm/BridgeForm.js +2 -1
  197. package/reactjs/components/BridgeForm/BridgeForm.mjs +2 -1
  198. package/reactjs/components/Connect/BridgeAccountDisplay.js +3 -2
  199. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +3 -2
  200. package/reactjs/components/Connect/CustomConnectButton.js +3 -2
  201. package/reactjs/components/Connect/CustomConnectButton.mjs +3 -2
  202. package/reactjs/components/Connect/SwitchChainButton.js +4 -3
  203. package/reactjs/components/Connect/SwitchChainButton.mjs +4 -3
  204. package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -1
  205. package/reactjs/components/DisplayAmount/DisplayAmount.mjs +1 -1
  206. package/reactjs/components/TokenSelector/components/TokenItem.js +1 -1
  207. package/reactjs/components/TokenSelector/components/TokenItem.mjs +1 -1
  208. package/reactjs/hooks/useAccount.d.ts +4 -4
  209. package/reactjs/hooks/useAccount.js +3 -2
  210. package/reactjs/hooks/useAccount.mjs +3 -2
  211. package/reactjs/hooks/useGetChainId.js +1 -1
  212. package/reactjs/hooks/useGetChainId.mjs +1 -1
  213. package/reactjs/index.js +3 -3
  214. package/reactjs/index.mjs +3 -3
  215. package/reactjs/init/init.js +4 -3
  216. package/reactjs/init/init.mjs +4 -3
  217. package/reactjs/init/tests/init.spec.js +2 -2
  218. package/reactjs/init/tests/init.spec.mjs +2 -2
  219. package/reactjs/queries/useGetEvmTokensBalances.query.js +3 -2
  220. package/reactjs/queries/useGetEvmTokensBalances.query.mjs +3 -2
  221. package/reactjs/reexports.js +3 -3
  222. package/reactjs/reexports.mjs +3 -3
  223. package/reactjs/utils/getCleanStringAmount.js +1 -1
  224. package/reactjs/utils/getCleanStringAmount.mjs +1 -1
  225. package/reactjs/utils/hasEnoughFunds.js +1 -1
  226. package/reactjs/utils/hasEnoughFunds.mjs +1 -1
  227. package/reactjs/utils/isStringFloat.js +1 -1
  228. package/reactjs/utils/isStringFloat.mjs +1 -1
  229. package/reactjs/utils/roundAmount.js +1 -1
  230. package/reactjs/utils/roundAmount.mjs +1 -1
  231. package/receive-CK0hRQPr.js +212 -0
  232. package/receive-CQcD6bZf.mjs +212 -0
  233. package/recycle-horizontal--x5cMoTE.js +14 -0
  234. package/recycle-horizontal-QI0xtDHK.mjs +13 -0
  235. package/ref-CqxfRkBm.mjs +41 -0
  236. package/ref-FGI2cUQB.js +41 -0
  237. package/refresh-CFNHjhDi.js +13 -0
  238. package/refresh-CSOC1NUY.mjs +12 -0
  239. package/reown-logo-BfU5xFX5.js +17 -0
  240. package/reown-logo-CZAEp1jU.mjs +16 -0
  241. package/search-Do_rb-9-.mjs +12 -0
  242. package/search-V9CGMHkm.js +13 -0
  243. package/send-D-5G7tDL.mjs +1204 -0
  244. package/send-D4yYsIHV.mjs +19 -0
  245. package/send-DoiSHLsX.js +1202 -0
  246. package/send-_jfNFrys.js +20 -0
  247. package/socials-BL7-97fT.mjs +758 -0
  248. package/socials-DF0CK9cN.js +756 -0
  249. package/solana-BQ0Jh8lh.js +18 -0
  250. package/solana-YAkDp6j_.mjs +17 -0
  251. package/swapHorizontal-DOIo-Ccx.mjs +12 -0
  252. package/swapHorizontal-OHKtz4Gu.js +13 -0
  253. package/swapHorizontalBold-D7QmFj-c.js +13 -0
  254. package/swapHorizontalBold-DDroA0Af.mjs +12 -0
  255. package/swapHorizontalMedium-CU_v0kFz.mjs +20 -0
  256. package/swapHorizontalMedium-D-yMmtml.js +21 -0
  257. package/swapHorizontalRoundedBold-CHvbmnjw.js +13 -0
  258. package/swapHorizontalRoundedBold-DXMH0sgK.mjs +12 -0
  259. package/swapVertical-CH7fTK6w.js +13 -0
  260. package/swapVertical-HJZ6rFcr.mjs +12 -0
  261. package/swaps-CETflhdU.js +1952 -0
  262. package/swaps-DRUV6d3p.mjs +1954 -0
  263. package/telegram-CsCauOwj.mjs +20 -0
  264. package/telegram-DKEcF_Tq.js +21 -0
  265. package/three-dots-B-7hr8Nl.js +10 -0
  266. package/three-dots-LNZ_fjP7.mjs +9 -0
  267. package/transactions-BTTsGV2W.mjs +37 -0
  268. package/transactions-mpNNlClw.js +37 -0
  269. package/twitch-CCWVT2ij.js +23 -0
  270. package/twitch-Dg1CCQvd.mjs +22 -0
  271. package/twitterIcon-BjR09Cj9.mjs +10 -0
  272. package/twitterIcon-CeEs0iDJ.js +11 -0
  273. package/verify-B8WZq7kt.mjs +12 -0
  274. package/verify-filled-BeqC1imk.mjs +12 -0
  275. package/verify-filled-C-mv3ApD.js +13 -0
  276. package/verify-yATdPqt-.js +13 -0
  277. package/w3m-modal-3GziKj7h.js +1254 -0
  278. package/w3m-modal-81Z5PngE.mjs +1255 -0
  279. package/wallet-BMXEH23x.js +13 -0
  280. package/wallet-CNAVQCfm.mjs +12 -0
  281. package/wallet-placeholder-CQ-7CmVN.mjs +18 -0
  282. package/wallet-placeholder-CdoQy2e6.js +19 -0
  283. package/walletconnect-ACr-R1QZ.mjs +38 -0
  284. package/walletconnect-BWSkiS2F.js +39 -0
  285. package/warning-circle-CYnuYwpt.js +17 -0
  286. package/warning-circle-HV2lOiCj.mjs +16 -0
  287. package/x-CW5dozRj.js +17 -0
  288. package/x-Cgm2OFpL.mjs +16 -0
  289. package/x-mark-CR8SpZvu.js +8 -0
  290. package/x-mark-u0KJjUJ1.mjs +7 -0
  291. package/index-B4Eq5P3w.mjs +0 -91
  292. package/index-C4WV9nam.js +0 -329
  293. package/index-CWMcKi_X.js +0 -107
  294. package/index-D8E0O3qL.mjs +0 -68744
  295. package/index-DJ8CdHSw.mjs +0 -107
  296. package/index-nigVQYBu.js +0 -68665
  297. package/react-C43nEIqn.js +0 -3133
  298. package/react-DKUsVej7.js +0 -50
  299. package/react-Dp0H8q2z.mjs +0 -50
  300. package/react-wMhOUFOm.mjs +0 -3133
  301. package/w3m-modal-DLyg7Voy.js +0 -356
  302. package/w3m-modal-hC-B8qZP.mjs +0 -356
@@ -0,0 +1,677 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ const bitcoin = require("./bitcoin-DAvQGpeP.js");
4
+ const ifDefined = require("./if-defined-CJ5EZLw2.js");
5
+ const index = require("./index-CeY_DRuc.js");
6
+ require("./index-BBwuv2SS.js");
7
+ require("./index-DZEwxUMS.js");
8
+ require("./index-CtFcWwAd.js");
9
+ const react = require("./react-BzZcQig5.js");
10
+ var TransactionTypePastTense;
11
+ (function(TransactionTypePastTense2) {
12
+ TransactionTypePastTense2["approve"] = "approved";
13
+ TransactionTypePastTense2["bought"] = "bought";
14
+ TransactionTypePastTense2["borrow"] = "borrowed";
15
+ TransactionTypePastTense2["burn"] = "burnt";
16
+ TransactionTypePastTense2["cancel"] = "canceled";
17
+ TransactionTypePastTense2["claim"] = "claimed";
18
+ TransactionTypePastTense2["deploy"] = "deployed";
19
+ TransactionTypePastTense2["deposit"] = "deposited";
20
+ TransactionTypePastTense2["execute"] = "executed";
21
+ TransactionTypePastTense2["mint"] = "minted";
22
+ TransactionTypePastTense2["receive"] = "received";
23
+ TransactionTypePastTense2["repay"] = "repaid";
24
+ TransactionTypePastTense2["send"] = "sent";
25
+ TransactionTypePastTense2["sell"] = "sold";
26
+ TransactionTypePastTense2["stake"] = "staked";
27
+ TransactionTypePastTense2["trade"] = "swapped";
28
+ TransactionTypePastTense2["unstake"] = "unstaked";
29
+ TransactionTypePastTense2["withdraw"] = "withdrawn";
30
+ })(TransactionTypePastTense || (TransactionTypePastTense = {}));
31
+ const styles$2 = bitcoin.i`
32
+ :host > wui-flex {
33
+ display: flex;
34
+ justify-content: center;
35
+ align-items: center;
36
+ position: relative;
37
+ width: 40px;
38
+ height: 40px;
39
+ box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
40
+ background-color: var(--wui-color-gray-glass-005);
41
+ }
42
+
43
+ :host > wui-flex wui-image {
44
+ display: block;
45
+ }
46
+
47
+ :host > wui-flex,
48
+ :host > wui-flex wui-image,
49
+ .swap-images-container,
50
+ .swap-images-container.nft,
51
+ wui-image.nft {
52
+ border-top-left-radius: var(--local-left-border-radius);
53
+ border-top-right-radius: var(--local-right-border-radius);
54
+ border-bottom-left-radius: var(--local-left-border-radius);
55
+ border-bottom-right-radius: var(--local-right-border-radius);
56
+ }
57
+
58
+ wui-icon {
59
+ width: 20px;
60
+ height: 20px;
61
+ }
62
+
63
+ wui-icon-box {
64
+ position: absolute;
65
+ right: 0;
66
+ bottom: 0;
67
+ transform: translate(20%, 20%);
68
+ }
69
+
70
+ .swap-images-container {
71
+ position: relative;
72
+ width: 40px;
73
+ height: 40px;
74
+ overflow: hidden;
75
+ }
76
+
77
+ .swap-images-container wui-image:first-child {
78
+ position: absolute;
79
+ width: 40px;
80
+ height: 40px;
81
+ top: 0;
82
+ left: 0%;
83
+ clip-path: inset(0px calc(50% + 2px) 0px 0%);
84
+ }
85
+
86
+ .swap-images-container wui-image:last-child {
87
+ clip-path: inset(0px 0px 0px calc(50% + 2px));
88
+ }
89
+ `;
90
+ var __decorate$2 = function(decorators, target, key, desc) {
91
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
92
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
93
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
95
+ };
96
+ let WuiTransactionVisual = class WuiTransactionVisual2 extends bitcoin.i$1 {
97
+ constructor() {
98
+ super(...arguments);
99
+ this.images = [];
100
+ this.secondImage = {
101
+ type: void 0,
102
+ url: ""
103
+ };
104
+ }
105
+ render() {
106
+ const [firstImage, secondImage] = this.images;
107
+ const isLeftNFT = (firstImage == null ? void 0 : firstImage.type) === "NFT";
108
+ const isRightNFT = (secondImage == null ? void 0 : secondImage.url) ? secondImage.type === "NFT" : isLeftNFT;
109
+ const leftRadius = isLeftNFT ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)";
110
+ const rightRadius = isRightNFT ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)";
111
+ this.style.cssText = `
112
+ --local-left-border-radius: ${leftRadius};
113
+ --local-right-border-radius: ${rightRadius};
114
+ `;
115
+ return bitcoin.x`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`;
116
+ }
117
+ templateVisual() {
118
+ const [firstImage, secondImage] = this.images;
119
+ const firstImageType = firstImage == null ? void 0 : firstImage.type;
120
+ const haveTwoImages = this.images.length === 2;
121
+ if (haveTwoImages && ((firstImage == null ? void 0 : firstImage.url) || (secondImage == null ? void 0 : secondImage.url))) {
122
+ return bitcoin.x`<div class="swap-images-container">
123
+ ${(firstImage == null ? void 0 : firstImage.url) ? bitcoin.x`<wui-image src=${firstImage.url} alt="Transaction image"></wui-image>` : null}
124
+ ${(secondImage == null ? void 0 : secondImage.url) ? bitcoin.x`<wui-image src=${secondImage.url} alt="Transaction image"></wui-image>` : null}
125
+ </div>`;
126
+ } else if (firstImage == null ? void 0 : firstImage.url) {
127
+ return bitcoin.x`<wui-image src=${firstImage.url} alt="Transaction image"></wui-image>`;
128
+ } else if (firstImageType === "NFT") {
129
+ return bitcoin.x`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>`;
130
+ }
131
+ return bitcoin.x`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`;
132
+ }
133
+ templateIcon() {
134
+ let color = "accent-100";
135
+ let icon = void 0;
136
+ icon = this.getIcon();
137
+ if (this.status) {
138
+ color = this.getStatusColor();
139
+ }
140
+ if (!icon) {
141
+ return null;
142
+ }
143
+ return bitcoin.x`
144
+ <wui-icon-box
145
+ size="xxs"
146
+ iconColor=${color}
147
+ backgroundColor=${color}
148
+ background="opaque"
149
+ icon=${icon}
150
+ ?border=${true}
151
+ borderColor="wui-color-bg-125"
152
+ ></wui-icon-box>
153
+ `;
154
+ }
155
+ getDirectionIcon() {
156
+ switch (this.direction) {
157
+ case "in":
158
+ return "arrowBottom";
159
+ case "out":
160
+ return "arrowTop";
161
+ default:
162
+ return void 0;
163
+ }
164
+ }
165
+ getIcon() {
166
+ if (this.onlyDirectionIcon) {
167
+ return this.getDirectionIcon();
168
+ }
169
+ if (this.type === "trade") {
170
+ return "swapHorizontalBold";
171
+ } else if (this.type === "approve") {
172
+ return "checkmark";
173
+ } else if (this.type === "cancel") {
174
+ return "close";
175
+ }
176
+ return this.getDirectionIcon();
177
+ }
178
+ getStatusColor() {
179
+ switch (this.status) {
180
+ case "confirmed":
181
+ return "success-100";
182
+ case "failed":
183
+ return "error-100";
184
+ case "pending":
185
+ return "inverse-100";
186
+ default:
187
+ return "accent-100";
188
+ }
189
+ }
190
+ };
191
+ WuiTransactionVisual.styles = [styles$2];
192
+ __decorate$2([
193
+ ifDefined.n()
194
+ ], WuiTransactionVisual.prototype, "type", void 0);
195
+ __decorate$2([
196
+ ifDefined.n()
197
+ ], WuiTransactionVisual.prototype, "status", void 0);
198
+ __decorate$2([
199
+ ifDefined.n()
200
+ ], WuiTransactionVisual.prototype, "direction", void 0);
201
+ __decorate$2([
202
+ ifDefined.n({ type: Boolean })
203
+ ], WuiTransactionVisual.prototype, "onlyDirectionIcon", void 0);
204
+ __decorate$2([
205
+ ifDefined.n({ type: Array })
206
+ ], WuiTransactionVisual.prototype, "images", void 0);
207
+ __decorate$2([
208
+ ifDefined.n({ type: Object })
209
+ ], WuiTransactionVisual.prototype, "secondImage", void 0);
210
+ WuiTransactionVisual = __decorate$2([
211
+ ifDefined.customElement("wui-transaction-visual")
212
+ ], WuiTransactionVisual);
213
+ const styles$1 = bitcoin.i`
214
+ :host > wui-flex:first-child {
215
+ align-items: center;
216
+ column-gap: var(--wui-spacing-s);
217
+ padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
218
+ width: 100%;
219
+ }
220
+
221
+ :host > wui-flex:first-child wui-text:nth-child(1) {
222
+ text-transform: capitalize;
223
+ }
224
+
225
+ wui-transaction-visual {
226
+ width: 40px;
227
+ height: 40px;
228
+ }
229
+
230
+ wui-flex {
231
+ flex: 1;
232
+ }
233
+
234
+ :host wui-flex wui-flex {
235
+ overflow: hidden;
236
+ }
237
+
238
+ :host .description-container wui-text span {
239
+ word-break: break-all;
240
+ }
241
+
242
+ :host .description-container wui-text {
243
+ overflow: hidden;
244
+ }
245
+
246
+ :host .description-separator-icon {
247
+ margin: 0px 6px;
248
+ }
249
+
250
+ :host wui-text > span {
251
+ overflow: hidden;
252
+ display: -webkit-box;
253
+ -webkit-box-orient: vertical;
254
+ -webkit-line-clamp: 1;
255
+ }
256
+ `;
257
+ var __decorate$1 = function(decorators, target, key, desc) {
258
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
259
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
260
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
261
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
262
+ };
263
+ let WuiTransactionListItem = class WuiTransactionListItem2 extends bitcoin.i$1 {
264
+ constructor() {
265
+ super(...arguments);
266
+ this.type = "approve";
267
+ this.onlyDirectionIcon = false;
268
+ this.images = [];
269
+ this.price = [];
270
+ this.amount = [];
271
+ this.symbol = [];
272
+ }
273
+ render() {
274
+ return bitcoin.x`
275
+ <wui-flex>
276
+ <wui-transaction-visual
277
+ .status=${this.status}
278
+ direction=${ifDefined.o(this.direction)}
279
+ type=${this.type}
280
+ onlyDirectionIcon=${ifDefined.o(this.onlyDirectionIcon)}
281
+ .images=${this.images}
282
+ ></wui-transaction-visual>
283
+ <wui-flex flexDirection="column" gap="3xs">
284
+ <wui-text variant="paragraph-600" color="fg-100">
285
+ ${TransactionTypePastTense[this.type] || this.type}
286
+ </wui-text>
287
+ <wui-flex class="description-container">
288
+ ${this.templateDescription()} ${this.templateSecondDescription()}
289
+ </wui-flex>
290
+ </wui-flex>
291
+ <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
292
+ </wui-flex>
293
+ `;
294
+ }
295
+ templateDescription() {
296
+ var _a;
297
+ const description = (_a = this.descriptions) == null ? void 0 : _a[0];
298
+ return description ? bitcoin.x`
299
+ <wui-text variant="small-500" color="fg-200">
300
+ <span>${description}</span>
301
+ </wui-text>
302
+ ` : null;
303
+ }
304
+ templateSecondDescription() {
305
+ var _a;
306
+ const description = (_a = this.descriptions) == null ? void 0 : _a[1];
307
+ return description ? bitcoin.x`
308
+ <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
309
+ <wui-text variant="small-400" color="fg-200">
310
+ <span>${description}</span>
311
+ </wui-text>
312
+ ` : null;
313
+ }
314
+ };
315
+ WuiTransactionListItem.styles = [bitcoin.resetStyles, styles$1];
316
+ __decorate$1([
317
+ ifDefined.n()
318
+ ], WuiTransactionListItem.prototype, "type", void 0);
319
+ __decorate$1([
320
+ ifDefined.n({ type: Array })
321
+ ], WuiTransactionListItem.prototype, "descriptions", void 0);
322
+ __decorate$1([
323
+ ifDefined.n()
324
+ ], WuiTransactionListItem.prototype, "date", void 0);
325
+ __decorate$1([
326
+ ifDefined.n({ type: Boolean })
327
+ ], WuiTransactionListItem.prototype, "onlyDirectionIcon", void 0);
328
+ __decorate$1([
329
+ ifDefined.n()
330
+ ], WuiTransactionListItem.prototype, "status", void 0);
331
+ __decorate$1([
332
+ ifDefined.n()
333
+ ], WuiTransactionListItem.prototype, "direction", void 0);
334
+ __decorate$1([
335
+ ifDefined.n({ type: Array })
336
+ ], WuiTransactionListItem.prototype, "images", void 0);
337
+ __decorate$1([
338
+ ifDefined.n({ type: Array })
339
+ ], WuiTransactionListItem.prototype, "price", void 0);
340
+ __decorate$1([
341
+ ifDefined.n({ type: Array })
342
+ ], WuiTransactionListItem.prototype, "amount", void 0);
343
+ __decorate$1([
344
+ ifDefined.n({ type: Array })
345
+ ], WuiTransactionListItem.prototype, "symbol", void 0);
346
+ WuiTransactionListItem = __decorate$1([
347
+ ifDefined.customElement("wui-transaction-list-item")
348
+ ], WuiTransactionListItem);
349
+ const styles = bitcoin.i`
350
+ :host {
351
+ min-height: 100%;
352
+ }
353
+
354
+ .group-container[last-group='true'] {
355
+ padding-bottom: var(--wui-spacing-m);
356
+ }
357
+
358
+ .contentContainer {
359
+ height: 280px;
360
+ }
361
+
362
+ .contentContainer > wui-icon-box {
363
+ width: 40px;
364
+ height: 40px;
365
+ border-radius: var(--wui-border-radius-xxs);
366
+ }
367
+
368
+ .contentContainer > .textContent {
369
+ width: 65%;
370
+ }
371
+
372
+ .emptyContainer {
373
+ height: 100%;
374
+ }
375
+ `;
376
+ var __decorate = function(decorators, target, key, desc) {
377
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
378
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
379
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
380
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
381
+ };
382
+ const PAGINATOR_ID = "last-transaction";
383
+ const LOADING_ITEM_COUNT = 7;
384
+ let W3mActivityList = class W3mActivityList2 extends bitcoin.i$1 {
385
+ constructor() {
386
+ super();
387
+ this.unsubscribe = [];
388
+ this.paginationObserver = void 0;
389
+ this.page = "activity";
390
+ this.caipAddress = react.ChainController.state.activeCaipAddress;
391
+ this.transactionsByYear = react.TransactionsController.state.transactionsByYear;
392
+ this.loading = react.TransactionsController.state.loading;
393
+ this.empty = react.TransactionsController.state.empty;
394
+ this.next = react.TransactionsController.state.next;
395
+ react.TransactionsController.clearCursor();
396
+ this.unsubscribe.push(...[
397
+ react.ChainController.subscribeKey("activeCaipAddress", (val) => {
398
+ if (val) {
399
+ if (this.caipAddress !== val) {
400
+ react.TransactionsController.resetTransactions();
401
+ react.TransactionsController.fetchTransactions(val);
402
+ }
403
+ }
404
+ this.caipAddress = val;
405
+ }),
406
+ react.ChainController.subscribeKey("activeCaipNetwork", () => {
407
+ this.updateTransactionView();
408
+ }),
409
+ react.TransactionsController.subscribe((val) => {
410
+ this.transactionsByYear = val.transactionsByYear;
411
+ this.loading = val.loading;
412
+ this.empty = val.empty;
413
+ this.next = val.next;
414
+ })
415
+ ]);
416
+ }
417
+ firstUpdated() {
418
+ this.updateTransactionView();
419
+ this.createPaginationObserver();
420
+ }
421
+ updated() {
422
+ this.setPaginationObserver();
423
+ }
424
+ disconnectedCallback() {
425
+ this.unsubscribe.forEach((unsubscribe) => unsubscribe());
426
+ }
427
+ render() {
428
+ return bitcoin.x` ${this.empty ? null : this.templateTransactionsByYear()}
429
+ ${this.loading ? this.templateLoading() : null}
430
+ ${!this.loading && this.empty ? this.templateEmpty() : null}`;
431
+ }
432
+ updateTransactionView() {
433
+ react.TransactionsController.resetTransactions();
434
+ if (this.caipAddress) {
435
+ react.TransactionsController.fetchTransactions(react.CoreHelperUtil.getPlainAddress(this.caipAddress));
436
+ }
437
+ }
438
+ templateTransactionsByYear() {
439
+ const sortedYearKeys = Object.keys(this.transactionsByYear).sort().reverse();
440
+ return sortedYearKeys.map((year) => {
441
+ const yearInt = parseInt(year, 10);
442
+ const sortedMonthIndexes = new Array(12).fill(null).map((_, idx) => {
443
+ var _a;
444
+ const groupTitle = index.TransactionUtil.getTransactionGroupTitle(yearInt, idx);
445
+ const transactions = (_a = this.transactionsByYear[yearInt]) == null ? void 0 : _a[idx];
446
+ return {
447
+ groupTitle,
448
+ transactions
449
+ };
450
+ }).filter(({ transactions }) => transactions).reverse();
451
+ return sortedMonthIndexes.map(({ groupTitle, transactions }, index2) => {
452
+ const isLastGroup = index2 === sortedMonthIndexes.length - 1;
453
+ if (!transactions) {
454
+ return null;
455
+ }
456
+ return bitcoin.x`
457
+ <wui-flex
458
+ flexDirection="column"
459
+ class="group-container"
460
+ last-group="${isLastGroup ? "true" : "false"}"
461
+ data-testid="month-indexes"
462
+ >
463
+ <wui-flex
464
+ alignItems="center"
465
+ flexDirection="row"
466
+ .padding=${["xs", "s", "s", "s"]}
467
+ >
468
+ <wui-text variant="paragraph-500" color="fg-200" data-testid="group-title"
469
+ >${groupTitle}</wui-text
470
+ >
471
+ </wui-flex>
472
+ <wui-flex flexDirection="column" gap="xs">
473
+ ${this.templateTransactions(transactions, isLastGroup)}
474
+ </wui-flex>
475
+ </wui-flex>
476
+ `;
477
+ });
478
+ });
479
+ }
480
+ templateRenderTransaction(transaction, isLastTransaction) {
481
+ const { date, descriptions, direction, isAllNFT, images, status, transfers, type } = this.getTransactionListItemProps(transaction);
482
+ const haveMultipleTransfers = (transfers == null ? void 0 : transfers.length) > 1;
483
+ const haveTwoTransfers = (transfers == null ? void 0 : transfers.length) === 2;
484
+ if (haveTwoTransfers && !isAllNFT) {
485
+ return bitcoin.x`
486
+ <wui-transaction-list-item
487
+ date=${date}
488
+ .direction=${direction}
489
+ id=${isLastTransaction && this.next ? PAGINATOR_ID : ""}
490
+ status=${status}
491
+ type=${type}
492
+ .images=${images}
493
+ .descriptions=${descriptions}
494
+ ></wui-transaction-list-item>
495
+ `;
496
+ }
497
+ if (haveMultipleTransfers) {
498
+ return transfers.map((transfer, index$1) => {
499
+ const description = index.TransactionUtil.getTransferDescription(transfer);
500
+ const isLastTransfer = isLastTransaction && index$1 === transfers.length - 1;
501
+ return bitcoin.x` <wui-transaction-list-item
502
+ date=${date}
503
+ direction=${transfer.direction}
504
+ id=${isLastTransfer && this.next ? PAGINATOR_ID : ""}
505
+ status=${status}
506
+ type=${type}
507
+ .onlyDirectionIcon=${true}
508
+ .images=${[images[index$1]]}
509
+ .descriptions=${[description]}
510
+ ></wui-transaction-list-item>`;
511
+ });
512
+ }
513
+ return bitcoin.x`
514
+ <wui-transaction-list-item
515
+ date=${date}
516
+ .direction=${direction}
517
+ id=${isLastTransaction && this.next ? PAGINATOR_ID : ""}
518
+ status=${status}
519
+ type=${type}
520
+ .images=${images}
521
+ .descriptions=${descriptions}
522
+ ></wui-transaction-list-item>
523
+ `;
524
+ }
525
+ templateTransactions(transactions, isLastGroup) {
526
+ return transactions.map((transaction, index2) => {
527
+ const isLastTransaction = isLastGroup && index2 === transactions.length - 1;
528
+ return bitcoin.x`${this.templateRenderTransaction(transaction, isLastTransaction)}`;
529
+ });
530
+ }
531
+ emptyStateActivity() {
532
+ return bitcoin.x`<wui-flex
533
+ class="emptyContainer"
534
+ flexGrow="1"
535
+ flexDirection="column"
536
+ justifyContent="center"
537
+ alignItems="center"
538
+ .padding=${["3xl", "xl", "3xl", "xl"]}
539
+ gap="xl"
540
+ data-testid="empty-activity-state"
541
+ >
542
+ <wui-icon-box
543
+ backgroundColor="gray-glass-005"
544
+ background="gray"
545
+ iconColor="fg-200"
546
+ icon="wallet"
547
+ size="lg"
548
+ ?border=${true}
549
+ borderColor="wui-color-bg-125"
550
+ ></wui-icon-box>
551
+ <wui-flex flexDirection="column" alignItems="center" gap="xs">
552
+ <wui-text align="center" variant="paragraph-500" color="fg-100"
553
+ >No Transactions yet</wui-text
554
+ >
555
+ <wui-text align="center" variant="small-500" color="fg-200"
556
+ >Start trading on dApps <br />
557
+ to grow your wallet!</wui-text
558
+ >
559
+ </wui-flex>
560
+ </wui-flex>`;
561
+ }
562
+ emptyStateAccount() {
563
+ return bitcoin.x`<wui-flex
564
+ class="contentContainer"
565
+ alignItems="center"
566
+ justifyContent="center"
567
+ flexDirection="column"
568
+ gap="l"
569
+ data-testid="empty-account-state"
570
+ >
571
+ <wui-icon-box
572
+ icon="swapHorizontal"
573
+ size="inherit"
574
+ iconColor="fg-200"
575
+ backgroundColor="fg-200"
576
+ iconSize="lg"
577
+ ></wui-icon-box>
578
+ <wui-flex
579
+ class="textContent"
580
+ gap="xs"
581
+ flexDirection="column"
582
+ justifyContent="center"
583
+ flexDirection="column"
584
+ >
585
+ <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text>
586
+ <wui-text variant="small-400" align="center" color="fg-200"
587
+ >Your next transactions will appear here</wui-text
588
+ >
589
+ </wui-flex>
590
+ <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
591
+ </wui-flex>`;
592
+ }
593
+ templateEmpty() {
594
+ if (this.page === "account") {
595
+ return bitcoin.x`${this.emptyStateAccount()}`;
596
+ }
597
+ return bitcoin.x`${this.emptyStateActivity()}`;
598
+ }
599
+ templateLoading() {
600
+ if (this.page === "activity") {
601
+ return Array(LOADING_ITEM_COUNT).fill(bitcoin.x` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((item) => item);
602
+ }
603
+ return null;
604
+ }
605
+ onReceiveClick() {
606
+ react.RouterController.push("WalletReceive");
607
+ }
608
+ createPaginationObserver() {
609
+ const activeChainNamespace = react.ChainController.state.activeChain;
610
+ const { projectId } = react.OptionsController.state;
611
+ this.paginationObserver = new IntersectionObserver(([element]) => {
612
+ if ((element == null ? void 0 : element.isIntersecting) && !this.loading) {
613
+ react.TransactionsController.fetchTransactions(react.CoreHelperUtil.getPlainAddress(this.caipAddress));
614
+ react.EventsController.sendEvent({
615
+ type: "track",
616
+ event: "LOAD_MORE_TRANSACTIONS",
617
+ properties: {
618
+ address: react.CoreHelperUtil.getPlainAddress(this.caipAddress),
619
+ projectId,
620
+ cursor: this.next,
621
+ isSmartAccount: react.getPreferredAccountType(activeChainNamespace) === react.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT
622
+ }
623
+ });
624
+ }
625
+ }, {});
626
+ this.setPaginationObserver();
627
+ }
628
+ setPaginationObserver() {
629
+ var _a, _b, _c;
630
+ (_a = this.paginationObserver) == null ? void 0 : _a.disconnect();
631
+ const lastItem = (_b = this.shadowRoot) == null ? void 0 : _b.querySelector(`#${PAGINATOR_ID}`);
632
+ if (lastItem) {
633
+ (_c = this.paginationObserver) == null ? void 0 : _c.observe(lastItem);
634
+ }
635
+ }
636
+ getTransactionListItemProps(transaction) {
637
+ var _a, _b, _c, _d, _e;
638
+ const date = index.DateUtil.formatDate((_a = transaction == null ? void 0 : transaction.metadata) == null ? void 0 : _a.minedAt);
639
+ const descriptions = index.TransactionUtil.getTransactionDescriptions(transaction);
640
+ const transfers = transaction == null ? void 0 : transaction.transfers;
641
+ const transfer = (_b = transaction == null ? void 0 : transaction.transfers) == null ? void 0 : _b[0];
642
+ const isAllNFT = Boolean(transfer) && ((_c = transaction == null ? void 0 : transaction.transfers) == null ? void 0 : _c.every((item) => Boolean(item.nft_info)));
643
+ const images = index.TransactionUtil.getTransactionImages(transfers);
644
+ return {
645
+ date,
646
+ direction: transfer == null ? void 0 : transfer.direction,
647
+ descriptions,
648
+ isAllNFT,
649
+ images,
650
+ status: (_d = transaction.metadata) == null ? void 0 : _d.status,
651
+ transfers,
652
+ type: (_e = transaction.metadata) == null ? void 0 : _e.operationType
653
+ };
654
+ }
655
+ };
656
+ W3mActivityList.styles = styles;
657
+ __decorate([
658
+ ifDefined.n()
659
+ ], W3mActivityList.prototype, "page", void 0);
660
+ __decorate([
661
+ ifDefined.r()
662
+ ], W3mActivityList.prototype, "caipAddress", void 0);
663
+ __decorate([
664
+ ifDefined.r()
665
+ ], W3mActivityList.prototype, "transactionsByYear", void 0);
666
+ __decorate([
667
+ ifDefined.r()
668
+ ], W3mActivityList.prototype, "loading", void 0);
669
+ __decorate([
670
+ ifDefined.r()
671
+ ], W3mActivityList.prototype, "empty", void 0);
672
+ __decorate([
673
+ ifDefined.r()
674
+ ], W3mActivityList.prototype, "next", void 0);
675
+ W3mActivityList = __decorate([
676
+ ifDefined.customElement("w3m-activity-list")
677
+ ], W3mActivityList);