@ape.swap/bonds-sdk 1.0.780 → 1.1.0-seedify

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 (462) hide show
  1. package/dist/components/BondRows/BondRow.d.ts +3 -2
  2. package/dist/components/BondRows/BondRowHeader.d.ts +2 -3
  3. package/dist/components/BondRows/BondRowsByChain.d.ts +3 -3
  4. package/dist/components/BondRows/BondRowsWithTitle.d.ts +3 -3
  5. package/dist/components/DisconnectedPlaceholder/index.d.ts +3 -0
  6. package/dist/components/SlippageModal/index.d.ts +3 -0
  7. package/dist/components/TokenInfoAndName/index.d.ts +2 -2
  8. package/dist/components/TokenSelectorPanel/index.d.ts +1 -2
  9. package/dist/components/uikit-sdk/Modal/index.d.ts +1 -1
  10. package/dist/components/uikit-sdk/Toggle/index.d.ts +8 -0
  11. package/dist/components/uikit-sdk/Toggle/styles.d.ts +3 -0
  12. package/dist/components/uikit-sdk/TokenImage/index.d.ts +1 -1
  13. package/dist/components/uikit-sdk/index.d.ts +1 -0
  14. package/dist/config/abi/types/Banana.d.ts +103 -126
  15. package/dist/config/abi/types/Bond.d.ts +176 -221
  16. package/dist/config/abi/types/BondNft.d.ts +160 -207
  17. package/dist/config/abi/types/EnsPublicResolver.d.ts +129 -205
  18. package/dist/config/abi/types/EnsRegistrar.d.ts +62 -82
  19. package/dist/config/abi/types/Erc20.d.ts +40 -52
  20. package/dist/config/abi/types/Erc20_bytes32.d.ts +11 -11
  21. package/dist/config/abi/types/JungleChef.d.ts +64 -79
  22. package/dist/config/abi/types/LaunchBonds.d.ts +299 -355
  23. package/dist/config/abi/types/LensContract.d.ts +58 -77
  24. package/dist/config/abi/types/LockVeAbond.d.ts +328 -434
  25. package/dist/config/abi/types/MigrationBond.d.ts +268 -330
  26. package/dist/config/abi/types/MigrationFveAbond.d.ts +83 -89
  27. package/dist/config/abi/types/MiniComplexRewarder.d.ts +99 -145
  28. package/dist/config/abi/types/Multicallv2.d.ts +35 -46
  29. package/dist/config/abi/types/Multicallv3.d.ts +14 -14
  30. package/dist/config/abi/types/NonFungibleApes.d.ts +130 -170
  31. package/dist/config/abi/types/NonFungibleBananas.d.ts +135 -172
  32. package/dist/config/abi/types/PriceGetter.d.ts +218 -255
  33. package/dist/config/abi/types/PriceGetterLinea.d.ts +254 -287
  34. package/dist/config/abi/types/PriceGetterV2.d.ts +239 -276
  35. package/dist/config/abi/types/SousChef.d.ts +140 -177
  36. package/dist/config/abi/types/Treasury.d.ts +66 -69
  37. package/dist/config/abi/types/Weth.d.ts +53 -68
  38. package/dist/config/abi/types/Zap.d.ts +97 -141
  39. package/dist/config/abi/types/common.d.ts +3 -3
  40. package/dist/config/abi/types/factories/Banana__factory.d.ts +3 -3
  41. package/dist/config/abi/types/factories/BondNft__factory.d.ts +3 -3
  42. package/dist/config/abi/types/factories/Bond__factory.d.ts +3 -3
  43. package/dist/config/abi/types/factories/EnsPublicResolver__factory.d.ts +3 -3
  44. package/dist/config/abi/types/factories/EnsRegistrar__factory.d.ts +3 -3
  45. package/dist/config/abi/types/factories/Erc20__factory.d.ts +3 -3
  46. package/dist/config/abi/types/factories/Erc20_bytes32__factory.d.ts +3 -3
  47. package/dist/config/abi/types/factories/JungleChef__factory.d.ts +3 -3
  48. package/dist/config/abi/types/factories/LaunchBonds__factory.d.ts +3 -3
  49. package/dist/config/abi/types/factories/LensContract__factory.d.ts +3 -3
  50. package/dist/config/abi/types/factories/LockVeAbond__factory.d.ts +3 -3
  51. package/dist/config/abi/types/factories/MigrationBond__factory.d.ts +3 -3
  52. package/dist/config/abi/types/factories/MigrationFveAbond__factory.d.ts +3 -3
  53. package/dist/config/abi/types/factories/MiniComplexRewarder__factory.d.ts +3 -3
  54. package/dist/config/abi/types/factories/Multicallv2__factory.d.ts +3 -3
  55. package/dist/config/abi/types/factories/Multicallv3__factory.d.ts +3 -3
  56. package/dist/config/abi/types/factories/NonFungibleApes__factory.d.ts +3 -3
  57. package/dist/config/abi/types/factories/NonFungibleBananas__factory.d.ts +3 -3
  58. package/dist/config/abi/types/factories/PriceGetterLinea__factory.d.ts +3 -3
  59. package/dist/config/abi/types/factories/PriceGetterV2__factory.d.ts +3 -3
  60. package/dist/config/abi/types/factories/PriceGetter__factory.d.ts +3 -3
  61. package/dist/config/abi/types/factories/SousChef__factory.d.ts +3 -3
  62. package/dist/config/abi/types/factories/Treasury__factory.d.ts +3 -3
  63. package/dist/config/abi/types/factories/Weth__factory.d.ts +3 -3
  64. package/dist/config/abi/types/factories/Zap__factory.d.ts +3 -3
  65. package/dist/config/abi/types/factories/index.d.ts +25 -25
  66. package/dist/config/abi/types/index.d.ts +51 -51
  67. package/dist/config/constants/addresses.d.ts +0 -8
  68. package/dist/config/constants/queryKeys.d.ts +7 -2
  69. package/dist/config/constants/tokens.d.ts +2 -2
  70. package/dist/hooks/useTokenFromZapList.d.ts +1 -1
  71. package/dist/hooks/useTopThreeTags.d.ts +2 -2
  72. package/dist/main.d.ts +7 -0
  73. package/dist/main.js +73492 -0
  74. package/dist/scss/BondMenu.scss +2 -2
  75. package/dist/scss/BondModal.scss +74 -73
  76. package/dist/scss/BondRow.scss +5 -5
  77. package/dist/scss/BondRowHeader.scss +7 -7
  78. package/dist/scss/Bonds.scss +2 -1
  79. package/dist/scss/YourBonds.scss +19 -14
  80. package/dist/scss/YourBondsModal.scss +3 -3
  81. package/dist/scss/index.scss +12 -0
  82. package/dist/state/allowance/useAllowance.d.ts +8 -4
  83. package/dist/state/bonds/useBondNFTData.d.ts +5 -0
  84. package/dist/state/bonds/useBondsData.d.ts +4 -0
  85. package/dist/state/bonds/useBondsList.d.ts +4 -0
  86. package/dist/state/bonds/useHotBonds.d.ts +3 -0
  87. package/dist/state/bonds/useUserBonds.d.ts +5 -0
  88. package/dist/state/price/useCurrencyPrice.d.ts +1 -17
  89. package/dist/state/slippage/useSlippage.d.ts +1 -0
  90. package/dist/state/tokenPrices/useTokenPrices.d.ts +29 -0
  91. package/dist/state/zap/getChainParam.d.ts +1 -1
  92. package/dist/state/zap/useSoulZapBondQuote.d.ts +2 -2
  93. package/dist/types/bonds.d.ts +4 -41
  94. package/dist/types/yourbonds.d.ts +54 -69
  95. package/dist/utils/displayHelpers.d.ts +13 -0
  96. package/dist/utils/getNativeTicker.d.ts +3 -3
  97. package/dist/utils/index.d.ts +1 -1
  98. package/dist/views/BondModal/BondModal.d.ts +4 -7
  99. package/dist/views/BondModal/helper.d.ts +6 -6
  100. package/dist/views/BondModal/index.d.ts +2 -2
  101. package/dist/views/Bonds/Bonds.d.ts +6 -9
  102. package/dist/views/Bonds/components/CheckURL/index.d.ts +4 -0
  103. package/dist/views/Bonds/index.d.ts +2 -2
  104. package/dist/views/Bonds/utils.d.ts +14 -0
  105. package/dist/views/FullBondsView/FullBondsView.d.ts +7 -0
  106. package/dist/views/FullBondsView/index.d.ts +3 -0
  107. package/dist/views/YourBonds/YourBonds.d.ts +1 -11
  108. package/dist/views/YourBonds/components/UserBondRow/index.d.ts +6 -0
  109. package/dist/views/YourBonds/fetchBillsUser.d.ts +4 -5
  110. package/dist/views/YourBonds/index.d.ts +3 -0
  111. package/dist/views/YourBondsModal/YourBondsModal.d.ts +4 -5
  112. package/package.json +19 -24
  113. package/dist/components/AccordionText/index.js +0 -17
  114. package/dist/components/BondMenu/BondMenu.js +0 -40
  115. package/dist/components/BondMenu/useChainFilterOption.js +0 -30
  116. package/dist/components/BondRows/BondRow.js +0 -81
  117. package/dist/components/BondRows/BondRowHeader.js +0 -12
  118. package/dist/components/BondRows/BondRowsByChain.js +0 -13
  119. package/dist/components/BondRows/BondRowsWithTitle.js +0 -20
  120. package/dist/components/BondRows/ChainTitle.js +0 -18
  121. package/dist/components/MenuSelect/MenuSelect.js +0 -36
  122. package/dist/components/MenuSelect/RecommendationSelector.js +0 -32
  123. package/dist/components/MenuSelect/types.js +0 -1
  124. package/dist/components/NetworkFilter/index.js +0 -66
  125. package/dist/components/ProgressBar/ProgressBar.js +0 -10
  126. package/dist/components/ProgressBar/ProgressBarWrapper.js +0 -9
  127. package/dist/components/ProgressBar/styles.js +0 -82
  128. package/dist/components/TokenInfoAndName/index.js +0 -34
  129. package/dist/components/TokenSelectorModal/TokenRow.js +0 -18
  130. package/dist/components/TokenSelectorModal/index.js +0 -56
  131. package/dist/components/TokenSelectorPanel/index.js +0 -36
  132. package/dist/components/Tooltip/ButtonsRow.js +0 -21
  133. package/dist/components/Tooltip/Tooltip.js +0 -13
  134. package/dist/components/Tooltip/styles.js +0 -44
  135. package/dist/components/uikit-sdk/Button/Button.js +0 -91
  136. package/dist/components/uikit-sdk/Button/IconButton.js +0 -33
  137. package/dist/components/uikit-sdk/Button/index.js +0 -2
  138. package/dist/components/uikit-sdk/Button/styles.js +0 -30
  139. package/dist/components/uikit-sdk/Button/types.js +0 -37
  140. package/dist/components/uikit-sdk/Checkbox/index.js +0 -46
  141. package/dist/components/uikit-sdk/Checkbox/types.js +0 -5
  142. package/dist/components/uikit-sdk/Flex/index.js +0 -29
  143. package/dist/components/uikit-sdk/Input/Input.js +0 -72
  144. package/dist/components/uikit-sdk/Input/NumericInput.js +0 -35
  145. package/dist/components/uikit-sdk/Input/StyledInput.js +0 -26
  146. package/dist/components/uikit-sdk/Input/index.js +0 -3
  147. package/dist/components/uikit-sdk/Modal/ModalFooter.js +0 -21
  148. package/dist/components/uikit-sdk/Modal/ModalHeader.js +0 -31
  149. package/dist/components/uikit-sdk/Modal/index.js +0 -46
  150. package/dist/components/uikit-sdk/Modal/styles.js +0 -62
  151. package/dist/components/uikit-sdk/Modal/types.js +0 -1
  152. package/dist/components/uikit-sdk/Select/Select.js +0 -61
  153. package/dist/components/uikit-sdk/Select/SelectItem.js +0 -40
  154. package/dist/components/uikit-sdk/Select/index.js +0 -2
  155. package/dist/components/uikit-sdk/Select/styles.js +0 -50
  156. package/dist/components/uikit-sdk/Select/types.js +0 -37
  157. package/dist/components/uikit-sdk/Skeleton/index.js +0 -31
  158. package/dist/components/uikit-sdk/Skeleton/styles.js +0 -40
  159. package/dist/components/uikit-sdk/Skeleton/types.js +0 -10
  160. package/dist/components/uikit-sdk/Svg/Icons/AbondFullLogo.js +0 -16
  161. package/dist/components/uikit-sdk/Svg/Icons/AbondSmallLogo.js +0 -6
  162. package/dist/components/uikit-sdk/Svg/Icons/AccountMonkey.js +0 -16
  163. package/dist/components/uikit-sdk/Svg/Icons/AllChains.js +0 -6
  164. package/dist/components/uikit-sdk/Svg/Icons/ApebondLogo.js +0 -17
  165. package/dist/components/uikit-sdk/Svg/Icons/ApeswapSmallLogo.js +0 -6
  166. package/dist/components/uikit-sdk/Svg/Icons/Arrow.js +0 -16
  167. package/dist/components/uikit-sdk/Svg/Icons/Audit.js +0 -16
  168. package/dist/components/uikit-sdk/Svg/Icons/BananaIcon.js +0 -6
  169. package/dist/components/uikit-sdk/Svg/Icons/BillsM1.js +0 -16
  170. package/dist/components/uikit-sdk/Svg/Icons/BillsM2.js +0 -17
  171. package/dist/components/uikit-sdk/Svg/Icons/BillsM3.js +0 -16
  172. package/dist/components/uikit-sdk/Svg/Icons/Bridge.js +0 -16
  173. package/dist/components/uikit-sdk/Svg/Icons/Bubble.js +0 -16
  174. package/dist/components/uikit-sdk/Svg/Icons/Calculator.js +0 -16
  175. package/dist/components/uikit-sdk/Svg/Icons/Calendar.js +0 -5
  176. package/dist/components/uikit-sdk/Svg/Icons/Cancelled.js +0 -16
  177. package/dist/components/uikit-sdk/Svg/Icons/Card.js +0 -16
  178. package/dist/components/uikit-sdk/Svg/Icons/Caret.js +0 -16
  179. package/dist/components/uikit-sdk/Svg/Icons/Chain.js +0 -9
  180. package/dist/components/uikit-sdk/Svg/Icons/Chart.js +0 -16
  181. package/dist/components/uikit-sdk/Svg/Icons/Chat.js +0 -16
  182. package/dist/components/uikit-sdk/Svg/Icons/Close.js +0 -9
  183. package/dist/components/uikit-sdk/Svg/Icons/Cog.js +0 -16
  184. package/dist/components/uikit-sdk/Svg/Icons/Collapse.js +0 -16
  185. package/dist/components/uikit-sdk/Svg/Icons/Copy.js +0 -16
  186. package/dist/components/uikit-sdk/Svg/Icons/Discord.js +0 -16
  187. package/dist/components/uikit-sdk/Svg/Icons/DiscordNew.js +0 -16
  188. package/dist/components/uikit-sdk/Svg/Icons/Docs.js +0 -16
  189. package/dist/components/uikit-sdk/Svg/Icons/DocsV2.js +0 -16
  190. package/dist/components/uikit-sdk/Svg/Icons/Ellipse.js +0 -16
  191. package/dist/components/uikit-sdk/Svg/Icons/Error.js +0 -16
  192. package/dist/components/uikit-sdk/Svg/Icons/Expand.js +0 -16
  193. package/dist/components/uikit-sdk/Svg/Icons/Explorer.js +0 -16
  194. package/dist/components/uikit-sdk/Svg/Icons/External.js +0 -16
  195. package/dist/components/uikit-sdk/Svg/Icons/Farm.js +0 -16
  196. package/dist/components/uikit-sdk/Svg/Icons/Fav.js +0 -16
  197. package/dist/components/uikit-sdk/Svg/Icons/FilledURL.js +0 -16
  198. package/dist/components/uikit-sdk/Svg/Icons/Fire.js +0 -6
  199. package/dist/components/uikit-sdk/Svg/Icons/Frame.js +0 -16
  200. package/dist/components/uikit-sdk/Svg/Icons/FullLogo.js +0 -6
  201. package/dist/components/uikit-sdk/Svg/Icons/Gnana.js +0 -16
  202. package/dist/components/uikit-sdk/Svg/Icons/GreenShield.js +0 -6
  203. package/dist/components/uikit-sdk/Svg/Icons/Hamburger.js +0 -16
  204. package/dist/components/uikit-sdk/Svg/Icons/HamburgerClosed.js +0 -16
  205. package/dist/components/uikit-sdk/Svg/Icons/Home.js +0 -16
  206. package/dist/components/uikit-sdk/Svg/Icons/Hot.js +0 -6
  207. package/dist/components/uikit-sdk/Svg/Icons/Info.js +0 -16
  208. package/dist/components/uikit-sdk/Svg/Icons/InfoSolid.js +0 -16
  209. package/dist/components/uikit-sdk/Svg/Icons/Insight.js +0 -16
  210. package/dist/components/uikit-sdk/Svg/Icons/Instagram.js +0 -16
  211. package/dist/components/uikit-sdk/Svg/Icons/Island.js +0 -16
  212. package/dist/components/uikit-sdk/Svg/Icons/Language.js +0 -16
  213. package/dist/components/uikit-sdk/Svg/Icons/LanguageIcon.js +0 -16
  214. package/dist/components/uikit-sdk/Svg/Icons/LineChart.js +0 -6
  215. package/dist/components/uikit-sdk/Svg/Icons/LiquidityIcon.js +0 -16
  216. package/dist/components/uikit-sdk/Svg/Icons/Logout.js +0 -16
  217. package/dist/components/uikit-sdk/Svg/Icons/Medium.js +0 -16
  218. package/dist/components/uikit-sdk/Svg/Icons/MenuSettings.js +0 -16
  219. package/dist/components/uikit-sdk/Svg/Icons/Message.js +0 -9
  220. package/dist/components/uikit-sdk/Svg/Icons/Migrate.js +0 -16
  221. package/dist/components/uikit-sdk/Svg/Icons/Moon.js +0 -16
  222. package/dist/components/uikit-sdk/Svg/Icons/More.js +0 -16
  223. package/dist/components/uikit-sdk/Svg/Icons/NFA.js +0 -16
  224. package/dist/components/uikit-sdk/Svg/Icons/NavCaret.js +0 -16
  225. package/dist/components/uikit-sdk/Svg/Icons/PlaceholderMonkey.js +0 -16
  226. package/dist/components/uikit-sdk/Svg/Icons/Play.js +0 -5
  227. package/dist/components/uikit-sdk/Svg/Icons/Pool.js +0 -16
  228. package/dist/components/uikit-sdk/Svg/Icons/Positions.js +0 -16
  229. package/dist/components/uikit-sdk/Svg/Icons/ProfileDark.js +0 -6
  230. package/dist/components/uikit-sdk/Svg/Icons/ProfileIcon.js +0 -16
  231. package/dist/components/uikit-sdk/Svg/Icons/ProfileLight.js +0 -6
  232. package/dist/components/uikit-sdk/Svg/Icons/Question.js +0 -6
  233. package/dist/components/uikit-sdk/Svg/Icons/QuestionCircle.js +0 -16
  234. package/dist/components/uikit-sdk/Svg/Icons/QuestionFill.js +0 -16
  235. package/dist/components/uikit-sdk/Svg/Icons/Quiz.js +0 -16
  236. package/dist/components/uikit-sdk/Svg/Icons/Receipt.js +0 -16
  237. package/dist/components/uikit-sdk/Svg/Icons/Reddit.js +0 -16
  238. package/dist/components/uikit-sdk/Svg/Icons/Rocket.js +0 -16
  239. package/dist/components/uikit-sdk/Svg/Icons/ScrollTop.js +0 -16
  240. package/dist/components/uikit-sdk/Svg/Icons/Search.js +0 -16
  241. package/dist/components/uikit-sdk/Svg/Icons/Send.js +0 -16
  242. package/dist/components/uikit-sdk/Svg/Icons/Settings.js +0 -16
  243. package/dist/components/uikit-sdk/Svg/Icons/Share.js +0 -16
  244. package/dist/components/uikit-sdk/Svg/Icons/Sort.js +0 -16
  245. package/dist/components/uikit-sdk/Svg/Icons/Success.js +0 -16
  246. package/dist/components/uikit-sdk/Svg/Icons/SuccessOutline.js +0 -16
  247. package/dist/components/uikit-sdk/Svg/Icons/SwapArrows.js +0 -16
  248. package/dist/components/uikit-sdk/Svg/Icons/SwitchArrows.js +0 -16
  249. package/dist/components/uikit-sdk/Svg/Icons/Tag.js +0 -5
  250. package/dist/components/uikit-sdk/Svg/Icons/Telegram.js +0 -16
  251. package/dist/components/uikit-sdk/Svg/Icons/TelegramNew.js +0 -16
  252. package/dist/components/uikit-sdk/Svg/Icons/TextLogo.js +0 -6
  253. package/dist/components/uikit-sdk/Svg/Icons/TickShield.js +0 -16
  254. package/dist/components/uikit-sdk/Svg/Icons/Trade.js +0 -16
  255. package/dist/components/uikit-sdk/Svg/Icons/Trash.js +0 -16
  256. package/dist/components/uikit-sdk/Svg/Icons/Twitter.js +0 -16
  257. package/dist/components/uikit-sdk/Svg/Icons/URL.js +0 -16
  258. package/dist/components/uikit-sdk/Svg/Icons/Vaults.js +0 -16
  259. package/dist/components/uikit-sdk/Svg/Icons/Verified.js +0 -6
  260. package/dist/components/uikit-sdk/Svg/Icons/Wallet.js +0 -16
  261. package/dist/components/uikit-sdk/Svg/Icons/Warning.js +0 -16
  262. package/dist/components/uikit-sdk/Svg/Icons/Watch.js +0 -16
  263. package/dist/components/uikit-sdk/Svg/Icons/Website.js +0 -16
  264. package/dist/components/uikit-sdk/Svg/Icons/WebsiteNew.js +0 -16
  265. package/dist/components/uikit-sdk/Svg/Icons/WhitepaperNew.js +0 -16
  266. package/dist/components/uikit-sdk/Svg/Icons/XNew.js +0 -16
  267. package/dist/components/uikit-sdk/Svg/Icons/YellowQuestionMark.js +0 -6
  268. package/dist/components/uikit-sdk/Svg/Icons/ZapArrow.js +0 -16
  269. package/dist/components/uikit-sdk/Svg/Icons/ZapIcon.js +0 -16
  270. package/dist/components/uikit-sdk/Svg/Icons/index.js +0 -112
  271. package/dist/components/uikit-sdk/Svg/Icons/polygonNew.js +0 -16
  272. package/dist/components/uikit-sdk/Svg/Icons/types.js +0 -1
  273. package/dist/components/uikit-sdk/Svg/index.js +0 -347
  274. package/dist/components/uikit-sdk/Svg/styles.js +0 -16
  275. package/dist/components/uikit-sdk/Svg/tokens/ABOND.js +0 -6
  276. package/dist/components/uikit-sdk/Svg/tokens/ARBITRUM.js +0 -6
  277. package/dist/components/uikit-sdk/Svg/tokens/AVAX.js +0 -6
  278. package/dist/components/uikit-sdk/Svg/tokens/BANANA.js +0 -6
  279. package/dist/components/uikit-sdk/Svg/tokens/BASE.js +0 -6
  280. package/dist/components/uikit-sdk/Svg/tokens/BNB.js +0 -6
  281. package/dist/components/uikit-sdk/Svg/tokens/BSC.js +0 -6
  282. package/dist/components/uikit-sdk/Svg/tokens/CELO.js +0 -5
  283. package/dist/components/uikit-sdk/Svg/tokens/CRONOS.js +0 -6
  284. package/dist/components/uikit-sdk/Svg/tokens/ETH.js +0 -6
  285. package/dist/components/uikit-sdk/Svg/tokens/FANTOM.js +0 -6
  286. package/dist/components/uikit-sdk/Svg/tokens/GNANA.js +0 -6
  287. package/dist/components/uikit-sdk/Svg/tokens/GNOSIS.js +0 -6
  288. package/dist/components/uikit-sdk/Svg/tokens/INEVM.js +0 -6
  289. package/dist/components/uikit-sdk/Svg/tokens/IOTA.js +0 -6
  290. package/dist/components/uikit-sdk/Svg/tokens/LIGHTLINK.js +0 -6
  291. package/dist/components/uikit-sdk/Svg/tokens/LINEA.js +0 -6
  292. package/dist/components/uikit-sdk/Svg/tokens/OKX.js +0 -5
  293. package/dist/components/uikit-sdk/Svg/tokens/OPTIMISM.js +0 -8
  294. package/dist/components/uikit-sdk/Svg/tokens/POLYGON.js +0 -6
  295. package/dist/components/uikit-sdk/Svg/tokens/POLYGONZK.js +0 -6
  296. package/dist/components/uikit-sdk/Svg/tokens/TLOS.js +0 -6
  297. package/dist/components/uikit-sdk/Svg/tokens/index.js +0 -22
  298. package/dist/components/uikit-sdk/Svg/types.js +0 -165
  299. package/dist/components/uikit-sdk/Svg/walletIcons/BinanceChain.js +0 -6
  300. package/dist/components/uikit-sdk/Svg/walletIcons/Bitkeep.js +0 -6
  301. package/dist/components/uikit-sdk/Svg/walletIcons/Brave.js +0 -6
  302. package/dist/components/uikit-sdk/Svg/walletIcons/Coinbase.js +0 -6
  303. package/dist/components/uikit-sdk/Svg/walletIcons/MadWallet.js +0 -6
  304. package/dist/components/uikit-sdk/Svg/walletIcons/MathWallet.js +0 -6
  305. package/dist/components/uikit-sdk/Svg/walletIcons/Metamask.js +0 -6
  306. package/dist/components/uikit-sdk/Svg/walletIcons/Nabox.js +0 -6
  307. package/dist/components/uikit-sdk/Svg/walletIcons/OKX.js +0 -6
  308. package/dist/components/uikit-sdk/Svg/walletIcons/OntoWallet.js +0 -6
  309. package/dist/components/uikit-sdk/Svg/walletIcons/SafePalWallet.js +0 -6
  310. package/dist/components/uikit-sdk/Svg/walletIcons/SocialLogin.js +0 -6
  311. package/dist/components/uikit-sdk/Svg/walletIcons/TokenPocket.js +0 -6
  312. package/dist/components/uikit-sdk/Svg/walletIcons/TorusWallet.js +0 -6
  313. package/dist/components/uikit-sdk/Svg/walletIcons/TrustWallet.js +0 -6
  314. package/dist/components/uikit-sdk/Svg/walletIcons/Unstoppable.js +0 -6
  315. package/dist/components/uikit-sdk/Svg/walletIcons/WalletConnect.js +0 -6
  316. package/dist/components/uikit-sdk/Svg/walletIcons/WalletImage.js +0 -5
  317. package/dist/components/uikit-sdk/Svg/walletIcons/index.js +0 -18
  318. package/dist/components/uikit-sdk/Tag/ListTag.js +0 -20
  319. package/dist/components/uikit-sdk/Tag/Tag.js +0 -42
  320. package/dist/components/uikit-sdk/Tag/index.js +0 -2
  321. package/dist/components/uikit-sdk/Tag/styles.js +0 -44
  322. package/dist/components/uikit-sdk/Tag/types.js +0 -34
  323. package/dist/components/uikit-sdk/Text/index.js +0 -35
  324. package/dist/components/uikit-sdk/Text/types.js +0 -13
  325. package/dist/components/uikit-sdk/TokenImage/index.js +0 -41
  326. package/dist/components/uikit-sdk/TooltipBubble/index.js +0 -66
  327. package/dist/components/uikit-sdk/TooltipBubble/styles.js +0 -60
  328. package/dist/components/uikit-sdk/TooltipBubble/types.js +0 -8
  329. package/dist/components/uikit-sdk/index.js +0 -12
  330. package/dist/config/abi/bond.json +0 -450
  331. package/dist/config/abi/erc20.json +0 -117
  332. package/dist/config/abi/multicallv2.json +0 -143
  333. package/dist/config/abi/price-getter-linea.json +0 -1448
  334. package/dist/config/abi/price-getter.json +0 -1309
  335. package/dist/config/abi/types/Banana.js +0 -1
  336. package/dist/config/abi/types/Bond.js +0 -1
  337. package/dist/config/abi/types/BondNft.js +0 -1
  338. package/dist/config/abi/types/EnsPublicResolver.js +0 -1
  339. package/dist/config/abi/types/EnsRegistrar.js +0 -1
  340. package/dist/config/abi/types/Erc20.js +0 -1
  341. package/dist/config/abi/types/Erc20_bytes32.js +0 -1
  342. package/dist/config/abi/types/JungleChef.js +0 -1
  343. package/dist/config/abi/types/LaunchBonds.js +0 -1
  344. package/dist/config/abi/types/LensContract.js +0 -1
  345. package/dist/config/abi/types/LockVeAbond.js +0 -1
  346. package/dist/config/abi/types/MigrationBond.js +0 -1
  347. package/dist/config/abi/types/MigrationFveAbond.js +0 -1
  348. package/dist/config/abi/types/MiniComplexRewarder.js +0 -1
  349. package/dist/config/abi/types/Multicallv2.js +0 -1
  350. package/dist/config/abi/types/Multicallv3.js +0 -1
  351. package/dist/config/abi/types/NonFungibleApes.js +0 -1
  352. package/dist/config/abi/types/NonFungibleBananas.js +0 -1
  353. package/dist/config/abi/types/PriceGetter.js +0 -1
  354. package/dist/config/abi/types/PriceGetterLinea.js +0 -1
  355. package/dist/config/abi/types/PriceGetterV2.js +0 -1
  356. package/dist/config/abi/types/SousChef.js +0 -1
  357. package/dist/config/abi/types/Treasury.js +0 -1
  358. package/dist/config/abi/types/Weth.js +0 -1
  359. package/dist/config/abi/types/Zap.js +0 -1
  360. package/dist/config/abi/types/common.js +0 -1
  361. package/dist/config/abi/types/factories/Banana__factory.js +0 -628
  362. package/dist/config/abi/types/factories/BondNft__factory.js +0 -951
  363. package/dist/config/abi/types/factories/Bond__factory.js +0 -1042
  364. package/dist/config/abi/types/factories/EnsPublicResolver__factory.js +0 -833
  365. package/dist/config/abi/types/factories/EnsRegistrar__factory.js +0 -439
  366. package/dist/config/abi/types/factories/Erc20__factory.js +0 -239
  367. package/dist/config/abi/types/factories/Erc20_bytes32__factory.js +0 -47
  368. package/dist/config/abi/types/factories/JungleChef__factory.js +0 -326
  369. package/dist/config/abi/types/factories/LaunchBonds__factory.js +0 -2031
  370. package/dist/config/abi/types/factories/LensContract__factory.js +0 -338
  371. package/dist/config/abi/types/factories/LockVeAbond__factory.js +0 -2215
  372. package/dist/config/abi/types/factories/MigrationBond__factory.js +0 -1656
  373. package/dist/config/abi/types/factories/MigrationFveAbond__factory.js +0 -346
  374. package/dist/config/abi/types/factories/MiniComplexRewarder__factory.js +0 -586
  375. package/dist/config/abi/types/factories/Multicallv2__factory.js +0 -160
  376. package/dist/config/abi/types/factories/Multicallv3__factory.js +0 -109
  377. package/dist/config/abi/types/factories/NonFungibleApes__factory.js +0 -810
  378. package/dist/config/abi/types/factories/NonFungibleBananas__factory.js +0 -756
  379. package/dist/config/abi/types/factories/PriceGetterLinea__factory.js +0 -1465
  380. package/dist/config/abi/types/factories/PriceGetterV2__factory.js +0 -1364
  381. package/dist/config/abi/types/factories/PriceGetter__factory.js +0 -1326
  382. package/dist/config/abi/types/factories/SousChef__factory.js +0 -666
  383. package/dist/config/abi/types/factories/Treasury__factory.js +0 -309
  384. package/dist/config/abi/types/factories/Weth__factory.js +0 -296
  385. package/dist/config/abi/types/factories/Zap__factory.js +0 -889
  386. package/dist/config/abi/types/factories/index.js +0 -28
  387. package/dist/config/abi/types/index.js +0 -26
  388. package/dist/config/constants/addresses.js +0 -116
  389. package/dist/config/constants/api.js +0 -6
  390. package/dist/config/constants/chains.js +0 -436
  391. package/dist/config/constants/lifiRouting.js +0 -6
  392. package/dist/config/constants/lists.js +0 -21
  393. package/dist/config/constants/meta.js +0 -92
  394. package/dist/config/constants/misc.js +0 -4
  395. package/dist/config/constants/networks.js +0 -44
  396. package/dist/config/constants/products.js +0 -58
  397. package/dist/config/constants/queryKeys.js +0 -47
  398. package/dist/config/constants/tokens.js +0 -64
  399. package/dist/config/constants/tutorials.js +0 -80
  400. package/dist/config/constants/zapInputTokens.js +0 -356
  401. package/dist/config/localization/languages.js +0 -83
  402. package/dist/config/localization/translations.json +0 -918
  403. package/dist/contexts/Localization/Provider.js +0 -134
  404. package/dist/contexts/Localization/helpers.js +0 -63
  405. package/dist/contexts/Localization/index.js +0 -2
  406. package/dist/contexts/Localization/types.js +0 -1
  407. package/dist/contexts/Localization/useTranslation.js +0 -10
  408. package/dist/contexts/ModalContext.js +0 -67
  409. package/dist/contexts/RefreshContext.js +0 -78
  410. package/dist/enum/apeswaplists.d.ts +0 -418
  411. package/dist/enum/apeswaplists.js +0 -152
  412. package/dist/enum/tooltips.js +0 -13
  413. package/dist/hooks/useCookie.js +0 -29
  414. package/dist/hooks/useIsAbond.js +0 -10
  415. package/dist/hooks/useModal.js +0 -39
  416. package/dist/hooks/usePendingVesting.js +0 -13
  417. package/dist/hooks/useRefresh.js +0 -7
  418. package/dist/hooks/useTimer.js +0 -13
  419. package/dist/hooks/useTokenFromZapList.js +0 -10
  420. package/dist/hooks/useTopThreeTags.js +0 -25
  421. package/dist/index.d.ts +0 -5
  422. package/dist/index.js +0 -6
  423. package/dist/providers/index.js +0 -18
  424. package/dist/state/allowance/useAllowance.js +0 -148
  425. package/dist/state/balance/useCurrencyBalance.js +0 -80
  426. package/dist/state/price/useCurrencyPrice.js +0 -397
  427. package/dist/state/zap/getChainParam.js +0 -34
  428. package/dist/state/zap/useSoulZapBondQuote.js +0 -177
  429. package/dist/state/zap/useSoulZapTokenQuote.js +0 -167
  430. package/dist/theme/base.js +0 -123
  431. package/dist/theme/colors.js +0 -93
  432. package/dist/theme/components.js +0 -338
  433. package/dist/theme/display.js +0 -2
  434. package/dist/theme/index.js +0 -15
  435. package/dist/theme/types.js +0 -1
  436. package/dist/types/bonds.js +0 -1
  437. package/dist/types/yourbonds.js +0 -1
  438. package/dist/utils/convertToTokenValue.js +0 -24
  439. package/dist/utils/formatNumber.js +0 -34
  440. package/dist/utils/formatNumbers.js +0 -148
  441. package/dist/utils/getBalanceNumber.js +0 -18
  442. package/dist/utils/getNativeTicker.js +0 -8
  443. package/dist/utils/getTimePeriods.js +0 -44
  444. package/dist/utils/index.js +0 -127
  445. package/dist/utils/localStorageHelpers.js +0 -47
  446. package/dist/utils/multicall.js +0 -90
  447. package/dist/utils/numbers.js +0 -111
  448. package/dist/utils/roundNumber.js +0 -14
  449. package/dist/utils/track.js +0 -17
  450. package/dist/views/BondModal/BondModal.js +0 -300
  451. package/dist/views/BondModal/helper.js +0 -54
  452. package/dist/views/BondModal/index.js +0 -18
  453. package/dist/views/Bonds/Bonds.js +0 -174
  454. package/dist/views/Bonds/index.js +0 -18
  455. package/dist/views/YourBonds/YourBonds.js +0 -276
  456. package/dist/views/YourBonds/fetchBillsUser.js +0 -235
  457. package/dist/views/YourBonds/getBillNftData.js +0 -109
  458. package/dist/views/YourBondsModal/YourBondsModal.js +0 -173
  459. package/dist/views/YourBondsModal/styles.js +0 -12
  460. package/dist/views/ZapModal/index.js +0 -150
  461. package/dist/views/ZapModal/styles.js +0 -35
  462. /package/dist/{enum → config/constants}/tooltips.d.ts +0 -0
