@multiversx/sdk-dapp-liquidity 2.1.0-alpha.0 → 2.1.0-alpha.2

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 (362) hide show
  1. package/all-networks--dfVLHLJ.js +2 -0
  2. package/all-networks-Czd8zS1n.mjs +4 -0
  3. package/api/checkAccount.js +1 -21
  4. package/api/checkAccount.mjs +13 -13
  5. package/api/confirmRate.js +1 -29
  6. package/api/confirmRate.mjs +17 -22
  7. package/api/getChains.js +1 -17
  8. package/api/getChains.mjs +10 -10
  9. package/api/getRate.js +1 -27
  10. package/api/getRate.mjs +17 -20
  11. package/api/getTokens.js +1 -22
  12. package/api/getTokens.mjs +14 -15
  13. package/api/getTokensBalances.js +1 -21
  14. package/api/getTokensBalances.mjs +13 -13
  15. package/api/getTransactions.js +1 -38
  16. package/api/getTransactions.mjs +25 -31
  17. package/api/index.js +1 -18
  18. package/api/index.mjs +16 -16
  19. package/api/sendTransactions.js +1 -32
  20. package/api/sendTransactions.mjs +19 -19
  21. package/api/tests/confirmRate.spec.js +1 -130
  22. package/api/tests/confirmRate.spec.mjs +44 -58
  23. package/api/tests/getChains.spec.js +1 -43
  24. package/api/tests/getChains.spec.mjs +15 -18
  25. package/api/tests/getRate.spec.js +1 -87
  26. package/api/tests/getRate.spec.mjs +35 -49
  27. package/api/tests/getTokens.spec.js +1 -68
  28. package/api/tests/getTokens.spec.mjs +23 -29
  29. package/api/tests/getTransactions.spec.js +1 -94
  30. package/api/tests/getTransactions.spec.mjs +35 -51
  31. package/api/tests/sendTransactions.spec.js +1 -96
  32. package/api/tests/sendTransactions.spec.mjs +44 -52
  33. package/constants/index.js +1 -4
  34. package/constants/index.mjs +2 -2
  35. package/default-D0Jk5ROI.mjs +4 -0
  36. package/default-DbU6vPaB.js +2 -0
  37. package/helpers/assertRateConfirmationMatchesIntent.js +1 -23
  38. package/helpers/assertRateConfirmationMatchesIntent.mjs +13 -16
  39. package/helpers/base64Utils.js +1 -31
  40. package/helpers/base64Utils.mjs +14 -24
  41. package/helpers/decodeLoginToken.js +1 -27
  42. package/helpers/decodeLoginToken.mjs +13 -18
  43. package/helpers/decodeToken.js +1 -39
  44. package/helpers/decodeToken.mjs +20 -31
  45. package/helpers/getApiURL.js +1 -7
  46. package/helpers/getApiURL.mjs +3 -5
  47. package/helpers/getBridgeURL.js +1 -7
  48. package/helpers/getBridgeURL.mjs +3 -5
  49. package/helpers/getDisplayName.js +1 -11
  50. package/helpers/getDisplayName.mjs +3 -8
  51. package/helpers/getMvxApiURL.js +1 -7
  52. package/helpers/getMvxApiURL.mjs +3 -5
  53. package/helpers/getMvxChainId.js +1 -7
  54. package/helpers/getMvxChainId.mjs +3 -5
  55. package/helpers/getMvxExplorerAddress.js +1 -7
  56. package/helpers/getMvxExplorerAddress.mjs +3 -5
  57. package/helpers/index.js +1 -26
  58. package/helpers/index.mjs +24 -24
  59. package/helpers/safeImageUrl.js +1 -23
  60. package/helpers/safeImageUrl.mjs +10 -20
  61. package/helpers/serializeTransaction.js +1 -8
  62. package/helpers/serializeTransaction.mjs +3 -5
  63. package/helpers/tests/assertRateConfirmationMatchesIntent.spec.js +1 -63
  64. package/helpers/tests/assertRateConfirmationMatchesIntent.spec.mjs +31 -41
  65. package/helpers/tests/base64Utils.spec.js +1 -29
  66. package/helpers/tests/base64Utils.spec.mjs +11 -24
  67. package/helpers/tests/decodeLoginToken.spec.js +1 -34
  68. package/helpers/tests/decodeLoginToken.spec.mjs +13 -24
  69. package/helpers/tests/decodeToken.spec.js +1 -27
  70. package/helpers/tests/decodeToken.spec.mjs +7 -12
  71. package/helpers/tests/safeImageUrl.spec.js +1 -48
  72. package/helpers/tests/safeImageUrl.spec.mjs +28 -43
  73. package/helpers/tests/serializeTransaction.spec.js +1 -36
  74. package/helpers/tests/serializeTransaction.spec.mjs +13 -24
  75. package/index.js +1 -232
  76. package/index.mjs +196 -196
  77. package/package.json +5 -4
  78. package/react.esm-B0AMOHxa.js +73 -0
  79. package/react.esm-BxvJJ86Q.mjs +9949 -0
  80. package/reactjs/adapters/SuiAdapter.js +1 -378
  81. package/reactjs/adapters/SuiAdapter.mjs +160 -217
  82. package/reactjs/components/AccountAddress/AccountAddress.js +1 -31
  83. package/reactjs/components/AccountAddress/AccountAddress.mjs +16 -16
  84. package/reactjs/components/AccountAddress/index.js +1 -4
  85. package/reactjs/components/AccountAddress/index.mjs +2 -2
  86. package/reactjs/components/AmountCard/AmountCard.js +1 -33
  87. package/reactjs/components/AmountCard/AmountCard.mjs +19 -21
  88. package/reactjs/components/AmountCard/index.js +1 -4
  89. package/reactjs/components/AmountCard/index.mjs +2 -2
  90. package/reactjs/components/AmountInput/AmountInput.js +1 -71
  91. package/reactjs/components/AmountInput/AmountInput.mjs +42 -46
  92. package/reactjs/components/AmountInput/index.js +1 -4
  93. package/reactjs/components/AmountInput/index.mjs +2 -2
  94. package/reactjs/components/BridgeForm/BridgeForm.d.ts +9 -0
  95. package/reactjs/components/BridgeForm/BridgeForm.js +1 -89
  96. package/reactjs/components/BridgeForm/BridgeForm.mjs +72 -79
  97. package/reactjs/components/BridgeForm/Deposit.js +1 -675
  98. package/reactjs/components/BridgeForm/Deposit.mjs +380 -504
  99. package/reactjs/components/BridgeForm/Transfer.js +1 -561
  100. package/reactjs/components/BridgeForm/Transfer.mjs +315 -428
  101. package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.js +1 -78
  102. package/reactjs/components/BridgeForm/hooks/useBridgeAmounts.mjs +47 -70
  103. package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.js +1 -58
  104. package/reactjs/components/BridgeForm/hooks/useBridgeRateFetching.mjs +36 -47
  105. package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.js +1 -266
  106. package/reactjs/components/BridgeForm/hooks/useBridgeTokenSelection.mjs +163 -231
  107. package/reactjs/components/BridgeForm/index.js +1 -4
  108. package/reactjs/components/BridgeForm/index.mjs +2 -2
  109. package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.js +1 -76
  110. package/reactjs/components/BridgeForm/utils/bridgeFormHelpers.mjs +33 -65
  111. package/reactjs/components/BridgeHistory/BridgeHistory.js +1 -381
  112. package/reactjs/components/BridgeHistory/BridgeHistory.mjs +170 -200
  113. package/reactjs/components/BridgeHistory/index.js +1 -4
  114. package/reactjs/components/BridgeHistory/index.mjs +2 -2
  115. package/reactjs/components/Connect/BridgeAccountDisplay.js +1 -150
  116. package/reactjs/components/Connect/BridgeAccountDisplay.mjs +99 -115
  117. package/reactjs/components/Connect/BridgeConnectButton.js +1 -35
  118. package/reactjs/components/Connect/BridgeConnectButton.mjs +20 -20
  119. package/reactjs/components/Connect/ChainSelectConnect.js +1 -144
  120. package/reactjs/components/Connect/ChainSelectConnect.mjs +70 -83
  121. package/reactjs/components/Connect/CustomConnectButton.js +1 -40
  122. package/reactjs/components/Connect/CustomConnectButton.mjs +24 -30
  123. package/reactjs/components/Connect/MvxAccountDisplay.js +1 -97
  124. package/reactjs/components/Connect/MvxAccountDisplay.mjs +47 -50
  125. package/reactjs/components/Connect/MvxConnectButton.js +1 -43
  126. package/reactjs/components/Connect/MvxConnectButton.mjs +35 -40
  127. package/reactjs/components/Connect/SwitchChainButton.js +1 -29
  128. package/reactjs/components/Connect/SwitchChainButton.mjs +15 -18
  129. package/reactjs/components/Connect/index.js +1 -16
  130. package/reactjs/components/Connect/index.mjs +14 -14
  131. package/reactjs/components/CopyButton/CopyButton.js +1 -46
  132. package/reactjs/components/CopyButton/CopyButton.mjs +33 -36
  133. package/reactjs/components/CopyButton/index.js +1 -4
  134. package/reactjs/components/CopyButton/index.mjs +2 -2
  135. package/reactjs/components/CopyButton/utils/copyToClipboard.js +1 -38
  136. package/reactjs/components/CopyButton/utils/copyToClipboard.mjs +20 -32
  137. package/reactjs/components/CopyButton/utils/index.js +1 -4
  138. package/reactjs/components/CopyButton/utils/index.mjs +2 -2
  139. package/reactjs/components/DisplayAmount/DisplayAmount.js +1 -90
  140. package/reactjs/components/DisplayAmount/DisplayAmount.mjs +68 -75
  141. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.js +1 -39
  142. package/reactjs/components/DisplayAmount/components/AnimateNumber/AnimateNumber.mjs +26 -33
  143. package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.js +1 -61
  144. package/reactjs/components/DisplayAmount/components/PrecisedAmount/PrecisedAmount.mjs +38 -46
  145. package/reactjs/components/DisplayAmount/index.js +1 -4
  146. package/reactjs/components/DisplayAmount/index.mjs +2 -2
  147. package/reactjs/components/DisplayAmount/utils/index.js +1 -4
  148. package/reactjs/components/DisplayAmount/utils/index.mjs +2 -2
  149. package/reactjs/components/DisplayAmount/utils/truncateAmount.js +1 -21
  150. package/reactjs/components/DisplayAmount/utils/truncateAmount.mjs +9 -13
  151. package/reactjs/components/Error/Error.js +1 -66
  152. package/reactjs/components/Error/Error.mjs +29 -29
  153. package/reactjs/components/Error/index.js +1 -4
  154. package/reactjs/components/Error/index.mjs +2 -2
  155. package/reactjs/components/SmallLoader/SmallLoader.js +1 -21
  156. package/reactjs/components/SmallLoader/SmallLoader.mjs +13 -18
  157. package/reactjs/components/SmallLoader/index.js +1 -4
  158. package/reactjs/components/SmallLoader/index.mjs +2 -2
  159. package/reactjs/components/ToggleDirection/ToggleDirection.js +1 -30
  160. package/reactjs/components/ToggleDirection/ToggleDirection.mjs +22 -28
  161. package/reactjs/components/TokenSelector/TokenSelector.js +1 -172
  162. package/reactjs/components/TokenSelector/TokenSelector.mjs +98 -118
  163. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.js +1 -94
  164. package/reactjs/components/TokenSelector/components/ChainSelect/ChainSelect.mjs +48 -57
  165. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.js +1 -55
  166. package/reactjs/components/TokenSelector/components/ChainSelect/components/ChainOptionLabel.mjs +45 -48
  167. package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.js +1 -18
  168. package/reactjs/components/TokenSelector/components/ChainSelect/components/FormatChainOptionLabel.mjs +9 -14
  169. package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.js +1 -6
  170. package/reactjs/components/TokenSelector/components/ChainSelect/components/IndicatorSeparator.mjs +2 -4
  171. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.js +1 -43
  172. package/reactjs/components/TokenSelector/components/ChainSelect/components/SelectedChainOption.mjs +21 -21
  173. package/reactjs/components/TokenSelector/components/SelectContainer.js +1 -40
  174. package/reactjs/components/TokenSelector/components/SelectContainer.mjs +36 -38
  175. package/reactjs/components/TokenSelector/components/SelectContent.js +1 -136
  176. package/reactjs/components/TokenSelector/components/SelectContent.mjs +79 -103
  177. package/reactjs/components/TokenSelector/components/SelectedOption.js +1 -28
  178. package/reactjs/components/TokenSelector/components/SelectedOption.mjs +22 -24
  179. package/reactjs/components/TokenSelector/components/TokenIcon.js +1 -82
  180. package/reactjs/components/TokenSelector/components/TokenIcon.mjs +52 -58
  181. package/reactjs/components/TokenSelector/components/TokenItem.js +1 -80
  182. package/reactjs/components/TokenSelector/components/TokenItem.mjs +41 -54
  183. package/reactjs/components/TokenSelector/components/TokenList.js +1 -23
  184. package/reactjs/components/TokenSelector/components/TokenList.mjs +19 -21
  185. package/reactjs/components/TokenSelector/components/TokenSymbol.js +1 -25
  186. package/reactjs/components/TokenSelector/components/TokenSymbol.mjs +14 -15
  187. package/reactjs/components/TokenSelector/index.js +1 -4
  188. package/reactjs/components/TokenSelector/index.mjs +2 -2
  189. package/reactjs/components/TransactionToast/TransactionToast.js +1 -53
  190. package/reactjs/components/TransactionToast/TransactionToast.mjs +27 -28
  191. package/reactjs/components/TransactionToast/TransactionToastContainer.js +1 -20
  192. package/reactjs/components/TransactionToast/TransactionToastContainer.mjs +16 -18
  193. package/reactjs/components/TransactionToast/index.js +1 -6
  194. package/reactjs/components/TransactionToast/index.mjs +4 -4
  195. package/reactjs/components/TrimAddress/TrimAddress.js +1 -27
  196. package/reactjs/components/TrimAddress/TrimAddress.mjs +19 -24
  197. package/reactjs/components/TrimAddress/index.js +1 -4
  198. package/reactjs/components/TrimAddress/index.mjs +2 -2
  199. package/reactjs/components/base/MxButton/MxButton.js +1 -71
  200. package/reactjs/components/base/MxButton/MxButton.mjs +46 -46
  201. package/reactjs/components/base/MxButton/index.js +1 -4
  202. package/reactjs/components/base/MxButton/index.mjs +2 -2
  203. package/reactjs/components/base/MxCard/MxCard.js +1 -54
  204. package/reactjs/components/base/MxCard/MxCard.mjs +34 -34
  205. package/reactjs/components/base/MxCard/index.js +1 -4
  206. package/reactjs/components/base/MxCard/index.mjs +2 -2
  207. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.js +1 -28
  208. package/reactjs/components/base/MxCircleLoader/MxCircleLoader.mjs +24 -26
  209. package/reactjs/components/base/MxCircleLoader/index.js +1 -4
  210. package/reactjs/components/base/MxCircleLoader/index.mjs +2 -2
  211. package/reactjs/components/base/MxLink/MxLink.js +1 -70
  212. package/reactjs/components/base/MxLink/MxLink.mjs +44 -46
  213. package/reactjs/components/base/MxLink/index.js +1 -4
  214. package/reactjs/components/base/MxLink/index.mjs +2 -2
  215. package/reactjs/components/base/MxSearch/MxSearch.js +1 -69
  216. package/reactjs/components/base/MxSearch/MxSearch.mjs +37 -41
  217. package/reactjs/components/base/MxSearch/index.js +1 -4
  218. package/reactjs/components/base/MxSearch/index.mjs +2 -2
  219. package/reactjs/components/base/MxSlideover/MxSlideover.js +1 -78
  220. package/reactjs/components/base/MxSlideover/MxSlideover.mjs +72 -74
  221. package/reactjs/components/base/MxSlideover/index.js +1 -4
  222. package/reactjs/components/base/MxSlideover/index.mjs +2 -2
  223. package/reactjs/components/base/MxTooltip/MxTooltip.js +1 -163
  224. package/reactjs/components/base/MxTooltip/MxTooltip.mjs +92 -135
  225. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.js +1 -33
  226. package/reactjs/components/base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs +29 -31
  227. package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.js +1 -4
  228. package/reactjs/components/base/MxTooltip/components/TooltipContainer/index.mjs +2 -2
  229. package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.js +1 -27
  230. package/reactjs/components/base/MxTooltip/components/TooltipContent/TooltipContent.mjs +23 -25
  231. package/reactjs/components/base/MxTooltip/components/TooltipContent/index.js +1 -4
  232. package/reactjs/components/base/MxTooltip/components/TooltipContent/index.mjs +2 -2
  233. package/reactjs/components/base/MxTooltip/components/index.js +1 -6
  234. package/reactjs/components/base/MxTooltip/components/index.mjs +4 -4
  235. package/reactjs/components/base/MxTooltip/index.js +1 -4
  236. package/reactjs/components/base/MxTooltip/index.mjs +2 -2
  237. package/reactjs/components/base/index.js +1 -14
  238. package/reactjs/components/base/index.mjs +12 -12
  239. package/reactjs/components/index.js +1 -54
  240. package/reactjs/components/index.mjs +52 -52
  241. package/reactjs/constants/chains.js +1 -54
  242. package/reactjs/constants/chains.mjs +33 -52
  243. package/reactjs/constants/index.js +1 -13
  244. package/reactjs/constants/index.mjs +9 -10
  245. package/reactjs/context/Web3AppProvider.js +1 -42
  246. package/reactjs/context/Web3AppProvider.mjs +34 -36
  247. package/reactjs/context/queryClient.js +1 -11
  248. package/reactjs/context/queryClient.mjs +5 -8
  249. package/reactjs/context/useWeb3App.js +1 -12
  250. package/reactjs/context/useWeb3App.mjs +7 -8
  251. package/reactjs/helpers/index.js +1 -6
  252. package/reactjs/helpers/index.mjs +4 -4
  253. package/reactjs/helpers/resolveBridgeApiChainId.js +1 -40
  254. package/reactjs/helpers/resolveBridgeApiChainId.mjs +21 -34
  255. package/reactjs/hooks/index.js +1 -35
  256. package/reactjs/hooks/index.mjs +33 -33
  257. package/reactjs/hooks/tests/useGenericSignMessage.spec.js +1 -68
  258. package/reactjs/hooks/tests/useGenericSignMessage.spec.mjs +23 -38
  259. package/reactjs/hooks/tests/useSignTransaction.spec.js +1 -195
  260. package/reactjs/hooks/tests/useSignTransaction.spec.mjs +72 -110
  261. package/reactjs/hooks/useAccount.js +1 -13
  262. package/reactjs/hooks/useAccount.mjs +7 -8
  263. package/reactjs/hooks/useBalances.js +1 -53
  264. package/reactjs/hooks/useBalances.mjs +28 -40
  265. package/reactjs/hooks/useBridgeApiChainId.js +1 -13
  266. package/reactjs/hooks/useBridgeApiChainId.mjs +9 -9
  267. package/reactjs/hooks/useBridgeFormik.js +1 -167
  268. package/reactjs/hooks/useBridgeFormik.mjs +110 -155
  269. package/reactjs/hooks/useDebounce.js +1 -13
  270. package/reactjs/hooks/useDebounce.mjs +8 -10
  271. package/reactjs/hooks/useFetchBridgeData.js +1 -45
  272. package/reactjs/hooks/useFetchBridgeData.mjs +37 -38
  273. package/reactjs/hooks/useFetchTokens.js +1 -115
  274. package/reactjs/hooks/useFetchTokens.mjs +80 -108
  275. package/reactjs/hooks/useGenericSignMessage.js +1 -75
  276. package/reactjs/hooks/useGenericSignMessage.mjs +44 -64
  277. package/reactjs/hooks/useGetChainId.js +1 -11
  278. package/reactjs/hooks/useGetChainId.mjs +7 -8
  279. package/reactjs/hooks/useResolveTokenChain.js +1 -20
  280. package/reactjs/hooks/useResolveTokenChain.mjs +11 -14
  281. package/reactjs/hooks/useSendTransactions.js +1 -25
  282. package/reactjs/hooks/useSendTransactions.mjs +19 -23
  283. package/reactjs/hooks/useSignTransaction.js +1 -112
  284. package/reactjs/hooks/useSignTransaction.mjs +50 -76
  285. package/reactjs/hooks/useSuiConnect.js +1 -86
  286. package/reactjs/hooks/useSuiConnect.mjs +52 -70
  287. package/reactjs/hooks/validation/index.js +1 -10
  288. package/reactjs/hooks/validation/index.mjs +8 -8
  289. package/reactjs/hooks/validation/useAmountSchema.js +1 -32
  290. package/reactjs/hooks/validation/useAmountSchema.mjs +8 -11
  291. package/reactjs/hooks/validation/useSecondAmountSchema.js +1 -26
  292. package/reactjs/hooks/validation/useSecondAmountSchema.mjs +5 -6
  293. package/reactjs/hooks/validation/useTestHasEnoughFunds.js +1 -37
  294. package/reactjs/hooks/validation/useTestHasEnoughFunds.mjs +20 -29
  295. package/reactjs/hooks/validation/useTestIsConnected.js +1 -27
  296. package/reactjs/hooks/validation/useTestIsConnected.mjs +13 -19
  297. package/reactjs/index.js +1 -190
  298. package/reactjs/index.mjs +154 -154
  299. package/reactjs/init/index.js +1 -5
  300. package/reactjs/init/index.mjs +3 -3
  301. package/reactjs/init/init.js +1 -147
  302. package/reactjs/init/init.mjs +57 -78
  303. package/reactjs/queries/index.js +1 -17
  304. package/reactjs/queries/index.mjs +15 -15
  305. package/reactjs/queries/useCheckAccount.query.js +1 -39
  306. package/reactjs/queries/useCheckAccount.query.mjs +29 -33
  307. package/reactjs/queries/useGetAllTokens.query.js +1 -35
  308. package/reactjs/queries/useGetAllTokens.query.mjs +26 -30
  309. package/reactjs/queries/useGetChains.query.js +1 -34
  310. package/reactjs/queries/useGetChains.query.mjs +26 -28
  311. package/reactjs/queries/useGetHistory.query.js +1 -69
  312. package/reactjs/queries/useGetHistory.query.mjs +53 -57
  313. package/reactjs/queries/useGetMvxTokensBalances.query.js +1 -66
  314. package/reactjs/queries/useGetMvxTokensBalances.query.mjs +38 -46
  315. package/reactjs/queries/useGetNonMvxTokensBalances.query.js +1 -81
  316. package/reactjs/queries/useGetNonMvxTokensBalances.query.mjs +49 -57
  317. package/reactjs/queries/useGetRate.mutation.js +1 -18
  318. package/reactjs/queries/useGetRate.mutation.mjs +12 -15
  319. package/reactjs/reexports.js +1 -48
  320. package/reactjs/reexports.mjs +13 -13
  321. package/reactjs/utils/delay.js +1 -6
  322. package/reactjs/utils/delay.mjs +3 -3
  323. package/reactjs/utils/formatAmount.js +1 -23
  324. package/reactjs/utils/formatAmount.mjs +16 -17
  325. package/reactjs/utils/getCleanStringAmount.js +1 -11
  326. package/reactjs/utils/getCleanStringAmount.mjs +6 -8
  327. package/reactjs/utils/getCompletePathname.js +1 -5
  328. package/reactjs/utils/getCompletePathname.mjs +3 -3
  329. package/reactjs/utils/getInitialTokens.js +1 -12
  330. package/reactjs/utils/getInitialTokens.mjs +6 -7
  331. package/reactjs/utils/hasEnoughFunds.js +1 -19
  332. package/reactjs/utils/hasEnoughFunds.mjs +11 -14
  333. package/reactjs/utils/index.js +1 -26
  334. package/reactjs/utils/index.mjs +24 -24
  335. package/reactjs/utils/isStringFloat.js +1 -21
  336. package/reactjs/utils/isStringFloat.mjs +11 -18
  337. package/reactjs/utils/mxClsx.js +1 -8
  338. package/reactjs/utils/mxClsx.mjs +4 -6
  339. package/reactjs/utils/pipe.js +1 -25
  340. package/reactjs/utils/pipe.mjs +13 -17
  341. package/reactjs/utils/removeCommas.js +1 -6
  342. package/reactjs/utils/removeCommas.mjs +2 -4
  343. package/reactjs/utils/roundAmount.js +1 -40
  344. package/reactjs/utils/roundAmount.mjs +16 -36
  345. package/reactjs/utils/testNumber.js +1 -4
  346. package/reactjs/utils/testNumber.mjs +2 -2
  347. package/store/inMemoryStore.js +1 -39
  348. package/store/inMemoryStore.mjs +17 -21
  349. package/style.css +1 -2274
  350. package/types/chainType.js +1 -11
  351. package/types/chainType.mjs +2 -9
  352. package/types/errors.js +1 -9
  353. package/types/errors.mjs +4 -5
  354. package/types/providerType.js +1 -9
  355. package/types/providerType.mjs +2 -7
  356. package/types/transaction.d.ts +2 -0
  357. package/all-networks-EJIVYZ_i.mjs +0 -4
  358. package/all-networks-NYACMyeN.js +0 -4
  359. package/default-BYtXv70Z.mjs +0 -4
  360. package/default-H3AbmzFV.js +0 -4
  361. package/react.esm-7GsOwMPq.js +0 -11815
  362. package/react.esm-CU-Iqz8D.mjs +0 -11796
