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