@ledgerhq/live-common 34.47.0 → 34.48.0-nightly.0

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 (422) hide show
  1. package/lib/bridge/crypto-assets/cal-integration.d.ts +4 -0
  2. package/lib/bridge/crypto-assets/cal-integration.d.ts.map +1 -0
  3. package/lib/bridge/crypto-assets/cal-integration.js +26 -0
  4. package/lib/bridge/crypto-assets/cal-integration.js.map +1 -0
  5. package/lib/bridge/crypto-assets/cal-integration.test.d.ts +2 -0
  6. package/lib/bridge/crypto-assets/cal-integration.test.d.ts.map +1 -0
  7. package/lib/bridge/crypto-assets/cal-integration.test.js +45 -0
  8. package/lib/bridge/crypto-assets/cal-integration.test.js.map +1 -0
  9. package/lib/bridge/crypto-assets/cal-store.d.ts +14 -0
  10. package/lib/bridge/crypto-assets/cal-store.d.ts.map +1 -0
  11. package/lib/bridge/crypto-assets/cal-store.js +58 -0
  12. package/lib/bridge/crypto-assets/cal-store.js.map +1 -0
  13. package/lib/bridge/crypto-assets/cal-store.test.d.ts +2 -0
  14. package/lib/bridge/crypto-assets/cal-store.test.d.ts.map +1 -0
  15. package/lib/bridge/crypto-assets/cal-store.test.js +70 -0
  16. package/lib/bridge/crypto-assets/cal-store.test.js.map +1 -0
  17. package/lib/bridge/crypto-assets/index.d.ts.map +1 -1
  18. package/lib/bridge/crypto-assets/index.js +4 -0
  19. package/lib/bridge/crypto-assets/index.js.map +1 -1
  20. package/lib/bridge/crypto-assets/index.test.js +36 -0
  21. package/lib/bridge/crypto-assets/index.test.js.map +1 -1
  22. package/lib/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  23. package/lib/bridge/generic-alpaca/alpaca/index.js +6 -1
  24. package/lib/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  25. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.d.ts +2 -0
  26. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.d.ts.map +1 -0
  27. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js +89 -0
  28. package/lib/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -0
  29. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
  30. package/lib/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  31. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts +2 -3
  32. package/lib/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
  33. package/lib/bridge/generic-alpaca/buildSubAccounts.js +4 -14
  34. package/lib/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
  35. package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  36. package/lib/bridge/generic-alpaca/getAccountShape.js +4 -4
  37. package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  38. package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  39. package/lib/bridge/generic-alpaca/getTransactionStatus.js +0 -1
  40. package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  41. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts +14 -3
  42. package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  43. package/lib/bridge/generic-alpaca/prepareTransaction.js +21 -5
  44. package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  45. package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
  46. package/lib/bridge/generic-alpaca/utils.js +6 -5
  47. package/lib/bridge/generic-alpaca/utils.js.map +1 -1
  48. package/lib/bridge/generic-alpaca/utils.test.d.ts.map +1 -0
  49. package/lib/bridge/generic-alpaca/utils.test.js +123 -0
  50. package/lib/bridge/generic-alpaca/utils.test.js.map +1 -0
  51. package/lib/e2e/enum/DeviceLabels.d.ts +9 -6
  52. package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
  53. package/lib/e2e/enum/DeviceLabels.js +8 -5
  54. package/lib/e2e/enum/DeviceLabels.js.map +1 -1
  55. package/lib/e2e/families/tezos.d.ts.map +1 -1
  56. package/lib/e2e/families/tezos.js +2 -0
  57. package/lib/e2e/families/tezos.js.map +1 -1
  58. package/lib/e2e/index.d.ts +6 -6
  59. package/lib/e2e/index.d.ts.map +1 -1
  60. package/lib/e2e/speculos.d.ts +2 -1
  61. package/lib/e2e/speculos.d.ts.map +1 -1
  62. package/lib/e2e/speculos.js +25 -17
  63. package/lib/e2e/speculos.js.map +1 -1
  64. package/lib/env.react.d.ts +1 -1
  65. package/lib/env.react.d.ts.map +1 -1
  66. package/lib/exchange/platform/transfer/completeExchange.d.ts.map +1 -1
  67. package/lib/exchange/platform/transfer/completeExchange.js +3 -5
  68. package/lib/exchange/platform/transfer/completeExchange.js.map +1 -1
  69. package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
  70. package/lib/exchange/swap/completeExchange.js +5 -2
  71. package/lib/exchange/swap/completeExchange.js.map +1 -1
  72. package/lib/exchange/swap/initSwap.d.ts.map +1 -1
  73. package/lib/exchange/swap/initSwap.js +5 -2
  74. package/lib/exchange/swap/initSwap.js.map +1 -1
  75. package/lib/families/canton/config.d.ts.map +1 -1
  76. package/lib/families/canton/config.js +4 -0
  77. package/lib/families/canton/config.js.map +1 -1
  78. package/lib/families/solana/setup.d.ts.map +1 -1
  79. package/lib/families/solana/setup.js +9 -0
  80. package/lib/families/solana/setup.js.map +1 -1
  81. package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
  82. package/lib/featureFlags/defaultFeatures.js +1 -2
  83. package/lib/featureFlags/defaultFeatures.js.map +1 -1
  84. package/lib/featureFlags/useFeature.d.ts +1 -1
  85. package/lib/featureFlags/useFeature.d.ts.map +1 -1
  86. package/lib/modularDrawer/__mocks__/dada.mock.d.ts +3336 -0
  87. package/lib/modularDrawer/__mocks__/dada.mock.d.ts.map +1 -0
  88. package/lib/modularDrawer/__mocks__/dada.mock.js +3879 -0
  89. package/lib/modularDrawer/__mocks__/dada.mock.js.map +1 -0
  90. package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts +16 -0
  91. package/lib/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -0
  92. package/lib/modularDrawer/data/entities/interestRateSelectors.js +21 -0
  93. package/lib/modularDrawer/data/entities/interestRateSelectors.js.map +1 -0
  94. package/lib/modularDrawer/data/state-manager/api.d.ts +727 -37
  95. package/lib/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  96. package/lib/modularDrawer/data/state-manager/api.js +38 -17
  97. package/lib/modularDrawer/data/state-manager/api.js.map +1 -1
  98. package/lib/modularDrawer/data/state-manager/types.d.ts +24 -0
  99. package/lib/modularDrawer/data/state-manager/types.d.ts.map +1 -0
  100. package/lib/modularDrawer/data/state-manager/types.js +13 -0
  101. package/lib/modularDrawer/data/state-manager/types.js.map +1 -0
  102. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js +134 -78
  103. package/lib/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -1
  104. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +3 -3
  105. package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
  106. package/lib/modularDrawer/hooks/modules/useLeftApyModule.js +43 -10
  107. package/lib/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
  108. package/lib/modularDrawer/hooks/{modules/useAssetAccountCounts.d.ts → useAssetAccountCounts.d.ts} +1 -1
  109. package/lib/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +1 -0
  110. package/lib/modularDrawer/hooks/{modules/useAssetAccountCounts.js → useAssetAccountCounts.js} +1 -1
  111. package/lib/modularDrawer/hooks/useAssetAccountCounts.js.map +1 -0
  112. package/lib/modularDrawer/hooks/useAssetsData.d.ts +10 -6
  113. package/lib/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  114. package/lib/modularDrawer/hooks/useAssetsData.js +40 -17
  115. package/lib/modularDrawer/hooks/useAssetsData.js.map +1 -1
  116. package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts +3 -0
  117. package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts.map +1 -0
  118. package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.js +23 -0
  119. package/lib/modularDrawer/hooks/useInterestRatesByCurrencies.js.map +1 -0
  120. package/lib/modularDrawer/hooks/useLeftAccounts.d.ts +13 -0
  121. package/lib/modularDrawer/hooks/useLeftAccounts.d.ts.map +1 -0
  122. package/lib/modularDrawer/hooks/useLeftAccounts.js +15 -0
  123. package/lib/modularDrawer/hooks/useLeftAccounts.js.map +1 -0
  124. package/lib/modularDrawer/hooks/useLeftAccountsApy.d.ts +4 -0
  125. package/lib/modularDrawer/hooks/useLeftAccountsApy.d.ts.map +1 -0
  126. package/lib/modularDrawer/hooks/useLeftAccountsApy.js +30 -0
  127. package/lib/modularDrawer/hooks/useLeftAccountsApy.js.map +1 -0
  128. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +57 -0
  129. package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -0
  130. package/lib/modularDrawer/hooks/useRightBalanceAsset.js +87 -0
  131. package/lib/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -0
  132. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +63 -0
  133. package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -0
  134. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js +66 -0
  135. package/lib/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -0
  136. package/lib/modularDrawer/modules/createAssetConfiguration.d.ts +4 -0
  137. package/lib/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -0
  138. package/lib/modularDrawer/modules/createAssetConfiguration.js +41 -0
  139. package/lib/modularDrawer/modules/createAssetConfiguration.js.map +1 -0
  140. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts +6 -0
  141. package/lib/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -0
  142. package/lib/modularDrawer/modules/createNetworkConfiguration.js +54 -0
  143. package/lib/modularDrawer/modules/createNetworkConfiguration.js.map +1 -0
  144. package/lib/modularDrawer/utils/__tests__/getInterestRateForAsset.test.d.ts +2 -0
  145. package/lib/modularDrawer/utils/__tests__/getInterestRateForAsset.test.d.ts.map +1 -0
  146. package/lib/modularDrawer/utils/__tests__/getInterestRateForAsset.test.js +36 -0
  147. package/lib/modularDrawer/utils/__tests__/getInterestRateForAsset.test.js.map +1 -0
  148. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
  149. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
  150. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js +17 -0
  151. package/lib/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
  152. package/lib/modularDrawer/utils/getInterestRateForAsset.d.ts +13 -0
  153. package/lib/modularDrawer/utils/getInterestRateForAsset.d.ts.map +1 -0
  154. package/lib/modularDrawer/utils/getInterestRateForAsset.js +20 -0
  155. package/lib/modularDrawer/utils/getInterestRateForAsset.js.map +1 -0
  156. package/lib/modularDrawer/utils/getLoadingStatus.d.ts +9 -0
  157. package/lib/modularDrawer/utils/getLoadingStatus.d.ts.map +1 -0
  158. package/lib/modularDrawer/utils/getLoadingStatus.js +18 -0
  159. package/lib/modularDrawer/utils/getLoadingStatus.js.map +1 -0
  160. package/lib/modularDrawer/utils/sortByBalance.d.ts +6 -0
  161. package/lib/modularDrawer/utils/sortByBalance.d.ts.map +1 -0
  162. package/lib/modularDrawer/utils/sortByBalance.js +32 -0
  163. package/lib/modularDrawer/utils/sortByBalance.js.map +1 -0
  164. package/lib/modularDrawer/utils/type.d.ts +90 -1
  165. package/lib/modularDrawer/utils/type.d.ts.map +1 -1
  166. package/lib/wallet-api/Exchange/server.js +2 -2
  167. package/lib/wallet-api/Exchange/server.js.map +1 -1
  168. package/lib/wallet-api/ModularDrawer/types.d.ts +6 -6
  169. package/lib/wallet-api/ModularDrawer/types.d.ts.map +1 -1
  170. package/lib/wallet-api/ModularDrawer/types.js +1 -1
  171. package/lib/wallet-api/ModularDrawer/types.js.map +1 -1
  172. package/lib/wallet-api/react.d.ts +2 -0
  173. package/lib/wallet-api/react.d.ts.map +1 -1
  174. package/lib/wallet-api/react.js +3 -1
  175. package/lib/wallet-api/react.js.map +1 -1
  176. package/lib-es/bridge/crypto-assets/cal-integration.d.ts +4 -0
  177. package/lib-es/bridge/crypto-assets/cal-integration.d.ts.map +1 -0
  178. package/lib-es/bridge/crypto-assets/cal-integration.js +21 -0
  179. package/lib-es/bridge/crypto-assets/cal-integration.js.map +1 -0
  180. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts +2 -0
  181. package/lib-es/bridge/crypto-assets/cal-integration.test.d.ts.map +1 -0
  182. package/lib-es/bridge/crypto-assets/cal-integration.test.js +43 -0
  183. package/lib-es/bridge/crypto-assets/cal-integration.test.js.map +1 -0
  184. package/lib-es/bridge/crypto-assets/cal-store.d.ts +14 -0
  185. package/lib-es/bridge/crypto-assets/cal-store.d.ts.map +1 -0
  186. package/lib-es/bridge/crypto-assets/cal-store.js +54 -0
  187. package/lib-es/bridge/crypto-assets/cal-store.js.map +1 -0
  188. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts +2 -0
  189. package/lib-es/bridge/crypto-assets/cal-store.test.d.ts.map +1 -0
  190. package/lib-es/bridge/crypto-assets/cal-store.test.js +68 -0
  191. package/lib-es/bridge/crypto-assets/cal-store.test.js.map +1 -0
  192. package/lib-es/bridge/crypto-assets/index.d.ts.map +1 -1
  193. package/lib-es/bridge/crypto-assets/index.js +4 -0
  194. package/lib-es/bridge/crypto-assets/index.js.map +1 -1
  195. package/lib-es/bridge/crypto-assets/index.test.js +36 -0
  196. package/lib-es/bridge/crypto-assets/index.test.js.map +1 -1
  197. package/lib-es/bridge/generic-alpaca/alpaca/index.d.ts.map +1 -1
  198. package/lib-es/bridge/generic-alpaca/alpaca/index.js +6 -1
  199. package/lib-es/bridge/generic-alpaca/alpaca/index.js.map +1 -1
  200. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.d.ts +2 -0
  201. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.d.ts.map +1 -0
  202. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js +64 -0
  203. package/lib-es/bridge/generic-alpaca/alpaca/index.unit.test.js.map +1 -0
  204. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js +1 -1
  205. package/lib-es/bridge/generic-alpaca/alpaca/network/network-alpaca.js.map +1 -1
  206. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts +2 -3
  207. package/lib-es/bridge/generic-alpaca/buildSubAccounts.d.ts.map +1 -1
  208. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js +4 -12
  209. package/lib-es/bridge/generic-alpaca/buildSubAccounts.js.map +1 -1
  210. package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
  211. package/lib-es/bridge/generic-alpaca/getAccountShape.js +3 -3
  212. package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
  213. package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
  214. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +0 -1
  215. package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
  216. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts +14 -3
  217. package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
  218. package/lib-es/bridge/generic-alpaca/prepareTransaction.js +21 -5
  219. package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
  220. package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
  221. package/lib-es/bridge/generic-alpaca/utils.js +6 -5
  222. package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
  223. package/lib-es/bridge/generic-alpaca/utils.test.d.ts.map +1 -0
  224. package/lib-es/bridge/generic-alpaca/utils.test.js +118 -0
  225. package/lib-es/bridge/generic-alpaca/utils.test.js.map +1 -0
  226. package/lib-es/e2e/enum/DeviceLabels.d.ts +9 -6
  227. package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
  228. package/lib-es/e2e/enum/DeviceLabels.js +8 -5
  229. package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
  230. package/lib-es/e2e/families/tezos.d.ts.map +1 -1
  231. package/lib-es/e2e/families/tezos.js +2 -0
  232. package/lib-es/e2e/families/tezos.js.map +1 -1
  233. package/lib-es/e2e/index.d.ts +6 -6
  234. package/lib-es/e2e/index.d.ts.map +1 -1
  235. package/lib-es/e2e/speculos.d.ts +2 -1
  236. package/lib-es/e2e/speculos.d.ts.map +1 -1
  237. package/lib-es/e2e/speculos.js +23 -16
  238. package/lib-es/e2e/speculos.js.map +1 -1
  239. package/lib-es/env.react.d.ts +1 -1
  240. package/lib-es/env.react.d.ts.map +1 -1
  241. package/lib-es/exchange/platform/transfer/completeExchange.d.ts.map +1 -1
  242. package/lib-es/exchange/platform/transfer/completeExchange.js +3 -2
  243. package/lib-es/exchange/platform/transfer/completeExchange.js.map +1 -1
  244. package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
  245. package/lib-es/exchange/swap/completeExchange.js +5 -2
  246. package/lib-es/exchange/swap/completeExchange.js.map +1 -1
  247. package/lib-es/exchange/swap/initSwap.d.ts.map +1 -1
  248. package/lib-es/exchange/swap/initSwap.js +5 -2
  249. package/lib-es/exchange/swap/initSwap.js.map +1 -1
  250. package/lib-es/families/canton/config.d.ts.map +1 -1
  251. package/lib-es/families/canton/config.js +4 -0
  252. package/lib-es/families/canton/config.js.map +1 -1
  253. package/lib-es/families/solana/setup.d.ts.map +1 -1
  254. package/lib-es/families/solana/setup.js +9 -0
  255. package/lib-es/families/solana/setup.js.map +1 -1
  256. package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
  257. package/lib-es/featureFlags/defaultFeatures.js +1 -2
  258. package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
  259. package/lib-es/featureFlags/useFeature.d.ts +1 -1
  260. package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
  261. package/lib-es/modularDrawer/__mocks__/dada.mock.d.ts +3336 -0
  262. package/lib-es/modularDrawer/__mocks__/dada.mock.d.ts.map +1 -0
  263. package/lib-es/modularDrawer/__mocks__/dada.mock.js +3876 -0
  264. package/lib-es/modularDrawer/__mocks__/dada.mock.js.map +1 -0
  265. package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts +16 -0
  266. package/lib-es/modularDrawer/data/entities/interestRateSelectors.d.ts.map +1 -0
  267. package/lib-es/modularDrawer/data/entities/interestRateSelectors.js +18 -0
  268. package/lib-es/modularDrawer/data/entities/interestRateSelectors.js.map +1 -0
  269. package/lib-es/modularDrawer/data/state-manager/api.d.ts +727 -37
  270. package/lib-es/modularDrawer/data/state-manager/api.d.ts.map +1 -1
  271. package/lib-es/modularDrawer/data/state-manager/api.js +35 -14
  272. package/lib-es/modularDrawer/data/state-manager/api.js.map +1 -1
  273. package/lib-es/modularDrawer/data/state-manager/types.d.ts +24 -0
  274. package/lib-es/modularDrawer/data/state-manager/types.d.ts.map +1 -0
  275. package/lib-es/modularDrawer/data/state-manager/types.js +10 -0
  276. package/lib-es/modularDrawer/data/state-manager/types.js.map +1 -0
  277. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js +135 -79
  278. package/lib-es/modularDrawer/hooks/__test__/useAssetsData.test.js.map +1 -1
  279. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts +3 -3
  280. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
  281. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js +21 -8
  282. package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.js.map +1 -1
  283. package/lib-es/modularDrawer/hooks/{modules/useAssetAccountCounts.d.ts → useAssetAccountCounts.d.ts} +1 -1
  284. package/lib-es/modularDrawer/hooks/useAssetAccountCounts.d.ts.map +1 -0
  285. package/lib-es/modularDrawer/hooks/{modules/useAssetAccountCounts.js → useAssetAccountCounts.js} +1 -1
  286. package/lib-es/modularDrawer/hooks/useAssetAccountCounts.js.map +1 -0
  287. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts +10 -6
  288. package/lib-es/modularDrawer/hooks/useAssetsData.d.ts.map +1 -1
  289. package/lib-es/modularDrawer/hooks/useAssetsData.js +42 -19
  290. package/lib-es/modularDrawer/hooks/useAssetsData.js.map +1 -1
  291. package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts +3 -0
  292. package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.d.ts.map +1 -0
  293. package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.js +19 -0
  294. package/lib-es/modularDrawer/hooks/useInterestRatesByCurrencies.js.map +1 -0
  295. package/lib-es/modularDrawer/hooks/useLeftAccounts.d.ts +13 -0
  296. package/lib-es/modularDrawer/hooks/useLeftAccounts.d.ts.map +1 -0
  297. package/lib-es/modularDrawer/hooks/useLeftAccounts.js +11 -0
  298. package/lib-es/modularDrawer/hooks/useLeftAccounts.js.map +1 -0
  299. package/lib-es/modularDrawer/hooks/useLeftAccountsApy.d.ts +4 -0
  300. package/lib-es/modularDrawer/hooks/useLeftAccountsApy.d.ts.map +1 -0
  301. package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js +26 -0
  302. package/lib-es/modularDrawer/hooks/useLeftAccountsApy.js.map +1 -0
  303. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +57 -0
  304. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -0
  305. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js +83 -0
  306. package/lib-es/modularDrawer/hooks/useRightBalanceAsset.js.map +1 -0
  307. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +63 -0
  308. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -0
  309. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js +62 -0
  310. package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.js.map +1 -0
  311. package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts +4 -0
  312. package/lib-es/modularDrawer/modules/createAssetConfiguration.d.ts.map +1 -0
  313. package/lib-es/modularDrawer/modules/createAssetConfiguration.js +39 -0
  314. package/lib-es/modularDrawer/modules/createAssetConfiguration.js.map +1 -0
  315. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts +6 -0
  316. package/lib-es/modularDrawer/modules/createNetworkConfiguration.d.ts.map +1 -0
  317. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js +48 -0
  318. package/lib-es/modularDrawer/modules/createNetworkConfiguration.js.map +1 -0
  319. package/lib-es/modularDrawer/utils/__tests__/getInterestRateForAsset.test.d.ts +2 -0
  320. package/lib-es/modularDrawer/utils/__tests__/getInterestRateForAsset.test.d.ts.map +1 -0
  321. package/lib-es/modularDrawer/utils/__tests__/getInterestRateForAsset.test.js +34 -0
  322. package/lib-es/modularDrawer/utils/__tests__/getInterestRateForAsset.test.js.map +1 -0
  323. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts +9 -0
  324. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.d.ts.map +1 -0
  325. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js +13 -0
  326. package/lib-es/modularDrawer/utils/buildProviderCurrenciesMap.js.map +1 -0
  327. package/lib-es/modularDrawer/utils/getInterestRateForAsset.d.ts +13 -0
  328. package/lib-es/modularDrawer/utils/getInterestRateForAsset.d.ts.map +1 -0
  329. package/lib-es/modularDrawer/utils/getInterestRateForAsset.js +16 -0
  330. package/lib-es/modularDrawer/utils/getInterestRateForAsset.js.map +1 -0
  331. package/lib-es/modularDrawer/utils/getLoadingStatus.d.ts +9 -0
  332. package/lib-es/modularDrawer/utils/getLoadingStatus.d.ts.map +1 -0
  333. package/lib-es/modularDrawer/utils/getLoadingStatus.js +14 -0
  334. package/lib-es/modularDrawer/utils/getLoadingStatus.js.map +1 -0
  335. package/lib-es/modularDrawer/utils/sortByBalance.d.ts +6 -0
  336. package/lib-es/modularDrawer/utils/sortByBalance.d.ts.map +1 -0
  337. package/lib-es/modularDrawer/utils/sortByBalance.js +25 -0
  338. package/lib-es/modularDrawer/utils/sortByBalance.js.map +1 -0
  339. package/lib-es/modularDrawer/utils/type.d.ts +90 -1
  340. package/lib-es/modularDrawer/utils/type.d.ts.map +1 -1
  341. package/lib-es/wallet-api/Exchange/server.js +2 -2
  342. package/lib-es/wallet-api/Exchange/server.js.map +1 -1
  343. package/lib-es/wallet-api/ModularDrawer/types.d.ts +6 -6
  344. package/lib-es/wallet-api/ModularDrawer/types.d.ts.map +1 -1
  345. package/lib-es/wallet-api/ModularDrawer/types.js +1 -1
  346. package/lib-es/wallet-api/ModularDrawer/types.js.map +1 -1
  347. package/lib-es/wallet-api/react.d.ts +2 -0
  348. package/lib-es/wallet-api/react.d.ts.map +1 -1
  349. package/lib-es/wallet-api/react.js +3 -1
  350. package/lib-es/wallet-api/react.js.map +1 -1
  351. package/package.json +41 -41
  352. package/src/bridge/crypto-assets/cal-integration.test.ts +53 -0
  353. package/src/bridge/crypto-assets/cal-integration.ts +23 -0
  354. package/src/bridge/crypto-assets/cal-store.test.ts +93 -0
  355. package/src/bridge/crypto-assets/cal-store.ts +63 -0
  356. package/src/bridge/crypto-assets/index.test.ts +47 -0
  357. package/src/bridge/crypto-assets/index.ts +5 -0
  358. package/src/bridge/generic-alpaca/alpaca/index.ts +14 -1
  359. package/src/bridge/generic-alpaca/alpaca/index.unit.test.ts +78 -0
  360. package/src/bridge/generic-alpaca/alpaca/network/network-alpaca.ts +1 -1
  361. package/src/bridge/generic-alpaca/buildSubAccounts.ts +5 -14
  362. package/src/bridge/generic-alpaca/getAccountShape.ts +3 -4
  363. package/src/bridge/generic-alpaca/getTransactionStatus.ts +0 -1
  364. package/src/bridge/generic-alpaca/prepareTransaction.ts +44 -17
  365. package/src/bridge/generic-alpaca/utils.test.ts +133 -0
  366. package/src/bridge/generic-alpaca/utils.ts +7 -5
  367. package/src/e2e/enum/DeviceLabels.ts +8 -5
  368. package/src/e2e/families/tezos.ts +2 -0
  369. package/src/e2e/speculos.ts +24 -17
  370. package/src/exchange/platform/transfer/completeExchange.ts +3 -2
  371. package/src/exchange/swap/completeExchange.ts +5 -2
  372. package/src/exchange/swap/initSwap.ts +5 -4
  373. package/src/families/canton/config.ts +5 -0
  374. package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +27 -7
  375. package/src/families/solana/setup.ts +9 -0
  376. package/src/featureFlags/defaultFeatures.ts +1 -2
  377. package/src/modularDrawer/__mocks__/dada.mock.ts +3890 -0
  378. package/src/modularDrawer/data/entities/interestRateSelectors.ts +39 -0
  379. package/src/modularDrawer/data/state-manager/api.ts +42 -27
  380. package/src/modularDrawer/data/state-manager/types.ts +28 -0
  381. package/src/modularDrawer/hooks/__test__/useAssetsData.test.ts +141 -80
  382. package/src/modularDrawer/hooks/modules/useLeftApyModule.tsx +27 -9
  383. package/src/modularDrawer/hooks/{modules/useAssetAccountCounts.tsx → useAssetAccountCounts.tsx} +2 -2
  384. package/src/modularDrawer/hooks/useAssetsData.ts +59 -22
  385. package/src/modularDrawer/hooks/useInterestRatesByCurrencies.ts +23 -0
  386. package/src/modularDrawer/hooks/useLeftAccounts.tsx +23 -0
  387. package/src/modularDrawer/hooks/useLeftAccountsApy.tsx +44 -0
  388. package/src/modularDrawer/hooks/useRightBalanceAsset.tsx +140 -0
  389. package/src/modularDrawer/hooks/useRightBalanceNetwork.tsx +116 -0
  390. package/src/modularDrawer/modules/createAssetConfiguration.ts +62 -0
  391. package/src/modularDrawer/modules/createNetworkConfiguration.ts +87 -0
  392. package/src/modularDrawer/utils/__tests__/getInterestRateForAsset.test.ts +58 -0
  393. package/src/modularDrawer/utils/buildProviderCurrenciesMap.tsx +25 -0
  394. package/src/modularDrawer/utils/getInterestRateForAsset.ts +32 -0
  395. package/src/modularDrawer/utils/getLoadingStatus.ts +24 -0
  396. package/src/modularDrawer/utils/sortByBalance.tsx +32 -0
  397. package/src/modularDrawer/utils/type.ts +98 -0
  398. package/src/wallet-api/Exchange/server.ts +2 -2
  399. package/src/wallet-api/ModularDrawer/types.ts +1 -1
  400. package/src/wallet-api/react.ts +5 -1
  401. package/lib/bridge/generic-alpaca/tests/utils.test.d.ts.map +0 -1
  402. package/lib/bridge/generic-alpaca/tests/utils.test.js +0 -20
  403. package/lib/bridge/generic-alpaca/tests/utils.test.js.map +0 -1
  404. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +0 -1
  405. package/lib/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +0 -1
  406. package/lib/modularDrawer/types.d.ts +0 -2
  407. package/lib/modularDrawer/types.d.ts.map +0 -1
  408. package/lib/modularDrawer/types.js +0 -3
  409. package/lib/modularDrawer/types.js.map +0 -1
  410. package/lib-es/bridge/generic-alpaca/tests/utils.test.d.ts.map +0 -1
  411. package/lib-es/bridge/generic-alpaca/tests/utils.test.js +0 -18
  412. package/lib-es/bridge/generic-alpaca/tests/utils.test.js.map +0 -1
  413. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.d.ts.map +0 -1
  414. package/lib-es/modularDrawer/hooks/modules/useAssetAccountCounts.js.map +0 -1
  415. package/lib-es/modularDrawer/types.d.ts +0 -2
  416. package/lib-es/modularDrawer/types.d.ts.map +0 -1
  417. package/lib-es/modularDrawer/types.js +0 -2
  418. package/lib-es/modularDrawer/types.js.map +0 -1
  419. package/src/bridge/generic-alpaca/tests/utils.test.ts +0 -19
  420. package/src/modularDrawer/types.ts +0 -1
  421. /package/lib/bridge/generic-alpaca/{tests/utils.test.d.ts → utils.test.d.ts} +0 -0
  422. /package/lib-es/bridge/generic-alpaca/{tests/utils.test.d.ts → utils.test.d.ts} +0 -0