@@ -1,11 +1,10 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { AdapterBlueprint, WalletConnectConnector, WcHelpersUtil } from "@reown/appkit-controllers";
5
- const WC_ID = "walletConnect";
6
- const DEFAULT_SUI_CAIP_CHAINS = ["sui:mainnet", "sui:testnet", "sui:devnet"];
7
- class SuiAdapter extends AdapterBlueprint {
8
- constructor(opts) {
1
+ var y = Object.defineProperty;
2
+ var v = (d, o, t) => o in d ? y(d, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[o] = t;
3
+ var h = (d, o, t) => v(d, typeof o != "symbol" ? o + "" : o, t);
4
+ import { AdapterBlueprint as w, WalletConnectConnector as S, WcHelpersUtil as g } from "@reown/appkit-controllers";
5
+ const p = "walletConnect", f = ["sui:mainnet", "sui:testnet", "sui:devnet"];
6
+ class P extends w {
7
+ constructor(t) {
9
8
  super({
10
9
  namespace: "sui",
11
10
  adapterType: "sui"
@@ -15,119 +14,102 @@ class SuiAdapter extends AdapterBlueprint {
15
14
  * @see @reown/appkit-adapter-solana — adapters must NOT call UniversalProvider.init() again
16
15
  * (duplicate Core breaks pairing / QR). `listenWalletConnect` attaches `display_uri` here only.
17
16
  */
18
- __publicField(this, "sharedWcProvider");
19
- __publicField(this, "explicitCaipChainsFromInit");
20
- __publicField(this, "expectedSuiAddress");
17
+ h(this, "sharedWcProvider");
18
+ h(this, "explicitCaipChainsFromInit");
19
+ h(this, "expectedSuiAddress");
21
20
  /**
22
21
  * AppKit passes `networks` here from `createAppKit({ networks })` filtered by namespace.
23
22
  * `ChainController.getRequestedCaipNetworks('sui')` is often still empty → we must keep this.
24
23
  */
25
- __publicField(this, "suiNetworksFromConfig", []);
26
- this.explicitCaipChainsFromInit = (opts == null ? void 0 : opts.explicitCaipChains) ?? [];
27
- this.expectedSuiAddress = opts == null ? void 0 : opts.expectedSuiAddress;
24
+ h(this, "suiNetworksFromConfig", []);
25
+ this.explicitCaipChainsFromInit = (t == null ? void 0 : t.explicitCaipChains) ?? [], this.expectedSuiAddress = t == null ? void 0 : t.expectedSuiAddress;
28
26
  }
29
- construct(params) {
30
- super.construct(params);
31
- this.suiNetworksFromConfig = params.networks ?? [];
27
+ construct(t) {
28
+ super.construct(t), this.suiNetworksFromConfig = t.networks ?? [];
32
29
  }
33
30
  /**
34
31
  * Resolves CAIP-2 chain ids for the WC session. Never return [] (breaks pairing + QR UI).
35
32
  */
36
- pickChainsFromExplicit(explicit, chainId) {
37
- if (explicit.length === 0) {
38
- return DEFAULT_SUI_CAIP_CHAINS;
39
- }
40
- if (chainId !== void 0 && chainId !== null) {
41
- const cid = chainId.toString();
42
- const match = explicit.find(
43
- (c) => c === `sui:${cid}` || c.endsWith(`:${cid}`)
33
+ pickChainsFromExplicit(t, e) {
34
+ if (t.length === 0)
35
+ return f;
36
+ if (e != null) {
37
+ const n = e.toString(), i = t.find(
38
+ (s) => s === `sui:${n}` || s.endsWith(`:${n}`)
44
39
  );
45
- if (match) {
46
- return [match];
47
- }
40
+ if (i)
41
+ return [i];
48
42
  }
49
- return explicit;
43
+ return t;
50
44
  }
51
- resolveSuiChainsForConnect(chainId) {
52
- const fromController = this.getCaipNetworks("sui");
53
- const source = fromController.length > 0 ? fromController : this.suiNetworksFromConfig;
54
- if (source.length === 0) {
45
+ resolveSuiChainsForConnect(t) {
46
+ const e = this.getCaipNetworks("sui"), n = e.length > 0 ? e : this.suiNetworksFromConfig;
47
+ if (n.length === 0)
55
48
  return this.pickChainsFromExplicit(
56
49
  this.explicitCaipChainsFromInit,
57
- chainId
50
+ t
58
51
  );
59
- }
60
- const toCaip = (n) => n.caipNetworkId || `sui:${n.id}`;
61
- if (chainId !== void 0 && chainId !== null) {
62
- const match = source.find((n) => {
63
- var _a;
64
- return ((_a = n.id) == null ? void 0 : _a.toString()) === chainId.toString();
52
+ const i = (s) => s.caipNetworkId || `sui:${s.id}`;
53
+ if (t != null) {
54
+ const s = n.find((r) => {
55
+ var c;
56
+ return ((c = r.id) == null ? void 0 : c.toString()) === t.toString();
65
57
  });
66
- if (match) {
67
- return [toCaip(match)];
68
- }
58
+ if (s)
59
+ return [i(s)];
69
60
  }
70
- return source.map(toCaip);
61
+ return n.map(i);
71
62
  }
72
63
  /**
73
64
  * `WalletConnectConnector` typings require `caipNetworks` (ChainController may still be empty
74
65
  * when this runs). Prefer networks from `construct`, else explicit/init CAIP ids.
75
66
  */
76
67
  getCaipNetworksForWalletConnectConnector() {
77
- if (this.suiNetworksFromConfig.length > 0) {
78
- return this.suiNetworksFromConfig;
79
- }
80
- const caipIds = this.explicitCaipChainsFromInit.length > 0 ? this.explicitCaipChainsFromInit : DEFAULT_SUI_CAIP_CHAINS;
81
- return caipIds.map((caip) => {
82
- const id = caip.startsWith("sui:") ? caip.slice(4) : caip;
68
+ return this.suiNetworksFromConfig.length > 0 ? this.suiNetworksFromConfig : (this.explicitCaipChainsFromInit.length > 0 ? this.explicitCaipChainsFromInit : f).map((e) => {
69
+ const n = e.startsWith("sui:") ? e.slice(4) : e;
83
70
  return {
84
- id,
71
+ id: n,
85
72
  chainNamespace: "sui",
86
- caipNetworkId: caip,
73
+ caipNetworkId: e,
87
74
  name: "Sui",
88
75
  nativeCurrency: { name: "SUI", symbol: "SUI", decimals: 9 },
89
76
  rpcUrls: {
90
- default: { http: [`https://fullnode.${id}.sui.io:443`] }
77
+ default: { http: [`https://fullnode.${n}.sui.io:443`] }
91
78
  }
92
79
  };
93
80
  });
94
81
  }
95
82
  syncConnectors() {
96
83
  }
97
- async setUniversalProvider(sharedProvider) {
98
- this.sharedWcProvider = sharedProvider;
99
- const wcConnector = new WalletConnectConnector({
100
- provider: sharedProvider,
84
+ async setUniversalProvider(t) {
85
+ this.sharedWcProvider = t;
86
+ const e = new S({
87
+ provider: t,
101
88
  namespace: "sui",
102
89
  caipNetworks: this.getCaipNetworksForWalletConnectConnector()
103
90
  });
104
- this.addConnector(wcConnector);
105
- WcHelpersUtil.listenWcProvider({
106
- universalProvider: sharedProvider,
91
+ this.addConnector(e), g.listenWcProvider({
92
+ universalProvider: t,
107
93
  namespace: "sui",
108
- onConnect: (accounts) => this.onConnect(accounts, WC_ID),
109
- onDisconnect: () => this.onDisconnect(WC_ID),
110
- onAccountsChanged: (accounts) => this.onAccountsChanged(accounts, WC_ID, false)
94
+ onConnect: (n) => this.onConnect(n, p),
95
+ onDisconnect: () => this.onDisconnect(p),
96
+ onAccountsChanged: (n) => this.onAccountsChanged(n, p, !1)
111
97
  });
112
98
  }
113
99
  getWcProvider() {
114
- if (!this.sharedWcProvider) {
100
+ if (!this.sharedWcProvider)
115
101
  throw new Error(
116
102
  "SuiAdapter: UniversalProvider not ready — setUniversalProvider must run before connect"
117
103
  );
118
- }
119
104
  return this.sharedWcProvider;
120
105
  }
121
- async connectWalletConnect(chainId) {
122
- var _a, _b;
123
- const wc = this.getWcProvider();
124
- if ((_b = (_a = wc.session) == null ? void 0 : _a.namespaces) == null ? void 0 : _b["sui"]) {
125
- const clientId2 = await wc.client.core.crypto.getClientId();
126
- return { clientId: clientId2 };
127
- }
128
- const chains = this.resolveSuiChainsForConnect(chainId);
129
- const safeChains = chains.length > 0 ? chains : DEFAULT_SUI_CAIP_CHAINS;
130
- await wc.connect({
106
+ async connectWalletConnect(t) {
107
+ var r, c;
108
+ const e = this.getWcProvider();
109
+ if ((c = (r = e.session) == null ? void 0 : r.namespaces) != null && c.sui)
110
+ return { clientId: await e.client.core.crypto.getClientId() };
111
+ const n = this.resolveSuiChainsForConnect(t), i = n.length > 0 ? n : f;
112
+ return await e.connect({
131
113
  optionalNamespaces: {
132
114
  sui: {
133
115
  methods: [
@@ -135,174 +117,143 @@ class SuiAdapter extends AdapterBlueprint {
135
117
  "sui_signTransaction",
136
118
  "sui_signAndExecuteTransaction"
137
119
  ],
138
- chains: safeChains,
120
+ chains: i,
139
121
  events: []
140
122
  }
141
123
  }
142
- });
143
- const clientId = await wc.client.core.crypto.getClientId();
144
- return { clientId };
124
+ }), { clientId: await e.client.core.crypto.getClientId() };
145
125
  }
146
- async connect(params) {
147
- var _a, _b, _c;
148
- const connector = this.connectors.find((c) => c.id === params.id);
149
- if (!connector) {
126
+ async connect(t) {
127
+ var l, m, C;
128
+ const e = this.connectors.find((u) => u.id === t.id);
129
+ if (!e)
150
130
  throw new Error("Sui connector not found");
151
- }
152
- const existingConnection = this.getConnection({
153
- address: params.address,
154
- connectorId: connector.id,
131
+ const n = this.getConnection({
132
+ address: t.address,
133
+ connectorId: e.id,
155
134
  connections: this.connections,
156
135
  connectors: this.connectors
157
136
  });
158
- if (existingConnection == null ? void 0 : existingConnection.account) {
159
- const chainId2 = ((_a = existingConnection.caipNetwork) == null ? void 0 : _a.id) ?? params.chainId ?? "mainnet";
160
- this.emit("accountChanged", {
161
- address: existingConnection.account.address,
162
- chainId: chainId2,
163
- connector
164
- });
165
- return {
166
- id: connector.id,
167
- address: existingConnection.account.address,
168
- chainId: chainId2,
169
- provider: connector.provider,
170
- type: connector.type
137
+ if (n != null && n.account) {
138
+ const u = ((l = n.caipNetwork) == null ? void 0 : l.id) ?? t.chainId ?? "mainnet";
139
+ return this.emit("accountChanged", {
140
+ address: n.account.address,
141
+ chainId: u,
142
+ connector: e
143
+ }), {
144
+ id: e.id,
145
+ address: n.account.address,
146
+ chainId: u,
147
+ provider: e.provider,
148
+ type: e.type
171
149
  };
172
150
  }
173
- const wc = this.getWcProvider();
174
- const accounts = WcHelpersUtil.getWalletConnectAccounts(
175
- wc,
151
+ const i = this.getWcProvider(), r = (m = g.getWalletConnectAccounts(
152
+ i,
176
153
  "sui"
177
- );
178
- const address = (_b = accounts[0]) == null ? void 0 : _b.address;
179
- if (!address) {
154
+ )[0]) == null ? void 0 : m.address;
155
+ if (!r)
180
156
  throw new Error("No Sui account found after WalletConnect session");
181
- }
182
- if (this.expectedSuiAddress && address !== this.expectedSuiAddress) {
157
+ if (this.expectedSuiAddress && r !== this.expectedSuiAddress)
183
158
  throw new Error(
184
- `Sui account mismatch: expected ${this.expectedSuiAddress}, got ${address}`
159
+ `Sui account mismatch: expected ${this.expectedSuiAddress}, got ${r}`
185
160
  );
186
- }
187
- const caipNetwork = (_c = this.getCaipNetworks()) == null ? void 0 : _c.find(
188
- (n) => n.id === params.chainId
161
+ const c = (C = this.getCaipNetworks()) == null ? void 0 : C.find(
162
+ (u) => u.id === t.chainId
189
163
  );
190
164
  this.addConnection({
191
- connectorId: connector.id,
192
- accounts: [{ address }],
193
- caipNetwork
194
- });
195
- const chainId = params.chainId ?? (caipNetwork == null ? void 0 : caipNetwork.id) ?? "mainnet";
196
- this.emit("accountChanged", {
197
- address,
198
- chainId,
199
- connector
165
+ connectorId: e.id,
166
+ accounts: [{ address: r }],
167
+ caipNetwork: c
200
168
  });
201
- return {
202
- id: connector.id,
203
- address,
204
- chainId,
205
- provider: connector.provider,
206
- type: connector.type
169
+ const a = t.chainId ?? (c == null ? void 0 : c.id) ?? "mainnet";
170
+ return this.emit("accountChanged", {
171
+ address: r,
172
+ chainId: a,
173
+ connector: e
174
+ }), {
175
+ id: e.id,
176
+ address: r,
177
+ chainId: a,
178
+ provider: e.provider,
179
+ type: e.type
207
180
  };
208
181
  }
209
- async disconnect(params) {
210
- if (params == null ? void 0 : params.id) {
211
- if (this.sharedWcProvider) {
182
+ async disconnect(t) {
183
+ if (t != null && t.id) {
184
+ if (this.sharedWcProvider)
212
185
  try {
213
186
  await this.sharedWcProvider.disconnect();
214
187
  } catch {
215
188
  }
216
- }
217
- this.deleteConnection(params.id);
218
- }
219
- if (this.connections.length === 0) {
220
- this.emit("disconnect");
221
- } else {
222
- this.emitFirstAvailableConnection();
189
+ this.deleteConnection(t.id);
223
190
  }
224
- return { connections: this.connections };
191
+ return this.connections.length === 0 ? this.emit("disconnect") : this.emitFirstAvailableConnection(), { connections: this.connections };
225
192
  }
226
- async getAccounts(params) {
227
- if (!this.sharedWcProvider) {
228
- return { accounts: [] };
229
- }
230
- const accounts = WcHelpersUtil.getWalletConnectAccounts(
231
- this.sharedWcProvider,
232
- "sui"
233
- );
234
- return {
235
- accounts: accounts.map((a) => ({
193
+ async getAccounts(t) {
194
+ return this.sharedWcProvider ? {
195
+ accounts: g.getWalletConnectAccounts(
196
+ this.sharedWcProvider,
197
+ "sui"
198
+ ).map((n) => ({
236
199
  namespace: "sui",
237
- address: a.address,
200
+ address: n.address,
238
201
  type: "eoa"
239
202
  }))
240
- };
203
+ } : { accounts: [] };
241
204
  }
242
- async getBalance(params) {
243
- var _a, _b, _c;
244
- if (!params.address) {
205
+ async getBalance(t) {
206
+ var e, n, i;
207
+ if (!t.address)
245
208
  return { balance: "0", symbol: "SUI" };
246
- }
247
209
  try {
248
- const caipNetwork = (_a = this.getCaipNetworks()) == null ? void 0 : _a.find(
249
- (n) => n.id === params.chainId
250
- );
251
- const rpcUrl = `https://fullnode.${caipNetwork == null ? void 0 : caipNetwork.id}.sui.io:443`;
252
- if (!rpcUrl) {
210
+ const s = (e = this.getCaipNetworks()) == null ? void 0 : e.find(
211
+ (C) => C.id === t.chainId
212
+ ), r = `https://fullnode.${s == null ? void 0 : s.id}.sui.io:443`;
213
+ if (!r)
253
214
  return { balance: "0", symbol: "SUI" };
254
- }
255
- const res = await fetch(rpcUrl, {
215
+ const a = await (await fetch(r, {
256
216
  method: "POST",
257
217
  headers: { "Content-Type": "application/json" },
258
218
  body: JSON.stringify({
259
219
  jsonrpc: "2.0",
260
220
  id: 1,
261
221
  method: "suix_getBalance",
262
- params: [params.address, "0x2::sui::SUI"]
222
+ params: [t.address, "0x2::sui::SUI"]
263
223
  })
264
- });
265
- const data = await res.json();
266
- const totalBalance = ((_b = data == null ? void 0 : data.result) == null ? void 0 : _b.totalBalance) ?? "0";
267
- const formatted = (parseInt(totalBalance, 10) / 1e9).toString();
224
+ })).json(), l = ((n = a == null ? void 0 : a.result) == null ? void 0 : n.totalBalance) ?? "0";
268
225
  return {
269
- balance: formatted,
270
- symbol: ((_c = caipNetwork == null ? void 0 : caipNetwork.nativeCurrency) == null ? void 0 : _c.symbol) || "SUI"
226
+ balance: (parseInt(l, 10) / 1e9).toString(),
227
+ symbol: ((i = s == null ? void 0 : s.nativeCurrency) == null ? void 0 : i.symbol) || "SUI"
271
228
  };
272
229
  } catch {
273
230
  return { balance: "0", symbol: "SUI" };
274
231
  }
275
232
  }
276
- async switchNetwork(params) {
277
- await super.switchNetwork(params);
233
+ async switchNetwork(t) {
234
+ await super.switchNetwork(t);
278
235
  }
279
- async syncConnection(params) {
280
- return this.connect({ ...params, type: "" });
236
+ async syncConnection(t) {
237
+ return this.connect({ ...t, type: "" });
281
238
  }
282
239
  async syncConnections({
283
- connectToFirstConnector,
284
- caipNetwork
240
+ connectToFirstConnector: t,
241
+ caipNetwork: e
285
242
  }) {
286
- if (!this.sharedWcProvider) {
243
+ if (!this.sharedWcProvider)
287
244
  return;
288
- }
289
- const accounts = WcHelpersUtil.getWalletConnectAccounts(
245
+ const n = g.getWalletConnectAccounts(
290
246
  this.sharedWcProvider,
291
247
  "sui"
292
248
  );
293
- if (accounts.length > 0) {
294
- this.addConnection({
295
- connectorId: WC_ID,
296
- accounts: accounts.map((a) => ({ address: a.address })),
297
- caipNetwork
298
- });
299
- }
300
- if (connectToFirstConnector) {
301
- this.emitFirstAvailableConnection();
302
- }
249
+ n.length > 0 && this.addConnection({
250
+ connectorId: p,
251
+ accounts: n.map((i) => ({ address: i.address })),
252
+ caipNetwork: e
253
+ }), t && this.emitFirstAvailableConnection();
303
254
  }
304
- getWalletConnectProvider(params) {
305
- return params.provider;
255
+ getWalletConnectProvider(t) {
256
+ return t.provider;
306
257
  }
307
258
  /**
308
259
  * Resolves the CAIP-2 chain scope string for WalletConnect requests.
@@ -311,42 +262,34 @@ class SuiAdapter extends AdapterBlueprint {
311
262
  * 2. First `'sui:'`-prefixed entry in `explicitCaipChainsFromInit`
312
263
  * 3. `'sui:mainnet'` as a safe last resort
313
264
  */
314
- getChainScope(caipNetworkId) {
315
- if (caipNetworkId == null ? void 0 : caipNetworkId.startsWith("sui:")) {
316
- return caipNetworkId;
317
- }
318
- const fromInit = this.explicitCaipChainsFromInit.find(
319
- (c) => c.startsWith("sui:")
265
+ getChainScope(t) {
266
+ if (t != null && t.startsWith("sui:"))
267
+ return t;
268
+ const e = this.explicitCaipChainsFromInit.find(
269
+ (n) => n.startsWith("sui:")
320
270
  );
321
- if (fromInit) {
322
- return fromInit;
323
- }
324
- return "sui:mainnet";
271
+ return e || "sui:mainnet";
325
272
  }
326
- async signMessage(params) {
327
- const wc = this.getWcProvider();
328
- const chainScope = this.getChainScope();
329
- const result = await wc.request(
273
+ async signMessage(t) {
274
+ const e = this.getWcProvider(), n = this.getChainScope();
275
+ return { signature: (await e.request(
330
276
  {
331
277
  method: "sui_signPersonalMessage",
332
- params: { message: params.message, address: params.address }
278
+ params: { message: t.message, address: t.address }
333
279
  },
334
- chainScope
335
- );
336
- return { signature: result.signature };
280
+ n
281
+ )).signature };
337
282
  }
338
- async sendTransaction(params) {
339
- var _a;
340
- const wc = this.getWcProvider();
341
- const chainScope = this.getChainScope((_a = params.caipNetwork) == null ? void 0 : _a.caipNetworkId);
342
- const result = await wc.request(
283
+ async sendTransaction(t) {
284
+ var s;
285
+ const e = this.getWcProvider(), n = this.getChainScope((s = t.caipNetwork) == null ? void 0 : s.caipNetworkId);
286
+ return { hash: (await e.request(
343
287
  {
344
288
  method: "sui_signAndExecuteTransaction",
345
- params: { transaction: params.data, address: params.to }
289
+ params: { transaction: t.data, address: t.to }
346
290
  },
347
- chainScope
348
- );
349
- return { hash: result.digest };
291
+ n
292
+ )).digest };
350
293
  }
351
294
  async estimateGas() {
352
295
  return { gas: 0n };
@@ -374,5 +317,5 @@ class SuiAdapter extends AdapterBlueprint {
374
317
  }
375
318
  }
376
319
  export {
377
- SuiAdapter
320
+ P as SuiAdapter
378
321
  };
@@ -1,32 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("react/jsx-runtime");
5
- const reactjs_utils_mxClsx = require("../../utils/mxClsx.js");
6
- const reactjs_components_TrimAddress_TrimAddress = require("../TrimAddress/TrimAddress.js");
7
- const AccountAddress = ({
8
- address,
9
- username,
10
- showTag = true,
11
- className = ""
12
- }) => {
13
- const heroTag = username ? `@${username.replace(".elrond", "")}` : void 0;
14
- return /* @__PURE__ */ jsxRuntime.jsx(
15
- "div",
16
- {
17
- className: reactjs_utils_mxClsx.mxClsx(
18
- "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",
19
- className
20
- ),
21
- children: heroTag && showTag ? /* @__PURE__ */ jsxRuntime.jsx(
22
- "div",
23
- {
24
- className: "liq-truncate liq-text-left liq-text-neutral-100 uppercase",
25
- "data-testid": "mx-address",
26
- children: heroTag
27
- }
28
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactjs_components_TrimAddress_TrimAddress.TrimAddress, { address, "data-testid": "mx-address" })
29
- }
30
- );
31
- };
32
- exports.AccountAddress = AccountAddress;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/mxClsx.js"),n=require("../TrimAddress/TrimAddress.js"),c=({address:t,username:s,showTag:i=!0,className:d=""})=>{const r=s?`@${s.replace(".elrond","")}`:void 0;return e.jsx("div",{className:l.mxClsx("liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",d),children:r&&i?e.jsx("div",{className:"liq-truncate liq-text-left liq-text-neutral-100 uppercase","data-testid":"mx-address",children:r}):e.jsx(n.TrimAddress,{address:t,"data-testid":"mx-address"})})};exports.AccountAddress=c;
@@ -1,31 +1,31 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { mxClsx } from "../../utils/mxClsx.mjs";
3
- import { TrimAddress } from "../TrimAddress/TrimAddress.mjs";
4
- const AccountAddress = ({
5
- address,
6
- username,
7
- showTag = true,
8
- className = ""
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { mxClsx as s } from "../../utils/mxClsx.mjs";
3
+ import { TrimAddress as o } from "../TrimAddress/TrimAddress.mjs";
4
+ const c = ({
5
+ address: t,
6
+ username: r,
7
+ showTag: l = !0,
8
+ className: d = ""
9
9
  }) => {
10
- const heroTag = username ? `@${username.replace(".elrond", "")}` : void 0;
11
- return /* @__PURE__ */ jsx(
10
+ const i = r ? `@${r.replace(".elrond", "")}` : void 0;
11
+ return /* @__PURE__ */ e(
12
12
  "div",
13
13
  {
14
- className: mxClsx(
14
+ className: s(
15
15
  "liq-flex liq-min-w-0 liq-flex-grow liq-overflow-hidden liq-leading-none liq-max-w-[10rem]",
16
- className
16
+ d
17
17
  ),
18
- children: heroTag && showTag ? /* @__PURE__ */ jsx(
18
+ children: i && l ? /* @__PURE__ */ e(
19
19
  "div",
20
20
  {
21
21
  className: "liq-truncate liq-text-left liq-text-neutral-100 uppercase",
22
22
  "data-testid": "mx-address",
23
- children: heroTag
23
+ children: i
24
24
  }
25
- ) : /* @__PURE__ */ jsx(TrimAddress, { address, "data-testid": "mx-address" })
25
+ ) : /* @__PURE__ */ e(o, { address: t, "data-testid": "mx-address" })
26
26
  }
27
27
  );
28
28
  };
29
29
  export {
30
- AccountAddress
30
+ c as AccountAddress
31
31
  };
@@ -1,5 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const reactjs_components_AccountAddress_AccountAddress = require("./AccountAddress.js");
5
- exports.AccountAddress = reactjs_components_AccountAddress_AccountAddress.AccountAddress;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./AccountAddress.js");exports.AccountAddress=e.AccountAddress;
@@ -1,4 +1,4 @@
1
- import { AccountAddress } from "./AccountAddress.mjs";
1
+ import { AccountAddress as c } from "./AccountAddress.mjs";
2
2
  export {
3
- AccountAddress
3
+ c as AccountAddress
4
4
  };
@@ -1,34 +1,2 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const jsxRuntime = require("react/jsx-runtime");
5
- const reactjs_utils_mxClsx = require("../../utils/mxClsx.js");
6
- const reactjs_components_base_MxCard_MxCard = require("../base/MxCard/MxCard.js");
7
- require("../base/MxLink/MxLink.js");
8
- require("../base/MxSearch/MxSearch.js");
9
- require("@fortawesome/free-solid-svg-icons/faClose");
10
- require("@fortawesome/react-fontawesome");
11
- require("@headlessui/react");
12
- require("react");
13
- require("react-dom");
14
- require("react-popper");
15
- require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");
16
- require("../../constants/index.js");
17
- const AmountCard = ({
18
- className,
19
- children
20
- }) => {
21
- return /* @__PURE__ */ jsxRuntime.jsx(
22
- reactjs_components_base_MxCard_MxCard.MxCard,
23
- {
24
- cardSize: "lg",
25
- variant: "neutral-750",
26
- className: reactjs_utils_mxClsx.mxClsx(
27
- "liq-flex liq-flex-col liq-gap-4 liq-outline liq-outline-transparent",
28
- className
29
- ),
30
- children
31
- }
32
- );
33
- };
34
- exports.AmountCard = AmountCard;
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("../../utils/mxClsx.js"),t=require("../base/MxCard/MxCard.js");require("../base/MxLink/MxLink.js");require("../base/MxSearch/MxSearch.js");require("@fortawesome/free-solid-svg-icons/faClose");require("@fortawesome/react-fontawesome");require("@headlessui/react");require("react");require("react-dom");require("react-popper");require("../base/MxTooltip/components/TooltipContainer/TooltipContainer.js");require("../../constants/index.js");const n=({className:e,children:r})=>i.jsx(t.MxCard,{cardSize:"lg",variant:"neutral-750",className:u.mxClsx("liq-flex liq-flex-col liq-gap-4 liq-outline liq-outline-transparent",e),children:r});exports.AmountCard=n;