@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,34 +1,34 @@
1
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
- import { faSpinner } from "@fortawesome/free-solid-svg-icons/faSpinner";
3
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
4
- import { formatAmount } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
5
- import { useAppKitNetwork } from "@reown/appkit/react";
6
- import { waitForTransactionReceipt } from "@wagmi/core";
7
- import debounce from "lodash/debounce";
8
- import { useRef, useState, useMemo, useCallback, useEffect } from "react";
9
- import { toast } from "react-toastify";
10
- import { useBridgeTokenSelection } from "./hooks/useBridgeTokenSelection.mjs";
11
- import { resolveSigningChainType } from "./utils/bridgeFormHelpers.mjs";
12
- import { MVX_CHAIN_IDS } from "../../../constants/index.mjs";
13
- import { getApiURL } from "../../../helpers/getApiURL.mjs";
1
+ import { jsx as n, Fragment as Ni, jsxs as s } from "react/jsx-runtime";
2
+ import { faSpinner as Ai } from "@fortawesome/free-solid-svg-icons/faSpinner";
3
+ import { FontAwesomeIcon as Di } from "@fortawesome/react-fontawesome";
4
+ import { formatAmount as Si } from "@multiversx/sdk-dapp-utils/out/helpers/formatAmount";
5
+ import { useAppKitNetwork as ki } from "@reown/appkit/react";
6
+ import { waitForTransactionReceipt as Ri } from "@wagmi/core";
7
+ import Mi from "lodash/debounce";
8
+ import { useRef as Pe, useState as x, useMemo as h, useCallback as g, useEffect as y } from "react";
9
+ import { toast as M } from "react-toastify";
10
+ import { useBridgeTokenSelection as Pi } from "./hooks/useBridgeTokenSelection.mjs";
11
+ import { resolveSigningChainType as Vi } from "./utils/bridgeFormHelpers.mjs";
12
+ import { MVX_CHAIN_IDS as Ve } from "../../../constants/index.mjs";
13
+ import { getApiURL as Ei } from "../../../helpers/getApiURL.mjs";
14
14
  import "../../constants/index.mjs";
15
- import { safeImageUrl } from "../../../helpers/safeImageUrl.mjs";
16
- import { ChainType } from "../../../types/chainType.mjs";
17
- import { useWeb3App } from "../../context/useWeb3App.mjs";
18
- import { sameBridgeApiChainId, toBridgeApiChainId } from "../../helpers/resolveBridgeApiChainId.mjs";
19
- import { useAccount } from "../../hooks/useAccount.mjs";
20
- import { useBridgeApiChainId } from "../../hooks/useBridgeApiChainId.mjs";
21
- import { useBridgeFormik, BridgeFormikValuesEnum } from "../../hooks/useBridgeFormik.mjs";
22
- import { useFetchBridgeData } from "../../hooks/useFetchBridgeData.mjs";
23
- import { useGetChainId } from "../../hooks/useGetChainId.mjs";
24
- import { useSendTransactions } from "../../hooks/useSendTransactions.mjs";
25
- import { useSignTransaction } from "../../hooks/useSignTransaction.mjs";
26
- import { useInvalidateHistoryQuery } from "../../queries/useGetHistory.query.mjs";
27
- import { useGetRateMutation } from "../../queries/useGetRate.mutation.mjs";
28
- import { mxClsx } from "../../utils/mxClsx.mjs";
29
- import { AmountCard } from "../AmountCard/AmountCard.mjs";
30
- import { AmountInput } from "../AmountInput/AmountInput.mjs";
31
- import { MxButton } from "../base/MxButton/MxButton.mjs";
15
+ import { safeImageUrl as X } from "../../../helpers/safeImageUrl.mjs";
16
+ import { ChainType as z } from "../../../types/chainType.mjs";
17
+ import { useWeb3App as Fi } from "../../context/useWeb3App.mjs";
18
+ import { sameBridgeApiChainId as le, toBridgeApiChainId as Li } from "../../helpers/resolveBridgeApiChainId.mjs";
19
+ import { useAccount as Ui } from "../../hooks/useAccount.mjs";
20
+ import { useBridgeApiChainId as ji } from "../../hooks/useBridgeApiChainId.mjs";
21
+ import { useBridgeFormik as Hi, BridgeFormikValuesEnum as G } from "../../hooks/useBridgeFormik.mjs";
22
+ import { useFetchBridgeData as Oi } from "../../hooks/useFetchBridgeData.mjs";
23
+ import { useGetChainId as Wi } from "../../hooks/useGetChainId.mjs";
24
+ import { useSendTransactions as Xi } from "../../hooks/useSendTransactions.mjs";
25
+ import { useSignTransaction as zi } from "../../hooks/useSignTransaction.mjs";
26
+ import { useInvalidateHistoryQuery as Gi } from "../../queries/useGetHistory.query.mjs";
27
+ import { useGetRateMutation as Qi } from "../../queries/useGetRate.mutation.mjs";
28
+ import { mxClsx as Ee } from "../../utils/mxClsx.mjs";
29
+ import { AmountCard as Fe } from "../AmountCard/AmountCard.mjs";
30
+ import { AmountInput as Le } from "../AmountInput/AmountInput.mjs";
31
+ import { MxButton as _i } from "../base/MxButton/MxButton.mjs";
32
32
  import "../base/MxCard/MxCard.mjs";
33
33
  import "../base/MxLink/MxLink.mjs";
34
34
  import "../base/MxSearch/MxSearch.mjs";
@@ -37,632 +37,508 @@ import "@headlessui/react";
37
37
  import "react-dom";
38
38
  import "react-popper";
39
39
  import "../base/MxTooltip/components/TooltipContainer/TooltipContainer.mjs";
40
- import { BridgeHistory } from "../BridgeHistory/BridgeHistory.mjs";
41
- import { BridgeConnectButton } from "../Connect/BridgeConnectButton.mjs";
40
+ import { BridgeHistory as $i } from "../BridgeHistory/BridgeHistory.mjs";
41
+ import { BridgeConnectButton as Ki } from "../Connect/BridgeConnectButton.mjs";
42
42
  import "wagmi";