@@ -1,276 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
38
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
39
- if (ar || !(i in from)) {
40
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
41
- ar[i] = from[i];
42
- }
43
- }
44
- return to.concat(ar || Array.prototype.slice.call(from));
45
- };
46
- import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
47
- /** @jsxImportSource theme-ui */
48
- import { useEffect, useState } from 'react';
49
- import { Flex, Spinner, ThemeUIProvider } from 'theme-ui';
50
- import getTimePeriods from '../../utils/getTimePeriods';
51
- import { defaultTheme } from '../../theme';
52
- import '../../scss/YourBonds.scss';
53
- import { BigNumber } from 'bignumber.js';
54
- import { Text, Button, Svg } from '../../components/uikit-sdk';
55
- import { MAINNET_CHAINS, NETWORK_LABEL } from '../../config/constants/chains';
56
- import TokenInfoAndName from '../../components/TokenInfoAndName';
57
- import { getBalanceNumber } from '../../utils/getBalanceNumber';
58
- import { getFirstNonZeroDigits } from '../../utils/roundNumber';
59
- import { formatNumberSI } from '../../utils/formatNumber';
60
- import useCurrentTime from '../../hooks/useTimer';
61
- import { getPendingVesting } from '../../hooks/usePendingVesting';
62
- import axios from 'axios';
63
- import { fetchUserOwnedBillsDataAsync } from './fetchBillsUser';
64
- import { Input } from '../../components/uikit-sdk/Input';
65
- import { YourBondsModal } from "../../index";
66
- import BOND_ABI from '../../config/abi/bond.json';
67
- import { useChainId, useSwitchChain, useWaitForTransactionReceipt, useWriteContract } from 'wagmi';
68
- var YourBonds = function (_a) {
69
- var account = _a.account, accountChainId = _a.accountChainId;
70
- var chainId = useChainId();
71
- var _b = useSwitchChain(), chains = _b.chains, switchChain = _b.switchChain;
72
- var _c = useWriteContract(), hash = _c.data, isPending = _c.isPending, writeContract = _c.writeContract, writeContractAsync = _c.writeContractAsync;
73
- var _d = useWaitForTransactionReceipt({
74
- confirmations: 4,
75
- chainId: chainId,
76
- hash: hash,
77
- }), isConfirming = _d.isLoading, isConfirmed = _d.isSuccess;
78
- var handleClaim = function (billId, billAddress) { return __awaiter(void 0, void 0, void 0, function () {
79
- var address, tx, error_1;
80
- return __generator(this, function (_a) {
81
- switch (_a.label) {
82
- case 0:
83
- address = billAddress;
84
- _a.label = 1;
85
- case 1:
86
- _a.trys.push([1, 3, , 4]);
87
- return [4 /*yield*/, writeContractAsync({
88
- address: address,
89
- abi: BOND_ABI,
90
- functionName: 'redeem',
91
- args: [billId],
92
- })];
93
- case 2:
94
- tx = _a.sent();
95
- if (tx) {
96
- setClaimTx(tx);
97
- }
98
- return [3 /*break*/, 4];
99
- case 3:
100
- error_1 = _a.sent();
101
- console.error('Approval failed:', error_1);
102
- return [3 /*break*/, 4];
103
- case 4: return [2 /*return*/];
104
- }
105
- });
106
- }); };
107
- var _e = useState(null), claimTx = _e[0], setClaimTx = _e[1];
108
- var _f = useState(null), toastMessage = _f[0], setToastMessage = _f[1];
109
- useEffect(function () {
110
- if (isConfirmed) {
111
- setToastMessage("Transaction Complete.");
112
- setTimeout(function () { return setToastMessage(null); }, 10000);
113
- }
114
- }, [claimTx, isConfirmed]);
115
- // Fetch data
116
- var _g = useState([]), bondData = _g[0], setBondData = _g[1];
117
- var _h = useState([]), mappedUserBills = _h[0], setMappedUserBills = _h[1];
118
- useEffect(function () {
119
- axios.get('https://realtime-api.ape.bond/bonds').then(function (response) {
120
- var bonds = response.data.bonds;
121
- setBondData(bonds);
122
- });
123
- }, []);
124
- useEffect(function () {
125
- var fetchData = function () { return __awaiter(void 0, void 0, void 0, function () {
126
- var results, mappedBills, error_2;
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0:
130
- if (!(account && bondData)) return [3 /*break*/, 4];
131
- _a.label = 1;
132
- case 1:
133
- _a.trys.push([1, 3, , 4]);
134
- return [4 /*yield*/, Promise.all(MAINNET_CHAINS.map(function (chain) { return fetchUserOwnedBillsDataAsync(chain, account, bondData); }))];
135
- case 2:
136
- results = _a.sent();
137
- mappedBills = results.flat().flatMap(function (results) { return results.userOwnedBills; });
138
- setMappedUserBills(mappedBills);
139
- return [3 /*break*/, 4];
140
- case 3:
141
- error_2 = _a.sent();
142
- console.error('Error fetching user owned bills data:', error_2);
143
- return [3 /*break*/, 4];
144
- case 4: return [2 /*return*/];
145
- }
146
- });
147
- }); };
148
- fetchData();
149
- }, [account, bondData, claimTx]);
150
- var _j = useState(null), sortConfig = _j[0], setSortConfig = _j[1];
151
- var _k = useState(mappedUserBills), sortedBonds = _k[0], setSortedBonds = _k[1];
152
- var handleSort = function (key) {
153
- var direction = 'asc';
154
- if ((sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.key) === key && (sortConfig === null || sortConfig === void 0 ? void 0 : sortConfig.direction) === 'asc') {
155
- direction = 'desc';
156
- }
157
- setSortConfig({ key: key, direction: direction });
158
- };
159
- useEffect(function () {
160
- if (sortConfig === null) {
161
- var sortedBills = __spreadArray([], mappedUserBills, true).sort(function (a, b) {
162
- var claimableDifference = parseFloat(claimable(b).toFixed(3)) - parseFloat(claimable(a).toFixed(3));
163
- if (claimableDifference !== 0) {
164
- return claimableDifference;
165
- }
166
- return 0;
167
- });
168
- setSortedBonds(sortedBills);
169
- return;
170
- }
171
- var sorted = __spreadArray([], mappedUserBills, true).sort(function (a, b) {
172
- var aValue, bValue;
173
- if (sortConfig.key === 'claimable') {
174
- aValue = parseFloat(claimable(a).toFixed(3));
175
- bValue = parseFloat(claimable(b).toFixed(3));
176
- }
177
- else if (sortConfig.key === 'pending') {
178
- aValue = parseFloat(totalPending(a).toFixed(0));
179
- bValue = parseFloat(totalPending(b).toFixed(0));
180
- }
181
- else if (sortConfig.key === 'terms') {
182
- var aRemainingTime = vestingTimeRemaining(a).days * 24 * 3600 +
183
- vestingTimeRemaining(a).hours * 3600 +
184
- vestingTimeRemaining(a).minutes * 60;
185
- var bRemainingTime = vestingTimeRemaining(b).days * 24 * 3600 +
186
- vestingTimeRemaining(b).hours * 3600 +
187
- vestingTimeRemaining(b).minutes * 60;
188
- aValue = aRemainingTime;
189
- bValue = bRemainingTime;
190
- }
191
- else {
192
- aValue = a[sortConfig.key];
193
- bValue = b[sortConfig.key];
194
- }
195
- if (aValue < bValue) {
196
- return sortConfig.direction === 'asc' ? -1 : 1;
197
- }
198
- if (aValue > bValue) {
199
- return sortConfig.direction === 'asc' ? 1 : -1;
200
- }
201
- return 0;
202
- });
203
- setSortedBonds(sorted);
204
- }, [sortConfig, mappedUserBills]);
205
- // Functions for calculations
206
- var currentTime = useCurrentTime() / 1000;
207
- var vestingTimeRemaining = function (userBill) {
208
- return getTimePeriods(parseInt(userBill.lastBlockTimestamp) + parseInt(userBill.vesting) - currentTime, true);
209
- };
210
- var totalPending = function (userBill) {
211
- var _a, _b, _c, _d;
212
- return getBalanceNumber(new BigNumber((_a = userBill === null || userBill === void 0 ? void 0 : userBill.payout) !== null && _a !== void 0 ? _a : 0), (_d = (_c = (_b = userBill.bond.earnToken) === null || _b === void 0 ? void 0 : _b.decimals) === null || _c === void 0 ? void 0 : _c[chainId]) !== null && _d !== void 0 ? _d : 18);
213
- };
214
- var claimable = function (userBill) {
215
- var _a, _b, _c;
216
- return getBalanceNumber(new BigNumber(userBill.pendingRewards), (_c = (_b = (_a = userBill.bond.earnToken) === null || _a === void 0 ? void 0 : _a.decimals) === null || _b === void 0 ? void 0 : _b[chainId]) !== null && _c !== void 0 ? _c : 18);
217
- };
218
- var hasPendingRewards = function (bills) {
219
- return bills.some(function (bill) { return parseFloat(bill.pendingRewards) > 0; });
220
- };
221
- var earnTokenPrice = function (bond) {
222
- var _a;
223
- return getFirstNonZeroDigits(parseFloat((_a = bond === null || bond === void 0 ? void 0 : bond.payoutTokenPrice) !== null && _a !== void 0 ? _a : '0'));
224
- };
225
- // Modal
226
- var _l = useState(false), isModalOpen = _l[0], setIsModalOpen = _l[1];
227
- var _m = useState(undefined), selectedBill = _m[0], setSelectedBill = _m[1];
228
- var rowClick = function (bill) {
229
- setSelectedBill(bill);
230
- setIsModalOpen(true);
231
- };
232
- // Search logic
233
- var _o = useState(''), inputValue = _o[0], setInputValue = _o[1];
234
- var _p = useState(sortedBonds), filteredBonds = _p[0], setFilteredBonds = _p[1];
235
- useEffect(function () {
236
- if (inputValue === '') {
237
- setFilteredBonds(sortedBonds);
238
- }
239
- else {
240
- setFilteredBonds(sortedBonds.filter(function (bond) {
241
- return bond.bond.showcaseTokenName.toLowerCase().includes(inputValue.toLowerCase());
242
- }));
243
- }
244
- }, [inputValue, sortedBonds]);
245
- var handleInputChange = function (event) {
246
- setInputValue(event.target.value);
247
- };
248
- // Page render logic
249
- var _q = useState(false), bondsRendered = _q[0], setBondsRendered = _q[1];
250
- useEffect(function () {
251
- if (filteredBonds.length > 0) {
252
- setBondsRendered(true);
253
- }
254
- }, [filteredBonds]);
255
- var closeModal = function () {
256
- setIsModalOpen(false);
257
- };
258
- return (_jsxs(ThemeUIProvider, { theme: defaultTheme, children: [isModalOpen &&
259
- _jsx(YourBondsModal, { isOpen: true, onClose: closeModal, userBill: selectedBill }), toastMessage && (_jsx(Flex, { className: "toast", children: toastMessage })), !bondsRendered ? (_jsxs(Flex, { className: "yourbonds-spinner", children: [" ", _jsx(Spinner, { size: 100 }), " "] }))
260
- : (_jsxs(Flex, { className: "yourbonds table-container", children: [_jsxs(Flex, { className: "yourbonds header-container", children: [_jsx(Flex, { className: "yourbonds column-tokens", children: _jsx(Flex, { className: "yourbonds column-search", sx: { width: '100%', maxWidth: ['200px', '200px', '200px', '340px'] }, children: _jsx(Input, { value: inputValue, onChange: handleInputChange, variant: "search", sx: { fontWeight: 400, background: 'white2', height: '30px', fontSize: '14px', color: 'white' }, width: '100%', placeholder: 'Search...' }) }) }), _jsxs(Flex, { className: "yourbonds column-bondinfo", children: [_jsxs(Flex, { className: "yourbonds header-claimable", children: ["CLAIMABLE", _jsx(Flex, { className: "yourbonds header-icon", onClick: function () { return handleSort('claimable'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "yourbonds header-pending", children: ["PENDING", _jsx(Flex, { className: "yourbonds header-icon", onClick: function () { return handleSort('pending'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsxs(Flex, { className: "yourbonds header-terms", children: ["TERMS", _jsx(Flex, { className: "yourbonds header-icon", onClick: function () { return handleSort('terms'); }, children: _jsx(Svg, { icon: "sort", width: "12px", color: "textDisabledButton" }) })] }), _jsx(Flex, { className: "yourbonds header-claimall" })] })] }), filteredBonds.map(function (bill) {
261
- var _a, _b;
262
- return (_jsxs(Flex, { className: "yourbonds bondrow-container", onClick: function () { return rowClick(bill); }, children: [_jsx(Flex, { className: "yourbonds column-tokens", children: _jsx(Flex, { className: "yourbonds column-tokeninfoname", children: _jsx(TokenInfoAndName, { bill: bill.bond, vestEnds: "Ends in ".concat(getPendingVesting(bill.lastBlockTimestamp, bill.vesting)) }) }) }), _jsxs(Flex, { className: "yourbonds column-bondinfo", children: [_jsxs(Flex, { className: "yourbonds column-claimable", children: [formatNumberSI(parseFloat(claimable(bill).toFixed(4)), 4), _jsx(Text, { sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' }, children: "($".concat((claimable(bill) * ((_a = parseFloat(earnTokenPrice(bill.bond))) !== null && _a !== void 0 ? _a : 0)).toFixed(2), ")") })] }), _jsxs(Flex, { className: "yourbonds column-pending", children: [formatNumberSI(parseFloat(totalPending(bill).toFixed(0)), 0), _jsx(Text, { sx: { opacity: '0.6', fontSize: '12px', paddingLeft: '5px' }, children: "($".concat((totalPending(bill) * ((_b = parseFloat(earnTokenPrice(bill.bond))) !== null && _b !== void 0 ? _b : 0)).toFixed(2), ")") })] }), _jsx(Flex, { className: "yourbonds column-terms", children: "".concat(vestingTimeRemaining(bill).days, "d, ").concat(vestingTimeRemaining(bill).hours, "h, ").concat(vestingTimeRemaining(bill).minutes, "m") }), _jsx(Flex, { className: "yourbonds column-claimall", children: chainId !== bill.bond.chainId ?
263
- _jsxs(Button, { className: "switch-button", disabled: claimable(bill) === 0 || isPending, onClick: function (event) {
264
- event.stopPropagation();
265
- // Add your claim logic here
266
- switchChain({ chainId: bill.bond.chainId });
267
- }, children: ["Switch to ", NETWORK_LABEL[bill.bond.chainId]] })
268
- :
269
- _jsx(Button, { className: "claim-button", disabled: claimable(bill) === 0 || isPending, onClick: function (event) {
270
- event.stopPropagation();
271
- // Add your claim logic here
272
- handleClaim(bill.id, bill.address);
273
- }, children: "Claim" }) })] })] }, bill.id));
274
- })] }))] }));
275
- };
276
- export default YourBonds;
@@ -1,235 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
- return new (P || (P = Promise))(function (resolve, reject) {
15
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
- step((generator = generator.apply(thisArg, _arguments || [])).next());
19
- });
20
- };
21
- var __generator = (this && this.__generator) || function (thisArg, body) {
22
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
23
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
- function verb(n) { return function (v) { return step([n, v]); }; }
25
- function step(op) {
26
- if (f) throw new TypeError("Generator is already executing.");
27
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
29
- if (y = 0, t) op = [op[0] & 2, t.value];
30
- switch (op[0]) {
31
- case 0: case 1: t = op; break;
32
- case 4: _.label++; return { value: op[1], done: false };
33
- case 5: _.label++; y = op[1]; op = [0]; continue;
34
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
- default:
36
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
- if (t[2]) _.ops.pop();
41
- _.trys.pop(); continue;
42
- }
43
- op = body.call(thisArg, _);
44
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
- }
47
- };
48
- import billAbi from '../../config/abi/bond.json';
49
- import BigNumber from 'bignumber.js';
50
- import { getBillNftBatchData } from './getBillNftData';
51
- import multicall from '../../utils/multicall';
52
- import { BillVersion } from '../../enum/apeswaplists';
53
- import { ACF_TO_ABOND } from '../../config/constants/addresses';
54
- /**
55
- * Fetches user-owned bill NFT data for a given set of owned bills data, chain ID, and bills.
56
- * @param ownedBillsData An array of objects containing the ID, bill NFT address, and contract address of the owned bills.
57
- * @param chainId The ID of the blockchain network.
58
- * @param bills An array of objects containing the contract address and user-owned bill NFT data.
59
- * @returns An array of objects containing the ID and data of the user-owned bill NFTs.
60
- */
61
- export var fetchUserOwnedBillNftData = function (ownedBillsData, chainId, bills) { return __awaiter(void 0, void 0, void 0, function () {
62
- var billsToFetch, billsFetched, groupedBillsToFetch, groupedBillsToFetchArray, billNftData, billNftDataFlat, result;
63
- return __generator(this, function (_a) {
64
- switch (_a.label) {
65
- case 0:
66
- billsToFetch = [];
67
- billsFetched = [];
68
- // Loop through each owned bill and check if it exists in the bills array
69
- ownedBillsData === null || ownedBillsData === void 0 ? void 0 : ownedBillsData.forEach(function (_a) {
70
- var id = _a.id, billNftAddress = _a.billNftAddress, contractAddress = _a.contractAddress;
71
- var bill = bills
72
- .find(function (b) { return b.billAddress[chainId] === contractAddress; });
73
- // ?.userOwnedBillsNftData?.find((u) => +u.tokenId === +id)
74
- // If the bill exists in the bills array, add it to the billsFetched array
75
- if (bill) {
76
- billsFetched.push({ id: id, data: bill });
77
- }
78
- // If the bill doesn't exist in the bills array, add it to the billsToFetch array
79
- billsToFetch.push({ id: id, billNftAddress: billNftAddress, chainId: chainId });
80
- });
81
- groupedBillsToFetch = billsToFetch === null || billsToFetch === void 0 ? void 0 : billsToFetch.reduce(function (acc, bill) {
82
- var key = "".concat(bill === null || bill === void 0 ? void 0 : bill.billNftAddress, "-").concat(bill === null || bill === void 0 ? void 0 : bill.chainId);
83
- if (!acc[key]) {
84
- acc[key] = {
85
- billNftAddress: bill === null || bill === void 0 ? void 0 : bill.billNftAddress,
86
- chainId: bill === null || bill === void 0 ? void 0 : bill.chainId,
87
- ids: [],
88
- };
89
- }
90
- acc[key].ids.push(bill === null || bill === void 0 ? void 0 : bill.id);
91
- return acc;
92
- }, {});
93
- groupedBillsToFetchArray = Object.values(groupedBillsToFetch);
94
- return [4 /*yield*/, Promise.all(groupedBillsToFetchArray.map(function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
95
- var billNftAddress = _b.billNftAddress, chainId = _b.chainId, ids = _b.ids;
96
- return __generator(this, function (_c) {
97
- return [2 /*return*/, getBillNftBatchData(ids, billNftAddress, chainId)];
98
- });
99
- }); }))
100
- // Flatten the resulting array of arrays into a single array
101
- ];
102
- case 1:
103
- billNftData = _a.sent();
104
- billNftDataFlat = billNftData.flat();
105
- result = billsFetched.concat(billNftDataFlat.map(function (data) { return ({ id: data.tokenId, data: data }); }));
106
- return [2 /*return*/, result];
107
- }
108
- });
109
- }); };
110
- /* MODIFIED FUNCTION FROM FRONTEND SPECIFICALLY FOR THE SDK */
111
- export var fetchUserOwnedBillsDataAsync = function (chainId, account, bondData) { return __awaiter(void 0, void 0, void 0, function () {
112
- var bonds, userOwnedBills_1, mapUserOwnedBills_1, userOwnedBillsData, ownedBillsData, userBillNftData_1, combinedData, error_1;
113
- return __generator(this, function (_a) {
114
- switch (_a.label) {
115
- case 0:
116
- _a.trys.push([0, 3, , 4]);
117
- bonds = bondData.filter(function (bond) {
118
- return bond.billVersion !== BillVersion.FixedPrice &&
119
- (bond === null || bond === void 0 ? void 0 : bond.chainId) === chainId &&
120
- bond.type !== 'migration' &&
121
- bond.billAddress.toLowerCase() !== ACF_TO_ABOND.toLowerCase();
122
- });
123
- return [4 /*yield*/, fetchUserOwnedBills(chainId, account, bonds)];
124
- case 1:
125
- userOwnedBills_1 = _a.sent();
126
- mapUserOwnedBills_1 = bonds.map(function (bill) {
127
- return userOwnedBills_1.filter(function (b) { return b.address.toLowerCase() === bill.billAddress.toLowerCase(); });
128
- });
129
- userOwnedBillsData = bonds.map(function (bill, i) { return ({
130
- index: bill.index,
131
- userOwnedBills: mapUserOwnedBills_1[i],
132
- }); });
133
- ownedBillsData = mapUserOwnedBills_1.flatMap(function (bs) {
134
- return bs.map(function (b) {
135
- return { id: b.id, billNftAddress: b.billNftAddress, contractAddress: b.address };
136
- });
137
- });
138
- return [4 /*yield*/, fetchUserOwnedBillNftData(ownedBillsData, chainId, bonds)
139
- // Merge userBillNftData into userOwnedBillsData
140
- ];
141
- case 2:
142
- userBillNftData_1 = _a.sent();
143
- combinedData = userOwnedBillsData.map(function (data) {
144
- var enrichedUserBills = data.userOwnedBills.map(function (bill) {
145
- var nftData = userBillNftData_1.find(function (nft) { return nft.id === parseInt(bill.id); });
146
- return __assign(__assign({}, bill), { nftData: nftData ? nftData : undefined });
147
- });
148
- return __assign(__assign({}, data), { userOwnedBills: enrichedUserBills });
149
- });
150
- return [2 /*return*/, Promise.resolve(combinedData)];
151
- case 3:
152
- error_1 = _a.sent();
153
- console.error('Error fetching user owned bills data:', error_1);
154
- return [2 /*return*/, Promise.reject(error_1)];
155
- case 4: return [2 /*return*/];
156
- }
157
- });
158
- }); };
159
- /* MODIFIED FUNCTION FROM FRONTEND SPECIFICALLY FOR THE SDK */
160
- export var fetchUserOwnedBills = function (chainId, account, bonds) { return __awaiter(void 0, void 0, void 0, function () {
161
- var billIdCalls, billIds, billsPendingRewardCall, billDataCalls, billVersions, billData, pendingRewardsCall, result, i, billDataPos, data;
162
- var _a, _b, _c, _d, _e;
163
- return __generator(this, function (_f) {
164
- switch (_f.label) {
165
- case 0:
166
- billIdCalls = bonds.map(function (b) { return ({
167
- address: b.billAddress,
168
- name: 'getBillIds',
169
- params: [account],
170
- }); });
171
- return [4 /*yield*/, multicall(chainId, billAbi, billIdCalls, true, 15)];
172
- case 1:
173
- billIds = _f.sent();
174
- billsPendingRewardCall = [];
175
- billDataCalls = [];
176
- billVersions = [];
177
- billIds.forEach(function (idArray, index) {
178
- return idArray[0].forEach(function (id) {
179
- return id.gt(0) &&
180
- (billDataCalls.push({
181
- address: bonds[index].billAddress,
182
- name: bonds[index].billVersion !== BillVersion.V1 ? 'getBillInfo' : 'billInfo',
183
- params: [id],
184
- bond: bonds[index]
185
- }),
186
- billDataCalls.push({ address: bonds[index].billAddress, name: 'billNft' }),
187
- billsPendingRewardCall.push({
188
- address: bonds[index].billAddress,
189
- name: bonds[index].billVersion !== BillVersion.V1 ? 'claimablePayout' : 'pendingPayoutFor',
190
- params: [id],
191
- bond: bonds[index]
192
- }),
193
- billVersions.push(bonds[index].billVersion));
194
- });
195
- });
196
- return [4 /*yield*/, multicall(chainId, billAbi, billDataCalls, true, 150)];
197
- case 2:
198
- billData = _f.sent();
199
- return [4 /*yield*/, multicall(chainId, billAbi, billsPendingRewardCall)];
200
- case 3:
201
- pendingRewardsCall = _f.sent();
202
- result = [];
203
- for (i = 0; i < billsPendingRewardCall.length; i++) {
204
- billDataPos = i === 0 ? 0 : i * 2;
205
- data = billVersions[i] !== BillVersion.V1
206
- ? {
207
- address: billsPendingRewardCall[i].address,
208
- id: billsPendingRewardCall[i].params[0].toString(),
209
- payout: new BigNumber((_a = billData[billDataPos][0]) === null || _a === void 0 ? void 0 : _a.payout.toString())
210
- .minus((_b = billData[billDataPos][0]) === null || _b === void 0 ? void 0 : _b.payoutClaimed.toString())
211
- .toString(),
212
- billNftAddress: billData[billDataPos + 1][0].toString(),
213
- vesting: (_c = billData[billDataPos][0]) === null || _c === void 0 ? void 0 : _c.vesting.toString(),
214
- lastBlockTimestamp: (_d = billData[billDataPos][0]) === null || _d === void 0 ? void 0 : _d.lastClaimTimestamp.toString(),
215
- truePricePaid: (_e = billData[billDataPos][0]) === null || _e === void 0 ? void 0 : _e.truePricePaid.toString(),
216
- pendingRewards: pendingRewardsCall[i][0].toString(),
217
- bond: billsPendingRewardCall[i].bond
218
- }
219
- : {
220
- address: billsPendingRewardCall[i].address,
221
- id: billsPendingRewardCall[i].params[0].toString(),
222
- payout: billData[billDataPos][0].toString(),
223
- billNftAddress: billData[billDataPos + 1][0].toString(),
224
- vesting: billData[billDataPos][1].toString(),
225
- lastBlockTimestamp: billData[billDataPos][2].toString(),
226
- truePricePaid: billData[billDataPos][3].toString(),
227
- pendingRewards: pendingRewardsCall[i][0].toString(),
228
- bond: billsPendingRewardCall[i].bond
229
- };
230
- result.push(data);
231
- }
232
- return [2 /*return*/, result];
233
- }
234
- });
235
- }); };
@@ -1,109 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import axiosRetry from 'axios-retry';
38
- import axios from 'axios';
39
- import { apiV2BaseUrl } from '../../config/constants/api';
40
- export var getBillNftData = function (billNftId, billNftAddress, chainId) { return __awaiter(void 0, void 0, void 0, function () {
41
- var response, billNftDataResp, error_1;
42
- return __generator(this, function (_a) {
43
- switch (_a.label) {
44
- case 0:
45
- _a.trys.push([0, 3, , 4]);
46
- axiosRetry(axios, {
47
- retries: 5,
48
- retryCondition: function () { return true; },
49
- });
50
- return [4 /*yield*/, axios.get("".concat(apiV2BaseUrl, "/bills/single/").concat(chainId, "/").concat(billNftAddress, "/").concat(billNftId))];
51
- case 1:
52
- response = _a.sent();
53
- return [4 /*yield*/, response.data];
54
- case 2:
55
- billNftDataResp = _a.sent();
56
- if (billNftDataResp.statusCode === 500) {
57
- return [2 /*return*/, null];
58
- }
59
- return [2 /*return*/, billNftDataResp];
60
- case 3:
61
- error_1 = _a.sent();
62
- return [2 /*return*/, null];
63
- case 4: return [2 /*return*/];
64
- }
65
- });
66
- }); };
67
- /**
68
- * Retrieves batch data for a list of bill NFT IDs from the API.
69
- * @param billNftIds - An array of bill NFT IDs to retrieve data for.
70
- * @param billNftAddress - The address of the bill NFT contract.
71
- * @param chainId - The ID of the blockchain network to retrieve data from.
72
- * @returns A Promise that resolves to the batch data for the specified bill NFT IDs, or null if an error occurs.
73
- */
74
- export var getBillNftBatchData = function (billNftIds, billNftAddress, chainId) { return __awaiter(void 0, void 0, void 0, function () {
75
- var response, billNftDataResp, error_2;
76
- return __generator(this, function (_a) {
77
- switch (_a.label) {
78
- case 0:
79
- _a.trys.push([0, 3, , 4]);
80
- // Retry the request up to 5 times if it fails
81
- axiosRetry(axios, {
82
- retries: 5,
83
- retryCondition: function () { return true; },
84
- });
85
- // If no bill NFT IDs are provided, return null
86
- if (!billNftIds || billNftIds.length === 0) {
87
- return [2 /*return*/, null];
88
- }
89
- return [4 /*yield*/, axios.get("".concat(apiV2BaseUrl, "/bills/batch/").concat(chainId, "/").concat(billNftAddress, "/?billIds[]=").concat(billNftIds.join('&billIds[]=')))
90
- // If the response status code is 500, return null
91
- ];
92
- case 1:
93
- response = _a.sent();
94
- return [4 /*yield*/, response.data];
95
- case 2:
96
- billNftDataResp = _a.sent();
97
- if (billNftDataResp.statusCode === 500) {
98
- return [2 /*return*/, null];
99
- }
100
- // Return the batch data for the specified bill NFT IDs
101
- return [2 /*return*/, billNftDataResp];
102
- case 3:
103
- error_2 = _a.sent();
104
- // If an error occurs, return null
105
- return [2 /*return*/, null];
106
- case 4: return [2 /*return*/];
107
- }
108
- });
109
- }); };