@directcryptopay/sdk 0.2.1 → 0.2.3

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 (228) hide show
  1. package/dist/ExchangeController-CPMQq6Q-.js +217 -0
  2. package/dist/HelpersUtil-DfMFC7Bf.js +120 -0
  3. package/dist/NavigationUtil-kj9LEOOd.js +8 -0
  4. package/dist/PhArrowCircleDown-lsK25DCk.js +73 -0
  5. package/dist/PhArrowClockwise-NeKHZ1co.js +73 -0
  6. package/dist/PhArrowDown-C9AkNvLs.js +73 -0
  7. package/dist/PhArrowLeft-RNfIQP1X.js +73 -0
  8. package/dist/PhArrowRight-DM1tna0G.js +73 -0
  9. package/dist/PhArrowSquareOut-S5XYbAZj.js +73 -0
  10. package/dist/PhArrowUp-DmktzOWy.js +73 -0
  11. package/dist/PhArrowUpRight-BkNeW_5i.js +73 -0
  12. package/dist/PhArrowsClockwise-CQ4pG76b.js +73 -0
  13. package/dist/PhArrowsDownUp-H6gxaNM6.js +73 -0
  14. package/dist/PhArrowsLeftRight-DZSsfMR6.js +73 -0
  15. package/dist/PhBank-4_9QzqIB.js +73 -0
  16. package/dist/PhBrowser-B-JSznId.js +73 -0
  17. package/dist/PhCaretDown-vV5oHMNi.js +73 -0
  18. package/dist/PhCaretLeft-BLo6Y_f4.js +73 -0
  19. package/dist/PhCaretRight-CqQN4TT3.js +73 -0
  20. package/dist/PhCaretUp-Df7UCAHy.js +73 -0
  21. package/dist/PhCheck-gtpfK4ed.js +73 -0
  22. package/dist/PhCircleHalf-Uq7dwDYw.js +73 -0
  23. package/dist/PhClock-SDCW-NmF.js +73 -0
  24. package/dist/PhCompass-B7hgtdx-.js +73 -0
  25. package/dist/PhCopy-BcnhyXCy.js +73 -0
  26. package/dist/PhCreditCard-BJjByVgu.js +73 -0
  27. package/dist/PhCurrencyDollar-B7ZXqXBy.js +73 -0
  28. package/dist/PhDesktop-B3VKPuJx.js +73 -0
  29. package/dist/PhDeviceMobile-Bnd0TYEH.js +73 -0
  30. package/dist/PhDotsThree-yyMWyZ-R.js +73 -0
  31. package/dist/PhEnvelope-67uzHbI9.js +73 -0
  32. package/dist/PhFunnelSimple-B-DCsloI.js +73 -0
  33. package/dist/PhGlobe-TMm_6qGk.js +73 -0
  34. package/dist/PhIdentificationCard-CePPD2xc.js +73 -0
  35. package/dist/PhImage-gY96WtHR.js +73 -0
  36. package/dist/PhInfo-DRQM_ZDP.js +73 -0
  37. package/dist/PhLightbulb-B0TxPfZ1.js +73 -0
  38. package/dist/PhMagnifyingGlass-B8si5_6W.js +73 -0
  39. package/dist/PhPaperPlaneRight-DVu5PLYd.js +73 -0
  40. package/dist/PhPlus-BfTsQnUz.js +73 -0
  41. package/dist/PhPower-CxYUGOWn.js +73 -0
  42. package/dist/PhPuzzlePiece-CQ4wh0gV.js +73 -0
  43. package/dist/PhQrCode-BuJ97NYJ.js +73 -0
  44. package/dist/PhQuestion-kJoP8Mja.js +73 -0
  45. package/dist/PhQuestionMark-C46ZkFpu.js +73 -0
  46. package/dist/PhSealCheck-Eh8jVqSN.js +73 -0
  47. package/dist/PhSignOut-jk97OSVt.js +73 -0
  48. package/dist/PhSpinner-CiYOhwMg.js +73 -0
  49. package/dist/PhTrash-pxerMqzd.js +73 -0
  50. package/dist/PhUser-BMg0VV4A.js +73 -0
  51. package/dist/PhVault-DYQvx5A-.js +73 -0
  52. package/dist/PhWarning-NLC5Mj87.js +73 -0
  53. package/dist/PhWarningCircle-Ch2jU9fA.js +73 -0
  54. package/dist/PhX-Bx4wpwm3.js +73 -0
  55. package/dist/SwapController-Cti0Cyxa.js +457 -0
  56. package/dist/{ccip-BIGqktC1.js → ccip-CKZd2XJ7.js} +4 -4
  57. package/dist/data-capture-7D5CL385.js +490 -0
  58. package/dist/dcp-sdk.umd.js +7400 -6589
  59. package/dist/email-AmK0INbZ.js +344 -0
  60. package/dist/embedded-wallet-Pn0I_XLn.js +820 -0
  61. package/dist/features-x8XNprEe.js +274 -0
  62. package/dist/{hashTypedData-ZH9ZnWu3.js → hashTypedData-B50-z0AA.js} +6 -6
  63. package/dist/if-defined-CdZSZ6UL.js +10 -0
  64. package/dist/index-4ewUtPPp.js +7981 -0
  65. package/dist/{index-D6h-qfpt.js → index-51l86yqx.js} +5 -5
  66. package/dist/index-B6K56LF_.js +85 -0
  67. package/dist/index-BAmv9PxJ.js +257 -0
  68. package/dist/index-BEswjY9r.js +117 -0
  69. package/dist/index-BSKRq56S.js +355 -0
  70. package/dist/index-BaygXQxx.js +172 -0
  71. package/dist/index-BcPxaHr5.js +118 -0
  72. package/dist/index-Bjt7nGaJ.js +199 -0
  73. package/dist/{index-D5r0iSq4.js → index-BkTSyAJb.js} +1 -1
  74. package/dist/index-Bmnl7l2U.js +555 -0
  75. package/dist/index-BvPvouSq.js +56 -0
  76. package/dist/index-C-6iznUO.js +174 -0
  77. package/dist/index-C4M5s_AM.js +228 -0
  78. package/dist/index-CEqcN8QP.js +1175 -0
  79. package/dist/{index-CPTcEPbD.js → index-CM3YaYca.js} +296 -298
  80. package/dist/{index-f3LXSfM5.js → index-CclBLA5r.js} +56 -142
  81. package/dist/index-ChTxJOiF.js +46 -0
  82. package/dist/index-CmAv0Tzr.js +86 -0
  83. package/dist/index-CmvoKY4x.js +125 -0
  84. package/dist/{index-BdSIrl-R.js → index-D7PmdQ9B.js} +578 -570
  85. package/dist/{index-DobBVPe4.js → index-D7k2Pc4e.js} +481 -236
  86. package/dist/index-D7lmgqUR.js +153 -0
  87. package/dist/index-DG_-qYze.js +107 -0
  88. package/dist/{index-Dy4NyE6l.js → index-DHot9Fdb.js} +7 -7
  89. package/dist/index-DV2LrPtU.js +123 -0
  90. package/dist/index-DYBaJQ2W.js +65 -0
  91. package/dist/{index-BJ7cbG3N.js → index-D_8VUmn1.js} +36688 -40208
  92. package/dist/index-D_gLn3rT.js +100 -0
  93. package/dist/index-DqcVUSC9.js +62 -0
  94. package/dist/index-I7VDqINw.js +128 -0
  95. package/dist/index-Oz72I9VP.js +209 -0
  96. package/dist/index-UclsHkJ0.js +118 -0
  97. package/dist/index-X8zir_1j.js +110 -0
  98. package/dist/index-XvlWKGCu.js +1281 -0
  99. package/dist/index-dO97xPlt.js +171 -0
  100. package/dist/{index-5mp7WkhV.js → index-uBeF6OAB.js} +2 -2
  101. package/dist/index-zeA_RiCV.js +159 -0
  102. package/dist/index.js +1 -1
  103. package/dist/{localBatchGatewayRequest-CjGcn5nM.js → localBatchGatewayRequest-BUZHGdjw.js} +1 -1
  104. package/dist/onramp-CdnBuF0r.js +855 -0
  105. package/dist/{parseSignature-S8VEpRHC.js → parseSignature-CcyTNGr4.js} +2312 -2313
  106. package/dist/pay-with-exchange-CSM6WCOV.js +525 -0
  107. package/dist/property-Bd8U3_QP.js +618 -0
  108. package/dist/receive-DooMu4Dx.js +232 -0
  109. package/dist/ref-CpgjXAw7.js +107 -0
  110. package/dist/send-3T7CyYic.js +1166 -0
  111. package/dist/socials-Dt-iHL17.js +620 -0
  112. package/dist/swaps-CjA9Es42.js +1760 -0
  113. package/dist/{transactions-DujFkB-M.js → transactions-nRm9DVzn.js} +10 -10
  114. package/dist/w3m-modal-NV25AXhM.js +1706 -0
  115. package/package.json +3 -3
  116. package/dist/ConstantsUtil-B-_-u8aQ.js +0 -6
  117. package/dist/add-sji6scSD.js +0 -19
  118. package/dist/all-wallets-B4H-890E.js +0 -10
  119. package/dist/app-store-Z433s97G.js +0 -21
  120. package/dist/apple-b8Lxj7nb.js +0 -22
  121. package/dist/arrow-bottom-M9oWWo_9.js +0 -12
  122. package/dist/arrow-bottom-circle-N9c4CXY1.js +0 -15
  123. package/dist/arrow-left-Dw8AKfwf.js +0 -12
  124. package/dist/arrow-right-DwLQZSC_.js +0 -12
  125. package/dist/arrow-top-zhUjkBe1.js +0 -12
  126. package/dist/bank-CbQdnILK.js +0 -18
  127. package/dist/browser-xAqNwt7z.js +0 -18
  128. package/dist/card-Dr1QBmWp.js +0 -18
  129. package/dist/checkmark-BhT1dTgG.js +0 -15
  130. package/dist/checkmark-bold-CPB29wqQ.js +0 -12
  131. package/dist/chevron-bottom-BhNyx2II.js +0 -12
  132. package/dist/chevron-left-CGuEjQlY.js +0 -12
  133. package/dist/chevron-right-CvIRRsqZ.js +0 -12
  134. package/dist/chevron-top-RSzCqjBd.js +0 -12
  135. package/dist/chrome-store-Cs8dAgs0.js +0 -65
  136. package/dist/clock-fhZO5otC.js +0 -12
  137. package/dist/close-BPuztrdR.js +0 -12
  138. package/dist/coinPlaceholder-C8X2i7Kh.js +0 -12
  139. package/dist/compass-WMc5huk0.js +0 -12
  140. package/dist/copy-DVAeT17y.js +0 -19
  141. package/dist/cursor-BJ4YLXfy.js +0 -7
  142. package/dist/cursor-transparent-DN2fLQN4.js +0 -16
  143. package/dist/desktop-6avxisBw.js +0 -13
  144. package/dist/disconnect-AReVI8Gk.js +0 -12
  145. package/dist/discord-CxrI30BZ.js +0 -21
  146. package/dist/email-B8dIIaay.js +0 -696
  147. package/dist/embedded-wallet-C_5hF7rM.js +0 -468
  148. package/dist/etherscan-BnAy8cIF.js +0 -10
  149. package/dist/exclamation-triangle-Bu7nHwx9.js +0 -8
  150. package/dist/extension-F0LIhvcf.js +0 -12
  151. package/dist/external-link-CP6phyaM.js +0 -12
  152. package/dist/facebook-BtQ-Io2y.js +0 -30
  153. package/dist/farcaster-BmaN1ugd.js +0 -16
  154. package/dist/filters-DpEwoOmy.js +0 -12
  155. package/dist/github-q7qO9V-b.js +0 -22
  156. package/dist/google-DH_ZE8bW.js +0 -22
  157. package/dist/help-circle-BAQVmKas.js +0 -16
  158. package/dist/id-Cj68Zwgo.js +0 -16
  159. package/dist/if-defined-CNte9B3N.js +0 -744
  160. package/dist/image-BKJDw6N-.js +0 -8
  161. package/dist/index-7toZMdtG.js +0 -573
  162. package/dist/index-B1uKzdvN.js +0 -170
  163. package/dist/index-BHFZVF-b.js +0 -257
  164. package/dist/index-BKwa5JSA.js +0 -559
  165. package/dist/index-BP4B9VUt.js +0 -54
  166. package/dist/index-BVdzXHpO.js +0 -181
  167. package/dist/index-BYND0GJ9.js +0 -146
  168. package/dist/index-BaJ0zEbh.js +0 -97
  169. package/dist/index-Bh0MPFwP.js +0 -58
  170. package/dist/index-Bsh7_qTp.js +0 -511
  171. package/dist/index-BwnXTNNg.js +0 -199
  172. package/dist/index-C0kPDbg_.js +0 -77
  173. package/dist/index-CKikVKe2.js +0 -75
  174. package/dist/index-ChVh0Hkp.js +0 -243
  175. package/dist/index-Cle_NnnS.js +0 -305
  176. package/dist/index-CmWdvIFT.js +0 -51
  177. package/dist/index-D2AMA8Bu.js +0 -65
  178. package/dist/index-DAUM8CO4.js +0 -65
  179. package/dist/index-DGjZW6uR.js +0 -78
  180. package/dist/index-DQe94z7X.js +0 -265
  181. package/dist/index-DTo6w99t.js +0 -7864
  182. package/dist/index-DYdXjap2.js +0 -320
  183. package/dist/index-DceCxNV5.js +0 -181
  184. package/dist/index-Uw9cSw0q.js +0 -294
  185. package/dist/index-qiuyrukh.js +0 -45
  186. package/dist/index-zddvaohA.js +0 -78
  187. package/dist/info-RfPsmroW.js +0 -7
  188. package/dist/info-circle-DFKHB_ZN.js +0 -16
  189. package/dist/lightbulb-B-Bykj9X.js +0 -7
  190. package/dist/mail-mBAgGuw5.js +0 -12
  191. package/dist/mobile-Dhh3ndkf.js +0 -13
  192. package/dist/more-D1h7UTvg.js +0 -15
  193. package/dist/network-placeholder-Dqynvc-t.js +0 -18
  194. package/dist/nftPlaceholder-Df7MW4MM.js +0 -12
  195. package/dist/off-BmG3cHTX.js +0 -12
  196. package/dist/onramp-C401Aenb.js +0 -1279
  197. package/dist/play-store-4q1fzL_P.js +0 -36
  198. package/dist/plus-603Gs3yG.js +0 -17
  199. package/dist/qr-code-Dgwhf6M1.js +0 -10
  200. package/dist/receive-CYXbbEUR.js +0 -186
  201. package/dist/recycle-horizontal-Bu8zZ563.js +0 -13
  202. package/dist/ref-DpmKRWBK.js +0 -41
  203. package/dist/refresh-BMZFu0mu.js +0 -12
  204. package/dist/reown-logo-BXph7ThY.js +0 -16
  205. package/dist/search-Cm_V42Y_.js +0 -12
  206. package/dist/secp256k1-C0iX1TUr.js +0 -1510
  207. package/dist/secp256k1-DOQBqE4Z.js +0 -1302
  208. package/dist/send-BSMYxDuP.js +0 -19
  209. package/dist/send-C8EeIzRB.js +0 -1038
  210. package/dist/socials-DQrHQajs.js +0 -574
  211. package/dist/swapHorizontal-98rnJewS.js +0 -12
  212. package/dist/swapHorizontalBold-C299FjEt.js +0 -12
  213. package/dist/swapHorizontalMedium-Cqm6i4WJ.js +0 -20
  214. package/dist/swapHorizontalRoundedBold-De7hFfqZ.js +0 -12
  215. package/dist/swapVertical-DSL75l8L.js +0 -12
  216. package/dist/swaps-BuTNp65Y.js +0 -1637
  217. package/dist/telegram-cJP7hgUb.js +0 -20
  218. package/dist/three-dots-DHnEh28O.js +0 -9
  219. package/dist/twitch-CR2iGcBo.js +0 -22
  220. package/dist/twitterIcon-E5TAQjOn.js +0 -10
  221. package/dist/verify-DEukUJp0.js +0 -12
  222. package/dist/verify-filled-BXsx1i_p.js +0 -12
  223. package/dist/w3m-modal-Bm7BqVng.js +0 -1037
  224. package/dist/wallet-CzyyvdrT.js +0 -12
  225. package/dist/wallet-placeholder-BrcmyGEe.js +0 -18
  226. package/dist/walletconnect-BSYogWiE.js +0 -36
  227. package/dist/warning-circle-Cgp2BW3m.js +0 -16
  228. package/dist/x-BJinLpTw.js +0 -16