43
- import { MvxConnectButton } from "../Connect/MvxConnectButton.mjs";
44
- import { BridgeAccountDisplay } from "../Connect/BridgeAccountDisplay.mjs";
45
- import { MvxAccountDisplay } from "../Connect/MvxAccountDisplay.mjs";
43
+ import { MvxConnectButton as Yi } from "../Connect/MvxConnectButton.mjs";
44
+ import { BridgeAccountDisplay as Ji } from "../Connect/BridgeAccountDisplay.mjs";
45
+ import { MvxAccountDisplay as Zi } from "../Connect/MvxAccountDisplay.mjs";
46
46
  import "@reown/appkit-controllers";
47
- import { ToggleDirection } from "../ToggleDirection/ToggleDirection.mjs";
48
- import { TokenSelector } from "../TokenSelector/TokenSelector.mjs";
49
- let fetchRateInterval;
50
- const Deposit = ({
51
- mvxChainId,
52
- mvxAddress,
53
- username,
54
- callbackRoute = "/",
55
- firstTokenIdentifier,
56
- secondTokenIdentifier,
57
- firstTokenAmount,
58
- secondTokenAmount,
59
- refetchTrigger,
60
- showHistory,
61
- forcedDestinationTokenSymbol,
62
- onSuccessfullySentTransaction,
63
- onFailedSentTransaction,
64
- onHistoryClose,
65
- onMvxConnect,
66
- onMvxDisconnect,
67
- onNavigate,
68
- onChangeDirection
47
+ import { ToggleDirection as Ti } from "../ToggleDirection/ToggleDirection.mjs";
48
+ import { TokenSelector as Ue } from "../TokenSelector/TokenSelector.mjs";
49
+ let Q;
50
+ const $t = ({
51
+ mvxChainId: _,
52
+ mvxAddress: l,
53
+ username: je,
54
+ callbackRoute: He = "/",
55
+ firstTokenIdentifier: Oe,
56
+ secondTokenIdentifier: We,
57
+ firstTokenAmount: P,
58
+ secondTokenAmount: w,
59
+ refetchTrigger: Xe,
60
+ showHistory: ze,
61
+ forcedDestinationTokenSymbol: Ge,
62
+ onSuccessfullySentTransaction: V,
63
+ onFailedSentTransaction: I,
64
+ onHistoryClose: E,
65
+ onMvxConnect: ce,
66
+ onMvxDisconnect: Qe,
67
+ onNavigate: _e,
68
+ onChangeDirection: $e
69
69
  }) => {
70
- var _a, _b;
71
- const ref = useRef(null);
72
- const [isTokenSelectorVisible, setIsTokenSelectorVisible] = useState(false);
73
- const [pendingSigning, setPendingSigning] = useState(false);
74
- const [forceRefetchRate, setForceRefetchRate] = useState(1);
75
- const [siginingTransactionsCount, setSigningTransactionsCount] = useState(0);
76
- const account = useAccount();
77
- const { switchNetwork } = useAppKitNetwork();
78
- const invalidateHistoryQuery = useInvalidateHistoryQuery();
79
- const {
80
- config,
81
- options,
82
- supportedChains: sdkChains,
83
- nativeAuthToken,
84
- bridgeOnly
85
- } = useWeb3App();
86
- const chainId = useGetChainId();
87
- const bridgeApiChainId = useBridgeApiChainId();
88
- const {
89
- evmTokensWithBalances,
90
- mvxTokensWithBalances,
91
- isTokensLoading: tokensLoading,
92
- isLoadingEvmTokensBalances,
93
- isLoadingMvxTokensBalances,
94
- chains = [],
95
- isChainsLoading
96
- } = useFetchBridgeData({
97
- refetchTrigger,
98
- mvxAddress,
99
- mvxApiURL: options.mvxApiURL
100
- });
101
- const isTokensLoading = tokensLoading || isLoadingEvmTokensBalances || isLoadingMvxTokensBalances || isChainsLoading;
102
- const activeChain = useMemo(() => {
103
- return sdkChains.find((chain) => sameBridgeApiChainId(chain.id, chainId));
104
- }, [chainId, sdkChains]);
105
- const mvxChain = useMemo(() => {
106
- return chains.find(
107
- (chain) => chain.chainId.toString() === mvxChainId.toString()
108
- );
109
- }, [chainId, chains]);
110
- const { evm, solana, bitcoin, sui } = useSignTransaction();
111
- const sendTransactions = useSendTransactions();
112
- const {
113
- mutate: getRate,
114
- data: rate,
115
- isPending: isPendingRate,
116
- error: rateError
117
- } = useGetRateMutation();
118
- const rateValidationError = ((_a = rateError == null ? void 0 : rateError.response) == null ? void 0 : _a.status) === 400 ? (_b = rateError == null ? void 0 : rateError.response) == null ? void 0 : _b.data.message : void 0;
119
- const handleSwitchNetwork = useCallback(
120
- (chain) => {
121
- const sdkChain = sdkChains.find(
122
- (c) => sameBridgeApiChainId(c.id, chain.id)
70
+ var we, Ne;
71
+ const Ke = Pe(null), de = Pe(void 0), [$, Ye] = x(!1), [F, N] = x(!1), [Je, Ze] = x(1), [K, Y] = x(0), f = Ui(), { switchNetwork: me } = ki(), ue = Gi(), {
72
+ config: pe,
73
+ options: he,
74
+ supportedChains: A,
75
+ nativeAuthToken: J,
76
+ bridgeOnly: Te
77
+ } = Fi(), Z = Wi(), ge = ji(), {
78
+ evmTokensWithBalances: ei,
79
+ mvxTokensWithBalances: ii,
80
+ isTokensLoading: ti,
81
+ isLoadingEvmTokensBalances: ni,
82
+ isLoadingMvxTokensBalances: ri,
83
+ chains: D = [],
84
+ isChainsLoading: oi
85
+ } = Oi({
86
+ refetchTrigger: Xe,
87
+ mvxAddress: l,
88
+ mvxApiURL: he.mvxApiURL
89
+ }), T = ti || ni || ri || oi, ai = h(() => A.find((i) => le(i.id, Z)), [Z, A]), a = h(() => D.find(
90
+ (i) => i.chainId.toString() === _.toString()
91
+ ), [Z, D]), { evm: fe, solana: qe, bitcoin: be, sui: Ie } = zi(), ve = Xi(), {
92
+ mutate: si,
93
+ data: d,
94
+ isPending: S,
95
+ error: v
96
+ } = Qi(), k = ((we = v == null ? void 0 : v.response) == null ? void 0 : we.status) === 400 ? (Ne = v == null ? void 0 : v.response) == null ? void 0 : Ne.data.message : void 0, li = g(
97
+ (i) => {
98
+ const b = A.find(
99
+ (c) => le(c.id, i.id)
123
100
  );
124
- if (sdkChain) {
125
- switchNetwork(sdkChain);
126
- }
101
+ b && me(b);
127
102
  },
128
- [sdkChains, switchNetwork]
129
- );
130
- const {
131
- firstToken,
132
- secondToken,
133
- fromOptions,
134
- toOptions,
135
- selectedChainOption,
136
- onChangeFirstSelect,
137
- onChangeSecondSelect,
138
- handleChangeDirection: handleTokenChangeDirection
139
- } = useBridgeTokenSelection({
140
- chains,
141
- activeChain,
142
- sdkChains,
143
- switchNetwork: handleSwitchNetwork,
144
- fromTokens: evmTokensWithBalances,
145
- toTokens: mvxTokensWithBalances,
146
- firstTokenIdentifier,
147
- secondTokenIdentifier,
148
- forcedDestinationTokenSymbol,
149
- isTokensLoading,
150
- callbackRoute,
151
- onNavigate
152
- });
153
- const isFirstTokenMvx = useMemo(() => {
154
- return firstToken ? MVX_CHAIN_IDS.includes(firstToken.chainId.toString()) : false;
155
- }, [firstToken == null ? void 0 : firstToken.chainId]);
156
- const isSecondTokenMvx = useMemo(() => {
157
- return secondToken ? MVX_CHAIN_IDS.includes(secondToken.chainId.toString()) : false;
158
- }, [secondToken == null ? void 0 : secondToken.chainId]);
159
- const [firstAmount, setFirstAmount] = useState(firstTokenAmount ?? "");
160
- const [secondAmount, setSecondAmount] = useState(secondTokenAmount ?? "");
161
- const firstTokenChain = useMemo(() => {
162
- if (!firstToken) {
163
- return selectedChainOption;
164
- }
165
- return chains.find(
166
- (chain) => sameBridgeApiChainId(chain.chainId, firstToken.chainId)
167
- ) ?? selectedChainOption;
168
- }, [firstToken == null ? void 0 : firstToken.chainId, chains, selectedChainOption]);
169
- const bridgeFromChainId = useMemo(
170
- () => toBridgeApiChainId(firstToken == null ? void 0 : firstToken.chainId) ?? bridgeApiChainId,
171
- [firstToken == null ? void 0 : firstToken.chainId, bridgeApiChainId]
172
- );
173
- const bridgeAddress = account.address;
174
- const isAuthenticated = account.isConnected && Boolean(bridgeAddress);
175
- const hasAmounts = firstAmount !== "" && secondAmount !== "";
176
- const fetchRateDebounced = useCallback(
177
- debounce(async (amount) => {
178
- if (!amount || !Number(amount) || !account.address || !(firstToken == null ? void 0 : firstToken.address) || !(secondToken == null ? void 0 : secondToken.address) || !selectedChainOption || !bridgeFromChainId) {
179
- return;
180
- }
181
- getRate({
182
- nativeAuthToken: nativeAuthToken ?? "",
103
+ [A, me]
104
+ ), {
105
+ firstToken: e,
106
+ secondToken: o,
107
+ fromOptions: L,
108
+ toOptions: ci,
109
+ selectedChainOption: r,
110
+ onChangeFirstSelect: Be,
111
+ onChangeSecondSelect: di,
112
+ handleChangeDirection: mi
113
+ } = Pi({
114
+ chains: D,
115
+ activeChain: ai,
116
+ sdkChains: A,
117
+ switchNetwork: li,
118
+ fromTokens: ei,
119
+ toTokens: ii,
120
+ firstTokenIdentifier: Oe,
121
+ secondTokenIdentifier: We,
122
+ forcedDestinationTokenSymbol: Ge,
123
+ isTokensLoading: T,
124
+ callbackRoute: He,
125
+ onNavigate: _e
126
+ }), ui = h(() => e ? Ve.includes(e.chainId.toString()) : !1, [e == null ? void 0 : e.chainId]), pi = h(() => o ? Ve.includes(o.chainId.toString()) : !1, [o == null ? void 0 : o.chainId]), [m, hi] = x(P ?? ""), [U, j] = x(w ?? ""), B = h(() => e ? D.find(
127
+ (i) => le(i.chainId, e.chainId)
128
+ ) ?? r : r, [e == null ? void 0 : e.chainId, D, r]), H = h(
129
+ () => Li(e == null ? void 0 : e.chainId) ?? ge,
130
+ [e == null ? void 0 : e.chainId, ge]
131
+ ), ee = f.address, Ce = f.isConnected && !!ee, ie = m !== "" && U !== "", te = g(
132
+ Mi(async (i) => {
133
+ !i || !Number(i) || !f.address || !(e != null && e.address) || !(o != null && o.address) || !r || !H || si({
134
+ nativeAuthToken: J ?? "",
183
135
  body: {
184
- tokenIn: firstToken.address,
185
- amountIn: amount,
186
- fromChainId: bridgeFromChainId,
187
- tokenOut: secondToken.address,
188
- toChainId: mvxChainId
136
+ tokenIn: e.address,
137
+ amountIn: i,
138
+ fromChainId: H,
139
+ tokenOut: o.address,
140
+ toChainId: _
189
141
  }
190
142
  });
191
143
  }, 500),
192
144
  [
193
- account.address,
194
- bridgeFromChainId,
195
- firstToken == null ? void 0 : firstToken.address,
196
- secondToken == null ? void 0 : secondToken.address,
197
- selectedChainOption
145
+ f.address,
146
+ H,
147
+ e == null ? void 0 : e.address,
148
+ o == null ? void 0 : o.address,
149
+ r
198
150
  ]
199
- );
200
- const handleOnChangeFirstAmount = useCallback((amount) => {
201
- setFirstAmount(() => amount);
202
- }, []);
203
- const handleOnChangeSecondAmount = useCallback((amount) => {
204
- setSecondAmount(() => amount);
205
- }, []);
206
- const handleHistoryClose = useCallback(() => {
207
- onHistoryClose == null ? void 0 : onHistoryClose();
208
- }, [onHistoryClose]);
209
- const handleOnFirstMaxBtnChange = useCallback(() => {
210
- const formattedBalance = formatAmount({
211
- decimals: firstToken == null ? void 0 : firstToken.decimals,
212
- input: (firstToken == null ? void 0 : firstToken.balance) ?? "0",
213
- addCommas: false,
151
+ ), u = g((i) => {
152
+ hi(() => i);
153
+ }, []), C = g((i) => {
154
+ j(() => i);
155
+ }, []), gi = g(() => {
156
+ E == null || E();
157
+ }, [E]), fi = g(() => {
158
+ const i = Si({
159
+ decimals: e == null ? void 0 : e.decimals,
160
+ input: (e == null ? void 0 : e.balance) ?? "0",
161
+ addCommas: !1,
214
162
  digits: 4
215
163
  });
216
- formik.setFieldValue("firstAmount", formattedBalance);
217
- handleOnChangeFirstAmount(formattedBalance);
218
- }, [firstToken == null ? void 0 : firstToken.balance, firstToken == null ? void 0 : firstToken.decimals, handleOnChangeFirstAmount]);
219
- const onSuccess = useCallback(
220
- async (txHashes) => {
221
- handleOnChangeFirstAmount("");
222
- handleOnChangeSecondAmount("");
223
- invalidateHistoryQuery();
224
- invalidateHistoryQuery();
225
- onSuccessfullySentTransaction == null ? void 0 : onSuccessfullySentTransaction(txHashes);
164
+ q.setFieldValue("firstAmount", i), u(i);
165
+ }, [e == null ? void 0 : e.balance, e == null ? void 0 : e.decimals, u]), xe = g(
166
+ async (i) => {
167
+ u(""), C(""), ue(), ue(), V == null || V(i);
226
168
  },
227
169
  [
228
- handleOnChangeFirstAmount,
229
- handleOnChangeSecondAmount,
230
- onSuccessfullySentTransaction
170
+ u,
171
+ C,
172
+ V
231
173
  ]
232
- );
233
- const handleChangeDirection = () => {
234
- handleTokenChangeDirection();
235
- onChangeDirection();
174
+ ), qi = () => {
175
+ mi(), $e();
236
176
  };
237
- useEffect(() => {
238
- if ((selectedChainOption == null ? void 0 : selectedChainOption.chainId) !== (firstToken == null ? void 0 : firstToken.chainId)) {
239
- const selectedOption = fromOptions == null ? void 0 : fromOptions.find(
240
- (option) => option.chainId.toString() === (selectedChainOption == null ? void 0 : selectedChainOption.chainId)
177
+ y(() => {
178
+ const i = de.current;
179
+ if (de.current = r == null ? void 0 : r.chainId, !!i && (r == null ? void 0 : r.chainId) !== (e == null ? void 0 : e.chainId)) {
180
+ const b = L == null ? void 0 : L.find(
181
+ (c) => c.chainId.toString() === (r == null ? void 0 : r.chainId)
241
182
  );
242
- if (!selectedOption) {
183
+ if (!b)
243
184
  return;
244
- }
245
- onChangeFirstSelect(selectedOption);
185
+ Be(b);
246
186
  }
247
- }, [selectedChainOption == null ? void 0 : selectedChainOption.chainId]);
248
- const onSubmit = useCallback(
187
+ }, [r == null ? void 0 : r.chainId]);
188
+ const bi = g(
249
189
  async ({
250
- transactions,
251
- provider
190
+ transactions: i,
191
+ provider: b
252
192
  }) => {
253
- var _a2, _b2, _c;
254
- const signedTransactions = [];
255
- setPendingSigning(true);
256
- setSigningTransactionsCount(() => transactions.length);
193
+ var Ae, De, Se;
194
+ const c = [];
195
+ N(!0), Y(() => i.length);
257
196
  try {
258
- let txIndex = -1;
259
- for (const transaction of transactions) {
260
- ++txIndex;
197
+ let R = -1;
198
+ for (const t of i) {
199
+ ++R;
261
200
  try {
262
- switch (resolveSigningChainType(transaction, firstTokenChain)) {
263
- case ChainType.evm: {
264
- const hash = await evm.signTransaction({
265
- ...transaction,
266
- value: BigInt(transaction.value),
267
- gas: BigInt(transaction.gasLimit),
268
- account: bridgeAddress
201
+ switch (Vi(t, B)) {
202
+ case z.evm: {
203
+ const p = await fe.signTransaction({
204
+ ...t,
205
+ value: BigInt(t.value),
206
+ gas: BigInt(t.gasLimit),
207
+ account: ee
269
208
  });
270
- if (!hash) {
209
+ if (!p || (c.push({
210
+ ...t,
211
+ txHash: p
212
+ }), R === i.length - 1 || !p))
271
213
  break;
272
- }
273
- signedTransactions.push({
274
- ...transaction,
275
- txHash: hash
276
- });
277
- if (txIndex === transactions.length - 1 || !hash) {
278
- break;
279
- }
280
- const transactionReceipt = await waitForTransactionReceipt(
281
- config,
214
+ const W = await Ri(
215
+ pe,
282
216
  {
283
217
  confirmations: 1,
284
- hash
218
+ hash: p
285
219
  }
286
220
  );
287
221
  console.info({
288
- transactionReceipt,
289
- hash
222
+ transactionReceipt: W,
223
+ hash: p
290
224
  });
291
225
  break;
292
226
  }
293
- case ChainType.sol:
294
- if (!transaction.instructions || !transaction.feePayer) {
227
+ case z.sol:
228
+ if (!t.instructions || !t.feePayer)
295
229
  break;
296
- }
297
- const txHash = await solana.signTransaction({
298
- feePayer: transaction.feePayer,
299
- instructions: transaction.instructions,
300
- recentBlockhash: transaction.recentBlockhash
230
+ const se = await qe.signTransaction({
231
+ feePayer: t.feePayer,
232
+ instructions: t.instructions,
233
+ recentBlockhash: t.recentBlockhash
301
234
  });
302
- if (!txHash) {
235
+ if (!se)
303
236
  break;
304
- }
305
- signedTransactions.push({
306
- ...transaction,
307
- txHash
237
+ c.push({
238
+ ...t,
239
+ txHash: se
308
240
  });
309
241
  break;
310
- case ChainType.btc:
311
- if (!transaction.bitcoinParams) {
242
+ case z.btc:
243
+ if (!t.bitcoinParams) {
312
244
  console.error("No bitcoin params");
313
245
  break;
314
246
  }
315
- const psbt = await bitcoin.signTransaction(
316
- transaction.bitcoinParams
247
+ const wi = await be.signTransaction(
248
+ t.bitcoinParams
317
249
  );
318
- signedTransactions.push({
319
- ...transaction,
320
- txHash: psbt
250
+ c.push({
251
+ ...t,
252
+ txHash: wi
321
253
  });
322
254
  break;
323
- case ChainType.sui: {
324
- const serializedTx = (_a2 = transaction.suiParams) == null ? void 0 : _a2.transactionBytes;
325
- const sender = (_b2 = transaction.suiParams) == null ? void 0 : _b2.sender;
326
- if (!serializedTx || !sender) {
255
+ case z.sui: {
256
+ const p = (Ae = t.suiParams) == null ? void 0 : Ae.transactionBytes, W = (De = t.suiParams) == null ? void 0 : De.sender;
257
+ if (!p || !W) {
327
258
  console.error("No Sui transaction bytes or sender address");
328
259
  break;
329
260
  }
330
- const signature = await sui.signTransaction({
331
- transaction: serializedTx,
332
- address: sender
261
+ const Me = await Ie.signTransaction({
262
+ transaction: p,
263
+ address: W
333
264
  });
334
- if (!signature) {
265
+ if (!Me)
335
266
  break;
336
- }
337
- signedTransactions.push({
338
- ...transaction,
267
+ c.push({
268
+ ...t,
339
269
  suiParams: {
340
- ...transaction.suiParams,
341
- signature
270
+ ...t.suiParams,
271
+ signature: Me
342
272
  }
343
273
  });
344
274
  break;
345
275
  }
346
276
  default:
347
- toast.error("Provider not supported");
348
- setPendingSigning(false);
277
+ M.error("Provider not supported"), N(!1);
349
278
  return;
350
279
  }
351
- setSigningTransactionsCount(
352
- () => transactions.length - 1 - txIndex
280
+ Y(
281
+ () => i.length - 1 - R
353
282
  );
354
- } catch (e) {
355
- toast.dismiss();
356
- toast.error("Transaction aborted");
357
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction aborted");
358
- setPendingSigning(false);
283
+ } catch {
284
+ M.dismiss(), M.error("Transaction aborted"), I == null || I("Transaction aborted"), N(!1);
359
285
  return;
360
286
  }
361
287
  }
362
- const { data: batch } = await sendTransactions({
363
- transactions: signedTransactions,
364
- provider,
365
- url: getApiURL() ?? "",
366
- token: nativeAuthToken ?? ""
367
- });
368
- const apiHashes = ((_c = batch.transactions) == null ? void 0 : _c.map((tx) => tx.txHash).filter((h) => Boolean(h))) ?? [];
369
- const localHashes = signedTransactions.map((tx) => tx.txHash).filter((h) => Boolean(h));
370
- const txHashes = apiHashes.length > 0 ? apiHashes : localHashes.length > 0 ? localHashes : batch.batchId ? [batch.batchId] : [];
371
- onSuccess(txHashes);
372
- setPendingSigning(false);
373
- } catch (e) {
374
- console.error(e);
375
- toast.dismiss();
376
- toast.error("Transaction cancelled");
377
- onFailedSentTransaction == null ? void 0 : onFailedSentTransaction("Transaction cancelled");
378
- setPendingSigning(false);
379
- setSigningTransactionsCount(0);
380
- resetSwapForm();
381
- handleOnChangeFirstAmount("");
382
- handleOnChangeSecondAmount("");
288
+ const { data: ae } = await ve({
289
+ transactions: c,
290
+ provider: b,
291
+ url: Ei() ?? "",
292
+ token: J ?? ""
293
+ }), ke = ((Se = ae.transactions) == null ? void 0 : Se.map((t) => t.txHash).filter((t) => !!t)) ?? [], Re = c.map((t) => t.txHash).filter((t) => !!t), yi = ke.length > 0 ? ke : Re.length > 0 ? Re : ae.batchId ? [ae.batchId] : [];
294
+ xe(yi), N(!1);
295
+ } catch (R) {
296
+ console.error(R), M.dismiss(), M.error("Transaction cancelled"), I == null || I("Transaction cancelled"), N(!1), Y(0), vi(), u(""), C("");
383
297
  }
384
298
  },
385
299
  [
386
- firstTokenChain == null ? void 0 : firstTokenChain.chainType,
387
- bridgeAddress,
388
- config,
389
- handleOnChangeFirstAmount,
390
- handleOnChangeSecondAmount,
391
- nativeAuthToken,
392
- onSuccess,
393
- sendTransactions,
394
- bitcoin.signTransaction,
395
- evm.signTransaction,
396
- solana.signTransaction,
397
- sui.signTransaction
300
+ B == null ? void 0 : B.chainType,
301
+ ee,
302
+ pe,
303
+ u,
304
+ C,
305
+ J,
306
+ xe,
307
+ ve,
308
+ be.signTransaction,
309
+ fe.signTransaction,
310
+ qe.signTransaction,
311
+ Ie.signTransaction
398
312
  ]
399
- );
400
- const {
401
- formik,
402
- firstAmountError,
403
- secondAmountError,
404
- fromChainError,
405
- handleBlur,
406
- handleChange,
407
- handleSubmit,
408
- resetSwapForm
409
- } = useBridgeFormik({
410
- isMvxConnected: Boolean(mvxAddress),
411
- rate,
412
- sender: account.address ?? "",
413
- receiver: mvxAddress ?? "",
414
- firstToken,
415
- firstAmount,
416
- fromChainId: bridgeFromChainId,
417
- toChainId: mvxChainId,
418
- secondToken,
419
- secondAmount,
420
- setForceRefetchRate,
421
- onSubmit
422
- });
423
- const hasError = Boolean(
424
- firstAmountError || secondAmountError || fromChainError || rateValidationError
425
- );
426
- const amountErrorFirstInput = useMemo(() => {
427
- return firstAmount !== "" ? rateValidationError ?? firstAmountError : void 0;
428
- }, [firstAmountError, firstAmount, rateValidationError]);
429
- const amountErrorSecondInput = useMemo(() => {
430
- return secondAmount !== "" ? fromChainError ?? secondAmountError : void 0;
431
- }, [fromChainError, secondAmountError, secondAmount]);
432
- useEffect(() => {
433
- if (!firstAmount) {
434
- setSecondAmount("");
435
- }
436
- fetchRateDebounced(firstAmount);
437
- if (fetchRateInterval) {
438
- clearInterval(fetchRateInterval);
439
- }
440
- fetchRateInterval = setInterval(() => {
441
- fetchRateDebounced(firstAmount);
442
- }, 50 * 1e3);
443
- return () => clearInterval(fetchRateInterval);
444
- }, [firstAmount, forceRefetchRate, fetchRateDebounced]);
445
- useEffect(() => {
446
- if (!(rate == null ? void 0 : rate.amountOut)) {
447
- return;
448
- }
449
- formik.setFieldValue(BridgeFormikValuesEnum.secondAmount, rate.amountOut);
450
- setSecondAmount(rate.amountOut);
451
- }, [rate == null ? void 0 : rate.amountOut]);
452
- useEffect(() => {
453
- if (rateValidationError) {
454
- formik.setFieldValue(BridgeFormikValuesEnum.secondAmount, "0");
455
- setSecondAmount("0");
456
- }
457
- }, [rateValidationError]);
458
- useEffect(() => {
459
- if (firstTokenAmount) {
460
- formik.setFieldValue(
461
- BridgeFormikValuesEnum.firstAmount,
462
- firstTokenAmount
463
- );
464
- handleOnChangeFirstAmount(firstTokenAmount);
465
- }
466
- }, []);
467
- useEffect(() => {
468
- if (secondTokenAmount) {
469
- formik.setFieldValue(
470
- BridgeFormikValuesEnum.secondAmount,
471
- secondTokenAmount
472
- );
473
- handleOnChangeSecondAmount(secondTokenAmount);
474
- }
475
- }, [secondTokenAmount]);
476
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
313
+ ), {
314
+ formik: q,
315
+ firstAmountError: ne,
316
+ secondAmountError: re,
317
+ fromChainError: oe,
318
+ handleBlur: O,
319
+ handleChange: ye,
320
+ handleSubmit: Ii,
321
+ resetSwapForm: vi
322
+ } = Hi({
323
+ isMvxConnected: !!l,
324
+ rate: d,
325
+ sender: f.address ?? "",
326
+ receiver: l ?? "",
327
+ firstToken: e,
328
+ firstAmount: m,
329
+ fromChainId: H,
330
+ toChainId: _,
331
+ secondToken: o,
332
+ secondAmount: U,
333
+ setForceRefetchRate: Ze,
334
+ onSubmit: bi
335
+ }), Bi = !!(ne || re || oe || k), Ci = h(() => m !== "" ? k ?? ne : void 0, [ne, m, k]), xi = h(() => U !== "" ? oe ?? re : void 0, [oe, re, U]);
336
+ return y(() => (m || j(""), te(m), Q && clearInterval(Q), Q = setInterval(() => {
337
+ te(m);
338
+ }, 50 * 1e3), () => clearInterval(Q)), [m, Je, te]), y(() => {
339
+ d != null && d.amountOut && (q.setFieldValue(G.secondAmount, d.amountOut), j(d.amountOut));
340
+ }, [d == null ? void 0 : d.amountOut]), y(() => {
341
+ k && (q.setFieldValue(G.secondAmount, "0"), j("0"));
342
+ }, [k]), y(() => {
343
+ P && (q.setFieldValue(
344
+ G.firstAmount,
345
+ P
346
+ ), u(P));
347
+ }, []), y(() => {
348
+ w && (q.setFieldValue(
349
+ G.secondAmount,
350
+ w
351
+ ), C(w));
352
+ }, [w]), /* @__PURE__ */ n(Ni, { children: /* @__PURE__ */ s(
477
353
  "form",
478
354
  {
479
- ref,
480
- noValidate: true,
355
+ ref: Ke,
356
+ noValidate: !0,
481
357
  className: "liq-flex liq-flex-col liq-gap-1 liq-relative",
482
358
  autoComplete: "off",
483
- onSubmit: handleSubmit,
359
+ onSubmit: Ii,
484
360
  children: [
485
- showHistory && /* @__PURE__ */ jsx(BridgeHistory, { mvxAddress, onClose: handleHistoryClose }),
486
- /* @__PURE__ */ jsxs(
487
- AmountCard,
361
+ ze && /* @__PURE__ */ n($i, { mvxAddress: l, onClose: gi }),
362
+ /* @__PURE__ */ s(
363
+ Fe,
488
364
  {
489
- className: mxClsx(
365
+ className: Ee(
490
366
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
491
367
  {
492
- "liq-pointer-events-none": isTokenSelectorVisible,
493
- "focus-within:liq-outline-neutral-700/75 hover:liq-outline-neutral-700/55 hover:focus-within:liq-outline-neutral-700/80": !isTokenSelectorVisible
368
+ "liq-pointer-events-none": $,
369
+ "focus-within:liq-outline-neutral-700/75 hover:liq-outline-neutral-700/55 hover:focus-within:liq-outline-neutral-700/80": !$
494
370
  }
495
371
  ),
496
372
  children: [
497
- /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
498
- /* @__PURE__ */ jsx("span", { children: "From" }),
499
- /* @__PURE__ */ jsx(
500
- BridgeAccountDisplay,
373
+ /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
374
+ /* @__PURE__ */ n("span", { children: "From" }),
375
+ /* @__PURE__ */ n(
376
+ Ji,
501
377
  {
502
- disabled: isPendingRate,
503
- activeChain: firstTokenChain
378
+ disabled: S,
379
+ activeChain: B
504
380
  }
505
381
  )
506
382
  ] }),
507
- /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
508
- /* @__PURE__ */ jsx(
509
- AmountInput,
383
+ /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
384
+ /* @__PURE__ */ n(
385
+ Le,
510
386
  {
511
387
  inputName: "firstAmount",
512
- inputValue: formik.values.firstAmount,
513
- amountError: amountErrorFirstInput,
514
- disabled: false,
515
- onInputDebounceChange: handleOnChangeFirstAmount,
516
- onInputChange: handleChange,
517
- onBlur: handleBlur
388
+ inputValue: q.values.firstAmount,
389
+ amountError: Ci,
390
+ disabled: !1,
391
+ onInputDebounceChange: u,
392
+ onInputChange: ye,
393
+ onBlur: O
518
394
  }
519
395
  ),
520
- /* @__PURE__ */ jsx(
521
- TokenSelector,
396
+ /* @__PURE__ */ n(
397
+ Ue,
522
398
  {
523
399
  name: "firstToken",
524
- disabled: isPendingRate,
525
- options: fromOptions,
526
- areOptionsLoading: isTokensLoading,
527
- isMvxSelector: isFirstTokenMvx,
528
- isDestination: false,
400
+ disabled: S,
401
+ options: L,
402
+ areOptionsLoading: T,
403
+ isMvxSelector: ui,
404
+ isDestination: !1,
529
405
  color: "neutral-850",
530
- onChange: onChangeFirstSelect,
531
- onBlur: handleBlur,
532
- onMaxBtnClick: handleOnFirstMaxBtnChange,
533
- selectedOption: firstToken,
534
- onTokenSelectorDisplay: (visible) => setIsTokenSelectorVisible(visible)
406
+ onChange: Be,
407
+ onBlur: O,
408
+ onMaxBtnClick: fi,
409
+ selectedOption: e,
410
+ onTokenSelectorDisplay: (i) => Ye(i)
535
411
  }
536
412
  )
537
413
  ] })
538
414
  ]
539
415
  }
540
416
  ),
541
- /* @__PURE__ */ jsx("div", { className: "liq-absolute liq-left-[6%] liq-top-[40%] -liq-mt-1 liq-z-10", children: bridgeOnly && /* @__PURE__ */ jsx(ToggleDirection, { onChangeDirection: handleChangeDirection }) }),
542
- /* @__PURE__ */ jsxs(
543
- AmountCard,
417
+ /* @__PURE__ */ n("div", { className: "liq-absolute liq-left-[6%] liq-top-[40%] -liq-mt-1 liq-z-10", children: Te && /* @__PURE__ */ n(Ti, { onChangeDirection: qi }) }),
418
+ /* @__PURE__ */ s(
419
+ Fe,
544
420
  {
545
- className: mxClsx(
421
+ className: Ee(
546
422
  "liq-pb-8 liq-pt-6 hover:liq-bg-neutral-700/50 sm:liq-pb-6",
547
423
  {
548
- "liq-pointer-events-none": isTokenSelectorVisible
424
+ "liq-pointer-events-none": $
549
425
  }
550
426
  ),
551
427
  children: [
552
- /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
553
- /* @__PURE__ */ jsx("span", { children: "To" }),
554
- /* @__PURE__ */ jsx(
555
- MvxAccountDisplay,
428
+ /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-gap-1", children: [
429
+ /* @__PURE__ */ n("span", { children: "To" }),
430
+ /* @__PURE__ */ n(
431
+ Zi,
556
432
  {
557
- accountAddress: mvxAddress,
558
- chainIcon: safeImageUrl(mvxChain == null ? void 0 : mvxChain.pngUrl),
559
- username,
560
- accountExplorerUrl: `${options.mvxExplorerAddress}/accounts/${mvxAddress}`,
561
- showTag: true,
562
- onDisconnect: onMvxDisconnect,
563
- onConnect: onMvxConnect
433
+ accountAddress: l,
434
+ chainIcon: X(a == null ? void 0 : a.pngUrl),
435
+ username: je,
436
+ accountExplorerUrl: `${he.mvxExplorerAddress}/accounts/${l}`,
437
+ showTag: !0,
438
+ onDisconnect: Qe,
439
+ onConnect: ce
564
440
  }
565
441
  )
566
442
  ] }),
567
- /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
568
- /* @__PURE__ */ jsx(
569
- AmountInput,
443
+ /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-between liq-gap-1", children: [
444
+ /* @__PURE__ */ n(
445
+ Le,
570
446
  {
571
447
  inputName: "secondAmount",
572
- inputValue: formik.values.secondAmount,
573
- amountError: amountErrorSecondInput,
574
- disabled: false,
575
- onInputDebounceChange: handleOnChangeSecondAmount,
576
- onInputChange: handleChange,
577
- onBlur: handleBlur
448
+ inputValue: q.values.secondAmount,
449
+ amountError: xi,
450
+ disabled: !1,
451
+ onInputDebounceChange: C,
452
+ onInputChange: ye,
453
+ onBlur: O
578
454
  }
579
455
  ),
580
- /* @__PURE__ */ jsx(
581
- TokenSelector,
456
+ /* @__PURE__ */ n(
457
+ Ue,
582
458
  {
583
459
  name: "secondToken",
584
- disabled: isPendingRate,
585
- omitDisableClass: true,
586
- options: toOptions,
587
- areOptionsLoading: isTokensLoading,
588
- isMvxSelector: isSecondTokenMvx,
460
+ disabled: S,
461
+ omitDisableClass: !0,
462
+ options: ci,
463
+ areOptionsLoading: T,
464
+ isMvxSelector: pi,
589
465
  color: "neutral-850",
590
- onChange: onChangeSecondSelect,
591
- onBlur: handleBlur,
592
- selectedOption: secondToken
466
+ onChange: di,
467
+ onBlur: O,
468
+ selectedOption: o
593
469
  }
594
470
  )
595
471
  ] })
596
472
  ]
597
473
  }
598
474
  ),
599
- /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
600
- !mvxAddress && /* @__PURE__ */ jsx(
601
- MvxConnectButton,
475
+ /* @__PURE__ */ s("div", { className: "liq-flex liq-items-center liq-justify-center", children: [
476
+ !l && /* @__PURE__ */ n(
477
+ Yi,
602
478
  {
603
- mvxAccountAddress: mvxAddress,
604
- icon: safeImageUrl(mvxChain == null ? void 0 : mvxChain.pngUrl),
605
- onClick: onMvxConnect
479
+ mvxAccountAddress: l,
480
+ icon: X(a == null ? void 0 : a.pngUrl),
481
+ onClick: ce
606
482
  }
607
483
  ),
608
- mvxAddress && !isAuthenticated && /* @__PURE__ */ jsx(
609
- BridgeConnectButton,
484
+ l && !Ce && /* @__PURE__ */ n(
485
+ Ki,
610
486
  {
611
487
  className: "liq-w-full liq-rounded-xl liq-bg-neutral-850/50 liq-px-8 liq-py-3 liq-font-semibold liq-text-primary-200 liq-transition-colors liq-duration-200 hover:enabled:liq-bg-primary-700/80 disabled:liq-opacity-50",
612
- disabled: isPendingRate,
613
- activeChain: firstTokenChain
488
+ disabled: S,
489
+ activeChain: B
614
490
  }
615
491
  ),
616
- mvxAddress && isAuthenticated && /* @__PURE__ */ jsxs(
617
- MxButton,
492
+ l && Ce && /* @__PURE__ */ s(
493
+ _i,
618
494
  {
619
495
  type: "submit",
620
496
  variant: "neutral-850",
621
497
  className: "liq-w-full disabled:liq-bg-neutral-850/50 liq-py-3 hover:enabled:liq-bg-primary !liq-text-primary-200",
622
- disabled: !hasAmounts || isPendingRate || !mvxAddress || !account.address || hasError || pendingSigning,
498
+ disabled: !ie || S || !l || !f.address || Bi || F,
623
499
  children: [
624
- hasAmounts && !pendingSigning && /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
625
- /* @__PURE__ */ jsx("div", { children: "Deposit on " }),
626
- /* @__PURE__ */ jsx(
500
+ ie && !F && /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
501
+ /* @__PURE__ */ n("div", { children: "Deposit on " }),
502
+ /* @__PURE__ */ n(
627
503
  "img",
628
504
  {
629
- src: safeImageUrl(mvxChain == null ? void 0 : mvxChain.pngUrl),
505
+ src: X(a == null ? void 0 : a.pngUrl),
630
506
  alt: "",
631
507
  className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
632
508
  }
633
509
  ),
634
- /* @__PURE__ */ jsx("div", { children: "MultiversX" })
510
+ /* @__PURE__ */ n("div", { children: "MultiversX" })
635
511
  ] }),
636
- !hasAmounts && !pendingSigning && /* @__PURE__ */ jsx("span", { className: "liq-text-neutral-100", children: "Enter amount" }),
637
- pendingSigning && /* @__PURE__ */ jsxs("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
638
- /* @__PURE__ */ jsx(
639
- FontAwesomeIcon,
512
+ !ie && !F && /* @__PURE__ */ n("span", { className: "liq-text-neutral-100", children: "Enter amount" }),
513
+ F && /* @__PURE__ */ s("div", { className: "liq-flex liq-justify-center liq-items-center liq-gap-2", children: [
514
+ /* @__PURE__ */ n(
515
+ Di,
640
516
  {
641
- icon: faSpinner,
642
- spin: true,
517
+ icon: Ai,
518
+ spin: !0,
643
519
  className: "liq-mx-1 liq-flex liq-items-center"
644
520
  }
645
521
  ),
646
- /* @__PURE__ */ jsx("div", { children: "Depositing on" }),
647
- /* @__PURE__ */ jsx(
522
+ /* @__PURE__ */ n("div", { children: "Depositing on" }),
523
+ /* @__PURE__ */ n(
648
524
  "img",
649
525
  {
650
- src: safeImageUrl(mvxChain == null ? void 0 : mvxChain.pngUrl),
526
+ src: X(a == null ? void 0 : a.pngUrl),
651
527
  alt: "",
652
528
  className: "liq-h-[1.5rem] liq-w-[1.5rem] liq-rounded-lg"
653
529
  }
654
530
  ),
655
- /* @__PURE__ */ jsx("div", { children: "MultiversX" })
531
+ /* @__PURE__ */ n("div", { children: "MultiversX" })
656
532
  ] })
657
533
  ]
658
534
  }
659
535
  )
660
536
  ] }),
661
- account.address && siginingTransactionsCount > 0 && /* @__PURE__ */ jsx("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ jsxs("div", { children: [
537
+ f.address && K > 0 && /* @__PURE__ */ n("div", { className: "liq-flex liq-items-center liq-justify-center liq-text-neutral-300 liq-text-sm", children: /* @__PURE__ */ s("div", { children: [
662
538
  "You will be asked to sign ",
663
- siginingTransactionsCount,
539
+ K,
664
540
  " ",
665
- siginingTransactionsCount > 1 ? "transactions" : "transaction",
541
+ K > 1 ? "transactions" : "transaction",
666
542
  " ",
667
543
  "on your wallet"
668
544
  ] }) })
@@ -671,5 +547,5 @@ const Deposit = ({
671
547
  ) });
672
548
  };
673
549
  export {
674
- Deposit
550
+ $t as Deposit
675
551
  };