@subwallet/extension-base 1.1.31-beta.0 → 1.1.33-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 (319) hide show
  1. package/background/KoniTypes.d.ts +71 -111
  2. package/background/KoniTypes.js +14 -19
  3. package/background/errors/TransactionError.js +0 -9
  4. package/cjs/background/KoniTypes.js +17 -20
  5. package/cjs/background/errors/TransactionError.js +0 -9
  6. package/cjs/constants/index.js +4 -19
  7. package/cjs/koni/api/nft/config.js +23 -33
  8. package/cjs/koni/api/nft/index.js +0 -14
  9. package/cjs/koni/api/nft/nft.js +22 -1
  10. package/cjs/koni/api/staking/bonding/amplitude.js +108 -76
  11. package/cjs/koni/api/staking/bonding/astar.js +10 -11
  12. package/cjs/koni/api/staking/bonding/index.js +3 -4
  13. package/cjs/koni/api/staking/bonding/paraChain.js +29 -28
  14. package/cjs/koni/api/staking/bonding/relayChain.js +45 -48
  15. package/cjs/koni/api/staking/bonding/utils.js +86 -104
  16. package/cjs/koni/api/staking/index.js +5 -6
  17. package/cjs/koni/api/staking/paraChain.js +36 -11
  18. package/cjs/koni/api/staking/relayChain.js +2 -3
  19. package/cjs/koni/api/xcm/xTokens.js +1 -1
  20. package/cjs/koni/background/cron.js +1 -11
  21. package/cjs/koni/background/handlers/Extension.js +69 -362
  22. package/cjs/koni/background/handlers/State.js +3 -51
  23. package/cjs/koni/background/handlers/Tabs.js +19 -2
  24. package/cjs/koni/background/handlers/index.js +2 -4
  25. package/cjs/koni/background/subscription.js +37 -95
  26. package/cjs/packageInfo.js +1 -1
  27. package/cjs/services/campaign-service/index.js +25 -9
  28. package/cjs/services/chain-service/constants.js +21 -4
  29. package/cjs/services/chain-service/index.js +2 -3
  30. package/cjs/services/chain-service/utils.js +1 -7
  31. package/cjs/services/event-service/index.js +0 -4
  32. package/cjs/services/history-service/index.js +12 -8
  33. package/cjs/services/keyring-service/index.js +2 -14
  34. package/cjs/services/migration-service/scripts/MigrateLedgerAccount.js +1 -1
  35. package/cjs/services/migration-service/scripts/MigrateTransactionHistory.js +1 -1
  36. package/cjs/services/migration-service/scripts/index.js +1 -7
  37. package/cjs/services/notification-service/NotificationService.js +1 -1
  38. package/cjs/services/storage-service/DatabaseService.js +3 -51
  39. package/cjs/services/storage-service/databases/index.js +0 -4
  40. package/cjs/services/storage-service/db-stores/Campaign.js +9 -3
  41. package/cjs/services/storage-service/db-stores/NominatorMetadata.js +3 -3
  42. package/cjs/services/subscan-service/index.js +0 -16
  43. package/cjs/services/transaction-service/event-parser/index.js +0 -58
  44. package/cjs/services/transaction-service/helpers/index.js +1 -3
  45. package/cjs/services/transaction-service/index.js +131 -242
  46. package/cjs/services/transaction-service/utils.js +0 -1
  47. package/cjs/types/index.js +0 -44
  48. package/cjs/utils/fetchEvmChainInfo.js +20 -0
  49. package/cjs/utils/fetchStaticData.js +1 -2
  50. package/cjs/utils/index.js +17 -81
  51. package/cjs/utils/number.js +1 -3
  52. package/constants/index.d.ts +1 -6
  53. package/constants/index.js +1 -6
  54. package/koni/api/nft/config.js +23 -33
  55. package/koni/api/nft/index.js +1 -15
  56. package/koni/api/nft/nft.js +23 -2
  57. package/koni/api/staking/bonding/amplitude.d.ts +1 -1
  58. package/koni/api/staking/bonding/amplitude.js +105 -73
  59. package/koni/api/staking/bonding/astar.js +8 -9
  60. package/koni/api/staking/bonding/index.d.ts +2 -1
  61. package/koni/api/staking/bonding/index.js +3 -5
  62. package/koni/api/staking/bonding/paraChain.js +16 -15
  63. package/koni/api/staking/bonding/relayChain.d.ts +2 -2
  64. package/koni/api/staking/bonding/relayChain.js +30 -33
  65. package/koni/api/staking/bonding/utils.d.ts +42 -15
  66. package/koni/api/staking/bonding/utils.js +69 -85
  67. package/koni/api/staking/index.js +1 -2
  68. package/koni/api/staking/paraChain.js +37 -12
  69. package/koni/api/staking/relayChain.js +3 -4
  70. package/koni/api/xcm/xTokens.js +1 -1
  71. package/koni/background/cron.d.ts +0 -1
  72. package/koni/background/cron.js +2 -12
  73. package/koni/background/handlers/Extension.d.ts +1 -17
  74. package/koni/background/handlers/Extension.js +30 -321
  75. package/koni/background/handlers/State.d.ts +2 -18
  76. package/koni/background/handlers/State.js +3 -50
  77. package/koni/background/handlers/Tabs.js +20 -3
  78. package/koni/background/handlers/index.js +2 -4
  79. package/koni/background/subscription.d.ts +1 -6
  80. package/koni/background/subscription.js +38 -97
  81. package/package.json +13 -321
  82. package/packageInfo.js +1 -1
  83. package/services/campaign-service/index.js +25 -9
  84. package/services/chain-service/constants.d.ts +12 -0
  85. package/services/chain-service/constants.js +19 -3
  86. package/services/chain-service/index.js +2 -3
  87. package/services/chain-service/utils.d.ts +0 -1
  88. package/services/chain-service/utils.js +1 -5
  89. package/services/event-service/index.d.ts +0 -1
  90. package/services/event-service/index.js +0 -4
  91. package/services/event-service/types.d.ts +1 -8
  92. package/services/history-service/index.js +12 -8
  93. package/services/keyring-service/index.d.ts +1 -2
  94. package/services/keyring-service/index.js +2 -14
  95. package/services/migration-service/scripts/MigrateLedgerAccount.js +1 -1
  96. package/services/migration-service/scripts/MigrateTransactionHistory.js +1 -1
  97. package/services/migration-service/scripts/index.js +1 -7
  98. package/services/notification-service/NotificationService.js +1 -1
  99. package/services/storage-service/DatabaseService.d.ts +2 -18
  100. package/services/storage-service/DatabaseService.js +3 -51
  101. package/services/storage-service/databases/index.d.ts +1 -3
  102. package/services/storage-service/databases/index.js +0 -4
  103. package/services/storage-service/db-stores/Campaign.js +9 -3
  104. package/services/storage-service/db-stores/NominatorMetadata.js +3 -3
  105. package/services/subscan-service/index.d.ts +2 -3
  106. package/services/subscan-service/index.js +0 -15
  107. package/services/subscan-service/types.d.ts +0 -20
  108. package/services/transaction-service/event-parser/index.d.ts +1 -3
  109. package/services/transaction-service/event-parser/index.js +1 -57
  110. package/services/transaction-service/helpers/index.js +1 -3
  111. package/services/transaction-service/index.d.ts +16 -4
  112. package/services/transaction-service/index.js +118 -230
  113. package/services/transaction-service/types.d.ts +1 -2
  114. package/services/transaction-service/utils.js +0 -1
  115. package/types/index.d.ts +0 -5
  116. package/types/index.js +1 -5
  117. package/utils/fetchEvmChainInfo.d.ts +17 -0
  118. package/utils/fetchEvmChainInfo.js +14 -0
  119. package/utils/fetchStaticData.js +1 -2
  120. package/utils/index.d.ts +2 -5
  121. package/utils/index.js +2 -52
  122. package/utils/number.d.ts +1 -1
  123. package/utils/number.js +1 -1
  124. package/cjs/koni/api/dotsama/balance.js +0 -464
  125. package/cjs/koni/api/nft/ordinal_nft/constants.js +0 -21
  126. package/cjs/koni/api/nft/ordinal_nft/index.js +0 -121
  127. package/cjs/koni/api/nft/ordinal_nft/utils.js +0 -41
  128. package/cjs/koni/api/yield/helper/utils.js +0 -46
  129. package/cjs/services/earning-service/constants/chains.js +0 -29
  130. package/cjs/services/earning-service/constants/index.js +0 -27
  131. package/cjs/services/earning-service/constants/step.js +0 -18
  132. package/cjs/services/earning-service/handlers/base.js +0 -259
  133. package/cjs/services/earning-service/handlers/index.js +0 -60
  134. package/cjs/services/earning-service/handlers/lending/base.js +0 -20
  135. package/cjs/services/earning-service/handlers/lending/index.js +0 -13
  136. package/cjs/services/earning-service/handlers/lending/interlay.js +0 -191
  137. package/cjs/services/earning-service/handlers/liquid-staking/acala.js +0 -239
  138. package/cjs/services/earning-service/handlers/liquid-staking/base.js +0 -43
  139. package/cjs/services/earning-service/handlers/liquid-staking/bifrost.js +0 -297
  140. package/cjs/services/earning-service/handlers/liquid-staking/index.js +0 -34
  141. package/cjs/services/earning-service/handlers/liquid-staking/parallel.js +0 -226
  142. package/cjs/services/earning-service/handlers/liquid-staking/stella-swap.js +0 -395
  143. package/cjs/services/earning-service/handlers/native-staking/amplitude.js +0 -384
  144. package/cjs/services/earning-service/handlers/native-staking/astar.js +0 -461
  145. package/cjs/services/earning-service/handlers/native-staking/base-para.js +0 -146
  146. package/cjs/services/earning-service/handlers/native-staking/base.js +0 -159
  147. package/cjs/services/earning-service/handlers/native-staking/index.js +0 -34
  148. package/cjs/services/earning-service/handlers/native-staking/para-chain.js +0 -385
  149. package/cjs/services/earning-service/handlers/native-staking/relay-chain.js +0 -558
  150. package/cjs/services/earning-service/handlers/nomination-pool/index.js +0 -560
  151. package/cjs/services/earning-service/handlers/special.js +0 -503
  152. package/cjs/services/earning-service/service.js +0 -387
  153. package/cjs/services/earning-service/utils/index.js +0 -128
  154. package/cjs/services/migration-service/scripts/DeleteEarningData.js +0 -21
  155. package/cjs/services/migration-service/scripts/EnableEarningChains.js +0 -21
  156. package/cjs/services/migration-service/scripts/MigrateEthProvider.js +0 -17
  157. package/cjs/services/migration-service/scripts/MigratePioneerProvider.js +0 -17
  158. package/cjs/services/migration-service/scripts/MigrateProvider.js +0 -29
  159. package/cjs/services/migration-service/scripts/databases/MigrateEarningHistory.js +0 -21
  160. package/cjs/services/migration-service/scripts/databases/MigrateEarningVersion.js +0 -21
  161. package/cjs/services/mint-campaign-service/campaigns/UnlockDotCampaign.js +0 -149
  162. package/cjs/services/mint-campaign-service/campaigns/index.js +0 -13
  163. package/cjs/services/mint-campaign-service/constants.js +0 -11
  164. package/cjs/services/mint-campaign-service/index.js +0 -18
  165. package/cjs/services/storage-service/db-stores/YieldPoolStore.js +0 -36
  166. package/cjs/services/storage-service/db-stores/YieldPositionStore.js +0 -65
  167. package/cjs/services/storage-service/index.js +0 -241
  168. package/cjs/types/campaigns/index.js +0 -16
  169. package/cjs/types/campaigns/unlock-dot.js +0 -1
  170. package/cjs/types/ordinal.js +0 -1
  171. package/cjs/types/transaction.js +0 -1
  172. package/cjs/types/yield/actions/index.js +0 -27
  173. package/cjs/types/yield/actions/join/index.js +0 -38
  174. package/cjs/types/yield/actions/join/step.js +0 -47
  175. package/cjs/types/yield/actions/join/submit.js +0 -1
  176. package/cjs/types/yield/actions/join/validate.js +0 -16
  177. package/cjs/types/yield/actions/others.js +0 -1
  178. package/cjs/types/yield/index.js +0 -27
  179. package/cjs/types/yield/info/account/index.js +0 -49
  180. package/cjs/types/yield/info/account/info.js +0 -1
  181. package/cjs/types/yield/info/account/reward.js +0 -1
  182. package/cjs/types/yield/info/account/target.js +0 -32
  183. package/cjs/types/yield/info/account/unstake.js +0 -27
  184. package/cjs/types/yield/info/base.js +0 -41
  185. package/cjs/types/yield/info/chain/index.js +0 -27
  186. package/cjs/types/yield/info/chain/info.js +0 -1
  187. package/cjs/types/yield/info/chain/target.js +0 -1
  188. package/cjs/types/yield/info/index.js +0 -49
  189. package/cjs/types/yield/info/pallet.js +0 -15
  190. package/cjs/types.js +0 -1
  191. package/cjs/utils/address.js +0 -34
  192. package/cjs/utils/keyring.js +0 -57
  193. package/cjs/utils/object.js +0 -12
  194. package/koni/api/nft/ordinal_nft/constants.d.ts +0 -9
  195. package/koni/api/nft/ordinal_nft/constants.js +0 -12
  196. package/koni/api/nft/ordinal_nft/index.d.ts +0 -8
  197. package/koni/api/nft/ordinal_nft/index.js +0 -114
  198. package/koni/api/nft/ordinal_nft/utils.d.ts +0 -2
  199. package/koni/api/nft/ordinal_nft/utils.js +0 -33
  200. package/koni/api/yield/helper/utils.d.ts +0 -10
  201. package/koni/api/yield/helper/utils.js +0 -32
  202. package/services/earning-service/constants/abis/compound_finance_v2_abi.json +0 -1235
  203. package/services/earning-service/constants/abis/st_liquid_token_abi.json +0 -1355
  204. package/services/earning-service/constants/chains.d.ts +0 -14
  205. package/services/earning-service/constants/chains.js +0 -21
  206. package/services/earning-service/constants/index.d.ts +0 -2
  207. package/services/earning-service/constants/index.js +0 -5
  208. package/services/earning-service/constants/step.d.ts +0 -3
  209. package/services/earning-service/constants/step.js +0 -10
  210. package/services/earning-service/handlers/base.d.ts +0 -112
  211. package/services/earning-service/handlers/base.js +0 -253
  212. package/services/earning-service/handlers/index.d.ts +0 -5
  213. package/services/earning-service/handlers/index.js +0 -8
  214. package/services/earning-service/handlers/lending/base.d.ts +0 -6
  215. package/services/earning-service/handlers/lending/base.js +0 -12
  216. package/services/earning-service/handlers/lending/index.d.ts +0 -1
  217. package/services/earning-service/handlers/lending/index.js +0 -4
  218. package/services/earning-service/handlers/lending/interlay.d.ts +0 -24
  219. package/services/earning-service/handlers/lending/interlay.js +0 -183
  220. package/services/earning-service/handlers/liquid-staking/acala.d.ts +0 -27
  221. package/services/earning-service/handlers/liquid-staking/acala.js +0 -231
  222. package/services/earning-service/handlers/liquid-staking/base.d.ts +0 -9
  223. package/services/earning-service/handlers/liquid-staking/base.js +0 -35
  224. package/services/earning-service/handlers/liquid-staking/bifrost.d.ts +0 -46
  225. package/services/earning-service/handlers/liquid-staking/bifrost.js +0 -286
  226. package/services/earning-service/handlers/liquid-staking/index.d.ts +0 -4
  227. package/services/earning-service/handlers/liquid-staking/index.js +0 -7
  228. package/services/earning-service/handlers/liquid-staking/parallel.d.ts +0 -26
  229. package/services/earning-service/handlers/liquid-staking/parallel.js +0 -218
  230. package/services/earning-service/handlers/liquid-staking/stella-swap.d.ts +0 -34
  231. package/services/earning-service/handlers/liquid-staking/stella-swap.js +0 -385
  232. package/services/earning-service/handlers/native-staking/amplitude.d.ts +0 -22
  233. package/services/earning-service/handlers/native-staking/amplitude.js +0 -375
  234. package/services/earning-service/handlers/native-staking/astar.d.ts +0 -19
  235. package/services/earning-service/handlers/native-staking/astar.js +0 -451
  236. package/services/earning-service/handlers/native-staking/base-para.d.ts +0 -11
  237. package/services/earning-service/handlers/native-staking/base-para.js +0 -138
  238. package/services/earning-service/handlers/native-staking/base.d.ts +0 -21
  239. package/services/earning-service/handlers/native-staking/base.js +0 -150
  240. package/services/earning-service/handlers/native-staking/index.d.ts +0 -4
  241. package/services/earning-service/handlers/native-staking/index.js +0 -7
  242. package/services/earning-service/handlers/native-staking/para-chain.d.ts +0 -15
  243. package/services/earning-service/handlers/native-staking/para-chain.js +0 -377
  244. package/services/earning-service/handlers/native-staking/relay-chain.d.ts +0 -21
  245. package/services/earning-service/handlers/native-staking/relay-chain.js +0 -549
  246. package/services/earning-service/handlers/nomination-pool/index.d.ts +0 -36
  247. package/services/earning-service/handlers/nomination-pool/index.js +0 -550
  248. package/services/earning-service/handlers/special.d.ts +0 -65
  249. package/services/earning-service/handlers/special.js +0 -495
  250. package/services/earning-service/service.d.ts +0 -45
  251. package/services/earning-service/service.js +0 -379
  252. package/services/earning-service/utils/index.d.ts +0 -18
  253. package/services/earning-service/utils/index.js +0 -112
  254. package/services/migration-service/scripts/DeleteEarningData.d.ts +0 -4
  255. package/services/migration-service/scripts/DeleteEarningData.js +0 -13
  256. package/services/migration-service/scripts/EnableEarningChains.d.ts +0 -4
  257. package/services/migration-service/scripts/EnableEarningChains.js +0 -13
  258. package/services/migration-service/scripts/databases/MigrateEarningHistory.d.ts +0 -4
  259. package/services/migration-service/scripts/databases/MigrateEarningHistory.js +0 -13
  260. package/services/migration-service/scripts/databases/MigrateEarningVersion.d.ts +0 -4
  261. package/services/migration-service/scripts/databases/MigrateEarningVersion.js +0 -13
  262. package/services/mint-campaign-service/campaigns/UnlockDotCampaign.d.ts +0 -13
  263. package/services/mint-campaign-service/campaigns/UnlockDotCampaign.js +0 -139
  264. package/services/mint-campaign-service/campaigns/index.d.ts +0 -1
  265. package/services/mint-campaign-service/campaigns/index.js +0 -4
  266. package/services/mint-campaign-service/constants.d.ts +0 -1
  267. package/services/mint-campaign-service/constants.js +0 -4
  268. package/services/mint-campaign-service/index.d.ts +0 -7
  269. package/services/mint-campaign-service/index.js +0 -11
  270. package/services/storage-service/db-stores/YieldPoolStore.d.ts +0 -10
  271. package/services/storage-service/db-stores/YieldPoolStore.js +0 -28
  272. package/services/storage-service/db-stores/YieldPositionStore.d.ts +0 -9
  273. package/services/storage-service/db-stores/YieldPositionStore.js +0 -57
  274. package/types/campaigns/index.d.ts +0 -1
  275. package/types/campaigns/index.js +0 -4
  276. package/types/campaigns/unlock-dot.d.ts +0 -71
  277. package/types/campaigns/unlock-dot.js +0 -1
  278. package/types/ordinal.d.ts +0 -69
  279. package/types/ordinal.js +0 -1
  280. package/types/transaction.d.ts +0 -3
  281. package/types/transaction.js +0 -1
  282. package/types/yield/actions/index.d.ts +0 -2
  283. package/types/yield/actions/index.js +0 -5
  284. package/types/yield/actions/join/index.d.ts +0 -3
  285. package/types/yield/actions/join/index.js +0 -6
  286. package/types/yield/actions/join/step.d.ts +0 -95
  287. package/types/yield/actions/join/step.js +0 -46
  288. package/types/yield/actions/join/submit.d.ts +0 -57
  289. package/types/yield/actions/join/submit.js +0 -1
  290. package/types/yield/actions/join/validate.d.ts +0 -18
  291. package/types/yield/actions/join/validate.js +0 -10
  292. package/types/yield/actions/others.d.ts +0 -85
  293. package/types/yield/actions/others.js +0 -1
  294. package/types/yield/index.d.ts +0 -2
  295. package/types/yield/index.js +0 -5
  296. package/types/yield/info/account/index.d.ts +0 -4
  297. package/types/yield/info/account/index.js +0 -7
  298. package/types/yield/info/account/info.d.ts +0 -92
  299. package/types/yield/info/account/info.js +0 -1
  300. package/types/yield/info/account/reward.d.ts +0 -45
  301. package/types/yield/info/account/reward.js +0 -1
  302. package/types/yield/info/account/target.d.ts +0 -43
  303. package/types/yield/info/account/target.js +0 -27
  304. package/types/yield/info/account/unstake.d.ts +0 -31
  305. package/types/yield/info/account/unstake.js +0 -22
  306. package/types/yield/info/base.d.ts +0 -45
  307. package/types/yield/info/base.js +0 -36
  308. package/types/yield/info/chain/index.d.ts +0 -2
  309. package/types/yield/info/chain/index.js +0 -5
  310. package/types/yield/info/chain/info.d.ts +0 -251
  311. package/types/yield/info/chain/info.js +0 -1
  312. package/types/yield/info/chain/target.d.ts +0 -37
  313. package/types/yield/info/chain/target.js +0 -1
  314. package/types/yield/info/index.d.ts +0 -4
  315. package/types/yield/info/index.js +0 -7
  316. package/types/yield/info/pallet.d.ts +0 -143
  317. package/types/yield/info/pallet.js +0 -9
  318. package/utils/object.d.ts +0 -1
  319. package/utils/object.js +0 -6
