@yaswap/wallet-core 2.0.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 (563) hide show
  1. package/CHANGELOG.md +804 -0
  2. package/README.md +163 -0
  3. package/dist/package.json +76 -0
  4. package/dist/src/build.config.d.ts +46 -0
  5. package/dist/src/build.config.js +237 -0
  6. package/dist/src/build.config.js.map +1 -0
  7. package/dist/src/factory/client/clients.d.ts +11 -0
  8. package/dist/src/factory/client/clients.js +119 -0
  9. package/dist/src/factory/client/clients.js.map +1 -0
  10. package/dist/src/factory/client/evm.d.ts +6 -0
  11. package/dist/src/factory/client/evm.js +71 -0
  12. package/dist/src/factory/client/evm.js.map +1 -0
  13. package/dist/src/factory/client/index.d.ts +11 -0
  14. package/dist/src/factory/client/index.js +38 -0
  15. package/dist/src/factory/client/index.js.map +1 -0
  16. package/dist/src/factory/client/nft.d.ts +4 -0
  17. package/dist/src/factory/client/nft.js +26 -0
  18. package/dist/src/factory/client/nft.js.map +1 -0
  19. package/dist/src/factory/index.d.ts +3 -0
  20. package/dist/src/factory/index.js +7 -0
  21. package/dist/src/factory/index.js.map +1 -0
  22. package/dist/src/factory/settings.d.ts +4 -0
  23. package/dist/src/factory/settings.js +27 -0
  24. package/dist/src/factory/settings.js.map +1 -0
  25. package/dist/src/factory/swap/index.d.ts +4 -0
  26. package/dist/src/factory/swap/index.js +66 -0
  27. package/dist/src/factory/swap/index.js.map +1 -0
  28. package/dist/src/index.d.ts +1619 -0
  29. package/dist/src/index.js +38 -0
  30. package/dist/src/index.js.map +1 -0
  31. package/dist/src/index.test.d.ts +1 -0
  32. package/dist/src/index.test.js +187 -0
  33. package/dist/src/index.test.js.map +1 -0
  34. package/dist/src/nameResolvers/nameResolver.d.ts +7 -0
  35. package/dist/src/nameResolvers/nameResolver.js +3 -0
  36. package/dist/src/nameResolvers/nameResolver.js.map +1 -0
  37. package/dist/src/nameResolvers/uns.d.ts +12 -0
  38. package/dist/src/nameResolvers/uns.js +83 -0
  39. package/dist/src/nameResolvers/uns.js.map +1 -0
  40. package/dist/src/nameResolvers/uns.test.d.ts +1 -0
  41. package/dist/src/nameResolvers/uns.test.js +29 -0
  42. package/dist/src/nameResolvers/uns.test.js.map +1 -0
  43. package/dist/src/store/actions/acceptTermsAndConditions.d.ts +4 -0
  44. package/dist/src/store/actions/acceptTermsAndConditions.js +17 -0
  45. package/dist/src/store/actions/acceptTermsAndConditions.js.map +1 -0
  46. package/dist/src/store/actions/acceptTermsAndConditions.test.d.ts +1 -0
  47. package/dist/src/store/actions/acceptTermsAndConditions.test.js +22 -0
  48. package/dist/src/store/actions/acceptTermsAndConditions.test.js.map +1 -0
  49. package/dist/src/store/actions/accounts/createAccount.d.ts +7 -0
  50. package/dist/src/store/actions/accounts/createAccount.js +27 -0
  51. package/dist/src/store/actions/accounts/createAccount.js.map +1 -0
  52. package/dist/src/store/actions/accounts/createAccount.test.d.ts +1 -0
  53. package/dist/src/store/actions/accounts/createAccount.test.js +29 -0
  54. package/dist/src/store/actions/accounts/createAccount.test.js.map +1 -0
  55. package/dist/src/store/actions/accounts/index.d.ts +5 -0
  56. package/dist/src/store/actions/accounts/index.js +9 -0
  57. package/dist/src/store/actions/accounts/index.js.map +1 -0
  58. package/dist/src/store/actions/accounts/removeAccount.d.ts +7 -0
  59. package/dist/src/store/actions/accounts/removeAccount.js +12 -0
  60. package/dist/src/store/actions/accounts/removeAccount.js.map +1 -0
  61. package/dist/src/store/actions/accounts/removeAccount.test.d.ts +1 -0
  62. package/dist/src/store/actions/accounts/removeAccount.test.js +53 -0
  63. package/dist/src/store/actions/accounts/removeAccount.test.js.map +1 -0
  64. package/dist/src/store/actions/accounts/toggleAccount.d.ts +8 -0
  65. package/dist/src/store/actions/accounts/toggleAccount.js +19 -0
  66. package/dist/src/store/actions/accounts/toggleAccount.js.map +1 -0
  67. package/dist/src/store/actions/accounts/toggleAccount.test.d.ts +1 -0
  68. package/dist/src/store/actions/accounts/toggleAccount.test.js +44 -0
  69. package/dist/src/store/actions/accounts/toggleAccount.test.js.map +1 -0
  70. package/dist/src/store/actions/accounts/toggleBlockchain.d.ts +9 -0
  71. package/dist/src/store/actions/accounts/toggleBlockchain.js +14 -0
  72. package/dist/src/store/actions/accounts/toggleBlockchain.js.map +1 -0
  73. package/dist/src/store/actions/accounts/updateAccount.d.ts +26 -0
  74. package/dist/src/store/actions/accounts/updateAccount.js +14 -0
  75. package/dist/src/store/actions/accounts/updateAccount.js.map +1 -0
  76. package/dist/src/store/actions/addCustomToken.d.ts +12 -0
  77. package/dist/src/store/actions/addCustomToken.js +12 -0
  78. package/dist/src/store/actions/addCustomToken.js.map +1 -0
  79. package/dist/src/store/actions/addCustomToken.test.d.ts +1 -0
  80. package/dist/src/store/actions/addCustomToken.test.js +59 -0
  81. package/dist/src/store/actions/addCustomToken.test.js.map +1 -0
  82. package/dist/src/store/actions/addExternalConnection.d.ts +9 -0
  83. package/dist/src/store/actions/addExternalConnection.js +13 -0
  84. package/dist/src/store/actions/addExternalConnection.js.map +1 -0
  85. package/dist/src/store/actions/addExternalConnection.test.d.ts +1 -0
  86. package/dist/src/store/actions/addExternalConnection.test.js +100 -0
  87. package/dist/src/store/actions/addExternalConnection.test.js.map +1 -0
  88. package/dist/src/store/actions/analytics.d.ts +21 -0
  89. package/dist/src/store/actions/analytics.js +58 -0
  90. package/dist/src/store/actions/analytics.js.map +1 -0
  91. package/dist/src/store/actions/analytics.test.d.ts +1 -0
  92. package/dist/src/store/actions/analytics.test.js +33 -0
  93. package/dist/src/store/actions/analytics.test.js.map +1 -0
  94. package/dist/src/store/actions/changeActiveNetwork.d.ts +5 -0
  95. package/dist/src/store/actions/changeActiveNetwork.js +13 -0
  96. package/dist/src/store/actions/changeActiveNetwork.js.map +1 -0
  97. package/dist/src/store/actions/changeActiveWalletId.d.ts +5 -0
  98. package/dist/src/store/actions/changeActiveWalletId.js +11 -0
  99. package/dist/src/store/actions/changeActiveWalletId.js.map +1 -0
  100. package/dist/src/store/actions/changeActiveWalletId.test.d.ts +1 -0
  101. package/dist/src/store/actions/changeActiveWalletId.test.js +40 -0
  102. package/dist/src/store/actions/changeActiveWalletId.test.js.map +1 -0
  103. package/dist/src/store/actions/changePassword.d.ts +4 -0
  104. package/dist/src/store/actions/changePassword.js +13 -0
  105. package/dist/src/store/actions/changePassword.js.map +1 -0
  106. package/dist/src/store/actions/changePassword.test.d.ts +1 -0
  107. package/dist/src/store/actions/changePassword.test.js +22 -0
  108. package/dist/src/store/actions/changePassword.test.js.map +1 -0
  109. package/dist/src/store/actions/checkPendingActions.d.ts +5 -0
  110. package/dist/src/store/actions/checkPendingActions.js +25 -0
  111. package/dist/src/store/actions/checkPendingActions.js.map +1 -0
  112. package/dist/src/store/actions/clearErrorLog.d.ts +2 -0
  113. package/dist/src/store/actions/clearErrorLog.js +10 -0
  114. package/dist/src/store/actions/clearErrorLog.js.map +1 -0
  115. package/dist/src/store/actions/createWallet.d.ts +7 -0
  116. package/dist/src/store/actions/createWallet.js +90 -0
  117. package/dist/src/store/actions/createWallet.js.map +1 -0
  118. package/dist/src/store/actions/createWallet.test.d.ts +1 -0
  119. package/dist/src/store/actions/createWallet.test.js +41 -0
  120. package/dist/src/store/actions/createWallet.test.js.map +1 -0
  121. package/dist/src/store/actions/customChainSettings.d.ts +15 -0
  122. package/dist/src/store/actions/customChainSettings.js +37 -0
  123. package/dist/src/store/actions/customChainSettings.js.map +1 -0
  124. package/dist/src/store/actions/disableAssets.d.ts +7 -0
  125. package/dist/src/store/actions/disableAssets.js +28 -0
  126. package/dist/src/store/actions/disableAssets.js.map +1 -0
  127. package/dist/src/store/actions/disableEthereumInjection.d.ts +2 -0
  128. package/dist/src/store/actions/disableEthereumInjection.js +11 -0
  129. package/dist/src/store/actions/disableEthereumInjection.js.map +1 -0
  130. package/dist/src/store/actions/disableEthereumInjection.test.d.ts +1 -0
  131. package/dist/src/store/actions/disableEthereumInjection.test.js +24 -0
  132. package/dist/src/store/actions/disableEthereumInjection.test.js.map +1 -0
  133. package/dist/src/store/actions/enableAssets.d.ts +7 -0
  134. package/dist/src/store/actions/enableAssets.js +65 -0
  135. package/dist/src/store/actions/enableAssets.js.map +1 -0
  136. package/dist/src/store/actions/enableAssets.test.d.ts +1 -0
  137. package/dist/src/store/actions/enableAssets.test.js +37 -0
  138. package/dist/src/store/actions/enableAssets.test.js.map +1 -0
  139. package/dist/src/store/actions/enableDisableAssets.test.d.ts +1 -0
  140. package/dist/src/store/actions/enableDisableAssets.test.js +79 -0
  141. package/dist/src/store/actions/enableDisableAssets.test.js.map +1 -0
  142. package/dist/src/store/actions/enableEthereumInjection.d.ts +2 -0
  143. package/dist/src/store/actions/enableEthereumInjection.js +11 -0
  144. package/dist/src/store/actions/enableEthereumInjection.js.map +1 -0
  145. package/dist/src/store/actions/exportPrivateKey.d.ts +9 -0
  146. package/dist/src/store/actions/exportPrivateKey.js +12 -0
  147. package/dist/src/store/actions/exportPrivateKey.js.map +1 -0
  148. package/dist/src/store/actions/exportPrivateKey.test.d.ts +1 -0
  149. package/dist/src/store/actions/exportPrivateKey.test.js +36 -0
  150. package/dist/src/store/actions/exportPrivateKey.test.js.map +1 -0
  151. package/dist/src/store/actions/fetchTokenDetails.d.ts +11 -0
  152. package/dist/src/store/actions/fetchTokenDetails.js +22 -0
  153. package/dist/src/store/actions/fetchTokenDetails.js.map +1 -0
  154. package/dist/src/store/actions/forgetDappConnections.d.ts +2 -0
  155. package/dist/src/store/actions/forgetDappConnections.js +11 -0
  156. package/dist/src/store/actions/forgetDappConnections.js.map +1 -0
  157. package/dist/src/store/actions/getLockForAsset.d.ts +8 -0
  158. package/dist/src/store/actions/getLockForAsset.js +34 -0
  159. package/dist/src/store/actions/getLockForAsset.js.map +1 -0
  160. package/dist/src/store/actions/getQuotes.d.ts +13 -0
  161. package/dist/src/store/actions/getQuotes.js +70 -0
  162. package/dist/src/store/actions/getQuotes.js.map +1 -0
  163. package/dist/src/store/actions/getQuotes.test.d.ts +1 -0
  164. package/dist/src/store/actions/getQuotes.test.js +30 -0
  165. package/dist/src/store/actions/getQuotes.test.js.map +1 -0
  166. package/dist/src/store/actions/getUnusedAddresses.d.ts +8 -0
  167. package/dist/src/store/actions/getUnusedAddresses.js +51 -0
  168. package/dist/src/store/actions/getUnusedAddresses.js.map +1 -0
  169. package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.d.ts +16 -0
  170. package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js +57 -0
  171. package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js.map +1 -0
  172. package/dist/src/store/actions/hardware-wallet/index.d.ts +1 -0
  173. package/dist/src/store/actions/hardware-wallet/index.js +5 -0
  174. package/dist/src/store/actions/hardware-wallet/index.js.map +1 -0
  175. package/dist/src/store/actions/index.d.ts +47 -0
  176. package/dist/src/store/actions/index.js +51 -0
  177. package/dist/src/store/actions/index.js.map +1 -0
  178. package/dist/src/store/actions/initializeAddresses.d.ts +6 -0
  179. package/dist/src/store/actions/initializeAddresses.js +26 -0
  180. package/dist/src/store/actions/initializeAddresses.js.map +1 -0
  181. package/dist/src/store/actions/initializeAddresses.test.d.ts +1 -0
  182. package/dist/src/store/actions/initializeAddresses.test.js +58 -0
  183. package/dist/src/store/actions/initializeAddresses.test.js.map +1 -0
  184. package/dist/src/store/actions/lockWallet.d.ts +2 -0
  185. package/dist/src/store/actions/lockWallet.js +11 -0
  186. package/dist/src/store/actions/lockWallet.js.map +1 -0
  187. package/dist/src/store/actions/lockWallet.test.d.ts +1 -0
  188. package/dist/src/store/actions/lockWallet.test.js +24 -0
  189. package/dist/src/store/actions/lockWallet.test.js.map +1 -0
  190. package/dist/src/store/actions/logError.d.ts +3 -0
  191. package/dist/src/store/actions/logError.js +10 -0
  192. package/dist/src/store/actions/logError.js.map +1 -0
  193. package/dist/src/store/actions/logError.test.d.ts +1 -0
  194. package/dist/src/store/actions/logError.test.js +27 -0
  195. package/dist/src/store/actions/logError.test.js.map +1 -0
  196. package/dist/src/store/actions/newSwap.d.ts +12 -0
  197. package/dist/src/store/actions/newSwap.js +34 -0
  198. package/dist/src/store/actions/newSwap.js.map +1 -0
  199. package/dist/src/store/actions/performNextAction/index.d.ts +7 -0
  200. package/dist/src/store/actions/performNextAction/index.js +65 -0
  201. package/dist/src/store/actions/performNextAction/index.js.map +1 -0
  202. package/dist/src/store/actions/performNextAction/send.d.ts +7 -0
  203. package/dist/src/store/actions/performNextAction/send.js +54 -0
  204. package/dist/src/store/actions/performNextAction/send.js.map +1 -0
  205. package/dist/src/store/actions/performNextAction/sendNFT.d.ts +7 -0
  206. package/dist/src/store/actions/performNextAction/sendNFT.js +50 -0
  207. package/dist/src/store/actions/performNextAction/sendNFT.js.map +1 -0
  208. package/dist/src/store/actions/performNextAction/utils.d.ts +11 -0
  209. package/dist/src/store/actions/performNextAction/utils.js +42 -0
  210. package/dist/src/store/actions/performNextAction/utils.js.map +1 -0
  211. package/dist/src/store/actions/proxyMutation.d.ts +5 -0
  212. package/dist/src/store/actions/proxyMutation.js +9 -0
  213. package/dist/src/store/actions/proxyMutation.js.map +1 -0
  214. package/dist/src/store/actions/removeCustomToken.d.ts +7 -0
  215. package/dist/src/store/actions/removeCustomToken.js +11 -0
  216. package/dist/src/store/actions/removeCustomToken.js.map +1 -0
  217. package/dist/src/store/actions/retrySwap.d.ts +5 -0
  218. package/dist/src/store/actions/retrySwap.js +23 -0
  219. package/dist/src/store/actions/retrySwap.js.map +1 -0
  220. package/dist/src/store/actions/sendNFTTransaction.d.ts +4 -0
  221. package/dist/src/store/actions/sendNFTTransaction.js +47 -0
  222. package/dist/src/store/actions/sendNFTTransaction.js.map +1 -0
  223. package/dist/src/store/actions/sendTransaction.d.ts +17 -0
  224. package/dist/src/store/actions/sendTransaction.js +51 -0
  225. package/dist/src/store/actions/sendTransaction.js.map +1 -0
  226. package/dist/src/store/actions/sendTransaction.test.d.ts +1 -0
  227. package/dist/src/store/actions/sendTransaction.test.js +80 -0
  228. package/dist/src/store/actions/sendTransaction.test.js.map +1 -0
  229. package/dist/src/store/actions/setEthereumInjectionChain.d.ts +5 -0
  230. package/dist/src/store/actions/setEthereumInjectionChain.js +11 -0
  231. package/dist/src/store/actions/setEthereumInjectionChain.js.map +1 -0
  232. package/dist/src/store/actions/setEthereumInjectionChain.test.d.ts +1 -0
  233. package/dist/src/store/actions/setEthereumInjectionChain.test.js +20 -0
  234. package/dist/src/store/actions/setEthereumInjectionChain.test.js.map +1 -0
  235. package/dist/src/store/actions/setWhatsNewModalVersion.d.ts +4 -0
  236. package/dist/src/store/actions/setWhatsNewModalVersion.js +10 -0
  237. package/dist/src/store/actions/setWhatsNewModalVersion.js.map +1 -0
  238. package/dist/src/store/actions/setWhatsNewModalVersion.test.d.ts +1 -0
  239. package/dist/src/store/actions/setWhatsNewModalVersion.test.js +24 -0
  240. package/dist/src/store/actions/setWhatsNewModalVersion.test.js.map +1 -0
  241. package/dist/src/store/actions/showNotification.d.ts +2 -0
  242. package/dist/src/store/actions/showNotification.js +10 -0
  243. package/dist/src/store/actions/showNotification.js.map +1 -0
  244. package/dist/src/store/actions/toggleExperiment.d.ts +5 -0
  245. package/dist/src/store/actions/toggleExperiment.js +10 -0
  246. package/dist/src/store/actions/toggleExperiment.js.map +1 -0
  247. package/dist/src/store/actions/toggleExperiment.test.d.ts +1 -0
  248. package/dist/src/store/actions/toggleExperiment.test.js +34 -0
  249. package/dist/src/store/actions/toggleExperiment.test.js.map +1 -0
  250. package/dist/src/store/actions/toggleNFTStarred.d.ts +8 -0
  251. package/dist/src/store/actions/toggleNFTStarred.js +10 -0
  252. package/dist/src/store/actions/toggleNFTStarred.js.map +1 -0
  253. package/dist/src/store/actions/unlockWallet.d.ts +4 -0
  254. package/dist/src/store/actions/unlockWallet.js +22 -0
  255. package/dist/src/store/actions/unlockWallet.js.map +1 -0
  256. package/dist/src/store/actions/updateAccountBalance.d.ts +7 -0
  257. package/dist/src/store/actions/updateAccountBalance.js +29 -0
  258. package/dist/src/store/actions/updateAccountBalance.js.map +1 -0
  259. package/dist/src/store/actions/updateBalances.d.ts +9 -0
  260. package/dist/src/store/actions/updateBalances.js +169 -0
  261. package/dist/src/store/actions/updateBalances.js.map +1 -0
  262. package/dist/src/store/actions/updateBalances.test.d.ts +1 -0
  263. package/dist/src/store/actions/updateBalances.test.js +43 -0
  264. package/dist/src/store/actions/updateBalances.test.js.map +1 -0
  265. package/dist/src/store/actions/updateCurrenciesInfo.d.ts +5 -0
  266. package/dist/src/store/actions/updateCurrenciesInfo.js +14 -0
  267. package/dist/src/store/actions/updateCurrenciesInfo.js.map +1 -0
  268. package/dist/src/store/actions/updateFees.d.ts +6 -0
  269. package/dist/src/store/actions/updateFees.js +16 -0
  270. package/dist/src/store/actions/updateFees.js.map +1 -0
  271. package/dist/src/store/actions/updateFees.test.d.ts +1 -0
  272. package/dist/src/store/actions/updateFees.test.js +86 -0
  273. package/dist/src/store/actions/updateFees.test.js.map +1 -0
  274. package/dist/src/store/actions/updateFiatRates.d.ts +5 -0
  275. package/dist/src/store/actions/updateFiatRates.js +15 -0
  276. package/dist/src/store/actions/updateFiatRates.js.map +1 -0
  277. package/dist/src/store/actions/updateFiatRates.test.d.ts +1 -0
  278. package/dist/src/store/actions/updateFiatRates.test.js +43 -0
  279. package/dist/src/store/actions/updateFiatRates.test.js.map +1 -0
  280. package/dist/src/store/actions/updateMarketData.d.ts +8 -0
  281. package/dist/src/store/actions/updateMarketData.js +28 -0
  282. package/dist/src/store/actions/updateMarketData.js.map +1 -0
  283. package/dist/src/store/actions/updateMarketData.test.d.ts +1 -0
  284. package/dist/src/store/actions/updateMarketData.test.js +49 -0
  285. package/dist/src/store/actions/updateMarketData.test.js.map +1 -0
  286. package/dist/src/store/actions/updateNFTs.d.ts +7 -0
  287. package/dist/src/store/actions/updateNFTs.js +39 -0
  288. package/dist/src/store/actions/updateNFTs.js.map +1 -0
  289. package/dist/src/store/actions/updateNFTs.test.d.ts +1 -0
  290. package/dist/src/store/actions/updateNFTs.test.js +32 -0
  291. package/dist/src/store/actions/updateNFTs.test.js.map +1 -0
  292. package/dist/src/store/actions/updateTransactionFee.d.ts +11 -0
  293. package/dist/src/store/actions/updateTransactionFee.js +81 -0
  294. package/dist/src/store/actions/updateTransactionFee.js.map +1 -0
  295. package/dist/src/store/broker/notification.d.ts +4 -0
  296. package/dist/src/store/broker/notification.js +84 -0
  297. package/dist/src/store/broker/notification.js.map +1 -0
  298. package/dist/src/store/getters.d.ts +59 -0
  299. package/dist/src/store/getters.js +350 -0
  300. package/dist/src/store/getters.js.map +1 -0
  301. package/dist/src/store/index.d.ts +3524 -0
  302. package/dist/src/store/index.js +24 -0
  303. package/dist/src/store/index.js.map +1 -0
  304. package/dist/src/store/migrations/10_analytics_settings.d.ts +4 -0
  305. package/dist/src/store/migrations/10_analytics_settings.js +19 -0
  306. package/dist/src/store/migrations/10_analytics_settings.js.map +1 -0
  307. package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.d.ts +8 -0
  308. package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js +22 -0
  309. package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js.map +1 -0
  310. package/dist/src/store/migrations/13_rsk_fish_token.d.ts +4 -0
  311. package/dist/src/store/migrations/13_rsk_fish_token.js +19 -0
  312. package/dist/src/store/migrations/13_rsk_fish_token.js.map +1 -0
  313. package/dist/src/store/migrations/14_account_set_derivation_path.d.ts +4 -0
  314. package/dist/src/store/migrations/14_account_set_derivation_path.js +56 -0
  315. package/dist/src/store/migrations/14_account_set_derivation_path.js.map +1 -0
  316. package/dist/src/store/migrations/15_accounts_chains_set_enabled.d.ts +4 -0
  317. package/dist/src/store/migrations/15_accounts_chains_set_enabled.js +25 -0
  318. package/dist/src/store/migrations/15_accounts_chains_set_enabled.js.map +1 -0
  319. package/dist/src/store/migrations/16_enable_terra_chain.d.ts +4 -0
  320. package/dist/src/store/migrations/16_enable_terra_chain.js +10 -0
  321. package/dist/src/store/migrations/16_enable_terra_chain.js.map +1 -0
  322. package/dist/src/store/migrations/17_remove_injection_enabled.d.ts +4 -0
  323. package/dist/src/store/migrations/17_remove_injection_enabled.js +12 -0
  324. package/dist/src/store/migrations/17_remove_injection_enabled.js.map +1 -0
  325. package/dist/src/store/migrations/18_enable_avalanche_chain.d.ts +4 -0
  326. package/dist/src/store/migrations/18_enable_avalanche_chain.js +10 -0
  327. package/dist/src/store/migrations/18_enable_avalanche_chain.js.map +1 -0
  328. package/dist/src/store/migrations/19_remove_existing_ledger_accounts.d.ts +4 -0
  329. package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js +25 -0
  330. package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js.map +1 -0
  331. package/dist/src/store/migrations/19_remove_existing_ledger_accounts.state.pre.json +1944 -0
  332. package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.d.ts +1 -0
  333. package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js +7 -0
  334. package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js.map +1 -0
  335. package/dist/src/store/migrations/1_first_migration.d.ts +4 -0
  336. package/dist/src/store/migrations/1_first_migration.js +11 -0
  337. package/dist/src/store/migrations/1_first_migration.js.map +1 -0
  338. package/dist/src/store/migrations/20_fix_accounts.d.ts +4 -0
  339. package/dist/src/store/migrations/20_fix_accounts.js +68 -0
  340. package/dist/src/store/migrations/20_fix_accounts.js.map +1 -0
  341. package/dist/src/store/migrations/21_enable_solana_chain.d.ts +4 -0
  342. package/dist/src/store/migrations/21_enable_solana_chain.js +10 -0
  343. package/dist/src/store/migrations/21_enable_solana_chain.js.map +1 -0
  344. package/dist/src/store/migrations/22_enable_optimism_chain.d.ts +4 -0
  345. package/dist/src/store/migrations/22_enable_optimism_chain.js +10 -0
  346. package/dist/src/store/migrations/22_enable_optimism_chain.js.map +1 -0
  347. package/dist/src/store/migrations/2_set_default_assets.d.ts +4 -0
  348. package/dist/src/store/migrations/2_set_default_assets.js +20 -0
  349. package/dist/src/store/migrations/2_set_default_assets.js.map +1 -0
  350. package/dist/src/store/migrations/3_add_network_custom_tokens.d.ts +4 -0
  351. package/dist/src/store/migrations/3_add_network_custom_tokens.js +21 -0
  352. package/dist/src/store/migrations/3_add_network_custom_tokens.js.map +1 -0
  353. package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.d.ts +4 -0
  354. package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js +15 -0
  355. package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js.map +1 -0
  356. package/dist/src/store/migrations/5_multiple_account_support.d.ts +4 -0
  357. package/dist/src/store/migrations/5_multiple_account_support.js +96 -0
  358. package/dist/src/store/migrations/5_multiple_account_support.js.map +1 -0
  359. package/dist/src/store/migrations/6_use_ledger_live_default.d.ts +4 -0
  360. package/dist/src/store/migrations/6_use_ledger_live_default.js +11 -0
  361. package/dist/src/store/migrations/6_use_ledger_live_default.js.map +1 -0
  362. package/dist/src/store/migrations/7_multi_provider_swaps.d.ts +4 -0
  363. package/dist/src/store/migrations/7_multi_provider_swaps.js +27 -0
  364. package/dist/src/store/migrations/7_multi_provider_swaps.js.map +1 -0
  365. package/dist/src/store/migrations/8_remove_use_ledger_live.d.ts +4 -0
  366. package/dist/src/store/migrations/8_remove_use_ledger_live.js +12 -0
  367. package/dist/src/store/migrations/8_remove_use_ledger_live.js.map +1 -0
  368. package/dist/src/store/migrations/9_inject_ethereum_asset_chain.d.ts +4 -0
  369. package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js +14 -0
  370. package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js.map +1 -0
  371. package/dist/src/store/migrations/before_after_migration_script.test.d.ts +1 -0
  372. package/dist/src/store/migrations/before_after_migration_script.test.js +92 -0
  373. package/dist/src/store/migrations/before_after_migration_script.test.js.map +1 -0
  374. package/dist/src/store/migrations/enable_chain.d.ts +3 -0
  375. package/dist/src/store/migrations/enable_chain.js +71 -0
  376. package/dist/src/store/migrations/enable_chain.js.map +1 -0
  377. package/dist/src/store/migrations/index.d.ts +5 -0
  378. package/dist/src/store/migrations/index.js +78 -0
  379. package/dist/src/store/migrations/index.js.map +1 -0
  380. package/dist/src/store/migrations/migration_script.test.d.ts +1 -0
  381. package/dist/src/store/migrations/migration_script.test.js +59 -0
  382. package/dist/src/store/migrations/migration_script.test.js.map +1 -0
  383. package/dist/src/store/mutations.d.ts +209 -0
  384. package/dist/src/store/mutations.js +348 -0
  385. package/dist/src/store/mutations.js.map +1 -0
  386. package/dist/src/store/state.d.ts +3 -0
  387. package/dist/src/store/state.js +46 -0
  388. package/dist/src/store/state.js.map +1 -0
  389. package/dist/src/store/types.d.ts +249 -0
  390. package/dist/src/store/types.js +64 -0
  391. package/dist/src/store/types.js.map +1 -0
  392. package/dist/src/store/utils.d.ts +38 -0
  393. package/dist/src/store/utils.js +194 -0
  394. package/dist/src/store/utils.js.map +1 -0
  395. package/dist/src/swaps/EvmSwapProvider.d.ts +32 -0
  396. package/dist/src/swaps/EvmSwapProvider.js +118 -0
  397. package/dist/src/swaps/EvmSwapProvider.js.map +1 -0
  398. package/dist/src/swaps/SwapProvider.d.ts +35 -0
  399. package/dist/src/swaps/SwapProvider.js +89 -0
  400. package/dist/src/swaps/SwapProvider.js.map +1 -0
  401. package/dist/src/swaps/astroport/AstroportSwapProvider.d.ts +67 -0
  402. package/dist/src/swaps/astroport/AstroportSwapProvider.js +251 -0
  403. package/dist/src/swaps/astroport/AstroportSwapProvider.js.map +1 -0
  404. package/dist/src/swaps/astroport/info.json +7 -0
  405. package/dist/src/swaps/astroport/queries.d.ts +108 -0
  406. package/dist/src/swaps/astroport/queries.js +227 -0
  407. package/dist/src/swaps/astroport/queries.js.map +1 -0
  408. package/dist/src/swaps/debridge/DeBridgeSwapProvider.d.ts +98 -0
  409. package/dist/src/swaps/debridge/DeBridgeSwapProvider.js +553 -0
  410. package/dist/src/swaps/debridge/DeBridgeSwapProvider.js.map +1 -0
  411. package/dist/src/swaps/debridge/abi/DeBridgeGate.json +1958 -0
  412. package/dist/src/swaps/debridge/abi/SignatureVerifier.json +925 -0
  413. package/dist/src/swaps/debridge/info.json +13 -0
  414. package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.d.ts +103 -0
  415. package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js +292 -0
  416. package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js.map +1 -0
  417. package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.d.ts +108 -0
  418. package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js +306 -0
  419. package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js.map +1 -0
  420. package/dist/src/swaps/fastbtc/fastBtcBridgeContract.d.ts +19 -0
  421. package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js +24 -0
  422. package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js.map +1 -0
  423. package/dist/src/swaps/fastbtc/info.json +7 -0
  424. package/dist/src/swaps/hop/HopSwapProvider.d.ts +124 -0
  425. package/dist/src/swaps/hop/HopSwapProvider.js +479 -0
  426. package/dist/src/swaps/hop/HopSwapProvider.js.map +1 -0
  427. package/dist/src/swaps/hop/info.json +12 -0
  428. package/dist/src/swaps/hop/queries.d.ts +2 -0
  429. package/dist/src/swaps/hop/queries.js +61 -0
  430. package/dist/src/swaps/hop/queries.js.map +1 -0
  431. package/dist/src/swaps/jupiter/JupiterSwapProvider.d.ts +46 -0
  432. package/dist/src/swaps/jupiter/JupiterSwapProvider.js +189 -0
  433. package/dist/src/swaps/jupiter/JupiterSwapProvider.js.map +1 -0
  434. package/dist/src/swaps/jupiter/info.json +7 -0
  435. package/dist/src/swaps/lifi/LifiSwapProvider.d.ts +76 -0
  436. package/dist/src/swaps/lifi/LifiSwapProvider.js +313 -0
  437. package/dist/src/swaps/lifi/LifiSwapProvider.js.map +1 -0
  438. package/dist/src/swaps/lifi/info.json +7 -0
  439. package/dist/src/swaps/liquality/LiqualitySwapProvider.d.ts +104 -0
  440. package/dist/src/swaps/liquality/LiqualitySwapProvider.js +704 -0
  441. package/dist/src/swaps/liquality/LiqualitySwapProvider.js.map +1 -0
  442. package/dist/src/swaps/liquality/info.json +7 -0
  443. package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.d.ts +124 -0
  444. package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js +239 -0
  445. package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js.map +1 -0
  446. package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/info.json +7 -0
  447. package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.d.ts +52 -0
  448. package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js +213 -0
  449. package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js.map +1 -0
  450. package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/info.json +7 -0
  451. package/dist/src/swaps/liqualityboost/types.d.ts +17 -0
  452. package/dist/src/swaps/liqualityboost/types.js +3 -0
  453. package/dist/src/swaps/liqualityboost/types.js.map +1 -0
  454. package/dist/src/swaps/oneinch/OneinchSwapProvider.d.ts +86 -0
  455. package/dist/src/swaps/oneinch/OneinchSwapProvider.js +369 -0
  456. package/dist/src/swaps/oneinch/OneinchSwapProvider.js.map +1 -0
  457. package/dist/src/swaps/oneinch/info.json +13 -0
  458. package/dist/src/swaps/sovryn/SovrynSwapProvider.d.ts +110 -0
  459. package/dist/src/swaps/sovryn/SovrynSwapProvider.js +369 -0
  460. package/dist/src/swaps/sovryn/SovrynSwapProvider.js.map +1 -0
  461. package/dist/src/swaps/sovryn/info.json +7 -0
  462. package/dist/src/swaps/teleswap/TeleSwapSwapProvider.d.ts +167 -0
  463. package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js +874 -0
  464. package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js.map +1 -0
  465. package/dist/src/swaps/teleswap/info.json +7 -0
  466. package/dist/src/swaps/thorchain/ThorchainSwapProvider.d.ts +194 -0
  467. package/dist/src/swaps/thorchain/ThorchainSwapProvider.js +534 -0
  468. package/dist/src/swaps/thorchain/ThorchainSwapProvider.js.map +1 -0
  469. package/dist/src/swaps/thorchain/info.json +7 -0
  470. package/dist/src/swaps/types.d.ts +87 -0
  471. package/dist/src/swaps/types.js +9 -0
  472. package/dist/src/swaps/types.js.map +1 -0
  473. package/dist/src/swaps/uniswap/UniswapSwapProvider.d.ts +117 -0
  474. package/dist/src/swaps/uniswap/UniswapSwapProvider.js +438 -0
  475. package/dist/src/swaps/uniswap/UniswapSwapProvider.js.map +1 -0
  476. package/dist/src/swaps/uniswap/info.json +7 -0
  477. package/dist/src/swaps/utils.d.ts +92 -0
  478. package/dist/src/swaps/utils.js +57 -0
  479. package/dist/src/swaps/utils.js.map +1 -0
  480. package/dist/src/tsconfig.json +30 -0
  481. package/dist/src/types.d.ts +29 -0
  482. package/dist/src/types.js +3 -0
  483. package/dist/src/types.js.map +1 -0
  484. package/dist/src/utils/accounts.d.ts +16 -0
  485. package/dist/src/utils/accounts.js +89 -0
  486. package/dist/src/utils/accounts.js.map +1 -0
  487. package/dist/src/utils/address.d.ts +8 -0
  488. package/dist/src/utils/address.js +17 -0
  489. package/dist/src/utils/address.js.map +1 -0
  490. package/dist/src/utils/address.test.d.ts +1 -0
  491. package/dist/src/utils/address.test.js +12 -0
  492. package/dist/src/utils/address.test.js.map +1 -0
  493. package/dist/src/utils/asset.d.ts +22 -0
  494. package/dist/src/utils/asset.js +198 -0
  495. package/dist/src/utils/asset.js.map +1 -0
  496. package/dist/src/utils/asset.test.d.ts +1 -0
  497. package/dist/src/utils/asset.test.js +42 -0
  498. package/dist/src/utils/asset.test.js.map +1 -0
  499. package/dist/src/utils/chainify.d.ts +3 -0
  500. package/dist/src/utils/chainify.js +41 -0
  501. package/dist/src/utils/chainify.js.map +1 -0
  502. package/dist/src/utils/coinFormatter.d.ts +13 -0
  503. package/dist/src/utils/coinFormatter.js +58 -0
  504. package/dist/src/utils/coinFormatter.js.map +1 -0
  505. package/dist/src/utils/crypto.d.ts +6 -0
  506. package/dist/src/utils/crypto.js +70 -0
  507. package/dist/src/utils/crypto.js.map +1 -0
  508. package/dist/src/utils/cryptoassets.d.ts +5 -0
  509. package/dist/src/utils/cryptoassets.js +26 -0
  510. package/dist/src/utils/cryptoassets.js.map +1 -0
  511. package/dist/src/utils/derivationPath.d.ts +6 -0
  512. package/dist/src/utils/derivationPath.js +75 -0
  513. package/dist/src/utils/derivationPath.js.map +1 -0
  514. package/dist/src/utils/derivationPath.spec.d.ts +1 -0
  515. package/dist/src/utils/derivationPath.spec.js +37 -0
  516. package/dist/src/utils/derivationPath.spec.js.map +1 -0
  517. package/dist/src/utils/export.d.ts +5 -0
  518. package/dist/src/utils/export.js +24 -0
  519. package/dist/src/utils/export.js.map +1 -0
  520. package/dist/src/utils/fees.d.ts +43 -0
  521. package/dist/src/utils/fees.js +222 -0
  522. package/dist/src/utils/fees.js.map +1 -0
  523. package/dist/src/utils/fees.test.d.ts +1 -0
  524. package/dist/src/utils/fees.test.js +40 -0
  525. package/dist/src/utils/fees.test.js.map +1 -0
  526. package/dist/src/utils/fetchTokenDetails.d.ts +1 -0
  527. package/dist/src/utils/fetchTokenDetails.js +19 -0
  528. package/dist/src/utils/fetchTokenDetails.js.map +1 -0
  529. package/dist/src/utils/history.d.ts +66 -0
  530. package/dist/src/utils/history.js +135 -0
  531. package/dist/src/utils/history.js.map +1 -0
  532. package/dist/src/utils/isTransactionNotFoundError.d.ts +1 -0
  533. package/dist/src/utils/isTransactionNotFoundError.js +16 -0
  534. package/dist/src/utils/isTransactionNotFoundError.js.map +1 -0
  535. package/dist/src/utils/ledger.d.ts +12 -0
  536. package/dist/src/utils/ledger.js +38 -0
  537. package/dist/src/utils/ledger.js.map +1 -0
  538. package/dist/src/utils/moment.d.ts +2 -0
  539. package/dist/src/utils/moment.js +8 -0
  540. package/dist/src/utils/moment.js.map +1 -0
  541. package/dist/src/utils/networks.d.ts +10 -0
  542. package/dist/src/utils/networks.js +43 -0
  543. package/dist/src/utils/networks.js.map +1 -0
  544. package/dist/src/utils/parseTokenTx.d.ts +2 -0
  545. package/dist/src/utils/parseTokenTx.js +10 -0
  546. package/dist/src/utils/parseTokenTx.js.map +1 -0
  547. package/dist/src/utils/quotes.d.ts +5 -0
  548. package/dist/src/utils/quotes.js +20 -0
  549. package/dist/src/utils/quotes.js.map +1 -0
  550. package/dist/src/utils/quotes.test.d.ts +1 -0
  551. package/dist/src/utils/quotes.test.js +85 -0
  552. package/dist/src/utils/quotes.test.js.map +1 -0
  553. package/dist/src/utils/timeline.d.ts +71 -0
  554. package/dist/src/utils/timeline.js +176 -0
  555. package/dist/src/utils/timeline.js.map +1 -0
  556. package/dist/src/walletOptions/defaultOptions.d.ts +3 -0
  557. package/dist/src/walletOptions/defaultOptions.js +36 -0
  558. package/dist/src/walletOptions/defaultOptions.js.map +1 -0
  559. package/dist/src/walletOptions/index.d.ts +7 -0
  560. package/dist/src/walletOptions/index.js +11 -0
  561. package/dist/src/walletOptions/index.js.map +1 -0
  562. package/dist/tsconfig.tsbuildinfo +1 -0
  563. package/package.json +76 -0
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const _19_remove_existing_ledger_accounts_1 = require("./19_remove_existing_ledger_accounts");
5
+ const _19_remove_existing_ledger_accounts_state_pre_json_1 = tslib_1.__importDefault(require("./19_remove_existing_ledger_accounts.state.pre.json"));
6
+ _19_remove_existing_ledger_accounts_1.removeExistingLedgerAccounts.migrate(_19_remove_existing_ledger_accounts_state_pre_json_1.default);
7
+ //# sourceMappingURL=19_remove_existing_ledger_accounts_test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"19_remove_existing_ledger_accounts_test.js","sourceRoot":"","sources":["../../../../src/store/migrations/19_remove_existing_ledger_accounts_test.ts"],"names":[],"mappings":";;;AAAA,8FAAoF;AACpF,qJAAwE;AAExE,kEAA4B,CAAC,OAAO,CAAC,4DAAK,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const firstMigration: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.firstMigration = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.firstMigration = {
6
+ version: 1,
7
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ return Object.assign({}, state);
9
+ }),
10
+ };
11
+ //# sourceMappingURL=1_first_migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_first_migration.js","sourceRoot":"","sources":["../../../../src/store/migrations/1_first_migration.ts"],"names":[],"mappings":";;;;AACa,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,yBAAY,KAAK,EAAG;IACtB,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const addMissingAccounts: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addMissingAccounts = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
6
+ const __1 = require("../..");
7
+ const accounts_1 = require("../../utils/accounts");
8
+ const types_1 = require("../types");
9
+ exports.addMissingAccounts = {
10
+ version: 20,
11
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
12
+ const walletId = state.activeWalletId;
13
+ const accounts = { [walletId]: { mainnet: [], testnet: [] } };
14
+ const { networks, defaultAssets } = __1.buildConfig;
15
+ networks.forEach((network) => {
16
+ const assetKeys = defaultAssets[network];
17
+ __1.buildConfig.chains.forEach((chainId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
18
+ const assets = assetKeys.filter((asset) => {
19
+ var _a;
20
+ return ((_a = (0, cryptoassets_1.getAsset)(network, asset)) === null || _a === void 0 ? void 0 : _a.chain) === chainId;
21
+ });
22
+ const chain = (0, cryptoassets_1.getChain)(network, chainId);
23
+ const _account = (0, accounts_1.accountCreator)({
24
+ walletId: walletId,
25
+ network,
26
+ account: {
27
+ name: `${chain.name} 1`,
28
+ alias: '',
29
+ chain: chainId,
30
+ addresses: [],
31
+ assets,
32
+ balances: {},
33
+ type: types_1.AccountType.Default,
34
+ index: 0,
35
+ color: (0, accounts_1.getNextAccountColor)(chainId, 0),
36
+ enabled: true,
37
+ },
38
+ });
39
+ accounts[walletId][network].push(_account);
40
+ if (chainId === cryptoassets_1.ChainId.Rootstock) {
41
+ const coinType = network === 'mainnet' ? '137' : '37310';
42
+ const chain = (0, cryptoassets_1.getChain)(network, cryptoassets_1.ChainId.Rootstock);
43
+ const _account = (0, accounts_1.accountCreator)({
44
+ walletId: walletId,
45
+ network,
46
+ account: {
47
+ name: `Legacy ${chain.name} 1`,
48
+ alias: '',
49
+ chain: cryptoassets_1.ChainId.Rootstock,
50
+ addresses: [],
51
+ assets,
52
+ balances: {},
53
+ type: types_1.AccountType.Default,
54
+ index: 0,
55
+ derivationPath: `m/44'/${coinType}'/0'/0/0`,
56
+ color: (0, accounts_1.getNextAccountColor)(cryptoassets_1.ChainId.Rootstock, 1),
57
+ enabled: true,
58
+ },
59
+ });
60
+ accounts[walletId][network].push(_account);
61
+ }
62
+ }));
63
+ });
64
+ const newState = Object.assign(Object.assign({}, state), { accounts });
65
+ return newState;
66
+ }),
67
+ };
68
+ //# sourceMappingURL=20_fix_accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20_fix_accounts.js","sourceRoot":"","sources":["../../../../src/store/migrations/20_fix_accounts.ts"],"names":[],"mappings":";;;;AAAA,uDAAmE;A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1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enableSolanaChain = void 0;
4
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
5
+ const enable_chain_1 = require("./enable_chain");
6
+ exports.enableSolanaChain = {
7
+ version: 21,
8
+ migrate: (state) => (0, enable_chain_1.enableChain)(state, cryptoassets_1.ChainId.Solana),
9
+ };
10
+ //# sourceMappingURL=21_enable_solana_chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"21_enable_solana_chain.js","sourceRoot":"","sources":["../../../../src/store/migrations/21_enable_solana_chain.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAC/C,iDAA6C;AAEhC,QAAA,iBAAiB,GAAG;IAC/B,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,IAAA,0BAAW,EAAC,KAAK,EAAE,sBAAO,CAAC,MAAM,CAAC;CAC5D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const enableOptimismChain: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enableOptimismChain = void 0;
4
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
5
+ const enable_chain_1 = require("./enable_chain");
6
+ exports.enableOptimismChain = {
7
+ version: 22,
8
+ migrate: (state) => (0, enable_chain_1.enableChain)(state, cryptoassets_1.ChainId.Optimism),
9
+ };
10
+ //# sourceMappingURL=22_enable_optimism_chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"22_enable_optimism_chain.js","sourceRoot":"","sources":["../../../../src/store/migrations/22_enable_optimism_chain.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAC/C,iDAA6C;AAEhC,QAAA,mBAAmB,GAAG;IACjC,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,IAAA,0BAAW,EAAC,KAAK,EAAE,sBAAO,CAAC,QAAQ,CAAC;CAC9D,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const setDefaultAssets: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setDefaultAssets = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const build_config_1 = tslib_1.__importDefault(require("../../build.config"));
6
+ exports.setDefaultAssets = {
7
+ version: 2,
8
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ const enabledAssets = {
10
+ mainnet: {
11
+ [state.activeWalletId]: build_config_1.default.defaultAssets.mainnet,
12
+ },
13
+ testnet: {
14
+ [state.activeWalletId]: build_config_1.default.defaultAssets.testnet,
15
+ },
16
+ };
17
+ return Object.assign(Object.assign({}, state), { enabledAssets });
18
+ }),
19
+ };
20
+ //# sourceMappingURL=2_set_default_assets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2_set_default_assets.js","sourceRoot":"","sources":["../../../../src/store/migrations/2_set_default_assets.ts"],"names":[],"mappings":";;;;AAAA,8EAA6C;AAGhC,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE;gBACP,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,sBAAW,CAAC,aAAa,CAAC,OAAO;aAC1D;YACD,OAAO,EAAE;gBACP,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,sBAAW,CAAC,aAAa,CAAC,OAAO;aAC1D;SACF,CAAC;QACF,uCAAY,KAAK,KAAE,aAAa,IAAG;IACrC,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const addNetworkCustomTokens: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addNetworkCustomTokens = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
6
+ exports.addNetworkCustomTokens = {
7
+ version: 3,
8
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ var _a, _b, _c, _d;
10
+ const customTokens = {
11
+ mainnet: {
12
+ [state.activeWalletId]: (_b = (_a = state.customTokens) === null || _a === void 0 ? void 0 : _a.mainnet) === null || _b === void 0 ? void 0 : _b[state.activeWalletId].map((token) => (Object.assign(Object.assign({}, token), { network: cryptoassets_1.ChainId.Ethereum }))),
13
+ },
14
+ testnet: {
15
+ [state.activeWalletId]: (_d = (_c = state.customTokens) === null || _c === void 0 ? void 0 : _c.testnet) === null || _d === void 0 ? void 0 : _d[state.activeWalletId].map((token) => (Object.assign(Object.assign({}, token), { network: cryptoassets_1.ChainId.Ethereum }))),
16
+ },
17
+ };
18
+ return Object.assign(Object.assign({}, state), { customTokens });
19
+ }),
20
+ };
21
+ //# sourceMappingURL=3_add_network_custom_tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_add_network_custom_tokens.js","sourceRoot":"","sources":["../../../../src/store/migrations/3_add_network_custom_tokens.ts"],"names":[],"mappings":";;;;AAAA,uDAA+C;AAGlC,QAAA,sBAAsB,GAAG;IACpC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;;QAC5B,MAAM,YAAY,GAAG;YACnB,OAAO,EAAE;gBACP,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,MAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,0CAAG,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,iCAC3F,KAAK,KACR,OAAO,EAAE,sBAAO,CAAC,QAAQ,IACzB,CAAC;aACJ;YACD,OAAO,EAAE;gBACP,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,MAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,0CAAG,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,iCAC3F,KAAK,KACR,OAAO,EAAE,sBAAO,CAAC,QAAQ,IACzB,CAAC;aACJ;SACF,CAAC;QACF,uCAAY,KAAK,KAAE,YAAY,IAAG;IACpC,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const fixRSKTokenInjectedAsset: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fixRSKTokenInjectedAsset = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.fixRSKTokenInjectedAsset = {
6
+ version: 4,
7
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ if (state.injectEthereumAsset === 'RSK') {
9
+ const injectEthereumAsset = 'RBTC';
10
+ return Object.assign(Object.assign({}, state), { injectEthereumAsset });
11
+ }
12
+ return Object.assign({}, state);
13
+ }),
14
+ };
15
+ //# sourceMappingURL=4_fix_rsk_token_injected_asset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"4_fix_rsk_token_injected_asset.js","sourceRoot":"","sources":["../../../../src/store/migrations/4_fix_rsk_token_injected_asset.ts"],"names":[],"mappings":";;;;AAAa,QAAA,wBAAwB,GAAG;IAEtC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,IAAI,KAAK,CAAC,mBAAmB,KAAK,KAAK,EAAE;YACvC,MAAM,mBAAmB,GAAG,MAAM,CAAC;YACnC,uCAAY,KAAK,KAAE,mBAAmB,IAAG;SAC1C;QAED,yBAAY,KAAK,EAAG;IACtB,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const multipleAccountSupport: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.multipleAccountSupport = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
6
+ const build_config_1 = tslib_1.__importDefault(require("../../build.config"));
7
+ const accounts_1 = require("../../utils/accounts");
8
+ const types_1 = require("../types");
9
+ exports.multipleAccountSupport = {
10
+ version: 5,
11
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
12
+ var _a, _b, _c, _d;
13
+ const { enabledAssets } = state;
14
+ const walletId = state.activeWalletId;
15
+ const accounts = {
16
+ [walletId]: {
17
+ mainnet: [],
18
+ testnet: [],
19
+ },
20
+ };
21
+ build_config_1.default.networks.forEach((network) => {
22
+ var _a;
23
+ const assetKeys = ((_a = enabledAssets[network]) === null || _a === void 0 ? void 0 : _a[walletId]) || [];
24
+ build_config_1.default.chains.forEach((chainId) => {
25
+ var _a, _b, _c, _d, _e, _f;
26
+ const assets = assetKeys.filter((asset) => {
27
+ return (0, cryptoassets_1.getAsset)(network, asset).chain === chainId;
28
+ });
29
+ const chain = (0, cryptoassets_1.getChain)(network, chainId);
30
+ const addresses = [];
31
+ if (state.addresses &&
32
+ ((_a = state.addresses) === null || _a === void 0 ? void 0 : _a[network]) &&
33
+ ((_c = (_b = state.addresses) === null || _b === void 0 ? void 0 : _b[network]) === null || _c === void 0 ? void 0 : _c[walletId]) &&
34
+ ((_f = (_e = (_d = state.addresses) === null || _d === void 0 ? void 0 : _d[network]) === null || _e === void 0 ? void 0 : _e[walletId]) === null || _f === void 0 ? void 0 : _f[chain.nativeAsset[0].code])) {
35
+ addresses.push(state.addresses[network][walletId][chain.nativeAsset[0].code]);
36
+ }
37
+ const _account = (0, accounts_1.accountCreator)({
38
+ walletId,
39
+ network,
40
+ account: {
41
+ name: `${chain.name} 1`,
42
+ chain: chainId,
43
+ addresses,
44
+ assets,
45
+ balances: {},
46
+ type: types_1.AccountType.Default,
47
+ index: 0,
48
+ color: (0, accounts_1.getNextAccountColor)(chainId, 0),
49
+ },
50
+ });
51
+ accounts[walletId][network].push(_account);
52
+ });
53
+ });
54
+ delete state.addresses;
55
+ delete state.balances;
56
+ const customTokens = {
57
+ mainnet: {
58
+ [walletId]: (_b = (_a = state.customTokens.mainnet) === null || _a === void 0 ? void 0 : _a[walletId]) === null || _b === void 0 ? void 0 : _b.map((token) => {
59
+ const newCustomToken = Object.assign(Object.assign({}, token), { chain: token.network });
60
+ delete newCustomToken.network;
61
+ return newCustomToken;
62
+ }),
63
+ },
64
+ testnet: {
65
+ [walletId]: (_d = (_c = state.customTokens.testnet) === null || _c === void 0 ? void 0 : _c[walletId]) === null || _d === void 0 ? void 0 : _d.map((token) => {
66
+ const newCustomToken = Object.assign(Object.assign({}, token), { chain: token.network });
67
+ delete newCustomToken.network;
68
+ return newCustomToken;
69
+ }),
70
+ },
71
+ };
72
+ const migrateHistory = (state, network, walletId) => {
73
+ var _a, _b;
74
+ return ((_b = (_a = state.history[network]) === null || _a === void 0 ? void 0 : _a[walletId]) === null || _b === void 0 ? void 0 : _b.filter((item) => !['QUOTE', 'SECRET_READY'].includes(item.status)).map((item) => ['INITIATION_REPORTED', 'INITIATION_CONFIRMED'].includes(item.status) ? Object.assign(Object.assign({}, item), { status: 'FUNDED' }) : item).map((item) => {
75
+ if (item.type !== 'SWAP')
76
+ return item;
77
+ const allAssets = (0, cryptoassets_1.getAllAssets)();
78
+ const fromChain = allAssets[network][item.from].chain;
79
+ const toChain = allAssets[network][item.to].chain;
80
+ const fromAccountId = accounts[walletId][network].find((account) => account.chain === fromChain).id;
81
+ const toAccountId = accounts[walletId][network].find((account) => account.chain === toChain).id;
82
+ return Object.assign(Object.assign({}, item), { fromAccountId, toAccountId });
83
+ }));
84
+ };
85
+ const history = {
86
+ mainnet: {
87
+ [walletId]: migrateHistory(state, types_1.Network.Mainnet, walletId),
88
+ },
89
+ testnet: {
90
+ [walletId]: migrateHistory(state, types_1.Network.Testnet, walletId),
91
+ },
92
+ };
93
+ return Object.assign(Object.assign({}, state), { accounts, customTokens, history });
94
+ }),
95
+ };
96
+ //# sourceMappingURL=5_multiple_account_support.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"5_multiple_account_support.js","sourceRoot":"","sources":["../../../../src/store/migrations/5_multiple_account_support.ts"],"names":[],"mappings":";;;;AAAA,uDAAiF;AACjF,8EAA6C;AAC7C,mDAA2E;AAC3E,oCAAgD;AAEnC,QAAA,sBAAsB,GAAG;IAEpC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;;QAC5B,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;QAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QACtC,MAAM,QAAQ,GAAQ;YACpB,CAAC,QAAQ,CAAC,EAAE;gBACV,OAAO,EAAE,EAAE;gBACX,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QAEF,sBAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;;YACvC,MAAM,SAAS,GAAG,CAAA,MAAA,aAAa,CAAC,OAAO,CAAC,0CAAG,QAAQ,CAAC,KAAI,EAAE,CAAC;YAE3D,sBAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAgB,EAAE,EAAE;;gBAC9C,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,KAAa,EAAE,EAAE;oBAChD,OAAO,IAAA,uBAAQ,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC;gBACpD,CAAC,CAAC,CAAC;gBAEH,MAAM,KAAK,GAAG,IAAA,uBAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;gBAEzC,MAAM,SAAS,GAAa,EAAE,C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C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;gBACtD,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC;gBAClD,MAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,EAAE,CAAC;gBACzG,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,OAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC;gBAErG,uCAAY,IAAI,KAAE,aAAa,EAAE,WAAW,IAAG;YACjD,CAAC,CAAC,CACL,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,OAAO,EAAE;gBACP,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,eAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;aAC7D;YACD,OAAO,EAAE;gBACP,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,eAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;aAC7D;SACF,CAAC;QAEF,uCAAY,KAAK,KAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,IAAG;IACvD,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const useLedgerLiveDefault: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLedgerLiveDefault = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.useLedgerLiveDefault = {
6
+ version: 6,
7
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ return Object.assign(Object.assign({}, state), { useLedgerLive: false });
9
+ }),
10
+ };
11
+ //# sourceMappingURL=6_use_ledger_live_default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"6_use_ledger_live_default.js","sourceRoot":"","sources":["../../../../src/store/migrations/6_use_ledger_live_default.ts"],"names":[],"mappings":";;;;AAAa,QAAA,oBAAoB,GAAG;IAElC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,uCAAY,KAAK,KAAE,aAAa,EAAE,KAAK,IAAG;IAC5C,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const multiProviderSwaps: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.multiProviderSwaps = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.multiProviderSwaps = {
6
+ version: 7,
7
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ const walletId = state.activeWalletId;
9
+ const migrateHistory = (state, network, walletId) => {
10
+ var _a;
11
+ const walletHistory = (_a = state.history[network]) === null || _a === void 0 ? void 0 : _a[walletId];
12
+ return walletHistory && walletHistory.length
13
+ ? walletHistory.map((item) => (item.type === 'SWAP' ? Object.assign(Object.assign({}, item), { provider: 'liquality' }) : item))
14
+ : [];
15
+ };
16
+ const history = {
17
+ mainnet: {
18
+ [walletId]: migrateHistory(state, 'mainnet', walletId),
19
+ },
20
+ testnet: {
21
+ [walletId]: migrateHistory(state, 'testnet', walletId),
22
+ },
23
+ };
24
+ return Object.assign(Object.assign({}, state), { history });
25
+ }),
26
+ };
27
+ //# sourceMappingURL=7_multi_provider_swaps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"7_multi_provider_swaps.js","sourceRoot":"","sources":["../../../../src/store/migrations/7_multi_provider_swaps.ts"],"names":[],"mappings":";;;;AAAa,QAAA,kBAAkB,GAAG;IAEhC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,MAAM,QAAQ,GAAG,KAAK,CAAC,cAAc,CAAC;QAEtC,MAAM,cAAc,GAAG,CAAC,KAAU,EAAE,OAAe,EAAE,QAAgB,EAAE,EAAE;;YACvE,MAAM,aAAa,GAAG,MAAA,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,0CAAG,QAAQ,CAAC,CAAC;YACzD,OAAO,aAAa,IAAI,aAAa,CAAC,MAAM;gBAC1C,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,iCAAM,IAAI,KAAE,QAAQ,EAAE,WAAW,IAAG,CAAC,CAAC,IAAI,CAAC,CAAC;gBACtG,CAAC,CAAC,EAAE,CAAC;QACT,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,OAAO,EAAE;gBACP,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;aACvD;YACD,OAAO,EAAE;gBACP,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC;aACvD;SACF,CAAC;QAEF,uCAAY,KAAK,KAAE,OAAO,IAAG;IAC/B,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const removeUseLedgerLive: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeUseLedgerLive = void 0;
4
+ const tslib_1 = require("tslib");
5
+ exports.removeUseLedgerLive = {
6
+ version: 8,
7
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
8
+ delete state.useLedgerLive;
9
+ return Object.assign(Object.assign({}, state), { usbBridgeWindowsId: 0 });
10
+ }),
11
+ };
12
+ //# sourceMappingURL=8_remove_use_ledger_live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"8_remove_use_ledger_live.js","sourceRoot":"","sources":["../../../../src/store/migrations/8_remove_use_ledger_live.ts"],"names":[],"mappings":";;;;AAAa,QAAA,mBAAmB,GAAG;IAEjC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,OAAO,KAAK,CAAC,aAAa,CAAC;QAC3B,uCAAY,KAAK,KAAE,kBAAkB,EAAE,CAAC,IAAG;IAC7C,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const injectEthereumAssetChain: {
2
+ version: number;
3
+ migrate: (state: any) => Promise<any>;
4
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.injectEthereumAssetChain = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const cryptoassets_1 = require("@yaswap/cryptoassets");
6
+ exports.injectEthereumAssetChain = {
7
+ version: 9,
8
+ migrate: (state) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
9
+ const injectEthereumChain = (0, cryptoassets_1.getAsset)(state.activeNetwork, state.injectEthereumAsset).chain || cryptoassets_1.ChainId.Ethereum;
10
+ delete state.injectEthereumAsset;
11
+ return Object.assign(Object.assign({}, state), { injectEthereumChain });
12
+ }),
13
+ };
14
+ //# sourceMappingURL=9_inject_ethereum_asset_chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"9_inject_ethereum_asset_chain.js","sourceRoot":"","sources":["../../../../src/store/migrations/9_inject_ethereum_asset_chain.ts"],"names":[],"mappings":";;;;AAAA,uDAAyD;AAE5C,QAAA,wBAAwB,GAAG;IAEtC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAO,KAAU,EAAE,EAAE;QAC5B,MAAM,mBAAmB,GAAG,IAAA,uBAAQ,EAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC,KAAK,IAAI,sBAAO,CAAC,QAAQ,CAAC;QAE/G,OAAO,KAAK,CAAC,mBAAmB,CAAC;QAEjC,uCAAY,KAAK,KAAE,mBAAmB,IAAG;IAC3C,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const Process = tslib_1.__importStar(require("process"));
5
+ const index_1 = require("../../index");
6
+ const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
7
+ const index_2 = require("./index");
8
+ describe('migrations scripts tests', () => {
9
+ test('Upgrade migrations from wallet versions-2 test, should be able validate accounts-mainnet', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
10
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
11
+ let wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
12
+ wallet = (0, index_1.setupWallet)(Object.assign(Object.assign({}, defaultOptions_1.default), { initialState: Object.assign(Object.assign({}, wallet.state), { version: index_2.LATEST_VERSION - 2 }) }));
13
+ let TEST_MNEMONIC = Process.env.TEST_MNEMONIC;
14
+ if (!TEST_MNEMONIC) {
15
+ throw new Error('Please set the TEST_MNEMONIC environment variable');
16
+ }
17
+ TEST_MNEMONIC = TEST_MNEMONIC.replace(/,/g, ' ');
18
+ yield wallet.dispatch.createWallet({
19
+ key: '0x1234567890123456789012345678901234567890',
20
+ mnemonic: TEST_MNEMONIC,
21
+ imported: true,
22
+ });
23
+ yield wallet.dispatch.unlockWallet({
24
+ key: '0x1234567890123456789012345678901234567890',
25
+ });
26
+ expect((0, index_2.isMigrationNeeded)(wallet.state)).toBeTruthy();
27
+ expect(wallet.state.activeNetwork).toBe('mainnet');
28
+ let walletId = wallet.state.activeWalletId;
29
+ expect(wallet.state.version).toBe(index_2.LATEST_VERSION - 2);
30
+ let accounts = wallet.state.accounts;
31
+ expect(accounts).not.toBeNull();
32
+ let maninNetAccountsLength = (_b = (_a = wallet.state.accounts) === null || _a === void 0 ? void 0 : _a[walletId]) === null || _b === void 0 ? void 0 : _b.mainnet.length;
33
+ expect(maninNetAccountsLength).toBeGreaterThan(0);
34
+ for (let i = 0; i < maninNetAccountsLength; i++) {
35
+ expect((_d = (_c = wallet.state.accounts) === null || _c === void 0 ? void 0 : _c[walletId]) === null || _d === void 0 ? void 0 : _d.mainnet[i].enabled).toBeTruthy();
36
+ expect((_f = (_e = wallet.state.accounts) === null || _e === void 0 ? void 0 : _e[walletId]) === null || _f === void 0 ? void 0 : _f.mainnet[i].type).toBe('default');
37
+ }
38
+ const afterMigrationState = yield (0, index_2.processMigrations)(wallet.state);
39
+ walletId = afterMigrationState.activeWalletId;
40
+ expect(afterMigrationState.version).toBe(index_2.LATEST_VERSION);
41
+ accounts = afterMigrationState.accounts;
42
+ expect(accounts).not.toBeNull();
43
+ maninNetAccountsLength = (_h = (_g = afterMigrationState.accounts) === null || _g === void 0 ? void 0 : _g[walletId]) === null || _h === void 0 ? void 0 : _h.mainnet.length;
44
+ expect(maninNetAccountsLength).toBeGreaterThan(0);
45
+ for (let i = 0; i < maninNetAccountsLength; i++) {
46
+ expect((_k = (_j = afterMigrationState.accounts) === null || _j === void 0 ? void 0 : _j[walletId]) === null || _k === void 0 ? void 0 : _k.mainnet[i].enabled).toBeTruthy();
47
+ expect((_m = (_l = afterMigrationState.accounts) === null || _l === void 0 ? void 0 : _l[walletId]) === null || _m === void 0 ? void 0 : _m.mainnet[i].type).toBe('default');
48
+ }
49
+ }));
50
+ test('Upgrade migrations from wallet versions-1 test, should be able validate accounts-mainnet', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
+ var _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
52
+ let wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
53
+ wallet = (0, index_1.setupWallet)(Object.assign(Object.assign({}, defaultOptions_1.default), { initialState: Object.assign(Object.assign({}, wallet.state), { version: index_2.LATEST_VERSION - 1 }) }));
54
+ let TEST_MNEMONIC = Process.env.TEST_MNEMONIC;
55
+ if (!TEST_MNEMONIC) {
56
+ throw new Error('Please set the TEST_MNEMONIC environment variable');
57
+ }
58
+ TEST_MNEMONIC = TEST_MNEMONIC.replace(/,/g, ' ');
59
+ yield wallet.dispatch.createWallet({
60
+ key: '0x1234567890123456789012345678901234567890',
61
+ mnemonic: TEST_MNEMONIC,
62
+ imported: true,
63
+ });
64
+ yield wallet.dispatch.unlockWallet({
65
+ key: '0x1234567890123456789012345678901234567890',
66
+ });
67
+ expect(wallet.state.activeNetwork).toBe('mainnet');
68
+ let walletId = wallet.state.activeWalletId;
69
+ expect(wallet.state.version).toBe(index_2.LATEST_VERSION - 1);
70
+ expect((0, index_2.isMigrationNeeded)(wallet.state)).toBeTruthy();
71
+ let accounts = wallet.state.accounts;
72
+ expect(accounts).not.toBeNull();
73
+ let maninNetAccountsLength = (_p = (_o = wallet.state.accounts) === null || _o === void 0 ? void 0 : _o[walletId]) === null || _p === void 0 ? void 0 : _p.mainnet.length;
74
+ expect(maninNetAccountsLength).toBeGreaterThan(0);
75
+ for (let i = 0; i < maninNetAccountsLength; i++) {
76
+ expect((_r = (_q = wallet.state.accounts) === null || _q === void 0 ? void 0 : _q[walletId]) === null || _r === void 0 ? void 0 : _r.mainnet[i].enabled).toBeTruthy();
77
+ expect((_t = (_s = wallet.state.accounts) === null || _s === void 0 ? void 0 : _s[walletId]) === null || _t === void 0 ? void 0 : _t.mainnet[i].type).toBe('default');
78
+ }
79
+ const afterMigrationState = yield (0, index_2.processMigrations)(wallet.state);
80
+ walletId = afterMigrationState.activeWalletId;
81
+ expect(afterMigrationState.version).toBe(index_2.LATEST_VERSION);
82
+ accounts = afterMigrationState.accounts;
83
+ expect(accounts).not.toBeNull();
84
+ maninNetAccountsLength = (_v = (_u = afterMigrationState.accounts) === null || _u === void 0 ? void 0 : _u[walletId]) === null || _v === void 0 ? void 0 : _v.mainnet.length;
85
+ expect(maninNetAccountsLength).toBeGreaterThan(0);
86
+ for (let i = 0; i < maninNetAccountsLength; i++) {
87
+ expect((_x = (_w = afterMigrationState.accounts) === null || _w === void 0 ? void 0 : _w[walletId]) === null || _x === void 0 ? void 0 : _x.mainnet[i].enabled).toBeTruthy();
88
+ expect((_z = (_y = afterMigrationState.accounts) === null || _y === void 0 ? void 0 : _y[walletId]) === null || _z === void 0 ? void 0 : _z.mainnet[i].type).toBe('default');
89
+ }
90
+ }));
91
+ });
92
+ //# sourceMappingURL=before_after_migration_script.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"before_after_migration_script.test.js","sourceRoot":"","sources":["../../../../src/store/migrations/before_after_migration_script.test.ts"],"names":[],"mappings":";;;AAAA,yDAAmC;AACnC,uCAA0C;AAC1C,gGAAsE;AACtE,mCAA+E;AAE/E,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,IAAI,CAAC,0FAA0F,EAAE,GAAS,EAAE;;QAC1G,IAAI,MAAM,GAAG,MAAM,IAAA,mBAAW,EAAC,wBAAoB,CAAC,CAAC;QAErD,MAAM,GAAG,IAAA,mBAAW,kCACf,wBAAoB,KACvB,YAAY,kCACP,MAAM,CAAC,KAAK,KACf,OAAO,EAAE,sBAAc,GAAG,CAAC,OAE7B,CAAC;QACH,IAAI,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;QAC9C,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;SACtE;QACD,aAAa,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAEjD,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;YACjC,GAAG,EAAE,4CAA4C;YACjD,QAAQ,EAAE,aAAc;YACxB,QAAQ,EAAE,IAA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