@@ -3,28 +3,51 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useAssetsData = void 0;
4
4
  const react_1 = require("react");
5
5
  const api_1 = require("../data/state-manager/api");
6
- function useAssetsData({ search, currencyIds, }) {
7
- const [cursor, setCursor] = (0, react_1.useState)(undefined);
8
- const { data, error, isLoading, isSuccess } = (0, api_1.useGetAssetsDataQuery)({
9
- cursor,
6
+ const emptyData = () => ({
7
+ cryptoAssets: {},
8
+ networks: {},
9
+ cryptoOrTokenCurrencies: {},
10
+ interestRates: {},
11
+ markets: {},
12
+ currenciesOrder: {
13
+ currenciesIds: [],
14
+ metaCurrencyIds: [],
15
+ key: "",
16
+ order: "",
17
+ },
18
+ pagination: { nextCursor: "" },
19
+ });
20
+ function useAssetsData({ search, currencyIds, useCase, areCurrenciesFiltered, product, version, }) {
21
+ const { data, isLoading, error, fetchNextPage, isSuccess, refetch } = (0, api_1.useGetAssetsDataInfiniteQuery)({
10
22
  search,
11
- currencyIds,
23
+ useCase,
24
+ currencyIds: areCurrenciesFiltered ? currencyIds : undefined,
25
+ product,
26
+ version,
12
27
  });
13
- const loadNext = (0, react_1.useCallback)(() => {
14
- const nextCursor = data?.pagination?.nextCursor;
15
- if (nextCursor) {
16
- setCursor(nextCursor);
17
- }
18
- }, [data?.pagination?.nextCursor]);
19
- const hasMore = Boolean(data?.pagination?.nextCursor);
28
+ const joinedPages = (0, react_1.useMemo)(() => {
29
+ return data?.pages.reduce((acc, page) => {
30
+ Object.assign(acc.cryptoAssets, page.cryptoAssets);
31
+ Object.assign(acc.networks, page.networks);
32
+ Object.assign(acc.cryptoOrTokenCurrencies, page.cryptoOrTokenCurrencies);
33
+ Object.assign(acc.interestRates, page.interestRates);
34
+ Object.assign(acc.markets, page.markets);
35
+ acc.currenciesOrder.currenciesIds.push(...page.currenciesOrder.currenciesIds);
36
+ acc.currenciesOrder.metaCurrencyIds.push(...page.currenciesOrder.metaCurrencyIds);
37
+ acc.currenciesOrder.key = page.currenciesOrder.key;
38
+ acc.currenciesOrder.order = page.currenciesOrder.order;
39
+ acc.pagination.nextCursor = page.pagination.nextCursor;
40
+ return acc;
41
+ }, emptyData());
42
+ }, [data]);
43
+ const hasMore = Boolean(joinedPages?.pagination.nextCursor);
20
44
  return {
21
- data,
22
- error,
45
+ data: joinedPages,
23
46
  isLoading,
47
+ error,
48
+ loadNext: hasMore ? fetchNextPage : undefined,
24
49
  isSuccess,
25
- hasMore,
26
- cursor,
27
- loadNext,
50
+ refetch,
28
51
  };
29
52
  }
30
53
  exports.useAssetsData = useAssetsData;
@@ -1 +1 @@
1
- {"version":3,"file":"useAssetsData.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useAssetsData.ts"],"names":[],"mappings":";;;AAAA,iCAA8C;AAC9C,mDAAkE;AAElE,SAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,WAAW,GAIZ;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAqB,SAAS,CAAC,CAAC;IACpE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAA,2BAAqB,EAAC;QAClE,MAAM;QACN,MAAM;QACN,WAAW;KACZ,CAAC,CAAC;IAEH,MAAM,QAAQ,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAChC,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC;QAChD,IAAI,UAAU,EAAE;YACd,SAAS,CAAC,UAAU,CAAC,CAAC;SACvB;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IAEnC,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEtD,OAAO;QACL,IAAI;QACJ,KAAK;QACL,SAAS;QACT,SAAS;QACT,OAAO;QACP,MAAM;QACN,QAAQ;KACT,CAAC;AACJ,CAAC;AAhCD,sCAgCC"}
1
+ {"version":3,"file":"useAssetsData.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useAssetsData.ts"],"names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C,CAAC;YACrD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAEzC,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;YAC9E,GAAG,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;YAElF,GAAG,CAAC,eAAe,CAAC,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC;YACnD,GAAG,CAAC,eAAe,CAAC,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;YACvD,GAAG,CAAC,UAAU,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;YAEvD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAClB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAE5D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,SAAS;QACT,KAAK;QACL,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;QAC7C,SAAS;QACT,OAAO;KACR,CAAC;AACJ,CAAC;AArDD,sCAqDC"}
@@ -0,0 +1,3 @@
1
+ import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
2
+ export declare const useInterestRatesByCurrencies: (currencies: CryptoOrTokenCurrency[]) => any;
3
+ //# sourceMappingURL=useInterestRatesByCurrencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInterestRatesByCurrencies.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useInterestRatesByCurrencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAOrE,eAAO,MAAM,4BAA4B,eAAgB,qBAAqB,EAAE,QAc/E,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useInterestRatesByCurrencies = void 0;
4
+ const react_redux_1 = require("react-redux");
5
+ const interestRateSelectors_1 = require("../data/entities/interestRateSelectors");
6
+ const isValidApyType = (type) => type === "NRR" || type === "APY" || type === "APR";
7
+ const useInterestRatesByCurrencies = (currencies) => {
8
+ return (0, react_redux_1.useSelector)(state => {
9
+ const rates = {};
10
+ currencies.forEach(currency => {
11
+ const apiRate = (0, interestRateSelectors_1.selectInterestRateByCurrency)(state, currency.id);
12
+ if (apiRate && isValidApyType(apiRate.type)) {
13
+ rates[currency.id] = {
14
+ value: apiRate.rate,
15
+ type: apiRate.type,
16
+ };
17
+ }
18
+ });
19
+ return rates;
20
+ });
21
+ };
22
+ exports.useInterestRatesByCurrencies = useInterestRatesByCurrencies;
23
+ //# sourceMappingURL=useInterestRatesByCurrencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInterestRatesByCurrencies.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useInterestRatesByCurrencies.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,kFAAsF;AAGtF,MAAM,cAAc,GAAG,CAAC,IAAY,EAAmB,EAAE,CACvD,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,CAAC;AAE9C,MAAM,4BAA4B,GAAG,CAAC,UAAmC,EAAE,EAAE;IAClF,OAAO,IAAA,yBAAW,EAAC,KAAK,CAAC,EAAE;QACzB,MAAM,KAAK,GAAiE,EAAE,CAAC;QAC/E,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC5B,MAAM,OAAO,GAAG,IAAA,oDAA4B,EAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;YACjE,IAAI,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC3C,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG;oBACnB,KAAK,EAAE,OAAO,CAAC,IAAI;oBACnB,IAAI,EAAE,OAAO,CAAC,IAAI;iBACnB,CAAC;aACH;QACH,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAdW,QAAA,4BAA4B,gCAcvC"}
@@ -0,0 +1,13 @@
1
+ import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
2
+ import { ReactNode } from "react";
3
+ import { AccountModuleParams, AccountDataItem } from "../utils/type";
4
+ export declare const createUseLeftAccountsModule: ({ useAccountData, accountsCount, }: {
5
+ useAccountData: (params: AccountModuleParams) => AccountDataItem[];
6
+ accountsCount: (args: {
7
+ label: string;
8
+ }) => ReactNode;
9
+ }) => (params: AccountModuleParams) => Array<CryptoOrTokenCurrency & {
10
+ leftElement?: ReactNode;
11
+ count: number;
12
+ }>;
13
+ //# sourceMappingURL=useLeftAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeftAccounts.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useLeftAccounts.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErE,eAAO,MAAM,2BAA2B;6BAIb,mBAAmB,KAAK,eAAe,EAAE;0BAC5C;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS;eAG3C,mBAAmB,KAC1B,MAAM,qBAAqB,GAAG;IAAE,WAAW,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAS5E,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createUseLeftAccountsModule = void 0;
4
+ const createUseLeftAccountsModule = ({ useAccountData, accountsCount, }) => {
5
+ return function useLeftAccountsModule(params) {
6
+ const accountData = useAccountData(params);
7
+ return accountData.map(({ asset, label, count }) => ({
8
+ ...asset,
9
+ leftElement: count > 0 ? accountsCount({ label }) : undefined,
10
+ count,
11
+ }));
12
+ };
13
+ };
14
+ exports.createUseLeftAccountsModule = createUseLeftAccountsModule;
15
+ //# sourceMappingURL=useLeftAccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeftAccounts.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useLeftAccounts.tsx"],"names":[],"mappings":";;;AAIO,MAAM,2BAA2B,GAAG,CAAC,EAC1C,cAAc,EACd,aAAa,GAId,EAAE,EAAE;IACH,OAAO,SAAS,qBAAqB,CACnC,MAA2B;QAE3B,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QAE3C,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;YACnD,GAAG,KAAK;YACR,WAAW,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;YAC7D,KAAK;SACN,CAAC,CAAC,CAAC;IACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,2BAA2B,+BAkBtC"}
@@ -0,0 +1,4 @@
1
+ import { AccountDataItem, AccountModuleParams, CreateAccountsCountAndApy, NetworkWithCount } from "../utils/type";
2
+ import { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
3
+ export declare function useLeftAccountsApyModule(params: AccountModuleParams, useAccountData: (params: AccountModuleParams) => AccountDataItem[], accountsCountAndApy: CreateAccountsCountAndApy, networks: CryptoOrTokenCurrency[]): NetworkWithCount[];
4
+ //# sourceMappingURL=useLeftAccountsApy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeftAccountsApy.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useLeftAccountsApy.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,cAAc,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,eAAe,EAAE,EAClE,mBAAmB,EAAE,yBAAyB,EAC9C,QAAQ,EAAE,qBAAqB,EAAE,GAChC,gBAAgB,EAAE,CA4BpB"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLeftAccountsApyModule = void 0;
4
+ const useInterestRatesByCurrencies_1 = require("../hooks/useInterestRatesByCurrencies");
5
+ const getInterestRateForAsset_1 = require("../utils/getInterestRateForAsset");
6
+ function useLeftAccountsApyModule(params, useAccountData, accountsCountAndApy, networks) {
7
+ const accountData = useAccountData(params);
8
+ const interestRates = (0, useInterestRatesByCurrencies_1.useInterestRatesByCurrencies)(networks);
9
+ // Map each account to its APY info using the shared utility
10
+ return accountData.map(({ asset, label, count }) => {
11
+ const { interestRate, interestRatePercentageRounded } = (0, getInterestRateForAsset_1.getInterestRateForAsset)(asset, interestRates, networks);
12
+ if ((!interestRate || interestRatePercentageRounded <= 0) && count <= 0) {
13
+ return {
14
+ ...asset,
15
+ count,
16
+ };
17
+ }
18
+ return {
19
+ ...asset,
20
+ leftElement: accountsCountAndApy({
21
+ label: count > 0 ? label : undefined,
22
+ value: interestRatePercentageRounded,
23
+ type: interestRate?.type,
24
+ }),
25
+ count,
26
+ };
27
+ });
28
+ }
29
+ exports.useLeftAccountsApyModule = useLeftAccountsApyModule;
30
+ //# sourceMappingURL=useLeftAccountsApy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeftAccountsApy.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useLeftAccountsApy.tsx"],"names":[],"mappings":";;;AAMA,wFAAqF;AAErF,8EAA2E;AAE3E,SAAgB,wBAAwB,CACtC,MAA2B,EAC3B,cAAkE,EAClE,mBAA8C,EAC9C,QAAiC;IAEjC,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IAC3C,MAAM,aAAa,GAAG,IAAA,2DAA4B,EAAC,QAAQ,CAAC,CAAC;IAE7D,4DAA4D;IAC5D,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;QACjD,MAAM,EAAE,YAAY,EAAE,6BAA6B,EAAE,GAAG,IAAA,iDAAuB,EAC7E,KAAK,EACL,aAAa,EACb,QAAQ,CACT,CAAC;QAEF,IAAI,CAAC,CAAC,YAAY,IAAI,6BAA6B,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE;YACvE,OAAO;gBACL,GAAG,KAAK;gBACR,KAAK;aACN,CAAC;SACH;QACD,OAAO;YACL,GAAG,KAAK;YACR,WAAW,EAAE,mBAAmB,CAAC;gBAC/B,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;gBACpC,KAAK,EAAE,6BAA6B;gBACpC,IAAI,EAAE,YAAY,EAAE,IAAI;aACzB,CAAC;YACF,KAAK;SACN,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAjCD,4DAiCC"}
@@ -0,0 +1,57 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
3
+ import { UseBalanceDeps } from "../utils/type";
4
+ import { CurrenciesByProviderId } from "../../deposit/type";
5
+ export type AssetDeps = {
6
+ useBalanceDeps: UseBalanceDeps;
7
+ balanceItem: (asset: {
8
+ fiatValue?: string;
9
+ balance?: string;
10
+ }) => ReactNode;
11
+ };
12
+ export declare function createUseRightBalanceAsset({ useBalanceDeps, balanceItem }: AssetDeps): (assets: CryptoOrTokenCurrency[], currenciesByProvider: CurrenciesByProviderId[]) => ({
13
+ rightElement: ReactNode;
14
+ name: string;
15
+ ticker: string;
16
+ units: import("@ledgerhq/types-cryptoassets").Unit[];
17
+ symbol?: string | undefined;
18
+ disableCountervalue?: boolean | undefined;
19
+ delisted?: boolean | undefined;
20
+ keywords?: string[] | undefined;
21
+ type: "CryptoCurrency";
22
+ id: import("@ledgerhq/types-cryptoassets").CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo";
23
+ forkedFrom?: string | undefined;
24
+ managerAppName: string;
25
+ coinType: import("@ledgerhq/types-cryptoassets").CoinType;
26
+ scheme: string;
27
+ color: string;
28
+ family: string;
29
+ blockAvgTime?: number | undefined;
30
+ supportsSegwit?: boolean | undefined;
31
+ supportsNativeSegwit?: boolean | undefined;
32
+ isTestnetFor?: string | undefined;
33
+ bitcoinLikeInfo?: import("@ledgerhq/types-cryptoassets").BitcoinLikeInfo | undefined;
34
+ ethereumLikeInfo?: import("@ledgerhq/types-cryptoassets").EthereumLikeInfo | undefined;
35
+ explorerViews: import("@ledgerhq/types-cryptoassets").ExplorerView[];
36
+ terminated?: {
37
+ link: string;
38
+ } | undefined;
39
+ deviceTicker?: string | undefined;
40
+ explorerId?: import("@ledgerhq/types-cryptoassets").LedgerExplorerId | undefined;
41
+ } | {
42
+ rightElement: ReactNode;
43
+ name: string;
44
+ ticker: string;
45
+ units: import("@ledgerhq/types-cryptoassets").Unit[];
46
+ symbol?: string | undefined;
47
+ disableCountervalue?: boolean | undefined;
48
+ delisted?: boolean | undefined;
49
+ keywords?: string[] | undefined;
50
+ type: "TokenCurrency";
51
+ id: string;
52
+ ledgerSignature?: string | undefined;
53
+ contractAddress: string;
54
+ parentCurrency: import("@ledgerhq/types-cryptoassets").CryptoCurrency;
55
+ tokenType: string;
56
+ })[];
57
+ //# sourceMappingURL=useRightBalanceAsset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRightBalanceAsset.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceAsset.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAY,MAAM,8BAA8B,CAAC;AAKpF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAM5D,MAAM,MAAM,SAAS,GAAG;IACtB,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;CAC7E,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,SAAS,YAuBzE,qBAAqB,EAAE,wBACT,sBAAsB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+FjD"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createUseRightBalanceAsset = void 0;
4
+ const react_1 = require("react");
5
+ const formatCurrencyUnit_1 = require("@ledgerhq/coin-framework/currencies/formatCurrencyUnit");
6
+ const counterValueFormatter_1 = require("../utils/counterValueFormatter");
7
+ const sortByBalance_1 = require("../utils/sortByBalance");
8
+ const buildProviderCurrenciesMap_1 = require("../utils/buildProviderCurrenciesMap");
9
+ const calculateProviderTotal_1 = require("../utils/calculateProviderTotal");
10
+ const getProviderCurrency_1 = require("../utils/getProviderCurrency");
11
+ const getBalanceAndFiatValueByAssets_1 = require("../utils/getBalanceAndFiatValueByAssets");
12
+ const groupAccountsByAsset_1 = require("../utils/groupAccountsByAsset");
13
+ function createUseRightBalanceAsset({ useBalanceDeps, balanceItem }) {
14
+ const formatProviderResult = (providerCurrency, totalBalance, totalFiatValue, counterValueCurrency, locale, discreet) => {
15
+ const unit = providerCurrency.units?.[0];
16
+ const balance = unit
17
+ ? (0, formatCurrencyUnit_1.formatCurrencyUnit)(unit, totalBalance, { showCode: true, discreet })
18
+ : `${totalBalance.toFixed()} ${providerCurrency.ticker ?? providerCurrency.symbol}`;
19
+ const fiatValue = (0, counterValueFormatter_1.counterValueFormatter)({
20
+ currency: counterValueCurrency.ticker,
21
+ value: totalFiatValue.toNumber(),
22
+ locale,
23
+ allowZeroValue: true,
24
+ });
25
+ return { balance, fiatValue };
26
+ };
27
+ return function useRightBalanceAsset(assets, currenciesByProvider) {
28
+ const { flattenedAccounts, discreet, state, counterValueCurrency, locale } = useBalanceDeps();
29
+ const grouped = (0, react_1.useMemo)(() => (0, groupAccountsByAsset_1.groupAccountsByAsset)(flattenedAccounts, state, counterValueCurrency, discreet), [flattenedAccounts, state, counterValueCurrency, discreet]);
30
+ const providerMap = (0, react_1.useMemo)(() => (0, buildProviderCurrenciesMap_1.buildProviderCurrenciesMap)(currenciesByProvider), [currenciesByProvider]);
31
+ return (0, react_1.useMemo)(() => {
32
+ if (!providerMap) {
33
+ const allBalance = (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, assets, state, counterValueCurrency, discreet, locale);
34
+ const balanceMap = new Map(allBalance.map(b => [b.id, b]));
35
+ const assetsWithBalanceData = assets.map(asset => {
36
+ const balanceData = balanceMap.get(asset.id) || {};
37
+ return {
38
+ asset,
39
+ balanceData,
40
+ };
41
+ });
42
+ assetsWithBalanceData.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
43
+ return assetsWithBalanceData.map(({ asset, balanceData }) => ({
44
+ ...asset,
45
+ rightElement: balanceItem(balanceData),
46
+ }));
47
+ }
48
+ const assetsSet = new Set(assets.map(a => a.id));
49
+ const providerResultsMap = new Map();
50
+ for (const [, { currencies, mainCurrency }] of providerMap) {
51
+ if (!assetsSet.has(mainCurrency.id))
52
+ continue;
53
+ const providerCurrency = (0, getProviderCurrency_1.getProviderCurrency)(mainCurrency, currencies);
54
+ if (!providerCurrency)
55
+ continue;
56
+ const { totalBalance, totalFiatValue, hasAccounts } = (0, calculateProviderTotal_1.calculateProviderTotals)(currencies, grouped);
57
+ if (!hasAccounts)
58
+ continue;
59
+ const { balance, fiatValue } = formatProviderResult(providerCurrency, totalBalance, totalFiatValue, counterValueCurrency, locale, discreet);
60
+ providerResultsMap.set(mainCurrency.id, { balance, fiatValue });
61
+ }
62
+ const assetsWithBalanceData = assets.map(asset => {
63
+ const balanceData = providerResultsMap.get(asset.id) || {};
64
+ return {
65
+ asset,
66
+ balanceData,
67
+ };
68
+ });
69
+ assetsWithBalanceData.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
70
+ return assetsWithBalanceData.map(({ asset, balanceData }) => ({
71
+ ...asset,
72
+ rightElement: balanceItem(balanceData),
73
+ }));
74
+ }, [
75
+ assets,
76
+ providerMap,
77
+ flattenedAccounts,
78
+ state,
79
+ counterValueCurrency,
80
+ discreet,
81
+ locale,
82
+ grouped,
83
+ ]);
84
+ };
85
+ }
86
+ exports.createUseRightBalanceAsset = createUseRightBalanceAsset;
87
+ //# sourceMappingURL=useRightBalanceAsset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRightBalanceAsset.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceAsset.tsx"],"names":[],"mappings":";;;AAAA,iCAAgC;AAGhC,+FAA4F;AAE5F,0EAAuE;AACvE,0DAAkE;AAElE,oFAAiF;AAE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AAW,CAAC;aACvC,CAAC,CAAC,CAAC;QACN,CAAC,EAAE;YACD,MAAM;YACN,WAAW;YACX,iBAAiB;YACjB,KAAK;YACL,oBAAoB;YACpB,QAAQ;YACR,MAAM;YACN,OAAO;SACR,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAvHD,gEAuHC"}
@@ -0,0 +1,63 @@
1
+ import { type ReactNode } from "react";
2
+ import type { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
3
+ import { UseBalanceDeps } from "../utils/type";
4
+ import { CurrenciesByProviderId } from "../../deposit/type";
5
+ export type NetworkDeps = {
6
+ balanceItem: (asset: {
7
+ fiatValue?: string;
8
+ balance?: string;
9
+ }) => ReactNode;
10
+ useBalanceDeps: UseBalanceDeps;
11
+ };
12
+ type Params = {
13
+ assets: CryptoOrTokenCurrency[];
14
+ selectedAssetId: string;
15
+ currenciesByProvider: CurrenciesByProviderId[];
16
+ };
17
+ export declare function createUseRightBalanceNetwork({ useBalanceDeps, balanceItem }: NetworkDeps): ({ assets: networks, selectedAssetId, currenciesByProvider, }: Params) => ({
18
+ rightElement: ReactNode;
19
+ name: string;
20
+ ticker: string;
21
+ units: import("@ledgerhq/types-cryptoassets").Unit[];
22
+ symbol?: string | undefined;
23
+ disableCountervalue?: boolean | undefined;
24
+ delisted?: boolean | undefined;
25
+ keywords?: string[] | undefined;
26
+ type: "CryptoCurrency";
27
+ id: import("@ledgerhq/types-cryptoassets").CryptoCurrencyId | "LBRY" | "groestcoin" | "osmo";
28
+ forkedFrom?: string | undefined;
29
+ managerAppName: string;
30
+ coinType: import("@ledgerhq/types-cryptoassets").CoinType;
31
+ scheme: string;
32
+ color: string;
33
+ family: string;
34
+ blockAvgTime?: number | undefined;
35
+ supportsSegwit?: boolean | undefined;
36
+ supportsNativeSegwit?: boolean | undefined;
37
+ isTestnetFor?: string | undefined;
38
+ bitcoinLikeInfo?: import("@ledgerhq/types-cryptoassets").BitcoinLikeInfo | undefined;
39
+ ethereumLikeInfo?: import("@ledgerhq/types-cryptoassets").EthereumLikeInfo | undefined;
40
+ explorerViews: import("@ledgerhq/types-cryptoassets").ExplorerView[];
41
+ terminated?: {
42
+ link: string;
43
+ } | undefined;
44
+ deviceTicker?: string | undefined;
45
+ explorerId?: import("@ledgerhq/types-cryptoassets").LedgerExplorerId | undefined;
46
+ } | {
47
+ rightElement: ReactNode;
48
+ name: string;
49
+ ticker: string;
50
+ units: import("@ledgerhq/types-cryptoassets").Unit[];
51
+ symbol?: string | undefined;
52
+ disableCountervalue?: boolean | undefined;
53
+ delisted?: boolean | undefined;
54
+ keywords?: string[] | undefined;
55
+ type: "TokenCurrency";
56
+ id: string;
57
+ ledgerSignature?: string | undefined;
58
+ contractAddress: string;
59
+ parentCurrency: import("@ledgerhq/types-cryptoassets").CryptoCurrency;
60
+ tokenType: string;
61
+ })[];
62
+ export {};
63
+ //# sourceMappingURL=useRightBalanceNetwork.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRightBalanceNetwork.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceNetwork.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAa,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAC;IAC5E,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF,KAAK,MAAM,GAAG;IACZ,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,sBAAsB,EAAE,CAAC;CAChD,CAAC;AAEF,wBAAgB,4BAA4B,CAAC,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,WAAW,kEAKpF,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4FV"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createUseRightBalanceNetwork = void 0;
4
+ const react_1 = require("react");
5
+ const sortByBalance_1 = require("../utils/sortByBalance");
6
+ const getBalanceAndFiatValueByAssets_1 = require("../utils/getBalanceAndFiatValueByAssets");
7
+ function createUseRightBalanceNetwork({ useBalanceDeps, balanceItem }) {
8
+ return function useRightBalanceNetwork({ assets: networks, selectedAssetId, currenciesByProvider, }) {
9
+ const { flattenedAccounts, discreet, state, counterValueCurrency, locale } = useBalanceDeps();
10
+ return (0, react_1.useMemo)(() => {
11
+ if (currenciesByProvider && currenciesByProvider.length > 0) {
12
+ const providerOfSelectedAsset = currenciesByProvider.find(provider => provider.currenciesByNetwork.some(currency => currency.id === selectedAssetId));
13
+ if (providerOfSelectedAsset) {
14
+ const pairs = networks.map(network => ({
15
+ network,
16
+ asset: providerOfSelectedAsset.currenciesByNetwork.find(currency => currency.type === "TokenCurrency"
17
+ ? currency.parentCurrency.id === network.id
18
+ : currency.id === network.id),
19
+ }));
20
+ const validAssets = pairs.filter(p => p.asset).map(p => p.asset);
21
+ const allBalanceData = validAssets.length > 0
22
+ ? (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, validAssets, state, counterValueCurrency, discreet, locale)
23
+ : [];
24
+ const balanceMap = new Map(allBalanceData.map(b => [b.id, b]));
25
+ const networkWithBalanceData = pairs.map(({ network, asset }) => {
26
+ const balanceData = asset ? balanceMap.get(asset.id) || {} : {};
27
+ return {
28
+ network,
29
+ balanceData,
30
+ };
31
+ });
32
+ networkWithBalanceData.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
33
+ return networkWithBalanceData.map(({ network, balanceData }) => ({
34
+ ...network,
35
+ rightElement: balanceItem(balanceData),
36
+ }));
37
+ }
38
+ }
39
+ const networkBalanceData = (0, getBalanceAndFiatValueByAssets_1.getBalanceAndFiatValueByAssets)(flattenedAccounts, networks, state, counterValueCurrency, discreet, locale);
40
+ const balanceMap = new Map(networkBalanceData.map(b => [b.id, b]));
41
+ const networksWithBalance = networks.map(network => {
42
+ const balanceData = balanceMap.get(network.id) || {};
43
+ return {
44
+ network,
45
+ balanceData,
46
+ };
47
+ });
48
+ networksWithBalance.sort((a, b) => (0, sortByBalance_1.compareByBalanceThenFiat)(a.balanceData, b.balanceData, discreet));
49
+ return networksWithBalance.map(({ network, balanceData }) => ({
50
+ ...network,
51
+ rightElement: balanceItem(balanceData),
52
+ }));
53
+ }, [
54
+ networks,
55
+ selectedAssetId,
56
+ currenciesByProvider,
57
+ flattenedAccounts,
58
+ state,
59
+ counterValueCurrency,
60
+ discreet,
61
+ locale,
62
+ ]);
63
+ };
64
+ }
65
+ exports.createUseRightBalanceNetwork = createUseRightBalanceNetwork;
66
+ //# sourceMappingURL=useRightBalanceNetwork.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRightBalanceNetwork.js","sourceRoot":"","sources":["../../../src/modularDrawer/hooks/useRightBalanceNetwork.tsx"],"names":[],"mappings":";;;AAAA,iCAAgD;AAEhD,0DAAkE;AAGlE,4FAAyF;AAazF,SAAgB,4BAA4B,CAAC,EAAE,cAAc,EAAE,WAAW,EAAe;IACvF,OAAO,SAAS,sBAAsB,CAAC,EACrC,MAAM,EAAE,QAAQ,EAChB,eAAe,EACf,oBAAoB,GACb;QACP,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAAC;QAE9F,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;YAClB,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AAA,wCAAwB,EAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CACjE,CAAC;YAEF,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5D,GAAG,OAAO;gBACV,YAAY,EAAE,WAAW,CAAC,WAAW,CAAC;aACvC,CAAC,CAAC,CAAC;QACN,CAAC,EAAE;YACD,QAAQ;YACR,eAAe;YACf,oBAAoB;YACpB,iBAAiB;YACjB,KAAK;YACL,oBAAoB;YACpB,QAAQ;YACR,MAAM;SACP,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAjGD,oEAiGC"}
@@ -0,0 +1,4 @@
1
+ import { CreateAssetConfigurationHook } from "../utils/type";
2
+ declare const createAssetConfigurationHook: CreateAssetConfigurationHook;
3
+ export default createAssetConfigurationHook;
4
+ //# sourceMappingURL=createAssetConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAssetConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,4BAA4B,EAA0B,MAAM,eAAe,CAAC;AAkChG,QAAA,MAAM,4BAA4B,EAAE,4BAwBjC,CAAC;AAEJ,eAAe,4BAA4B,CAAC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const composeHooks_1 = require("../../utils/composeHooks");
4
+ const useLeftApyModule_1 = require("../hooks/modules/useLeftApyModule");
5
+ const useRightBalanceAsset_1 = require("../hooks/useRightBalanceAsset");
6
+ const getRightElement = (AssetConfigurationDeps) => (rightElement) => {
7
+ switch (rightElement) {
8
+ case "undefined":
9
+ return undefined;
10
+ case "marketTrend":
11
+ case "balance":
12
+ default:
13
+ return (0, useRightBalanceAsset_1.createUseRightBalanceAsset)({
14
+ useBalanceDeps: AssetConfigurationDeps.useBalanceDeps,
15
+ balanceItem: AssetConfigurationDeps.balanceItem,
16
+ });
17
+ }
18
+ };
19
+ const getLeftElement = (AssetConfigurationDeps) => (leftElement) => {
20
+ switch (leftElement) {
21
+ case "apy":
22
+ return (assets) => (0, useLeftApyModule_1.useLeftApyModule)(assets, AssetConfigurationDeps.ApyIndicator);
23
+ case "marketTrend":
24
+ case "undefined":
25
+ default:
26
+ return undefined;
27
+ }
28
+ };
29
+ const createAssetConfigurationHook = deps => ({ assetsConfiguration, currenciesByProvider }) => {
30
+ const { rightElement, leftElement } = assetsConfiguration ?? {};
31
+ const rightHook = getRightElement(deps)(rightElement);
32
+ const leftHook = getLeftElement(deps)(leftElement);
33
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
34
+ const hooks = [rightHook, leftHook].filter(Boolean);
35
+ return (assets) => {
36
+ const composedHook = (0, composeHooks_1.composeHooks)(...hooks.map(hook => (assets) => hook(assets, currenciesByProvider)));
37
+ return composedHook(assets);
38
+ };
39
+ };
40
+ exports.default = createAssetConfigurationHook;
41
+ //# sourceMappingURL=createAssetConfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAssetConfiguration.js","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createAssetConfiguration.ts"],"names":[],"mappings":";;AAGA,2DAAwD;AACxD,wEAAqE;AACrE,wEAA2E;AAE3E,MAAM,eAAe,GACnB,CAAC,sBAA8C,EAAE,EAAE,CAAC,CAAC,YAAqB,EAAE,EAAE;IAC5E,QAAQ,YAAY,EAAE;QACpB,KAAK,WAAW;YACd,OAAO,SAAS,CAAC;QACnB,KAAK,aAAa,CAAC;QACnB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,IAAA,iDAA0B,EAAC;gBAChC,cAAc,EAAE,sBAAsB,CAAC,cAAc;gBACrD,WAAW,EAAE,sBAAsB,CAAC,WAAW;aAChD,CAAC,CAAC;KACN;AACH,CAAC,CAAC;AAEJ,MAAM,cAAc,GAClB,CAAC,sBAA8C,EAAE,EAAE,CAAC,CAAC,WAAoB,EAAE,EAAE;IAC3E,QAAQ,WAAW,EAAE;QACnB,KAAK,KAAK;YACR,OAAO,CAAC,MAA+B,EAAE,EAAE,CACzC,IAAA,mCAAgB,EAAC,MAAM,EAAE,sBAAsB,CAAC,YAAY,CAAC,CAAC;QAClE,KAAK,aAAa,CAAC;QACnB,KAAK,WAAW,CAAC;QACjB;YACE,OAAO,SAAS,CAAC;KACpB;AACH,CAAC,CAAC;AAEJ,MAAM,4BAA4B,GAChC,IAAI,CAAC,EAAE,CACP,CAAC,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,EAAE,EAAE;IAChD,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,mBAAmB,IAAI,EAAE,CAAC;IAEhE,MAAM,SAAS,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC;IAEnD,yEAAyE;IACzE,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAKjD,CAAC;IAEF,OAAO,CAAC,MAA+B,EAAE,EAAE;QACzC,MAAM,YAAY,GAAG,IAAA,2BAAY,EAC/B,GAAG,KAAK,CAAC,GAAG,CACV,IAAI,CAAC,EAAE,CAAC,CAAC,MAA+B,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAChF,CACF,CAAC;QACF,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEJ,kBAAe,4BAA4B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
2
+ import { CreateNetworkConfigurationHookProps, NetworkConfigurationDeps, LeftElementKind, Network, NetworkHook, RightElementKind } from "../utils/type";
3
+ export declare const getLeftElement: (NetworkConfigurationDeps: NetworkConfigurationDeps) => (leftElement?: LeftElementKind) => NetworkHook | undefined;
4
+ export declare const getRightElement: (NetworkConfigurationDeps: NetworkConfigurationDeps) => (rightElement?: RightElementKind) => NetworkHook | undefined;
5
+ export declare const createNetworkConfigurationHook: (NetworkConfigurationDeps: NetworkConfigurationDeps) => ({ networksConfig, selectedAssetId, currenciesByProvider, accounts$, }: CreateNetworkConfigurationHookProps) => (assets: CryptoOrTokenCurrency[], networks: CryptoOrTokenCurrency[]) => Array<CryptoOrTokenCurrency & Network>;
6
+ //# sourceMappingURL=createNetworkConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNetworkConfiguration.d.ts","sourceRoot":"","sources":["../../../src/modularDrawer/modules/createNetworkConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAI1E,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACxB,eAAe,EACf,OAAO,EACP,WAAW,EACX,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AAGvB,eAAO,MAAM,cAAc,yEAEV,eAAe,KAAG,WAAW,GAAG,SAmB9C,CAAC;AAEJ,eAAO,MAAM,eAAe,0EAEV,gBAAgB,KAAG,WAAW,GAAG,SAWhD,CAAC;AAEJ,eAAO,MAAM,8BAA8B,kIAOtC,mCAAmC,cAS1B,qBAAqB,EAAE,YACrB,qBAAqB,EAAE,KAChC,MAAM,qBAAqB,GAAG,OAAO,CAezC,CAAC"}