@@ -1,559 +0,0 @@
1
- import { cE as R, cF as k, cG as a, cH as Y, cY as v, dh as p, d1 as O, cJ as L, di as V, d8 as z, cX as E, d0 as F } from "./index-BJ7cbG3N.js";
2
- import { n as l, c as _, o as j, r as b } from "./if-defined-CNte9B3N.js";
3
- import { T as A, D as W } from "./index-Bsh7_qTp.js";
4
- import "./index-CKikVKe2.js";
5
- import "./index-BP4B9VUt.js";
6
- import "./index-CmWdvIFT.js";
7
- var N;
8
- (function(s) {
9
- s.approve = "approved", s.bought = "bought", s.borrow = "borrowed", s.burn = "burnt", s.cancel = "canceled", s.claim = "claimed", s.deploy = "deployed", s.deposit = "deposited", s.execute = "executed", s.mint = "minted", s.receive = "received", s.repay = "repaid", s.send = "sent", s.sell = "sold", s.stake = "staked", s.trade = "swapped", s.unstake = "unstaked", s.withdraw = "withdrawn";
10
- })(N || (N = {}));
11
- const U = R`
12
- :host > wui-flex {
13
- display: flex;
14
- justify-content: center;
15
- align-items: center;
16
- position: relative;
17
- width: 40px;
18
- height: 40px;
19
- box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005);
20
- background-color: var(--wui-color-gray-glass-005);
21
- }
22
-
23
- :host > wui-flex wui-image {
24
- display: block;
25
- }
26
-
27
- :host > wui-flex,
28
- :host > wui-flex wui-image,
29
- .swap-images-container,
30
- .swap-images-container.nft,
31
- wui-image.nft {
32
- border-top-left-radius: var(--local-left-border-radius);
33
- border-top-right-radius: var(--local-right-border-radius);
34
- border-bottom-left-radius: var(--local-left-border-radius);
35
- border-bottom-right-radius: var(--local-right-border-radius);
36
- }
37
-
38
- wui-icon {
39
- width: 20px;
40
- height: 20px;
41
- }
42
-
43
- wui-icon-box {
44
- position: absolute;
45
- right: 0;
46
- bottom: 0;
47
- transform: translate(20%, 20%);
48
- }
49
-
50
- .swap-images-container {
51
- position: relative;
52
- width: 40px;
53
- height: 40px;
54
- overflow: hidden;
55
- }
56
-
57
- .swap-images-container wui-image:first-child {
58
- position: absolute;
59
- width: 40px;
60
- height: 40px;
61
- top: 0;
62
- left: 0%;
63
- clip-path: inset(0px calc(50% + 2px) 0px 0%);
64
- }
65
-
66
- .swap-images-container wui-image:last-child {
67
- clip-path: inset(0px 0px 0px calc(50% + 2px));
68
- }
69
- `;
70
- var m = function(s, t, e, r) {
71
- var o = arguments.length, i = o < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, e) : r, n;
72
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, t, e, r);
73
- else for (var c = s.length - 1; c >= 0; c--) (n = s[c]) && (i = (o < 3 ? n(i) : o > 3 ? n(t, e, i) : n(t, e)) || i);
74
- return o > 3 && i && Object.defineProperty(t, e, i), i;
75
- };
76
- let f = class extends k {
77
- constructor() {
78
- super(...arguments), this.images = [], this.secondImage = {
79
- type: void 0,
80
- url: ""
81
- };
82
- }
83
- render() {
84
- const [t, e] = this.images, r = (t == null ? void 0 : t.type) === "NFT", o = e != null && e.url ? e.type === "NFT" : r, i = r ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)", n = o ? "var(--wui-border-radius-xxs)" : "var(--wui-border-radius-s)";
85
- return this.style.cssText = `
86
- --local-left-border-radius: ${i};
87
- --local-right-border-radius: ${n};
88
- `, a`<wui-flex> ${this.templateVisual()} ${this.templateIcon()} </wui-flex>`;
89
- }
90
- templateVisual() {
91
- const [t, e] = this.images, r = t == null ? void 0 : t.type;
92
- return this.images.length === 2 && (t != null && t.url || e != null && e.url) ? a`<div class="swap-images-container">
93
- ${t != null && t.url ? a`<wui-image src=${t.url} alt="Transaction image"></wui-image>` : null}
94
- ${e != null && e.url ? a`<wui-image src=${e.url} alt="Transaction image"></wui-image>` : null}
95
- </div>` : t != null && t.url ? a`<wui-image src=${t.url} alt="Transaction image"></wui-image>` : r === "NFT" ? a`<wui-icon size="inherit" color="fg-200" name="nftPlaceholder"></wui-icon>` : a`<wui-icon size="inherit" color="fg-200" name="coinPlaceholder"></wui-icon>`;
96
- }
97
- templateIcon() {
98
- let t = "accent-100", e;
99
- return e = this.getIcon(), this.status && (t = this.getStatusColor()), e ? a`
100
- <wui-icon-box
101
- size="xxs"
102
- iconColor=${t}
103
- backgroundColor=${t}
104
- background="opaque"
105
- icon=${e}
106
- ?border=${!0}
107
- borderColor="wui-color-bg-125"
108
- ></wui-icon-box>
109
- ` : null;
110
- }
111
- getDirectionIcon() {
112
- switch (this.direction) {
113
- case "in":
114
- return "arrowBottom";
115
- case "out":
116
- return "arrowTop";
117
- default:
118
- return;
119
- }
120
- }
121
- getIcon() {
122
- return this.onlyDirectionIcon ? this.getDirectionIcon() : this.type === "trade" ? "swapHorizontalBold" : this.type === "approve" ? "checkmark" : this.type === "cancel" ? "close" : this.getDirectionIcon();
123
- }
124
- getStatusColor() {
125
- switch (this.status) {
126
- case "confirmed":
127
- return "success-100";
128
- case "failed":
129
- return "error-100";
130
- case "pending":
131
- return "inverse-100";
132
- default:
133
- return "accent-100";
134
- }
135
- }
136
- };
137
- f.styles = [U];
138
- m([
139
- l()
140
- ], f.prototype, "type", void 0);
141
- m([
142
- l()
143
- ], f.prototype, "status", void 0);
144
- m([
145
- l()
146
- ], f.prototype, "direction", void 0);
147
- m([
148
- l({ type: Boolean })
149
- ], f.prototype, "onlyDirectionIcon", void 0);
150
- m([
151
- l({ type: Array })
152
- ], f.prototype, "images", void 0);
153
- m([
154
- l({ type: Object })
155
- ], f.prototype, "secondImage", void 0);
156
- f = m([
157
- _("wui-transaction-visual")
158
- ], f);
159
- const G = R`
160
- :host > wui-flex:first-child {
161
- align-items: center;
162
- column-gap: var(--wui-spacing-s);
163
- padding: 6.5px var(--wui-spacing-xs) 6.5px var(--wui-spacing-xs);
164
- width: 100%;
165
- }
166
-
167
- :host > wui-flex:first-child wui-text:nth-child(1) {
168
- text-transform: capitalize;
169
- }
170
-
171
- wui-transaction-visual {
172
- width: 40px;
173
- height: 40px;
174
- }
175
-
176
- wui-flex {
177
- flex: 1;
178
- }
179
-
180
- :host wui-flex wui-flex {
181
- overflow: hidden;
182
- }
183
-
184
- :host .description-container wui-text span {
185
- word-break: break-all;
186
- }
187
-
188
- :host .description-container wui-text {
189
- overflow: hidden;
190
- }
191
-
192
- :host .description-separator-icon {
193
- margin: 0px 6px;
194
- }
195
-
196
- :host wui-text > span {
197
- overflow: hidden;
198
- display: -webkit-box;
199
- -webkit-box-orient: vertical;
200
- -webkit-line-clamp: 1;
201
- }
202
- `;
203
- var w = function(s, t, e, r) {
204
- var o = arguments.length, i = o < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, e) : r, n;
205
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, t, e, r);
206
- else for (var c = s.length - 1; c >= 0; c--) (n = s[c]) && (i = (o < 3 ? n(i) : o > 3 ? n(t, e, i) : n(t, e)) || i);
207
- return o > 3 && i && Object.defineProperty(t, e, i), i;
208
- };
209
- let d = class extends k {
210
- constructor() {
211
- super(...arguments), this.type = "approve", this.onlyDirectionIcon = !1, this.images = [], this.price = [], this.amount = [], this.symbol = [];
212
- }
213
- render() {
214
- return a`
215
- <wui-flex>
216
- <wui-transaction-visual
217
- .status=${this.status}
218
- direction=${j(this.direction)}
219
- type=${this.type}
220
- onlyDirectionIcon=${j(this.onlyDirectionIcon)}
221
- .images=${this.images}
222
- ></wui-transaction-visual>
223
- <wui-flex flexDirection="column" gap="3xs">
224
- <wui-text variant="paragraph-600" color="fg-100">
225
- ${N[this.type] || this.type}
226
- </wui-text>
227
- <wui-flex class="description-container">
228
- ${this.templateDescription()} ${this.templateSecondDescription()}
229
- </wui-flex>
230
- </wui-flex>
231
- <wui-text variant="micro-700" color="fg-300"><span>${this.date}</span></wui-text>
232
- </wui-flex>
233
- `;
234
- }
235
- templateDescription() {
236
- var e;
237
- const t = (e = this.descriptions) == null ? void 0 : e[0];
238
- return t ? a`
239
- <wui-text variant="small-500" color="fg-200">
240
- <span>${t}</span>
241
- </wui-text>
242
- ` : null;
243
- }
244
- templateSecondDescription() {
245
- var e;
246
- const t = (e = this.descriptions) == null ? void 0 : e[1];
247
- return t ? a`
248
- <wui-icon class="description-separator-icon" size="xxs" name="arrowRight"></wui-icon>
249
- <wui-text variant="small-400" color="fg-200">
250
- <span>${t}</span>
251
- </wui-text>
252
- ` : null;
253
- }
254
- };
255
- d.styles = [Y, G];
256
- w([
257
- l()
258
- ], d.prototype, "type", void 0);
259
- w([
260
- l({ type: Array })
261
- ], d.prototype, "descriptions", void 0);
262
- w([
263
- l()
264
- ], d.prototype, "date", void 0);
265
- w([
266
- l({ type: Boolean })
267
- ], d.prototype, "onlyDirectionIcon", void 0);
268
- w([
269
- l()
270
- ], d.prototype, "status", void 0);
271
- w([
272
- l()
273
- ], d.prototype, "direction", void 0);
274
- w([
275
- l({ type: Array })
276
- ], d.prototype, "images", void 0);
277
- w([
278
- l({ type: Array })
279
- ], d.prototype, "price", void 0);
280
- w([
281
- l({ type: Array })
282
- ], d.prototype, "amount", void 0);
283
- w([
284
- l({ type: Array })
285
- ], d.prototype, "symbol", void 0);
286
- d = w([
287
- _("wui-transaction-list-item")
288
- ], d);
289
- const M = R`
290
- :host {
291
- min-height: 100%;
292
- }
293
-
294
- .group-container[last-group='true'] {
295
- padding-bottom: var(--wui-spacing-m);
296
- }
297
-
298
- .contentContainer {
299
- height: 280px;
300
- }
301
-
302
- .contentContainer > wui-icon-box {
303
- width: 40px;
304
- height: 40px;
305
- border-radius: var(--wui-border-radius-xxs);
306
- }
307
-
308
- .contentContainer > .textContent {
309
- width: 65%;
310
- }
311
-
312
- .emptyContainer {
313
- height: 100%;
314
- }
315
- `;
316
- var x = function(s, t, e, r) {
317
- var o = arguments.length, i = o < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, e) : r, n;
318
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") i = Reflect.decorate(s, t, e, r);
319
- else for (var c = s.length - 1; c >= 0; c--) (n = s[c]) && (i = (o < 3 ? n(i) : o > 3 ? n(t, e, i) : n(t, e)) || i);
320
- return o > 3 && i && Object.defineProperty(t, e, i), i;
321
- };
322
- const D = "last-transaction", H = 7;
323
- let g = class extends k {
324
- constructor() {
325
- super(), this.unsubscribe = [], this.paginationObserver = void 0, this.page = "activity", this.caipAddress = v.state.activeCaipAddress, this.transactionsByYear = p.state.transactionsByYear, this.loading = p.state.loading, this.empty = p.state.empty, this.next = p.state.next, p.clearCursor(), this.unsubscribe.push(v.subscribeKey("activeCaipAddress", (t) => {
326
- t && this.caipAddress !== t && (p.resetTransactions(), p.fetchTransactions(t)), this.caipAddress = t;
327
- }), v.subscribeKey("activeCaipNetwork", () => {
328
- this.updateTransactionView();
329
- }), p.subscribe((t) => {
330
- this.transactionsByYear = t.transactionsByYear, this.loading = t.loading, this.empty = t.empty, this.next = t.next;
331
- }));
332
- }
333
- firstUpdated() {
334
- this.updateTransactionView(), this.createPaginationObserver();
335
- }
336
- updated() {
337
- this.setPaginationObserver();
338
- }
339
- disconnectedCallback() {
340
- this.unsubscribe.forEach((t) => t());
341
- }
342
- render() {
343
- return a` ${this.empty ? null : this.templateTransactionsByYear()}
344
- ${this.loading ? this.templateLoading() : null}
345
- ${!this.loading && this.empty ? this.templateEmpty() : null}`;
346
- }
347
- updateTransactionView() {
348
- var r;
349
- const t = (r = v.state.activeCaipNetwork) == null ? void 0 : r.caipNetworkId;
350
- p.state.lastNetworkInView !== t && (p.resetTransactions(), this.caipAddress && p.fetchTransactions(O.getPlainAddress(this.caipAddress))), p.setLastNetworkInView(t);
351
- }
352
- templateTransactionsByYear() {
353
- return Object.keys(this.transactionsByYear).sort().reverse().map((e) => {
354
- const r = parseInt(e, 10), o = new Array(12).fill(null).map((i, n) => {
355
- var u;
356
- const c = A.getTransactionGroupTitle(r, n), h = (u = this.transactionsByYear[r]) == null ? void 0 : u[n];
357
- return {
358
- groupTitle: c,
359
- transactions: h
360
- };
361
- }).filter(({ transactions: i }) => i).reverse();
362
- return o.map(({ groupTitle: i, transactions: n }, c) => {
363
- const h = c === o.length - 1;
364
- return n ? a`
365
- <wui-flex
366
- flexDirection="column"
367
- class="group-container"
368
- last-group="${h ? "true" : "false"}"
369
- data-testid="month-indexes"
370
- >
371
- <wui-flex
372
- alignItems="center"
373
- flexDirection="row"
374
- .padding=${["xs", "s", "s", "s"]}
375
- >
376
- <wui-text variant="paragraph-500" color="fg-200" data-testid="group-title"
377
- >${i}</wui-text
378
- >
379
- </wui-flex>
380
- <wui-flex flexDirection="column" gap="xs">
381
- ${this.templateTransactions(n, h)}
382
- </wui-flex>
383
- </wui-flex>
384
- ` : null;
385
- });
386
- });
387
- }
388
- templateRenderTransaction(t, e) {
389
- const { date: r, descriptions: o, direction: i, isAllNFT: n, images: c, status: h, transfers: u, type: y } = this.getTransactionListItemProps(t), $ = (u == null ? void 0 : u.length) > 1;
390
- return (u == null ? void 0 : u.length) === 2 && !n ? a`
391
- <wui-transaction-list-item
392
- date=${r}
393
- .direction=${i}
394
- id=${e && this.next ? D : ""}
395
- status=${h}
396
- type=${y}
397
- .images=${c}
398
- .descriptions=${o}
399
- ></wui-transaction-list-item>
400
- ` : $ ? u.map((C, S) => {
401
- const B = A.getTransferDescription(C), T = e && S === u.length - 1;
402
- return a` <wui-transaction-list-item
403
- date=${r}
404
- direction=${C.direction}
405
- id=${T && this.next ? D : ""}
406
- status=${h}
407
- type=${y}
408
- .onlyDirectionIcon=${!0}
409
- .images=${[c[S]]}
410
- .descriptions=${[B]}
411
- ></wui-transaction-list-item>`;
412
- }) : a`
413
- <wui-transaction-list-item
414
- date=${r}
415
- .direction=${i}
416
- id=${e && this.next ? D : ""}
417
- status=${h}
418
- type=${y}
419
- .images=${c}
420
- .descriptions=${o}
421
- ></wui-transaction-list-item>
422
- `;
423
- }
424
- templateTransactions(t, e) {
425
- return t.map((r, o) => {
426
- const i = e && o === t.length - 1;
427
- return a`${this.templateRenderTransaction(r, i)}`;
428
- });
429
- }
430
- emptyStateActivity() {
431
- return a`<wui-flex
432
- class="emptyContainer"
433
- flexGrow="1"
434
- flexDirection="column"
435
- justifyContent="center"
436
- alignItems="center"
437
- .padding=${["3xl", "xl", "3xl", "xl"]}
438
- gap="xl"
439
- data-testid="empty-activity-state"
440
- >
441
- <wui-icon-box
442
- backgroundColor="gray-glass-005"
443
- background="gray"
444
- iconColor="fg-200"
445
- icon="wallet"
446
- size="lg"
447
- ?border=${!0}
448
- borderColor="wui-color-bg-125"
449
- ></wui-icon-box>
450
- <wui-flex flexDirection="column" alignItems="center" gap="xs">
451
- <wui-text align="center" variant="paragraph-500" color="fg-100"
452
- >No Transactions yet</wui-text
453
- >
454
- <wui-text align="center" variant="small-500" color="fg-200"
455
- >Start trading on dApps <br />
456
- to grow your wallet!</wui-text
457
- >
458
- </wui-flex>
459
- </wui-flex>`;
460
- }
461
- emptyStateAccount() {
462
- return a`<wui-flex
463
- class="contentContainer"
464
- alignItems="center"
465
- justifyContent="center"
466
- flexDirection="column"
467
- gap="l"
468
- data-testid="empty-account-state"
469
- >
470
- <wui-icon-box
471
- icon="swapHorizontal"
472
- size="inherit"
473
- iconColor="fg-200"
474
- backgroundColor="fg-200"
475
- iconSize="lg"
476
- ></wui-icon-box>
477
- <wui-flex
478
- class="textContent"
479
- gap="xs"
480
- flexDirection="column"
481
- justifyContent="center"
482
- flexDirection="column"
483
- >
484
- <wui-text variant="paragraph-500" align="center" color="fg-100">No activity yet</wui-text>
485
- <wui-text variant="small-400" align="center" color="fg-200"
486
- >Your next transactions will appear here</wui-text
487
- >
488
- </wui-flex>
489
- <wui-link @click=${this.onReceiveClick.bind(this)}>Trade</wui-link>
490
- </wui-flex>`;
491
- }
492
- templateEmpty() {
493
- return this.page === "account" ? a`${this.emptyStateAccount()}` : a`${this.emptyStateActivity()}`;
494
- }
495
- templateLoading() {
496
- return this.page === "activity" ? Array(H).fill(a` <wui-transaction-list-item-loader></wui-transaction-list-item-loader> `).map((t) => t) : null;
497
- }
498
- onReceiveClick() {
499
- L.push("WalletReceive");
500
- }
501
- createPaginationObserver() {
502
- const t = v.state.activeChain, { projectId: e } = V.state;
503
- this.paginationObserver = new IntersectionObserver(([r]) => {
504
- var o;
505
- r != null && r.isIntersecting && !this.loading && (p.fetchTransactions(O.getPlainAddress(this.caipAddress)), z.sendEvent({
506
- type: "track",
507
- event: "LOAD_MORE_TRANSACTIONS",
508
- properties: {
509
- address: O.getPlainAddress(this.caipAddress),
510
- projectId: e,
511
- cursor: this.next,
512
- isSmartAccount: ((o = E.state.preferredAccountTypes) == null ? void 0 : o[t]) === F.ACCOUNT_TYPES.SMART_ACCOUNT
513
- }
514
- }));
515
- }, {}), this.setPaginationObserver();
516
- }
517
- setPaginationObserver() {
518
- var e, r, o;
519
- (e = this.paginationObserver) == null || e.disconnect();
520
- const t = (r = this.shadowRoot) == null ? void 0 : r.querySelector(`#${D}`);
521
- t && ((o = this.paginationObserver) == null || o.observe(t));
522
- }
523
- getTransactionListItemProps(t) {
524
- var h, u, y, $, I;
525
- const e = W.formatDate((h = t == null ? void 0 : t.metadata) == null ? void 0 : h.minedAt), r = A.getTransactionDescriptions(t), o = t == null ? void 0 : t.transfers, i = (u = t == null ? void 0 : t.transfers) == null ? void 0 : u[0], n = !!i && ((y = t == null ? void 0 : t.transfers) == null ? void 0 : y.every((C) => !!C.nft_info)), c = A.getTransactionImages(o);
526
- return {
527
- date: e,
528
- direction: i == null ? void 0 : i.direction,
529
- descriptions: r,
530
- isAllNFT: n,
531
- images: c,
532
- status: ($ = t.metadata) == null ? void 0 : $.status,
533
- transfers: o,
534
- type: (I = t.metadata) == null ? void 0 : I.operationType
535
- };
536
- }
537
- };
538
- g.styles = M;
539
- x([
540
- l()
541
- ], g.prototype, "page", void 0);
542
- x([
543
- b()
544
- ], g.prototype, "caipAddress", void 0);
545
- x([
546
- b()
547
- ], g.prototype, "transactionsByYear", void 0);
548
- x([
549
- b()
550
- ], g.prototype, "loading", void 0);
551
- x([
552
- b()
553
- ], g.prototype, "empty", void 0);
554
- x([
555
- b()
556
- ], g.prototype, "next", void 0);
557
- g = x([
558
- _("w3m-activity-list")
559
- ], g);
@@ -1,54 +0,0 @@
1
- import { cE as u, cH as b, cI as p, cF as f, cG as v } from "./index-BJ7cbG3N.js";
2
- import { n as d, c as m, o as x } from "./if-defined-CNte9B3N.js";
3
- const g = u`
4
- button {
5
- padding: var(--wui-spacing-4xs) var(--wui-spacing-xxs);
6
- border-radius: var(--wui-border-radius-3xs);
7
- background-color: transparent;
8
- color: var(--wui-color-accent-100);
9
- }
10
-
11
- button:disabled {
12
- background-color: transparent;
13
- color: var(--wui-color-gray-glass-015);
14
- }
15
-
16
- button:hover {
17
- background-color: var(--wui-color-gray-glass-005);
18
- }
19
- `;
20
- var l = function(n, o, r, i) {
21
- var s = arguments.length, t = s < 3 ? o : i === null ? i = Object.getOwnPropertyDescriptor(o, r) : i, a;
22
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") t = Reflect.decorate(n, o, r, i);
23
- else for (var c = n.length - 1; c >= 0; c--) (a = n[c]) && (t = (s < 3 ? a(t) : s > 3 ? a(o, r, t) : a(o, r)) || t);
24
- return s > 3 && t && Object.defineProperty(o, r, t), t;
25
- };
26
- let e = class extends f {
27
- constructor() {
28
- super(...arguments), this.tabIdx = void 0, this.disabled = !1, this.color = "inherit";
29
- }
30
- render() {
31
- return v`
32
- <button ?disabled=${this.disabled} tabindex=${x(this.tabIdx)}>
33
- <slot name="iconLeft"></slot>
34
- <wui-text variant="small-600" color=${this.color}>
35
- <slot></slot>
36
- </wui-text>
37
- <slot name="iconRight"></slot>
38
- </button>
39
- `;
40
- }
41
- };
42
- e.styles = [b, p, g];
43
- l([
44
- d()
45
- ], e.prototype, "tabIdx", void 0);
46
- l([
47
- d({ type: Boolean })
48
- ], e.prototype, "disabled", void 0);
49
- l([
50
- d()
51
- ], e.prototype, "color", void 0);
52
- e = l([
53
- m("wui-link")
54
- ], e);