@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.
- package/CHANGELOG.md +804 -0
- package/README.md +163 -0
- package/dist/package.json +76 -0
- package/dist/src/build.config.d.ts +46 -0
- package/dist/src/build.config.js +237 -0
- package/dist/src/build.config.js.map +1 -0
- package/dist/src/factory/client/clients.d.ts +11 -0
- package/dist/src/factory/client/clients.js +119 -0
- package/dist/src/factory/client/clients.js.map +1 -0
- package/dist/src/factory/client/evm.d.ts +6 -0
- package/dist/src/factory/client/evm.js +71 -0
- package/dist/src/factory/client/evm.js.map +1 -0
- package/dist/src/factory/client/index.d.ts +11 -0
- package/dist/src/factory/client/index.js +38 -0
- package/dist/src/factory/client/index.js.map +1 -0
- package/dist/src/factory/client/nft.d.ts +4 -0
- package/dist/src/factory/client/nft.js +26 -0
- package/dist/src/factory/client/nft.js.map +1 -0
- package/dist/src/factory/index.d.ts +3 -0
- package/dist/src/factory/index.js +7 -0
- package/dist/src/factory/index.js.map +1 -0
- package/dist/src/factory/settings.d.ts +4 -0
- package/dist/src/factory/settings.js +27 -0
- package/dist/src/factory/settings.js.map +1 -0
- package/dist/src/factory/swap/index.d.ts +4 -0
- package/dist/src/factory/swap/index.js +66 -0
- package/dist/src/factory/swap/index.js.map +1 -0
- package/dist/src/index.d.ts +1619 -0
- package/dist/src/index.js +38 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/index.test.d.ts +1 -0
- package/dist/src/index.test.js +187 -0
- package/dist/src/index.test.js.map +1 -0
- package/dist/src/nameResolvers/nameResolver.d.ts +7 -0
- package/dist/src/nameResolvers/nameResolver.js +3 -0
- package/dist/src/nameResolvers/nameResolver.js.map +1 -0
- package/dist/src/nameResolvers/uns.d.ts +12 -0
- package/dist/src/nameResolvers/uns.js +83 -0
- package/dist/src/nameResolvers/uns.js.map +1 -0
- package/dist/src/nameResolvers/uns.test.d.ts +1 -0
- package/dist/src/nameResolvers/uns.test.js +29 -0
- package/dist/src/nameResolvers/uns.test.js.map +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.d.ts +4 -0
- package/dist/src/store/actions/acceptTermsAndConditions.js +17 -0
- package/dist/src/store/actions/acceptTermsAndConditions.js.map +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.d.ts +1 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.js +22 -0
- package/dist/src/store/actions/acceptTermsAndConditions.test.js.map +1 -0
- package/dist/src/store/actions/accounts/createAccount.d.ts +7 -0
- package/dist/src/store/actions/accounts/createAccount.js +27 -0
- package/dist/src/store/actions/accounts/createAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/createAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/createAccount.test.js +29 -0
- package/dist/src/store/actions/accounts/createAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/index.d.ts +5 -0
- package/dist/src/store/actions/accounts/index.js +9 -0
- package/dist/src/store/actions/accounts/index.js.map +1 -0
- package/dist/src/store/actions/accounts/removeAccount.d.ts +7 -0
- package/dist/src/store/actions/accounts/removeAccount.js +12 -0
- package/dist/src/store/actions/accounts/removeAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/removeAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/removeAccount.test.js +53 -0
- package/dist/src/store/actions/accounts/removeAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.d.ts +8 -0
- package/dist/src/store/actions/accounts/toggleAccount.js +19 -0
- package/dist/src/store/actions/accounts/toggleAccount.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.d.ts +1 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.js +44 -0
- package/dist/src/store/actions/accounts/toggleAccount.test.js.map +1 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.d.ts +9 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.js +14 -0
- package/dist/src/store/actions/accounts/toggleBlockchain.js.map +1 -0
- package/dist/src/store/actions/accounts/updateAccount.d.ts +26 -0
- package/dist/src/store/actions/accounts/updateAccount.js +14 -0
- package/dist/src/store/actions/accounts/updateAccount.js.map +1 -0
- package/dist/src/store/actions/addCustomToken.d.ts +12 -0
- package/dist/src/store/actions/addCustomToken.js +12 -0
- package/dist/src/store/actions/addCustomToken.js.map +1 -0
- package/dist/src/store/actions/addCustomToken.test.d.ts +1 -0
- package/dist/src/store/actions/addCustomToken.test.js +59 -0
- package/dist/src/store/actions/addCustomToken.test.js.map +1 -0
- package/dist/src/store/actions/addExternalConnection.d.ts +9 -0
- package/dist/src/store/actions/addExternalConnection.js +13 -0
- package/dist/src/store/actions/addExternalConnection.js.map +1 -0
- package/dist/src/store/actions/addExternalConnection.test.d.ts +1 -0
- package/dist/src/store/actions/addExternalConnection.test.js +100 -0
- package/dist/src/store/actions/addExternalConnection.test.js.map +1 -0
- package/dist/src/store/actions/analytics.d.ts +21 -0
- package/dist/src/store/actions/analytics.js +58 -0
- package/dist/src/store/actions/analytics.js.map +1 -0
- package/dist/src/store/actions/analytics.test.d.ts +1 -0
- package/dist/src/store/actions/analytics.test.js +33 -0
- package/dist/src/store/actions/analytics.test.js.map +1 -0
- package/dist/src/store/actions/changeActiveNetwork.d.ts +5 -0
- package/dist/src/store/actions/changeActiveNetwork.js +13 -0
- package/dist/src/store/actions/changeActiveNetwork.js.map +1 -0
- package/dist/src/store/actions/changeActiveWalletId.d.ts +5 -0
- package/dist/src/store/actions/changeActiveWalletId.js +11 -0
- package/dist/src/store/actions/changeActiveWalletId.js.map +1 -0
- package/dist/src/store/actions/changeActiveWalletId.test.d.ts +1 -0
- package/dist/src/store/actions/changeActiveWalletId.test.js +40 -0
- package/dist/src/store/actions/changeActiveWalletId.test.js.map +1 -0
- package/dist/src/store/actions/changePassword.d.ts +4 -0
- package/dist/src/store/actions/changePassword.js +13 -0
- package/dist/src/store/actions/changePassword.js.map +1 -0
- package/dist/src/store/actions/changePassword.test.d.ts +1 -0
- package/dist/src/store/actions/changePassword.test.js +22 -0
- package/dist/src/store/actions/changePassword.test.js.map +1 -0
- package/dist/src/store/actions/checkPendingActions.d.ts +5 -0
- package/dist/src/store/actions/checkPendingActions.js +25 -0
- package/dist/src/store/actions/checkPendingActions.js.map +1 -0
- package/dist/src/store/actions/clearErrorLog.d.ts +2 -0
- package/dist/src/store/actions/clearErrorLog.js +10 -0
- package/dist/src/store/actions/clearErrorLog.js.map +1 -0
- package/dist/src/store/actions/createWallet.d.ts +7 -0
- package/dist/src/store/actions/createWallet.js +90 -0
- package/dist/src/store/actions/createWallet.js.map +1 -0
- package/dist/src/store/actions/createWallet.test.d.ts +1 -0
- package/dist/src/store/actions/createWallet.test.js +41 -0
- package/dist/src/store/actions/createWallet.test.js.map +1 -0
- package/dist/src/store/actions/customChainSettings.d.ts +15 -0
- package/dist/src/store/actions/customChainSettings.js +37 -0
- package/dist/src/store/actions/customChainSettings.js.map +1 -0
- package/dist/src/store/actions/disableAssets.d.ts +7 -0
- package/dist/src/store/actions/disableAssets.js +28 -0
- package/dist/src/store/actions/disableAssets.js.map +1 -0
- package/dist/src/store/actions/disableEthereumInjection.d.ts +2 -0
- package/dist/src/store/actions/disableEthereumInjection.js +11 -0
- package/dist/src/store/actions/disableEthereumInjection.js.map +1 -0
- package/dist/src/store/actions/disableEthereumInjection.test.d.ts +1 -0
- package/dist/src/store/actions/disableEthereumInjection.test.js +24 -0
- package/dist/src/store/actions/disableEthereumInjection.test.js.map +1 -0
- package/dist/src/store/actions/enableAssets.d.ts +7 -0
- package/dist/src/store/actions/enableAssets.js +65 -0
- package/dist/src/store/actions/enableAssets.js.map +1 -0
- package/dist/src/store/actions/enableAssets.test.d.ts +1 -0
- package/dist/src/store/actions/enableAssets.test.js +37 -0
- package/dist/src/store/actions/enableAssets.test.js.map +1 -0
- package/dist/src/store/actions/enableDisableAssets.test.d.ts +1 -0
- package/dist/src/store/actions/enableDisableAssets.test.js +79 -0
- package/dist/src/store/actions/enableDisableAssets.test.js.map +1 -0
- package/dist/src/store/actions/enableEthereumInjection.d.ts +2 -0
- package/dist/src/store/actions/enableEthereumInjection.js +11 -0
- package/dist/src/store/actions/enableEthereumInjection.js.map +1 -0
- package/dist/src/store/actions/exportPrivateKey.d.ts +9 -0
- package/dist/src/store/actions/exportPrivateKey.js +12 -0
- package/dist/src/store/actions/exportPrivateKey.js.map +1 -0
- package/dist/src/store/actions/exportPrivateKey.test.d.ts +1 -0
- package/dist/src/store/actions/exportPrivateKey.test.js +36 -0
- package/dist/src/store/actions/exportPrivateKey.test.js.map +1 -0
- package/dist/src/store/actions/fetchTokenDetails.d.ts +11 -0
- package/dist/src/store/actions/fetchTokenDetails.js +22 -0
- package/dist/src/store/actions/fetchTokenDetails.js.map +1 -0
- package/dist/src/store/actions/forgetDappConnections.d.ts +2 -0
- package/dist/src/store/actions/forgetDappConnections.js +11 -0
- package/dist/src/store/actions/forgetDappConnections.js.map +1 -0
- package/dist/src/store/actions/getLockForAsset.d.ts +8 -0
- package/dist/src/store/actions/getLockForAsset.js +34 -0
- package/dist/src/store/actions/getLockForAsset.js.map +1 -0
- package/dist/src/store/actions/getQuotes.d.ts +13 -0
- package/dist/src/store/actions/getQuotes.js +70 -0
- package/dist/src/store/actions/getQuotes.js.map +1 -0
- package/dist/src/store/actions/getQuotes.test.d.ts +1 -0
- package/dist/src/store/actions/getQuotes.test.js +30 -0
- package/dist/src/store/actions/getQuotes.test.js.map +1 -0
- package/dist/src/store/actions/getUnusedAddresses.d.ts +8 -0
- package/dist/src/store/actions/getUnusedAddresses.js +51 -0
- package/dist/src/store/actions/getUnusedAddresses.js.map +1 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.d.ts +16 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js +57 -0
- package/dist/src/store/actions/hardware-wallet/getLedgerAccounts.js.map +1 -0
- package/dist/src/store/actions/hardware-wallet/index.d.ts +1 -0
- package/dist/src/store/actions/hardware-wallet/index.js +5 -0
- package/dist/src/store/actions/hardware-wallet/index.js.map +1 -0
- package/dist/src/store/actions/index.d.ts +47 -0
- package/dist/src/store/actions/index.js +51 -0
- package/dist/src/store/actions/index.js.map +1 -0
- package/dist/src/store/actions/initializeAddresses.d.ts +6 -0
- package/dist/src/store/actions/initializeAddresses.js +26 -0
- package/dist/src/store/actions/initializeAddresses.js.map +1 -0
- package/dist/src/store/actions/initializeAddresses.test.d.ts +1 -0
- package/dist/src/store/actions/initializeAddresses.test.js +58 -0
- package/dist/src/store/actions/initializeAddresses.test.js.map +1 -0
- package/dist/src/store/actions/lockWallet.d.ts +2 -0
- package/dist/src/store/actions/lockWallet.js +11 -0
- package/dist/src/store/actions/lockWallet.js.map +1 -0
- package/dist/src/store/actions/lockWallet.test.d.ts +1 -0
- package/dist/src/store/actions/lockWallet.test.js +24 -0
- package/dist/src/store/actions/lockWallet.test.js.map +1 -0
- package/dist/src/store/actions/logError.d.ts +3 -0
- package/dist/src/store/actions/logError.js +10 -0
- package/dist/src/store/actions/logError.js.map +1 -0
- package/dist/src/store/actions/logError.test.d.ts +1 -0
- package/dist/src/store/actions/logError.test.js +27 -0
- package/dist/src/store/actions/logError.test.js.map +1 -0
- package/dist/src/store/actions/newSwap.d.ts +12 -0
- package/dist/src/store/actions/newSwap.js +34 -0
- package/dist/src/store/actions/newSwap.js.map +1 -0
- package/dist/src/store/actions/performNextAction/index.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/index.js +65 -0
- package/dist/src/store/actions/performNextAction/index.js.map +1 -0
- package/dist/src/store/actions/performNextAction/send.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/send.js +54 -0
- package/dist/src/store/actions/performNextAction/send.js.map +1 -0
- package/dist/src/store/actions/performNextAction/sendNFT.d.ts +7 -0
- package/dist/src/store/actions/performNextAction/sendNFT.js +50 -0
- package/dist/src/store/actions/performNextAction/sendNFT.js.map +1 -0
- package/dist/src/store/actions/performNextAction/utils.d.ts +11 -0
- package/dist/src/store/actions/performNextAction/utils.js +42 -0
- package/dist/src/store/actions/performNextAction/utils.js.map +1 -0
- package/dist/src/store/actions/proxyMutation.d.ts +5 -0
- package/dist/src/store/actions/proxyMutation.js +9 -0
- package/dist/src/store/actions/proxyMutation.js.map +1 -0
- package/dist/src/store/actions/removeCustomToken.d.ts +7 -0
- package/dist/src/store/actions/removeCustomToken.js +11 -0
- package/dist/src/store/actions/removeCustomToken.js.map +1 -0
- package/dist/src/store/actions/retrySwap.d.ts +5 -0
- package/dist/src/store/actions/retrySwap.js +23 -0
- package/dist/src/store/actions/retrySwap.js.map +1 -0
- package/dist/src/store/actions/sendNFTTransaction.d.ts +4 -0
- package/dist/src/store/actions/sendNFTTransaction.js +47 -0
- package/dist/src/store/actions/sendNFTTransaction.js.map +1 -0
- package/dist/src/store/actions/sendTransaction.d.ts +17 -0
- package/dist/src/store/actions/sendTransaction.js +51 -0
- package/dist/src/store/actions/sendTransaction.js.map +1 -0
- package/dist/src/store/actions/sendTransaction.test.d.ts +1 -0
- package/dist/src/store/actions/sendTransaction.test.js +80 -0
- package/dist/src/store/actions/sendTransaction.test.js.map +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.d.ts +5 -0
- package/dist/src/store/actions/setEthereumInjectionChain.js +11 -0
- package/dist/src/store/actions/setEthereumInjectionChain.js.map +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.d.ts +1 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.js +20 -0
- package/dist/src/store/actions/setEthereumInjectionChain.test.js.map +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.d.ts +4 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.js +10 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.js.map +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.d.ts +1 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.js +24 -0
- package/dist/src/store/actions/setWhatsNewModalVersion.test.js.map +1 -0
- package/dist/src/store/actions/showNotification.d.ts +2 -0
- package/dist/src/store/actions/showNotification.js +10 -0
- package/dist/src/store/actions/showNotification.js.map +1 -0
- package/dist/src/store/actions/toggleExperiment.d.ts +5 -0
- package/dist/src/store/actions/toggleExperiment.js +10 -0
- package/dist/src/store/actions/toggleExperiment.js.map +1 -0
- package/dist/src/store/actions/toggleExperiment.test.d.ts +1 -0
- package/dist/src/store/actions/toggleExperiment.test.js +34 -0
- package/dist/src/store/actions/toggleExperiment.test.js.map +1 -0
- package/dist/src/store/actions/toggleNFTStarred.d.ts +8 -0
- package/dist/src/store/actions/toggleNFTStarred.js +10 -0
- package/dist/src/store/actions/toggleNFTStarred.js.map +1 -0
- package/dist/src/store/actions/unlockWallet.d.ts +4 -0
- package/dist/src/store/actions/unlockWallet.js +22 -0
- package/dist/src/store/actions/unlockWallet.js.map +1 -0
- package/dist/src/store/actions/updateAccountBalance.d.ts +7 -0
- package/dist/src/store/actions/updateAccountBalance.js +29 -0
- package/dist/src/store/actions/updateAccountBalance.js.map +1 -0
- package/dist/src/store/actions/updateBalances.d.ts +9 -0
- package/dist/src/store/actions/updateBalances.js +169 -0
- package/dist/src/store/actions/updateBalances.js.map +1 -0
- package/dist/src/store/actions/updateBalances.test.d.ts +1 -0
- package/dist/src/store/actions/updateBalances.test.js +43 -0
- package/dist/src/store/actions/updateBalances.test.js.map +1 -0
- package/dist/src/store/actions/updateCurrenciesInfo.d.ts +5 -0
- package/dist/src/store/actions/updateCurrenciesInfo.js +14 -0
- package/dist/src/store/actions/updateCurrenciesInfo.js.map +1 -0
- package/dist/src/store/actions/updateFees.d.ts +6 -0
- package/dist/src/store/actions/updateFees.js +16 -0
- package/dist/src/store/actions/updateFees.js.map +1 -0
- package/dist/src/store/actions/updateFees.test.d.ts +1 -0
- package/dist/src/store/actions/updateFees.test.js +86 -0
- package/dist/src/store/actions/updateFees.test.js.map +1 -0
- package/dist/src/store/actions/updateFiatRates.d.ts +5 -0
- package/dist/src/store/actions/updateFiatRates.js +15 -0
- package/dist/src/store/actions/updateFiatRates.js.map +1 -0
- package/dist/src/store/actions/updateFiatRates.test.d.ts +1 -0
- package/dist/src/store/actions/updateFiatRates.test.js +43 -0
- package/dist/src/store/actions/updateFiatRates.test.js.map +1 -0
- package/dist/src/store/actions/updateMarketData.d.ts +8 -0
- package/dist/src/store/actions/updateMarketData.js +28 -0
- package/dist/src/store/actions/updateMarketData.js.map +1 -0
- package/dist/src/store/actions/updateMarketData.test.d.ts +1 -0
- package/dist/src/store/actions/updateMarketData.test.js +49 -0
- package/dist/src/store/actions/updateMarketData.test.js.map +1 -0
- package/dist/src/store/actions/updateNFTs.d.ts +7 -0
- package/dist/src/store/actions/updateNFTs.js +39 -0
- package/dist/src/store/actions/updateNFTs.js.map +1 -0
- package/dist/src/store/actions/updateNFTs.test.d.ts +1 -0
- package/dist/src/store/actions/updateNFTs.test.js +32 -0
- package/dist/src/store/actions/updateNFTs.test.js.map +1 -0
- package/dist/src/store/actions/updateTransactionFee.d.ts +11 -0
- package/dist/src/store/actions/updateTransactionFee.js +81 -0
- package/dist/src/store/actions/updateTransactionFee.js.map +1 -0
- package/dist/src/store/broker/notification.d.ts +4 -0
- package/dist/src/store/broker/notification.js +84 -0
- package/dist/src/store/broker/notification.js.map +1 -0
- package/dist/src/store/getters.d.ts +59 -0
- package/dist/src/store/getters.js +350 -0
- package/dist/src/store/getters.js.map +1 -0
- package/dist/src/store/index.d.ts +3524 -0
- package/dist/src/store/index.js +24 -0
- package/dist/src/store/index.js.map +1 -0
- package/dist/src/store/migrations/10_analytics_settings.d.ts +4 -0
- package/dist/src/store/migrations/10_analytics_settings.js +19 -0
- package/dist/src/store/migrations/10_analytics_settings.js.map +1 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.d.ts +8 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js +22 -0
- package/dist/src/store/migrations/11_12_rsk_legacy_derivation_path.js.map +1 -0
- package/dist/src/store/migrations/13_rsk_fish_token.d.ts +4 -0
- package/dist/src/store/migrations/13_rsk_fish_token.js +19 -0
- package/dist/src/store/migrations/13_rsk_fish_token.js.map +1 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.d.ts +4 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.js +56 -0
- package/dist/src/store/migrations/14_account_set_derivation_path.js.map +1 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.d.ts +4 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.js +25 -0
- package/dist/src/store/migrations/15_accounts_chains_set_enabled.js.map +1 -0
- package/dist/src/store/migrations/16_enable_terra_chain.d.ts +4 -0
- package/dist/src/store/migrations/16_enable_terra_chain.js +10 -0
- package/dist/src/store/migrations/16_enable_terra_chain.js.map +1 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.d.ts +4 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.js +12 -0
- package/dist/src/store/migrations/17_remove_injection_enabled.js.map +1 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.d.ts +4 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.js +10 -0
- package/dist/src/store/migrations/18_enable_avalanche_chain.js.map +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.d.ts +4 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js +25 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.js.map +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts.state.pre.json +1944 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.d.ts +1 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js +7 -0
- package/dist/src/store/migrations/19_remove_existing_ledger_accounts_test.js.map +1 -0
- package/dist/src/store/migrations/1_first_migration.d.ts +4 -0
- package/dist/src/store/migrations/1_first_migration.js +11 -0
- package/dist/src/store/migrations/1_first_migration.js.map +1 -0
- package/dist/src/store/migrations/20_fix_accounts.d.ts +4 -0
- package/dist/src/store/migrations/20_fix_accounts.js +68 -0
- package/dist/src/store/migrations/20_fix_accounts.js.map +1 -0
- package/dist/src/store/migrations/21_enable_solana_chain.d.ts +4 -0
- package/dist/src/store/migrations/21_enable_solana_chain.js +10 -0
- package/dist/src/store/migrations/21_enable_solana_chain.js.map +1 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.d.ts +4 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.js +10 -0
- package/dist/src/store/migrations/22_enable_optimism_chain.js.map +1 -0
- package/dist/src/store/migrations/2_set_default_assets.d.ts +4 -0
- package/dist/src/store/migrations/2_set_default_assets.js +20 -0
- package/dist/src/store/migrations/2_set_default_assets.js.map +1 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.d.ts +4 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.js +21 -0
- package/dist/src/store/migrations/3_add_network_custom_tokens.js.map +1 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.d.ts +4 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js +15 -0
- package/dist/src/store/migrations/4_fix_rsk_token_injected_asset.js.map +1 -0
- package/dist/src/store/migrations/5_multiple_account_support.d.ts +4 -0
- package/dist/src/store/migrations/5_multiple_account_support.js +96 -0
- package/dist/src/store/migrations/5_multiple_account_support.js.map +1 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.d.ts +4 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.js +11 -0
- package/dist/src/store/migrations/6_use_ledger_live_default.js.map +1 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.d.ts +4 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.js +27 -0
- package/dist/src/store/migrations/7_multi_provider_swaps.js.map +1 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.d.ts +4 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.js +12 -0
- package/dist/src/store/migrations/8_remove_use_ledger_live.js.map +1 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.d.ts +4 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js +14 -0
- package/dist/src/store/migrations/9_inject_ethereum_asset_chain.js.map +1 -0
- package/dist/src/store/migrations/before_after_migration_script.test.d.ts +1 -0
- package/dist/src/store/migrations/before_after_migration_script.test.js +92 -0
- package/dist/src/store/migrations/before_after_migration_script.test.js.map +1 -0
- package/dist/src/store/migrations/enable_chain.d.ts +3 -0
- package/dist/src/store/migrations/enable_chain.js +71 -0
- package/dist/src/store/migrations/enable_chain.js.map +1 -0
- package/dist/src/store/migrations/index.d.ts +5 -0
- package/dist/src/store/migrations/index.js +78 -0
- package/dist/src/store/migrations/index.js.map +1 -0
- package/dist/src/store/migrations/migration_script.test.d.ts +1 -0
- package/dist/src/store/migrations/migration_script.test.js +59 -0
- package/dist/src/store/migrations/migration_script.test.js.map +1 -0
- package/dist/src/store/mutations.d.ts +209 -0
- package/dist/src/store/mutations.js +348 -0
- package/dist/src/store/mutations.js.map +1 -0
- package/dist/src/store/state.d.ts +3 -0
- package/dist/src/store/state.js +46 -0
- package/dist/src/store/state.js.map +1 -0
- package/dist/src/store/types.d.ts +249 -0
- package/dist/src/store/types.js +64 -0
- package/dist/src/store/types.js.map +1 -0
- package/dist/src/store/utils.d.ts +38 -0
- package/dist/src/store/utils.js +194 -0
- package/dist/src/store/utils.js.map +1 -0
- package/dist/src/swaps/EvmSwapProvider.d.ts +32 -0
- package/dist/src/swaps/EvmSwapProvider.js +118 -0
- package/dist/src/swaps/EvmSwapProvider.js.map +1 -0
- package/dist/src/swaps/SwapProvider.d.ts +35 -0
- package/dist/src/swaps/SwapProvider.js +89 -0
- package/dist/src/swaps/SwapProvider.js.map +1 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.d.ts +67 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.js +251 -0
- package/dist/src/swaps/astroport/AstroportSwapProvider.js.map +1 -0
- package/dist/src/swaps/astroport/info.json +7 -0
- package/dist/src/swaps/astroport/queries.d.ts +108 -0
- package/dist/src/swaps/astroport/queries.js +227 -0
- package/dist/src/swaps/astroport/queries.js.map +1 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.d.ts +98 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.js +553 -0
- package/dist/src/swaps/debridge/DeBridgeSwapProvider.js.map +1 -0
- package/dist/src/swaps/debridge/abi/DeBridgeGate.json +1958 -0
- package/dist/src/swaps/debridge/abi/SignatureVerifier.json +925 -0
- package/dist/src/swaps/debridge/info.json +13 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.d.ts +103 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js +292 -0
- package/dist/src/swaps/fastbtc/FastBTCDepositSwapProvider.js.map +1 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.d.ts +108 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js +306 -0
- package/dist/src/swaps/fastbtc/FastBTCWithdrawSwapProvider.js.map +1 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.d.ts +19 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js +24 -0
- package/dist/src/swaps/fastbtc/fastBtcBridgeContract.js.map +1 -0
- package/dist/src/swaps/fastbtc/info.json +7 -0
- package/dist/src/swaps/hop/HopSwapProvider.d.ts +124 -0
- package/dist/src/swaps/hop/HopSwapProvider.js +479 -0
- package/dist/src/swaps/hop/HopSwapProvider.js.map +1 -0
- package/dist/src/swaps/hop/info.json +12 -0
- package/dist/src/swaps/hop/queries.d.ts +2 -0
- package/dist/src/swaps/hop/queries.js +61 -0
- package/dist/src/swaps/hop/queries.js.map +1 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.d.ts +46 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.js +189 -0
- package/dist/src/swaps/jupiter/JupiterSwapProvider.js.map +1 -0
- package/dist/src/swaps/jupiter/info.json +7 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.d.ts +76 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.js +313 -0
- package/dist/src/swaps/lifi/LifiSwapProvider.js.map +1 -0
- package/dist/src/swaps/lifi/info.json +7 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.d.ts +104 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.js +704 -0
- package/dist/src/swaps/liquality/LiqualitySwapProvider.js.map +1 -0
- package/dist/src/swaps/liquality/info.json +7 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.d.ts +124 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js +239 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/LiqualityBoostERC20toNative.js.map +1 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostERC20toNative/info.json +7 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.d.ts +52 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js +213 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/LiqualityBoostNativeToERC20.js.map +1 -0
- package/dist/src/swaps/liqualityboost/liqualityBoostNativeToERC20/info.json +7 -0
- package/dist/src/swaps/liqualityboost/types.d.ts +17 -0
- package/dist/src/swaps/liqualityboost/types.js +3 -0
- package/dist/src/swaps/liqualityboost/types.js.map +1 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.d.ts +86 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.js +369 -0
- package/dist/src/swaps/oneinch/OneinchSwapProvider.js.map +1 -0
- package/dist/src/swaps/oneinch/info.json +13 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.d.ts +110 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.js +369 -0
- package/dist/src/swaps/sovryn/SovrynSwapProvider.js.map +1 -0
- package/dist/src/swaps/sovryn/info.json +7 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.d.ts +167 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js +874 -0
- package/dist/src/swaps/teleswap/TeleSwapSwapProvider.js.map +1 -0
- package/dist/src/swaps/teleswap/info.json +7 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.d.ts +194 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.js +534 -0
- package/dist/src/swaps/thorchain/ThorchainSwapProvider.js.map +1 -0
- package/dist/src/swaps/thorchain/info.json +7 -0
- package/dist/src/swaps/types.d.ts +87 -0
- package/dist/src/swaps/types.js +9 -0
- package/dist/src/swaps/types.js.map +1 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.d.ts +117 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.js +438 -0
- package/dist/src/swaps/uniswap/UniswapSwapProvider.js.map +1 -0
- package/dist/src/swaps/uniswap/info.json +7 -0
- package/dist/src/swaps/utils.d.ts +92 -0
- package/dist/src/swaps/utils.js +57 -0
- package/dist/src/swaps/utils.js.map +1 -0
- package/dist/src/tsconfig.json +30 -0
- package/dist/src/types.d.ts +29 -0
- package/dist/src/types.js +3 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/accounts.d.ts +16 -0
- package/dist/src/utils/accounts.js +89 -0
- package/dist/src/utils/accounts.js.map +1 -0
- package/dist/src/utils/address.d.ts +8 -0
- package/dist/src/utils/address.js +17 -0
- package/dist/src/utils/address.js.map +1 -0
- package/dist/src/utils/address.test.d.ts +1 -0
- package/dist/src/utils/address.test.js +12 -0
- package/dist/src/utils/address.test.js.map +1 -0
- package/dist/src/utils/asset.d.ts +22 -0
- package/dist/src/utils/asset.js +198 -0
- package/dist/src/utils/asset.js.map +1 -0
- package/dist/src/utils/asset.test.d.ts +1 -0
- package/dist/src/utils/asset.test.js +42 -0
- package/dist/src/utils/asset.test.js.map +1 -0
- package/dist/src/utils/chainify.d.ts +3 -0
- package/dist/src/utils/chainify.js +41 -0
- package/dist/src/utils/chainify.js.map +1 -0
- package/dist/src/utils/coinFormatter.d.ts +13 -0
- package/dist/src/utils/coinFormatter.js +58 -0
- package/dist/src/utils/coinFormatter.js.map +1 -0
- package/dist/src/utils/crypto.d.ts +6 -0
- package/dist/src/utils/crypto.js +70 -0
- package/dist/src/utils/crypto.js.map +1 -0
- package/dist/src/utils/cryptoassets.d.ts +5 -0
- package/dist/src/utils/cryptoassets.js +26 -0
- package/dist/src/utils/cryptoassets.js.map +1 -0
- package/dist/src/utils/derivationPath.d.ts +6 -0
- package/dist/src/utils/derivationPath.js +75 -0
- package/dist/src/utils/derivationPath.js.map +1 -0
- package/dist/src/utils/derivationPath.spec.d.ts +1 -0
- package/dist/src/utils/derivationPath.spec.js +37 -0
- package/dist/src/utils/derivationPath.spec.js.map +1 -0
- package/dist/src/utils/export.d.ts +5 -0
- package/dist/src/utils/export.js +24 -0
- package/dist/src/utils/export.js.map +1 -0
- package/dist/src/utils/fees.d.ts +43 -0
- package/dist/src/utils/fees.js +222 -0
- package/dist/src/utils/fees.js.map +1 -0
- package/dist/src/utils/fees.test.d.ts +1 -0
- package/dist/src/utils/fees.test.js +40 -0
- package/dist/src/utils/fees.test.js.map +1 -0
- package/dist/src/utils/fetchTokenDetails.d.ts +1 -0
- package/dist/src/utils/fetchTokenDetails.js +19 -0
- package/dist/src/utils/fetchTokenDetails.js.map +1 -0
- package/dist/src/utils/history.d.ts +66 -0
- package/dist/src/utils/history.js +135 -0
- package/dist/src/utils/history.js.map +1 -0
- package/dist/src/utils/isTransactionNotFoundError.d.ts +1 -0
- package/dist/src/utils/isTransactionNotFoundError.js +16 -0
- package/dist/src/utils/isTransactionNotFoundError.js.map +1 -0
- package/dist/src/utils/ledger.d.ts +12 -0
- package/dist/src/utils/ledger.js +38 -0
- package/dist/src/utils/ledger.js.map +1 -0
- package/dist/src/utils/moment.d.ts +2 -0
- package/dist/src/utils/moment.js +8 -0
- package/dist/src/utils/moment.js.map +1 -0
- package/dist/src/utils/networks.d.ts +10 -0
- package/dist/src/utils/networks.js +43 -0
- package/dist/src/utils/networks.js.map +1 -0
- package/dist/src/utils/parseTokenTx.d.ts +2 -0
- package/dist/src/utils/parseTokenTx.js +10 -0
- package/dist/src/utils/parseTokenTx.js.map +1 -0
- package/dist/src/utils/quotes.d.ts +5 -0
- package/dist/src/utils/quotes.js +20 -0
- package/dist/src/utils/quotes.js.map +1 -0
- package/dist/src/utils/quotes.test.d.ts +1 -0
- package/dist/src/utils/quotes.test.js +85 -0
- package/dist/src/utils/quotes.test.js.map +1 -0
- package/dist/src/utils/timeline.d.ts +71 -0
- package/dist/src/utils/timeline.js +176 -0
- package/dist/src/utils/timeline.js.map +1 -0
- package/dist/src/walletOptions/defaultOptions.d.ts +3 -0
- package/dist/src/walletOptions/defaultOptions.js +36 -0
- package/dist/src/walletOptions/defaultOptions.js.map +1 -0
- package/dist/src/walletOptions/index.d.ts +7 -0
- package/dist/src/walletOptions/index.js +11 -0
- package/dist/src/walletOptions/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withInterval = exports.withLock = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
function withLock({ dispatch }, { item, network, walletId, asset }, func) {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
const lock = yield dispatch('getLockForAsset', {
|
|
10
|
+
item,
|
|
11
|
+
network,
|
|
12
|
+
walletId,
|
|
13
|
+
asset,
|
|
14
|
+
});
|
|
15
|
+
try {
|
|
16
|
+
return yield func();
|
|
17
|
+
}
|
|
18
|
+
finally {
|
|
19
|
+
(0, utils_1.unlockAsset)(lock);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
exports.withLock = withLock;
|
|
24
|
+
function withInterval(func) {
|
|
25
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const updates = yield func();
|
|
27
|
+
if (updates) {
|
|
28
|
+
return updates;
|
|
29
|
+
}
|
|
30
|
+
return new Promise((resolve) => {
|
|
31
|
+
const interval = setInterval(() => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const updates = yield func();
|
|
33
|
+
if (updates) {
|
|
34
|
+
clearInterval(interval);
|
|
35
|
+
resolve(updates);
|
|
36
|
+
}
|
|
37
|
+
}), (0, lodash_1.random)(15000, 30000));
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
exports.withInterval = withInterval;
|
|
42
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/store/actions/performNextAction/utils.ts"],"names":[],"mappings":";;;;AAAA,mCAAgC;AAGhC,uCAA0C;AAI1C,SAAsB,QAAQ,CAC5B,EAAE,QAAQ,EAAiB,EAC3B,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAmE,EACnG,IAA+B;;QAE/B,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,iBAAiB,EAAE;YAC7C,IAAI;YACJ,OAAO;YACP,QAAQ;YACR,KAAK;SACN,CAAC,CAAC;QACH,IAAI;YACF,OAAO,MAAM,IAAI,EAAE,CAAC;SACrB;gBAAS;YACR,IAAA,mBAAW,EAAC,IAAI,CAAC,CAAC;SACnB;IACH,CAAC;CAAA;AAhBD,4BAgBC;AAED,SAAsB,YAAY,CAAI,IAA8B;;QAClE,MAAM,OAAO,GAAG,MAAM,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,EAAE;YACX,OAAO,OAAO,CAAC;SAChB;QACD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAS,EAAE;gBACtC,MAAM,OAAO,GAAG,MAAM,IAAI,EAAE,CAAC;gBAC7B,IAAI,OAAO,EAAE;oBACX,aAAa,CAAC,QAAQ,CAAC,CAAC;oBACxB,OAAO,CAAC,OAAO,CAAC,CAAC;iBAClB;YACH,CAAC,CAAA,EAAE,IAAA,eAAM,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAdD,oCAcC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.proxyMutation = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const proxyMutation = ({ commit }, { type, payload }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
6
|
+
commit(type, payload);
|
|
7
|
+
});
|
|
8
|
+
exports.proxyMutation = proxyMutation;
|
|
9
|
+
//# sourceMappingURL=proxyMutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxyMutation.js","sourceRoot":"","sources":["../../../../src/store/actions/proxyMutation.ts"],"names":[],"mappings":";;;;AAEO,MAAM,aAAa,GAAG,CAAO,EAAE,MAAM,EAAiB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAkC,EAAE,EAAE;IAClH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACxB,CAAC,CAAA,CAAC;AAFW,QAAA,aAAa,iBAExB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeCustomToken = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const removeCustomToken = (context, { network, walletId, symbol }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
8
|
+
commit.REMOVE_CUSTOM_TOKEN({ network, walletId, symbol });
|
|
9
|
+
});
|
|
10
|
+
exports.removeCustomToken = removeCustomToken;
|
|
11
|
+
//# sourceMappingURL=removeCustomToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeCustomToken.js","sourceRoot":"","sources":["../../../../src/store/actions/removeCustomToken.ts"],"names":[],"mappings":";;;;AAAA,0BAAsD;AAG/C,MAAM,iBAAiB,GAAG,CAC/B,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAA4D,EACvF,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,mBAAmB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAA,CAAC;AANW,QAAA,iBAAiB,qBAM5B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.retrySwap = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const retrySwap = (context, { swap }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const { commit, dispatch } = (0, __1.rootActionContext)(context);
|
|
8
|
+
commit.UPDATE_HISTORY({
|
|
9
|
+
network: swap.network,
|
|
10
|
+
walletId: swap.walletId,
|
|
11
|
+
id: swap.id,
|
|
12
|
+
updates: {
|
|
13
|
+
error: undefined,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
return (yield dispatch.performNextAction({
|
|
17
|
+
network: swap.network,
|
|
18
|
+
walletId: swap.walletId,
|
|
19
|
+
id: swap.id,
|
|
20
|
+
}));
|
|
21
|
+
});
|
|
22
|
+
exports.retrySwap = retrySwap;
|
|
23
|
+
//# sourceMappingURL=retrySwap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrySwap.js","sourceRoot":"","sources":["../../../../src/store/actions/retrySwap.ts"],"names":[],"mappings":";;;;AAAA,0BAAsD;AAG/C,MAAM,SAAS,GAAG,CACvB,OAAsB,EACtB,EAAE,IAAI,EAA6B,EACY,EAAE;IACjD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACxD,MAAM,CAAC,cAAc,CAAC;QACpB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,EAAE,EAAE,IAAI,CAAC,EAAE;QACX,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;SACjB;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,MAAM,QAAQ,CAAC,iBAAiB,CAAC;QACvC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,EAAE,EAAE,IAAI,CAAC,EAAE;KACZ,CAAC,CAAoB,CAAC;AACzB,CAAC,CAAA,CAAC;AAnBW,QAAA,SAAS,aAmBpB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Transaction } from '@yaswap/types';
|
|
2
|
+
import { ActionContext } from '..';
|
|
3
|
+
import { NFTSendTransactionParams } from '../types';
|
|
4
|
+
export declare const sendNFTTransaction: (context: ActionContext, { network, accountId, walletId, receiver, values, fee, feeLabel, nft }: NFTSendTransactionParams) => Promise<Transaction>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendNFTTransaction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
6
|
+
const uuid_1 = require("uuid");
|
|
7
|
+
const __1 = require("..");
|
|
8
|
+
const notification_1 = require("../broker/notification");
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
const sendNFTTransaction = (context, { network, accountId, walletId, receiver, values, fee, feeLabel, nft }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
11
|
+
const { getters, commit, dispatch } = (0, __1.rootActionContext)(context);
|
|
12
|
+
const account = getters.accountItem(accountId);
|
|
13
|
+
const asset = (0, cryptoassets_1.getChain)(network, account.chain).nativeAsset[0].code;
|
|
14
|
+
const client = getters.client({ network, walletId, chainId: account.chain, accountId });
|
|
15
|
+
const tx = yield client.nft.transfer(nft.asset_contract.address, receiver, [nft.token_id], values);
|
|
16
|
+
const transaction = {
|
|
17
|
+
id: (0, uuid_1.v4)(),
|
|
18
|
+
type: types_1.TransactionType.NFT,
|
|
19
|
+
network,
|
|
20
|
+
walletId,
|
|
21
|
+
to: asset,
|
|
22
|
+
from: asset,
|
|
23
|
+
toAddress: receiver,
|
|
24
|
+
fee,
|
|
25
|
+
tx,
|
|
26
|
+
nft,
|
|
27
|
+
txHash: tx.hash,
|
|
28
|
+
startTime: Date.now(),
|
|
29
|
+
status: types_1.SendStatus.WAITING_FOR_CONFIRMATIONS,
|
|
30
|
+
accountId,
|
|
31
|
+
feeLabel,
|
|
32
|
+
};
|
|
33
|
+
commit.NEW_NFT_TRASACTION({
|
|
34
|
+
network,
|
|
35
|
+
walletId,
|
|
36
|
+
transaction,
|
|
37
|
+
});
|
|
38
|
+
dispatch.performNextAction({
|
|
39
|
+
network,
|
|
40
|
+
walletId,
|
|
41
|
+
id: transaction.id,
|
|
42
|
+
});
|
|
43
|
+
(0, notification_1.createHistoryNotification)(transaction);
|
|
44
|
+
return tx;
|
|
45
|
+
});
|
|
46
|
+
exports.sendNFTTransaction = sendNFTTransaction;
|
|
47
|
+
//# sourceMappingURL=sendNFTTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendNFTTransaction.js","sourceRoot":"","sources":["../../../../src/store/actions/sendNFTTransaction.ts"],"names":[],"mappings":";;;;AACA,uDAAgD;AAChD,+BAAoC;AACpC,0BAAsD;AACtD,yDAAmE;AACnE,oCAA8G;AAEvG,MAAM,kBAAkB,GAAG,CAChC,OAAsB,EACtB,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAA4B,EAC1E,EAAE;IACxB,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACjE,MAAM,OAAO,GAAY,OAAO,CAAC,WAAW,CAAC,SAAS,CAAE,CAAC;IACzD,MAAM,KAAK,GAAG,IAAA,uBAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACnE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAExF,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,cAAe,CAAC,OAAQ,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,QAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAEtG,MAAM,WAAW,GAAuB;QACtC,EAAE,EAAE,IAAA,SAAM,GAAE;QACZ,IAAI,EAAE,uBAAe,CAAC,GAAG;QACzB,OAAO;QACP,QAAQ;QACR,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,QAAQ;QACnB,GAAG;QACH,EAAE;QACF,GAAG;QACH,MAAM,EAAE,EAAE,CAAC,IAAI;QACf,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,MAAM,EAAE,kBAAU,CAAC,yBAAyB;QAC5C,SAAS;QACT,QAAQ;KACT,CAAC;IAEF,MAAM,CAAC,kBAAkB,CAAC;QACxB,OAAO;QACP,QAAQ;QACR,WAAW;KACZ,CAAC,CAAC;IAEH,QAAQ,CAAC,iBAAiB,CAAC;QACzB,OAAO;QACP,QAAQ;QACR,EAAE,EAAE,WAAW,CAAC,EAAE;KACnB,CAAC,CAAC;IAEH,IAAA,wCAAyB,EAAC,WAAW,CAAC,CAAC;IAEvC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAA,CAAC;AA5CW,QAAA,kBAAkB,sBA4C7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BigNumber } from 'bignumber.js';
|
|
2
|
+
import { ActionContext } from '..';
|
|
3
|
+
import { AccountId, Asset, FeeLabel, Network, SendHistoryItem, WalletId } from '../types';
|
|
4
|
+
export declare const sendTransaction: (context: ActionContext, { network, walletId, accountId, asset, to, amount, data, fee, feeAsset, gas, feeLabel, fiatRate, }: {
|
|
5
|
+
network: Network;
|
|
6
|
+
walletId: WalletId;
|
|
7
|
+
accountId: AccountId;
|
|
8
|
+
asset: Asset;
|
|
9
|
+
to: Asset;
|
|
10
|
+
amount: BigNumber;
|
|
11
|
+
data: string;
|
|
12
|
+
fee: number;
|
|
13
|
+
feeAsset: string;
|
|
14
|
+
gas: number;
|
|
15
|
+
feeLabel: FeeLabel;
|
|
16
|
+
fiatRate: number;
|
|
17
|
+
}) => Promise<SendHistoryItem>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendTransaction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
6
|
+
const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
const __1 = require("..");
|
|
9
|
+
const chainify_1 = require("../../utils/chainify");
|
|
10
|
+
const notification_1 = require("../broker/notification");
|
|
11
|
+
const types_1 = require("../types");
|
|
12
|
+
const sendTransaction = (context, { network, walletId, accountId, asset, to, amount, data, fee, feeAsset, gas, feeLabel, fiatRate, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
const { dispatch, commit, getters } = (0, __1.rootActionContext)(context);
|
|
14
|
+
const chainId = getters.cryptoassets[asset].chain;
|
|
15
|
+
const client = getters.client({ network, walletId, chainId, accountId });
|
|
16
|
+
const _asset = (0, chainify_1.assetsAdapter)(asset)[0];
|
|
17
|
+
const _feeAsset = (0, chainify_1.assetsAdapter)(feeAsset)[0] || _asset;
|
|
18
|
+
const tx = yield client.wallet.sendTransaction({
|
|
19
|
+
to: (0, cryptoassets_1.getChain)(network, chainId).formatAddress(to),
|
|
20
|
+
value: new bignumber_js_1.default(amount),
|
|
21
|
+
data,
|
|
22
|
+
gasLimit: gas,
|
|
23
|
+
fee,
|
|
24
|
+
asset: _asset,
|
|
25
|
+
feeAsset: _feeAsset,
|
|
26
|
+
});
|
|
27
|
+
const transaction = {
|
|
28
|
+
id: (0, uuid_1.v4)(),
|
|
29
|
+
type: types_1.TransactionType.Send,
|
|
30
|
+
network,
|
|
31
|
+
walletId,
|
|
32
|
+
to: asset,
|
|
33
|
+
from: asset,
|
|
34
|
+
toAddress: to,
|
|
35
|
+
amount: new bignumber_js_1.default(amount).toFixed(),
|
|
36
|
+
fee,
|
|
37
|
+
tx,
|
|
38
|
+
txHash: tx.hash,
|
|
39
|
+
startTime: Date.now(),
|
|
40
|
+
status: types_1.SendStatus.WAITING_FOR_CONFIRMATIONS,
|
|
41
|
+
accountId,
|
|
42
|
+
feeLabel,
|
|
43
|
+
fiatRate,
|
|
44
|
+
};
|
|
45
|
+
commit.NEW_TRASACTION({ network, walletId, transaction });
|
|
46
|
+
dispatch.performNextAction({ network, walletId, id: transaction.id });
|
|
47
|
+
(0, notification_1.createHistoryNotification)(transaction);
|
|
48
|
+
return transaction;
|
|
49
|
+
});
|
|
50
|
+
exports.sendTransaction = sendTransaction;
|
|
51
|
+
//# sourceMappingURL=sendTransaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../../src/store/actions/sendTransaction.ts"],"names":[],"mappings":";;;;AAAA,uDAAgD;AAChD,wEAA6C;AAC7C,+BAAoC;AACpC,0BAAsD;AACtD,mDAAqD;AACrD,yDAAmE;AACnE,oCAAuH;AAEhH,MAAM,eAAe,GAAG,CAC7B,OAAsB,EACtB,EACE,OAAO,EACP,QAAQ,EACR,SAAS,EACT,KAAK,EACL,EAAE,EACF,MAAM,EACN,IAAI,EACJ,GAAG,EACH,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,QAAQ,GAcT,EACyB,EAAE;IAC5B,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;IAEzE,MAAM,MAAM,GAAG,IAAA,wBAAa,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,IAAA,wBAAa,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;IAEvD,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC;QAC7C,EAAE,EAAE,IAAA,uBAAQ,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC;QAChD,KAAK,EAAE,IAAI,sBAAE,CAAC,MAAM,CAAC;QACrB,IAAI;QACJ,QAAQ,EAAE,GAAG;QACb,GAAG;QACH,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,SAAS;KACpB,CAAC,CAAC;IAEH,MAAM,WAAW,GAAoB;QACnC,EAAE,EAAE,IAAA,SAAM,GAAE;QACZ,IAAI,EAAE,uBAAe,CAAC,IAAI;QAC1B,OAAO;QACP,QAAQ;QACR,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,EAAE;QACb,MAAM,EAAE,IAAI,sBAAE,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;QAChC,GAAG;QACH,EAAE;QACF,MAAM,EAAE,EAAE,CAAC,IAAI;QACf,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,MAAM,EAAE,kBAAU,CAAC,yBAAyB;QAC5C,SAAS;QACT,QAAQ;QACR,QAAQ;KACT,CAAC;IAEF,MAAM,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAE1D,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtE,IAAA,wCAAyB,EAAC,WAAW,CAAC,CAAC;IAEvC,OAAO,WAAW,CAAC;AACrB,CAAC,CAAA,CAAC;AAzEW,QAAA,eAAe,mBAyE1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
5
|
+
const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
|
|
6
|
+
const Process = tslib_1.__importStar(require("process"));
|
|
7
|
+
const index_1 = require("../../index");
|
|
8
|
+
const history_1 = require("../../utils/history");
|
|
9
|
+
const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
|
|
10
|
+
const types_1 = require("../types");
|
|
11
|
+
describe('sendTransaction tests', () => {
|
|
12
|
+
jest.setTimeout(90000);
|
|
13
|
+
const createNotification = jest.fn();
|
|
14
|
+
const wallet = (0, index_1.setupWallet)(Object.assign(Object.assign({}, defaultOptions_1.default), { createNotification }));
|
|
15
|
+
let TEST_MNEMONIC = Process.env.TEST_MNEMONIC;
|
|
16
|
+
if (!TEST_MNEMONIC) {
|
|
17
|
+
throw new Error('Please set the TEST_MNEMONIC environment variable');
|
|
18
|
+
}
|
|
19
|
+
TEST_MNEMONIC = TEST_MNEMONIC.replace(/,/g, ' ');
|
|
20
|
+
beforeEach(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
yield wallet.dispatch.createWallet({
|
|
22
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
23
|
+
mnemonic: TEST_MNEMONIC,
|
|
24
|
+
imported: true,
|
|
25
|
+
});
|
|
26
|
+
yield wallet.dispatch.unlockWallet({
|
|
27
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
it('should be able to do send transaction (AVAX) using testnet', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
32
|
+
yield wallet.dispatch.changeActiveNetwork({
|
|
33
|
+
network: types_1.Network.Testnet,
|
|
34
|
+
});
|
|
35
|
+
expect(wallet.state.activeNetwork).toBe('testnet');
|
|
36
|
+
const walletId = wallet.state.activeWalletId;
|
|
37
|
+
let testnetEnabledAssets = (_c = (_b = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.state) === null || _a === void 0 ? void 0 : _a.enabledAssets) === null || _b === void 0 ? void 0 : _b.testnet) === null || _c === void 0 ? void 0 : _c[walletId];
|
|
38
|
+
testnetEnabledAssets = testnetEnabledAssets.filter((asset) => asset !== 'SOL');
|
|
39
|
+
expect(testnetEnabledAssets === null || testnetEnabledAssets === void 0 ? void 0 : testnetEnabledAssets.length).not.toBe(0);
|
|
40
|
+
yield wallet.dispatch.updateFees({
|
|
41
|
+
asset: 'AVAX',
|
|
42
|
+
});
|
|
43
|
+
const account = (_f = (_e = (_d = wallet.state.accounts) === null || _d === void 0 ? void 0 : _d[walletId]) === null || _e === void 0 ? void 0 : _e.testnet) === null || _f === void 0 ? void 0 : _f.find((acc) => acc.chain === cryptoassets_1.ChainId.Avalanche);
|
|
44
|
+
expect(account === null || account === void 0 ? void 0 : account.chain).toBe(cryptoassets_1.ChainId.Avalanche);
|
|
45
|
+
const avaxAccountId = account === null || account === void 0 ? void 0 : account.id;
|
|
46
|
+
const maintainElement = (_g = wallet.state.fees.testnet) === null || _g === void 0 ? void 0 : _g[walletId];
|
|
47
|
+
expect(maintainElement === null || maintainElement === void 0 ? void 0 : maintainElement.AVAX).toHaveProperty('fast');
|
|
48
|
+
const avaxFeeObject = maintainElement === null || maintainElement === void 0 ? void 0 : maintainElement.AVAX.fast;
|
|
49
|
+
yield wallet.dispatch.sendTransaction({
|
|
50
|
+
network: types_1.Network.Testnet,
|
|
51
|
+
walletId: wallet.state.activeWalletId,
|
|
52
|
+
accountId: avaxAccountId,
|
|
53
|
+
asset: 'AVAX',
|
|
54
|
+
to: '0x9d6345f731e160cd90b65a91ab60f4f9e37bdbd2',
|
|
55
|
+
amount: new bignumber_js_1.default(10000000000000),
|
|
56
|
+
data: '',
|
|
57
|
+
fee: avaxFeeObject.fee,
|
|
58
|
+
gas: 21000,
|
|
59
|
+
feeLabel: types_1.FeeLabel.Fast,
|
|
60
|
+
fiatRate: 72,
|
|
61
|
+
});
|
|
62
|
+
expect(wallet.state.history.testnet).toHaveProperty(walletId);
|
|
63
|
+
expect((_h = wallet.state.history.testnet) === null || _h === void 0 ? void 0 : _h[walletId].length).toBe(1);
|
|
64
|
+
expect((_j = wallet.state.history.testnet) === null || _j === void 0 ? void 0 : _j[walletId][0].type).toBe('SEND');
|
|
65
|
+
expect((_k = wallet.state.history.testnet) === null || _k === void 0 ? void 0 : _k[walletId][0].network).toBe('testnet');
|
|
66
|
+
expect((_l = wallet.state.history.testnet) === null || _l === void 0 ? void 0 : _l[walletId][0]).toHaveProperty('txHash');
|
|
67
|
+
const createNotification = jest.fn();
|
|
68
|
+
const b = {
|
|
69
|
+
title: 'Transaction sent',
|
|
70
|
+
message: 'Sending 0.00001 AVAX to 0x9d6345f731e160cd90b65a91ab60f4f9e37bdbd2',
|
|
71
|
+
};
|
|
72
|
+
const bound = createNotification.bind(b);
|
|
73
|
+
bound();
|
|
74
|
+
expect(createNotification).toHaveBeenCalled();
|
|
75
|
+
const historyObject = (_o = (_m = wallet.state.history.testnet) === null || _m === void 0 ? void 0 : _m[walletId]) === null || _o === void 0 ? void 0 : _o[0];
|
|
76
|
+
expect((0, history_1.getStatusLabel)(historyObject)).toBe('Pending');
|
|
77
|
+
expect((0, history_1.getStep)(historyObject)).toBe(0);
|
|
78
|
+
}));
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=sendTransaction.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendTransaction.test.js","sourceRoot":"","sources":["../../../../src/store/actions/sendTransaction.test.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setEthereumInjectionChain = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const setEthereumInjectionChain = (context, { chain }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
8
|
+
commit.SET_ETHEREUM_INJECTION_CHAIN({ chain });
|
|
9
|
+
});
|
|
10
|
+
exports.setEthereumInjectionChain = setEthereumInjectionChain;
|
|
11
|
+
//# sourceMappingURL=setEthereumInjectionChain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setEthereumInjectionChain.js","sourceRoot":"","sources":["../../../../src/store/actions/setEthereumInjectionChain.ts"],"names":[],"mappings":";;;;AACA,0BAAsD;AAE/C,MAAM,yBAAyB,GAAG,CAAO,OAAsB,EAAE,EAAE,KAAK,EAAsB,EAAE,EAAE;IACvG,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,4BAA4B,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACjD,CAAC,CAAA,CAAC;AAHW,QAAA,yBAAyB,6BAGpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const cryptoassets_1 = require("@yaswap/cryptoassets");
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
|
|
7
|
+
it('should be able to enable Rootstock injection', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
|
|
9
|
+
yield wallet.dispatch.createWallet({
|
|
10
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
11
|
+
mnemonic: 'test',
|
|
12
|
+
imported: true,
|
|
13
|
+
});
|
|
14
|
+
yield wallet.dispatch.unlockWallet({
|
|
15
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
16
|
+
});
|
|
17
|
+
yield wallet.dispatch.setEthereumInjectionChain({ chain: cryptoassets_1.ChainId.Rootstock });
|
|
18
|
+
expect(wallet.state.injectEthereumChain).toEqual(cryptoassets_1.ChainId.Rootstock);
|
|
19
|
+
}));
|
|
20
|
+
//# sourceMappingURL=setEthereumInjectionChain.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setEthereumInjectionChain.test.js","sourceRoot":"","sources":["../../../../src/store/actions/setEthereumInjectionChain.test.ts"],"names":[],"mappings":";;;AAAA,uDAA+C;AAC/C,uCAA0C;AAC1C,gGAAsE;AAEtE,EAAE,CAAC,8CAA8C,EAAE,GAAS,EAAE;IAC5D,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAW,EAAC,wBAAoB,CAAC,CAAC;IACvD,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QACjC,GAAG,EAAE,4CAA4C;QACjD,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QACjC,GAAG,EAAE,4CAA4C;KAClD,CAAC,CAAC;IACH,MAAM,MAAM,CAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,KAAK,EAAE,sBAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAC9E,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,sBAAO,CAAC,SAAS,CAAC,CAAC;AACtE,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setWhatsNewModalVersion = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const setWhatsNewModalVersion = (context, { version }) => {
|
|
6
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
7
|
+
commit.SET_WHATS_NEW_MODAL_VERSION({ version });
|
|
8
|
+
};
|
|
9
|
+
exports.setWhatsNewModalVersion = setWhatsNewModalVersion;
|
|
10
|
+
//# sourceMappingURL=setWhatsNewModalVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setWhatsNewModalVersion.js","sourceRoot":"","sources":["../../../../src/store/actions/setWhatsNewModalVersion.ts"],"names":[],"mappings":";;;AAAA,0BAAsD;AAE/C,MAAM,uBAAuB,GAAG,CAAC,OAAsB,EAAE,EAAE,OAAO,EAAuB,EAAE,EAAE;IAClG,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,2BAA2B,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAHW,QAAA,uBAAuB,2BAGlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
|
|
6
|
+
describe('setWhatsNewModalVersion tests', () => {
|
|
7
|
+
it('should be able to validate set whatsNewModalShowed', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
|
|
9
|
+
yield wallet.dispatch.createWallet({
|
|
10
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
11
|
+
mnemonic: 'test',
|
|
12
|
+
imported: true,
|
|
13
|
+
});
|
|
14
|
+
yield wallet.dispatch.unlockWallet({
|
|
15
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
16
|
+
});
|
|
17
|
+
const version = '1.61.0';
|
|
18
|
+
yield wallet.dispatch.setWhatsNewModalVersion({
|
|
19
|
+
version: version,
|
|
20
|
+
});
|
|
21
|
+
expect(wallet.state.whatsNewModalVersion).toBe(version);
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=setWhatsNewModalVersion.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setWhatsNewModalVersion.test.js","sourceRoot":"","sources":["../../../../src/store/actions/setWhatsNewModalVersion.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AAEtE,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,EAAE,CAAC,oDAAoD,EAAE,GAAS,EAAE;QAClE,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAW,EAAC,wBAAoB,CAAC,CAAC;QACvD,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;YACjC,GAAG,EAAE,4CAA4C;YACjD,QAAQ,EAAE,MAAM;YAChB,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;YACjC,GAAG,EAAE,4CAA4C;SAClD,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,QAAQ,CAAC;QAEzB,MAAM,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC;YAC5C,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.showNotification = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const notification_1 = require("../broker/notification");
|
|
6
|
+
const showNotification = (_, notification) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
(0, notification_1.createNotification)(notification);
|
|
8
|
+
});
|
|
9
|
+
exports.showNotification = showNotification;
|
|
10
|
+
//# sourceMappingURL=showNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"showNotification.js","sourceRoot":"","sources":["../../../../src/store/actions/showNotification.ts"],"names":[],"mappings":";;;;AACA,yDAA4D;AAErD,MAAM,gBAAgB,GAAG,CAAO,CAAM,EAAE,YAA0B,EAAE,EAAE;IAC3E,IAAA,iCAAkB,EAAC,YAAY,CAAC,CAAC;AACnC,CAAC,CAAA,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toggleExperiment = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const toggleExperiment = (context, { name }) => {
|
|
6
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
7
|
+
commit.TOGGLE_EXPERIMENT({ name });
|
|
8
|
+
};
|
|
9
|
+
exports.toggleExperiment = toggleExperiment;
|
|
10
|
+
//# sourceMappingURL=toggleExperiment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggleExperiment.js","sourceRoot":"","sources":["../../../../src/store/actions/toggleExperiment.ts"],"names":[],"mappings":";;;AAAA,0BAAsD;AAG/C,MAAM,gBAAgB,GAAG,CAAC,OAAsB,EAAE,EAAE,IAAI,EAA4B,EAAE,EAAE;IAC7F,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,iBAAiB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AACrC,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
test('Should be able to validate toggleExperiment features', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
|
|
9
|
+
yield wallet.dispatch.createWallet({
|
|
10
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
11
|
+
mnemonic: 'test',
|
|
12
|
+
imported: true,
|
|
13
|
+
});
|
|
14
|
+
yield wallet.dispatch.unlockWallet({
|
|
15
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
16
|
+
});
|
|
17
|
+
expect(wallet.state.wallets.length).toBe(1);
|
|
18
|
+
expect(wallet.state.wallets[0].imported).toBe(true);
|
|
19
|
+
expect(wallet.state.unlockedAt).not.toBe(0);
|
|
20
|
+
yield wallet.dispatch.initializeAnalyticsPreferences({
|
|
21
|
+
accepted: true,
|
|
22
|
+
});
|
|
23
|
+
expect(wallet.state.analytics.userId).not.toBe(null);
|
|
24
|
+
expect(wallet.state.analytics.acceptedDate).not.toBe(0);
|
|
25
|
+
expect(wallet.state.analytics.askedDate).not.toBe(0);
|
|
26
|
+
expect(wallet.state.analytics.askedTimes).toBe(0);
|
|
27
|
+
expect(wallet.state.analytics.notAskAgain).toBe(false);
|
|
28
|
+
yield wallet.dispatch.toggleExperiment({
|
|
29
|
+
name: types_1.ExperimentType.ManageAccounts,
|
|
30
|
+
});
|
|
31
|
+
expect(wallet.state.experiments).toHaveProperty('manageAccounts');
|
|
32
|
+
expect(wallet.state.experiments.manageAccounts).toBe(true);
|
|
33
|
+
}));
|
|
34
|
+
//# sourceMappingURL=toggleExperiment.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggleExperiment.test.js","sourceRoot":"","sources":["../../../../src/store/actions/toggleExperiment.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AACtE,oCAA0C;AAE1C,IAAI,CAAC,sDAAsD,EAAE,GAAS,EAAE;IACtE,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAW,EAAC,wBAAoB,CAAC,CAAC;IACvD,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QACjC,GAAG,EAAE,4CAA4C;QACjD,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QACjC,GAAG,EAAE,4CAA4C;KAClD,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE5C,MAAM,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC;QACnD,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAGvD,MAAM,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACrC,IAAI,EAAE,sBAAc,CAAC,cAAc;KACpC,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7D,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionContext } from '..';
|
|
2
|
+
import { AccountId, Network, NFT, WalletId } from '../types';
|
|
3
|
+
export declare const toggleNFTStarred: (context: ActionContext, { network, walletId, accountId, nft }: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
accountId: AccountId;
|
|
7
|
+
nft: NFT;
|
|
8
|
+
}) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toggleNFTStarred = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const toggleNFTStarred = (context, { network, walletId, accountId, nft }) => {
|
|
6
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
7
|
+
commit.NFT_TOGGLE_STARRED({ network, walletId, accountId, nft });
|
|
8
|
+
};
|
|
9
|
+
exports.toggleNFTStarred = toggleNFTStarred;
|
|
10
|
+
//# sourceMappingURL=toggleNFTStarred.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggleNFTStarred.js","sourceRoot":"","sources":["../../../../src/store/actions/toggleNFTStarred.ts"],"names":[],"mappings":";;;AAAA,0BAAsD;AAG/C,MAAM,gBAAgB,GAAG,CAC9B,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAA4E,EAC/G,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unlockWallet = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
6
|
+
const __1 = require("..");
|
|
7
|
+
const crypto_1 = require("../../utils/crypto");
|
|
8
|
+
const unlockWallet = (context, { key }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
+
const { commit, state } = (0, __1.rootActionContext)(context);
|
|
10
|
+
const wallets = yield (0, crypto_1.decrypt)(state.encryptedWallets, key, state.keySalt);
|
|
11
|
+
if (!wallets) {
|
|
12
|
+
throw new error_parser_1.PasswordError();
|
|
13
|
+
}
|
|
14
|
+
const parsedWallets = JSON.parse(wallets);
|
|
15
|
+
commit.UNLOCK_WALLET({
|
|
16
|
+
key,
|
|
17
|
+
wallets: parsedWallets,
|
|
18
|
+
unlockedAt: Date.now(),
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
exports.unlockWallet = unlockWallet;
|
|
22
|
+
//# sourceMappingURL=unlockWallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlockWallet.js","sourceRoot":"","sources":["../../../../src/store/actions/unlockWallet.ts"],"names":[],"mappings":";;;;AAAA,uDAAqD;AACrD,0BAAsD;AACtD,+CAA6C;AAEtC,MAAM,YAAY,GAAG,CAAO,OAAsB,EAAE,EAAE,GAAG,EAAmB,EAAE,EAAE;IACrF,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACrD,MAAM,OAAO,GAAG,MAAM,IAAA,gBAAO,EAAC,KAAK,CAAC,gBAAgB,EAAE,GAAG,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAE1E,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,4BAAa,EAAE,CAAC;KAC3B;IAED,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,CAAC,aAAa,CAAC;QACnB,GAAG;QACH,OAAO,EAAE,aAAa;QACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;KACvB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAdW,QAAA,YAAY,gBAcvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionContext } from '..';
|
|
2
|
+
import { AccountId, Network, WalletId } from '../types';
|
|
3
|
+
export declare const updateAccountBalance: (context: ActionContext, { network, walletId, accountId }: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
accountId: AccountId;
|
|
7
|
+
}) => Promise<void>;
|