@@ -1,121 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _constants = require("@subwallet/extension-base/constants");
8
- var _nft = require("@subwallet/extension-base/koni/api/nft/nft");
9
- var _utils = require("@subwallet/extension-base/koni/api/nft/ordinal_nft/utils");
10
- var _handlers = require("@subwallet/extension-base/koni/background/handlers");
11
- // Copyright 2019-2022 @subwallet/extension-koni authors & contributors
12
- // SPDX-License-Identifier: Apache-2.0
13
-
14
- const parseParamData = (param, event, chain, address) => {
15
- const ordinalData = JSON.parse(param.value);
16
- if ('p' in ordinalData) {
17
- const properties = {};
18
- for (const [key, value] of Object.entries(ordinalData)) {
19
- const _name = key.charAt(0).toUpperCase() + key.slice(1);
20
- properties[_name] = {
21
- value: value
22
- };
23
- }
24
- properties['Block number'] = {
25
- value: event.extrinsic_index.split('-')[0]
26
- };
27
- properties.Timestamp = {
28
- value: event.block_timestamp
29
- };
30
- const op = ordinalData.op.charAt(0).toUpperCase() + ordinalData.op.slice(1);
31
- const nameParams = [op];
32
- if (ordinalData.amt !== undefined) {
33
- nameParams.push(ordinalData.amt);
34
- }
35
- nameParams.push(ordinalData.tick);
36
- const name = nameParams.join(' ');
37
- return {
38
- chain: chain,
39
- collectionId: _constants.ORDINAL_COLLECTION,
40
- id: event.extrinsic_hash,
41
- description: JSON.stringify(ordinalData),
42
- name,
43
- owner: address,
44
- properties: properties
45
- };
46
- }
47
- return undefined;
48
- };
49
- class OrdinalNftApi extends _nft.BaseNftApi {
50
- constructor(addresses, chain, subscanChain) {
51
- super(chain, undefined, addresses);
52
- this.subscanChain = subscanChain;
53
- }
54
- async handleNft(address, handleNftParams) {
55
- const events = await _handlers.state.subscanService.addRequest(async () => {
56
- return await (0, _utils.fetchRemarkEvent)(this.subscanChain, address);
57
- });
58
- if (events && events.length) {
59
- const extrinsicIds = events.map(data => data.extrinsic_index);
60
- const extrinsicParams = await _handlers.state.subscanService.addRequest(async () => {
61
- return await (0, _utils.fetchExtrinsicParams)(this.subscanChain, extrinsicIds);
62
- });
63
- const items = [];
64
- for (const data of extrinsicParams) {
65
- const {
66
- extrinsic_index: extrinsicIndex,
67
- params
68
- } = data;
69
- const event = events.find(item => item.extrinsic_index === extrinsicIndex);
70
- if (params.length === 1 && event) {
71
- const [param] = params;
72
- if (param.name === 'remark') {
73
- const childParam = {
74
- name: param.name,
75
- type: param.type,
76
- value: param.value
77
- };
78
- const item = parseParamData(childParam, event, this.chain, address);
79
- if (item) {
80
- items.push(item);
81
- }
82
- } else if (param.name === 'calls') {
83
- const children = param.value;
84
- for (const child of children) {
85
- if (child.call_module === 'System' && child.call_name === 'remark_with_event') {
86
- for (const childParam of child.params) {
87
- const item = parseParamData(childParam, event, this.chain, address);
88
- if (item) {
89
- items.push(item);
90
- }
91
- }
92
- }
93
- }
94
- }
95
- }
96
- }
97
- if (items.length) {
98
- // handleNftParams.updateCollection(this.chain, {
99
- // chain: this.chain,
100
- // collectionId: ORDINAL_COLLECTION
101
- // });
102
-
103
- for (const item of items) {
104
- handleNftParams.updateItem(this.chain, item, address);
105
- }
106
- }
107
- }
108
- }
109
- async handleNfts(params) {
110
- await Promise.all(this.addresses.map(address => this.handleNft(address, params)));
111
- }
112
- async fetchNfts(params) {
113
- try {
114
- await this.handleNfts(params);
115
- } catch (e) {
116
- return 0;
117
- }
118
- return 1;
119
- }
120
- }
121
- exports.default = OrdinalNftApi;
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fetchRemarkEvent = exports.fetchExtrinsicParams = void 0;
7
- var _constants = require("./constants");
8
- // Copyright 2019-2022 @subwallet/extension-base authors & contributors
9
- // SPDX-License-Identifier: Apache-2.0
10
-
11
- const fetchRemarkEvent = async (chain, address) => {
12
- const params = {
13
- ..._constants.BASE_FETCH_ORDINAL_EVENT_DATA,
14
- address
15
- };
16
- const response = await fetch(_constants.GET_EVENT_LIST_API.replace('{{chain}}', chain), {
17
- method: 'POST',
18
- headers: {
19
- 'Content-Type': 'application/json'
20
- },
21
- body: JSON.stringify(params)
22
- });
23
- const data = await response.json();
24
- return data.data.events;
25
- };
26
- exports.fetchRemarkEvent = fetchRemarkEvent;
27
- const fetchExtrinsicParams = async (chain, extrinsicIndexes) => {
28
- const params = {
29
- extrinsic_index: extrinsicIndexes
30
- };
31
- const response = await fetch(_constants.GET_EXTRINSIC_PARAMS_API.replace('{{chain}}', chain), {
32
- method: 'POST',
33
- headers: {
34
- 'Content-Type': 'application/json'
35
- },
36
- body: JSON.stringify(params)
37
- });
38
- const data = await response.json();
39
- return data.data;
40
- };
41
- exports.fetchExtrinsicParams = fetchExtrinsicParams;
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.YIELD_POOL_STAT_REFRESH_INTERVAL = exports.YIELD_POOL_MIN_AMOUNT_PERCENT = exports.YIELD_EXTRINSIC_TYPES = exports.DEFAULT_YIELD_FIRST_STEP = void 0;
7
- exports.calculateAlternativeFee = calculateAlternativeFee;
8
- exports.convertDerivativeToOriginToken = convertDerivativeToOriginToken;
9
- exports.syntheticSelectedValidators = void 0;
10
- var _KoniTypes = require("@subwallet/extension-base/background/KoniTypes");
11
- var _utils = require("@subwallet/extension-base/services/chain-service/utils");
12
- var _types = require("@subwallet/extension-base/types");
13
- // Copyright 2019-2022 @subwallet/extension-base
14
- // SPDX-License-Identifier: Apache-2.0
15
-
16
- const syntheticSelectedValidators = ['15MLn9YQaHZ4GMkhK3qXqR5iGGSdULyJ995ctjeBgFRseyi6', '1REAJ1k691g5Eqqg9gL7vvZCBG7FCCZ8zgQkZWd4va5ESih', '1yGJ3h7TQuJWLYSsUVPZbM8aR8UsQXCqMvrFx5Fn1ktiAmq', '16GDRhRYxk42paoK6TfHAqWej8PdDDUwdDazjv4bAn4KGNeb', '13Ybj8CPEArUee78DxUAP9yX3ABmFNVQME1ZH4w8HVncHGzc', '14yx4vPAACZRhoDQm1dyvXD3QdRQyCRRCe5tj1zPomhhS29a', '14Vh8S1DzzycngbAB9vqEgPFR9JpSvmF1ezihTUES1EaHAV', '153YD8ZHD9dRh82U419bSCB5SzWhbdAFzjj4NtA5pMazR2yC', '1LUckyocmz9YzeQZHVpBvYYRGXb3rnSm2tvfz79h3G3JDgP', '14oRE62MB1SWR6h5RTx3GY5HK2oZipi1Gp3zdiLwVYLfEyRZ', '1cFsLn7o74nmjbRyDtMAnMpQMc5ZLsjgCSz9Np2mcejUK83', '15ZvLonEseaWZNy8LDkXXj3Y8bmAjxCjwvpy4pXWSL4nGSBs', '1NebF2xZHb4TJJpiqZZ3reeTo8dZov6LZ49qZqcHHbsmHfo', '1HmAqbBRrWvsqbLkvpiVDkdA2PcctUE5JUe3qokEh1FN455', '15tfUt4iQNjMyhZiJGBf4EpETE2KqtW1nfJwbBT1MvWjvcK9', '12RXTLiaYh59PokjZVhQvKzcfBEB5CvDnjKKUmDUotzcTH3S'];
17
- exports.syntheticSelectedValidators = syntheticSelectedValidators;
18
- function calculateAlternativeFee(feeInfo) {
19
- return feeInfo.partialFee;
20
- }
21
- const DEFAULT_YIELD_FIRST_STEP = {
22
- id: 0,
23
- name: 'Fill information',
24
- type: _types.YieldStepType.DEFAULT
25
- };
26
- exports.DEFAULT_YIELD_FIRST_STEP = DEFAULT_YIELD_FIRST_STEP;
27
- const YIELD_EXTRINSIC_TYPES = [_KoniTypes.ExtrinsicType.MINT_VDOT, _KoniTypes.ExtrinsicType.MINT_LDOT, _KoniTypes.ExtrinsicType.MINT_SDOT, _KoniTypes.ExtrinsicType.MINT_QDOT, _KoniTypes.ExtrinsicType.MINT_STDOT, _KoniTypes.ExtrinsicType.REDEEM_QDOT, _KoniTypes.ExtrinsicType.REDEEM_SDOT, _KoniTypes.ExtrinsicType.REDEEM_VDOT, _KoniTypes.ExtrinsicType.REDEEM_LDOT, _KoniTypes.ExtrinsicType.REDEEM_STDOT, _KoniTypes.ExtrinsicType.STAKING_JOIN_POOL, _KoniTypes.ExtrinsicType.STAKING_CLAIM_REWARD, _KoniTypes.ExtrinsicType.STAKING_LEAVE_POOL, _KoniTypes.ExtrinsicType.STAKING_POOL_WITHDRAW];
28
- exports.YIELD_EXTRINSIC_TYPES = YIELD_EXTRINSIC_TYPES;
29
- const YIELD_POOL_STAT_REFRESH_INTERVAL = 90000;
30
- exports.YIELD_POOL_STAT_REFRESH_INTERVAL = YIELD_POOL_STAT_REFRESH_INTERVAL;
31
- const YIELD_POOL_MIN_AMOUNT_PERCENT = {
32
- DOT___acala_liquid_staking: 0.98,
33
- DOT___bifrost_liquid_staking: 0.99,
34
- DOT___parallel_liquid_staking: 0.97,
35
- default: 0.98
36
- };
37
- exports.YIELD_POOL_MIN_AMOUNT_PERCENT = YIELD_POOL_MIN_AMOUNT_PERCENT;
38
- function convertDerivativeToOriginToken(amount, poolInfo, derivativeTokenInfo, originTokenInfo) {
39
- var _poolInfo$statistic, _poolInfo$statistic$a;
40
- const derivativeDecimals = (0, _utils._getAssetDecimals)(derivativeTokenInfo);
41
- const originDecimals = (0, _utils._getAssetDecimals)(originTokenInfo);
42
- const exchangeRate = ((_poolInfo$statistic = poolInfo.statistic) === null || _poolInfo$statistic === void 0 ? void 0 : (_poolInfo$statistic$a = _poolInfo$statistic.assetEarning) === null || _poolInfo$statistic$a === void 0 ? void 0 : _poolInfo$statistic$a[0].exchangeRate) || 1;
43
- const formattedAmount = parseInt(amount) / 10 ** derivativeDecimals; // TODO: decimals
44
- const minAmount = formattedAmount * exchangeRate;
45
- return Math.floor(minAmount * 10 ** originDecimals);
46
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports._STAKING_CHAIN_GROUP = exports.ST_LIQUID_TOKEN_ABI = void 0;
7
- // Copyright 2019-2022 @subwallet/extension-base
8
- // SPDX-License-Identifier: Apache-2.0
9
-
10
- const _STAKING_CHAIN_GROUP = {
11
- relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'ternoa_alphanet', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet'],
12
- para: ['moonbeam', 'moonriver', 'moonbase', 'turing', 'turingStaging', 'bifrost', 'bifrost_testnet', 'calamari_test', 'calamari'],
13
- astar: ['astar', 'shiden', 'shibuya'],
14
- amplitude: ['amplitude', 'amplitude_test', 'kilt', 'kilt_peregrine', 'pendulum'],
15
- // amplitude and kilt only share some common logic
16
- kilt: ['kilt', 'kilt_peregrine'],
17
- nominationPool: ['polkadot', 'kusama', 'westend', 'alephTest', 'aleph', 'kate', 'vara_network', 'goldberg_testnet'],
18
- bifrost: ['bifrost', 'bifrost_testnet'],
19
- aleph: ['aleph', 'alephTest'],
20
- // A0 has distinct tokenomics
21
- ternoa: ['ternoa', 'ternoa_alphanet'],
22
- liquidStaking: ['bifrost_dot', 'acala', 'parallel', 'moonbeam'],
23
- lending: ['interlay']
24
- };
25
-
26
- // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
27
- exports._STAKING_CHAIN_GROUP = _STAKING_CHAIN_GROUP;
28
- const ST_LIQUID_TOKEN_ABI = require('./abis/st_liquid_token_abi.json');
29
- exports.ST_LIQUID_TOKEN_ABI = ST_LIQUID_TOKEN_ABI;
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _chains = require("./chains");
7
- Object.keys(_chains).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _chains[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _chains[key];
14
- }
15
- });
16
- });
17
- var _step = require("./step");
18
- Object.keys(_step).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _step[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _step[key];
25
- }
26
- });
27
- });
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fakeAddress = exports.DEFAULT_YIELD_FIRST_STEP = void 0;
7
- var _types = require("@subwallet/extension-base/types");
8
- // Copyright 2019-2022 @subwallet/extension-base
9
- // SPDX-License-Identifier: Apache-2.0
10
-
11
- const DEFAULT_YIELD_FIRST_STEP = {
12
- id: 0,
13
- name: 'Fill information',
14
- type: _types.YieldStepType.DEFAULT
15
- };
16
- exports.DEFAULT_YIELD_FIRST_STEP = DEFAULT_YIELD_FIRST_STEP;
17
- const fakeAddress = '15MLn9YQaHZ4GMkhK3qXqR5iGGSdULyJ995ctjeBgFRseyi6';
18
- exports.fakeAddress = fakeAddress;
@@ -1,259 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _KoniTypes = require("@subwallet/extension-base/background/KoniTypes");
8
- var _constants = require("@subwallet/extension-base/constants");
9
- var _constants2 = require("@subwallet/extension-base/services/earning-service/constants");
10
- var _utils = require("@subwallet/extension-base/utils");
11
- var _util = require("@polkadot/util");
12
- // Copyright 2019-2022 @subwallet/extension-base
13
- // SPDX-License-Identifier: Apache-2.0
14
-
15
- /**
16
- * @class BasePoolHandler
17
- * @description Base pool handler
18
- * */
19
- class BasePoolHandler {
20
- /** Koni state */
21
-
22
- /** Pool's chain */
23
-
24
- /** Pool's logo */
25
-
26
- /** Pool's slug */
27
-
28
- /** Pool's type */
29
-
30
- /** Pool's name */
31
-
32
- /** Pool's short name */
33
-
34
- /** Pool's transaction type */
35
- transactionChainType = _KoniTypes.ChainType.SUBSTRATE;
36
-
37
- /** Pool's available method */
38
-
39
- /**
40
- * @constructor
41
- * @param {KoniState} state - Koni state
42
- * @param {string} chain - Pool's chain
43
- * */
44
- constructor(state, chain) {
45
- this.state = state;
46
- this.chain = chain;
47
- this._logo = chain;
48
- }
49
- get logo() {
50
- return this._logo;
51
- }
52
- get group() {
53
- const groupSlug = this.nativeToken.multiChainAsset;
54
- return groupSlug || this.nativeToken.slug;
55
- }
56
- get isActive() {
57
- return this.state.activeChainSlugs.includes(this.chain);
58
- }
59
- get substrateApi() {
60
- return this.state.getSubstrateApi(this.chain);
61
- }
62
- get evmApi() {
63
- return this.state.getEvmApi(this.chain);
64
- }
65
- get chainInfo() {
66
- return this.state.getChainInfo(this.chain);
67
- }
68
- get nativeToken() {
69
- return this.state.getNativeTokenInfo(this.chain);
70
- }
71
- get baseInfo() {
72
- return {
73
- group: this.group,
74
- chain: this.chain,
75
- slug: this.slug
76
- };
77
- }
78
- get maintainBalance() {
79
- const decimals = this.nativeToken.decimals || 0;
80
- const defaultMaintainBalance = new _util.BN(1).mul(_util.BN_TEN.pow(new _util.BN(decimals)));
81
- const ed = new _util.BN(this.nativeToken.minAmount || '0');
82
- const maintainBalance = ed.gte(defaultMaintainBalance) ? new _util.BN(15).mul(ed).div(_util.BN_TEN) : defaultMaintainBalance;
83
- return maintainBalance.toString();
84
- }
85
- get metadataInfo() {
86
- return {
87
- name: this.name,
88
- shortName: this.shortName,
89
- logo: this.logo,
90
- inputAsset: this.nativeToken.slug,
91
- isAvailable: true,
92
- maintainAsset: this.nativeToken.slug,
93
- maintainBalance: this.maintainBalance,
94
- availableMethod: this.availableMethod
95
- };
96
- }
97
-
98
- /** Can mint when haven't enough native token (use input token for fee) */
99
- get isPoolSupportAlternativeFee() {
100
- return false;
101
- }
102
- async getPoolInfo() {
103
- return this.state.dbService.getYieldPool(this.slug);
104
- }
105
- async getPoolPosition(address) {
106
- return this.state.dbService.getYieldPositionByAddressAndSlug(address, this.slug);
107
- }
108
-
109
- /* Subscribe data */
110
-
111
- /** Subscribe pool info */
112
-
113
- /* Subscribe data */
114
-
115
- /* Join action */
116
-
117
- /* Early validate */
118
-
119
- async earlyValidate(request) {
120
- var _poolInfo$statistic, _poolInfo$statistic2, _poolInfo$statistic2$;
121
- const poolInfo = await this.getPoolInfo();
122
- if (!poolInfo || !((_poolInfo$statistic = poolInfo.statistic) !== null && _poolInfo$statistic !== void 0 && _poolInfo$statistic.earningThreshold.join)) {
123
- return {
124
- passed: false,
125
- errorMessage: 'There\'s a trouble fetching data, please check your internet connection and try again'
126
- };
127
- }
128
- if (request.address === _constants.ALL_ACCOUNT_KEY) {
129
- return {
130
- passed: true
131
- };
132
- }
133
- const nativeTokenInfo = this.state.chainService.getNativeTokenInfo(this.chain);
134
- const nativeTokenBalance = await this.state.balanceService.getTokenFreeBalance(request.address, this.chain);
135
- const bnNativeTokenBalance = new _util.BN(nativeTokenBalance.value);
136
- if (bnNativeTokenBalance.lte(new _util.BN((_poolInfo$statistic2 = poolInfo.statistic) === null || _poolInfo$statistic2 === void 0 ? void 0 : (_poolInfo$statistic2$ = _poolInfo$statistic2.earningThreshold) === null || _poolInfo$statistic2$ === void 0 ? void 0 : _poolInfo$statistic2$.join))) {
137
- var _poolInfo$statistic3, _poolInfo$statistic3$;
138
- const minJoin = (0, _utils.formatNumber)(((_poolInfo$statistic3 = poolInfo.statistic) === null || _poolInfo$statistic3 === void 0 ? void 0 : (_poolInfo$statistic3$ = _poolInfo$statistic3.earningThreshold) === null || _poolInfo$statistic3$ === void 0 ? void 0 : _poolInfo$statistic3$.join) || '0', this.nativeToken.decimals || 0);
139
- const originChain = this.state.getChainInfo(nativeTokenInfo.originChain);
140
- return {
141
- passed: false,
142
- errorMessage: `You need at least ${minJoin} ${nativeTokenInfo.symbol} (${originChain.name}) to start earning`
143
- };
144
- }
145
- return {
146
- passed: true
147
- };
148
- }
149
-
150
- /* Early validate */
151
-
152
- /* Generate steps */
153
-
154
- /**
155
- * @function firstStepFee
156
- * */
157
- get firstStepFee() {
158
- return {
159
- slug: ''
160
- };
161
- }
162
-
163
- /**
164
- * @function defaultSubmitStep
165
- * @description Default submit step data
166
- * */
167
-
168
- /**
169
- * @async
170
- * @function getTokenApproveStep
171
- * @param {OptimalYieldPathParams} params - base param to join pool
172
- * @description Generate token approve step data
173
- * */
174
- async getTokenApproveStep(params) {
175
- return Promise.resolve(undefined);
176
- }
177
-
178
- /**
179
- * @async
180
- * @function getXcmStep
181
- * @param {OptimalYieldPathParams} params - base param to join pool
182
- * @description Generate token approve step data
183
- * */
184
- async getXcmStep(params) {
185
- return Promise.resolve(undefined);
186
- }
187
-
188
- /**
189
- * @async
190
- * @function getSubmitStep
191
- * @param {OptimalYieldPathParams} params - base param to join pool
192
- * @description Generate token approve step data
193
- * */
194
-
195
- /** Generate the optimal steps to join pool */
196
- async generateOptimalPath(params) {
197
- const result = {
198
- totalFee: [this.firstStepFee],
199
- steps: [_constants2.DEFAULT_YIELD_FIRST_STEP]
200
- };
201
- try {
202
- const stepFunctions = [this.getTokenApproveStep, this.getXcmStep, this.getSubmitStep];
203
- for (const stepFunction of stepFunctions) {
204
- const step = await stepFunction.bind(this, params)();
205
- if (step) {
206
- const [info, fee] = step;
207
- result.steps.push({
208
- id: result.steps.length,
209
- ...info
210
- });
211
- result.totalFee.push(fee);
212
- }
213
- }
214
- return result;
215
- } catch (e) {
216
- const errorMessage = e.message;
217
- if (errorMessage.includes('network')) {
218
- result.connectionError = errorMessage.split(' ')[0];
219
- }
220
-
221
- /* Submit step */
222
-
223
- const [step, fee] = this.defaultSubmitStep;
224
- result.steps.push({
225
- id: result.steps.length,
226
- ...step
227
- });
228
- result.totalFee.push(fee);
229
-
230
- /* Submit step */
231
-
232
- return result;
233
- }
234
- }
235
-
236
- /* Generate steps */
237
-
238
- /* Validate */
239
-
240
- /** Validate param to join the pool */
241
-
242
- /** Create `transaction` to leave the pool */
243
- async handleYieldLeave(fastLeave, amount, address, selectedTarget) {
244
- if (fastLeave) {
245
- return this.handleYieldRedeem(amount, address, selectedTarget);
246
- } else {
247
- return this.handleYieldUnstake(amount, address, selectedTarget);
248
- }
249
- }
250
-
251
- /* Leave action */
252
-
253
- /* Other actions */
254
-
255
- /** Create `transaction` to withdraw unstaked amount */
256
-
257
- /* Other actions */
258
- }
259
- exports.default = BasePoolHandler;
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {
8
- BasePoolHandler: true,
9
- NominationPoolHandler: true
10
- };
11
- Object.defineProperty(exports, "BasePoolHandler", {
12
- enumerable: true,
13
- get: function () {
14
- return _base.default;
15
- }
16
- });
17
- Object.defineProperty(exports, "NominationPoolHandler", {
18
- enumerable: true,
19
- get: function () {
20
- return _nominationPool.default;
21
- }
22
- });
23
- var _base = _interopRequireDefault(require("./base"));
24
- var _nominationPool = _interopRequireDefault(require("./nomination-pool"));
25
- var _lending = require("./lending");
26
- Object.keys(_lending).forEach(function (key) {
27
- if (key === "default" || key === "__esModule") return;
28
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
29
- if (key in exports && exports[key] === _lending[key]) return;
30
- Object.defineProperty(exports, key, {
31
- enumerable: true,
32
- get: function () {
33
- return _lending[key];
34
- }
35
- });
36
- });
37
- var _liquidStaking = require("./liquid-staking");
38
- Object.keys(_liquidStaking).forEach(function (key) {
39
- if (key === "default" || key === "__esModule") return;
40
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
41
- if (key in exports && exports[key] === _liquidStaking[key]) return;
42
- Object.defineProperty(exports, key, {
43
- enumerable: true,
44
- get: function () {
45
- return _liquidStaking[key];
46
- }
47
- });
48
- });
49
- var _nativeStaking = require("./native-staking");
50
- Object.keys(_nativeStaking).forEach(function (key) {
51
- if (key === "default" || key === "__esModule") return;
52
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
53
- if (key in exports && exports[key] === _nativeStaking[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _nativeStaking[key];
58
- }
59
- });
60
- });
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _types = require("@subwallet/extension-base/types");
9
- var _special = _interopRequireDefault(require("../special"));
10
- // Copyright 2019-2022 @subwallet/extension-base
11
- // SPDX-License-Identifier: Apache-2.0
12
-
13
- class BaseLendingPoolHandler extends _special.default {
14
- type = _types.YieldPoolType.LENDING;
15
-
16
- /* Subscribe pool info */
17
-
18
- /* Subscribe pool info */
19
- }
20
- exports.default = BaseLendingPoolHandler;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "InterlayLendingPoolHandler", {
8
- enumerable: true,
9
- get: function () {
10
- return _interlay.default;
11
- }
12
- });
13
- var _interlay = _interopRequireDefault(require("./interlay"));