@multiversx/sdk-dapp-liquidity 2.0.0 → 2.1.0-alpha.1

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