@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/store/actions/hardware-wallet/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export * from './acceptTermsAndConditions';
|
|
2
|
+
export * from './accounts';
|
|
3
|
+
export * from './addCustomToken';
|
|
4
|
+
export * from './addExternalConnection';
|
|
5
|
+
export * from './analytics';
|
|
6
|
+
export * from './changeActiveNetwork';
|
|
7
|
+
export * from './changeActiveWalletId';
|
|
8
|
+
export * from './changePassword';
|
|
9
|
+
export * from './checkPendingActions';
|
|
10
|
+
export * from './createWallet';
|
|
11
|
+
export * from './disableAssets';
|
|
12
|
+
export * from './disableEthereumInjection';
|
|
13
|
+
export * from './enableAssets';
|
|
14
|
+
export * from './enableEthereumInjection';
|
|
15
|
+
export * from './exportPrivateKey';
|
|
16
|
+
export * from './fetchTokenDetails';
|
|
17
|
+
export * from './forgetDappConnections';
|
|
18
|
+
export * from './getLockForAsset';
|
|
19
|
+
export * from './getQuotes';
|
|
20
|
+
export * from './getUnusedAddresses';
|
|
21
|
+
export * from './hardware-wallet';
|
|
22
|
+
export * from './initializeAddresses';
|
|
23
|
+
export * from './lockWallet';
|
|
24
|
+
export * from './newSwap';
|
|
25
|
+
export * from './performNextAction';
|
|
26
|
+
export * from './proxyMutation';
|
|
27
|
+
export * from './removeCustomToken';
|
|
28
|
+
export * from './retrySwap';
|
|
29
|
+
export * from './sendNFTTransaction';
|
|
30
|
+
export * from './sendTransaction';
|
|
31
|
+
export * from './setEthereumInjectionChain';
|
|
32
|
+
export * from './setWhatsNewModalVersion';
|
|
33
|
+
export * from './showNotification';
|
|
34
|
+
export * from './toggleExperiment';
|
|
35
|
+
export * from './toggleNFTStarred';
|
|
36
|
+
export * from './unlockWallet';
|
|
37
|
+
export * from './updateAccountBalance';
|
|
38
|
+
export * from './updateBalances';
|
|
39
|
+
export * from './updateCurrenciesInfo';
|
|
40
|
+
export * from './updateFees';
|
|
41
|
+
export * from './updateFiatRates';
|
|
42
|
+
export * from './updateMarketData';
|
|
43
|
+
export * from './updateNFTs';
|
|
44
|
+
export * from './updateTransactionFee';
|
|
45
|
+
export * from './logError';
|
|
46
|
+
export * from './clearErrorLog';
|
|
47
|
+
export * from './customChainSettings';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./acceptTermsAndConditions"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./accounts"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./addCustomToken"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./addExternalConnection"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./analytics"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./changeActiveNetwork"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./changeActiveWalletId"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./changePassword"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./checkPendingActions"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./createWallet"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./disableAssets"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./disableEthereumInjection"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./enableAssets"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./enableEthereumInjection"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./exportPrivateKey"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./fetchTokenDetails"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./forgetDappConnections"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./getLockForAsset"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./getQuotes"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./getUnusedAddresses"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./hardware-wallet"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./initializeAddresses"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./lockWallet"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./newSwap"), exports);
|
|
28
|
+
tslib_1.__exportStar(require("./performNextAction"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./proxyMutation"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./removeCustomToken"), exports);
|
|
31
|
+
tslib_1.__exportStar(require("./retrySwap"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./sendNFTTransaction"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./sendTransaction"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./setEthereumInjectionChain"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./setWhatsNewModalVersion"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./showNotification"), exports);
|
|
37
|
+
tslib_1.__exportStar(require("./toggleExperiment"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./toggleNFTStarred"), exports);
|
|
39
|
+
tslib_1.__exportStar(require("./unlockWallet"), exports);
|
|
40
|
+
tslib_1.__exportStar(require("./updateAccountBalance"), exports);
|
|
41
|
+
tslib_1.__exportStar(require("./updateBalances"), exports);
|
|
42
|
+
tslib_1.__exportStar(require("./updateCurrenciesInfo"), exports);
|
|
43
|
+
tslib_1.__exportStar(require("./updateFees"), exports);
|
|
44
|
+
tslib_1.__exportStar(require("./updateFiatRates"), exports);
|
|
45
|
+
tslib_1.__exportStar(require("./updateMarketData"), exports);
|
|
46
|
+
tslib_1.__exportStar(require("./updateNFTs"), exports);
|
|
47
|
+
tslib_1.__exportStar(require("./updateTransactionFee"), exports);
|
|
48
|
+
tslib_1.__exportStar(require("./logError"), exports);
|
|
49
|
+
tslib_1.__exportStar(require("./clearErrorLog"), exports);
|
|
50
|
+
tslib_1.__exportStar(require("./customChainSettings"), exports);
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/store/actions/index.ts"],"names":[],"mappings":";;;AAAA,qEAA2C;AAC3C,qDAA2B;AAC3B,2DAAiC;AACjC,kEAAwC;AACxC,sDAA4B;AAC5B,gEAAsC;AACtC,iEAAuC;AACvC,2DAAiC;AACjC,gEAAsC;AACtC,yDAA+B;AAC/B,0DAAgC;AAChC,qEAA2C;AAC3C,yDAA+B;AAC/B,oEAA0C;AAC1C,6DAAmC;AACnC,8DAAoC;AACpC,kEAAwC;AACxC,4DAAkC;AAClC,sDAA4B;AAC5B,+DAAqC;AACrC,4DAAkC;AAClC,gEAAsC;AACtC,uDAA6B;AAC7B,oDAA0B;AAC1B,8DAAoC;AACpC,0DAAgC;AAChC,8DAAoC;AACpC,sDAA4B;AAC5B,+DAAqC;AACrC,4DAAkC;AAClC,sEAA4C;AAC5C,oEAA0C;AAC1C,6DAAmC;AACnC,6DAAmC;AACnC,6DAAmC;AACnC,yDAA+B;AAC/B,iEAAuC;AACvC,2DAAiC;AACjC,iEAAuC;AACvC,uDAA6B;AAC7B,4DAAkC;AAClC,6DAAmC;AACnC,uDAA6B;AAC7B,iEAAuC;AACvC,qDAA2B;AAC3B,0DAAgC;AAChC,gEAAsC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initializeAddresses = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
6
|
+
const __1 = require("..");
|
|
7
|
+
const initializeAddresses = (context, { network, walletId }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
var _a;
|
|
9
|
+
const { state, dispatch } = (0, __1.rootActionContext)(context);
|
|
10
|
+
const accounts = (_a = state.accounts[walletId]) === null || _a === void 0 ? void 0 : _a[network];
|
|
11
|
+
if (!accounts) {
|
|
12
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.Accounts);
|
|
13
|
+
}
|
|
14
|
+
for (const account of accounts) {
|
|
15
|
+
if (!account.addresses.length) {
|
|
16
|
+
yield dispatch.getUnusedAddresses({
|
|
17
|
+
network,
|
|
18
|
+
walletId,
|
|
19
|
+
assets: account.assets,
|
|
20
|
+
accountId: account.id,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.initializeAddresses = initializeAddresses;
|
|
26
|
+
//# sourceMappingURL=initializeAddresses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializeAddresses.js","sourceRoot":"","sources":["../../../../src/store/actions/initializeAddresses.ts"],"names":[],"mappings":";;;;AAAA,uDAA0E;AAC1E,0BAAsD;AAG/C,MAAM,mBAAmB,GAAG,CACjC,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAA4C,EAC/D,EAAE;;IACF,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,0CAAG,OAAO,CAAC,CAAC;IACrD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAA,kCAAmB,EAAC,4BAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KAC5D;IACD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;YAC7B,MAAM,QAAQ,CAAC,kBAAkB,CAAC;gBAChC,OAAO;gBACP,QAAQ;gBACR,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,SAAS,EAAE,OAAO,CAAC,EAAE;aACtB,CAAC,CAAC;SACJ;KACF;AACH,CAAC,CAAA,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
describe('initializeAddresses tests', () => {
|
|
8
|
+
jest.setTimeout(120000);
|
|
9
|
+
it('should be able to validate every asset has addresses', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
11
|
+
const wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
|
|
12
|
+
yield wallet.dispatch.createWallet({
|
|
13
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
14
|
+
mnemonic: 'rough symbol license spirit advance pact catalog vibrant dream great usage empty',
|
|
15
|
+
imported: true,
|
|
16
|
+
});
|
|
17
|
+
yield wallet.dispatch.unlockWallet({
|
|
18
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
19
|
+
});
|
|
20
|
+
const walletId = wallet.state.activeWalletId;
|
|
21
|
+
let mainnetAccounts = (_b = (_a = wallet.state.accounts) === null || _a === void 0 ? void 0 : _a[walletId]) === null || _b === void 0 ? void 0 : _b.mainnet;
|
|
22
|
+
let testnetAccounts = (_d = (_c = wallet.state.accounts) === null || _c === void 0 ? void 0 : _c[walletId]) === null || _d === void 0 ? void 0 : _d.testnet;
|
|
23
|
+
expect(mainnetAccounts === null || mainnetAccounts === void 0 ? void 0 : mainnetAccounts.length).not.toBe(0);
|
|
24
|
+
expect(testnetAccounts === null || testnetAccounts === void 0 ? void 0 : testnetAccounts.length).not.toBe(0);
|
|
25
|
+
for (let i = 0; i < mainnetAccounts.length; i++) {
|
|
26
|
+
if (mainnetAccounts) {
|
|
27
|
+
expect((_f = (_e = mainnetAccounts[i]) === null || _e === void 0 ? void 0 : _e.addresses) === null || _f === void 0 ? void 0 : _f.length).toEqual(0);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
yield wallet.dispatch.initializeAddresses({
|
|
31
|
+
network: types_1.Network.Mainnet,
|
|
32
|
+
walletId: walletId,
|
|
33
|
+
});
|
|
34
|
+
mainnetAccounts = (_h = (_g = wallet.state.accounts) === null || _g === void 0 ? void 0 : _g[walletId]) === null || _h === void 0 ? void 0 : _h.mainnet;
|
|
35
|
+
expect(mainnetAccounts === null || mainnetAccounts === void 0 ? void 0 : mainnetAccounts.length).not.toBe(0);
|
|
36
|
+
for (let i = 0; i < mainnetAccounts.length; i++) {
|
|
37
|
+
if (mainnetAccounts) {
|
|
38
|
+
if (((_j = mainnetAccounts[i]) === null || _j === void 0 ? void 0 : _j.chain) !== 'fuse') {
|
|
39
|
+
expect((_l = (_k = mainnetAccounts[i]) === null || _k === void 0 ? void 0 : _k.addresses) === null || _l === void 0 ? void 0 : _l.length).toEqual(1);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
yield wallet.dispatch.initializeAddresses({
|
|
44
|
+
network: types_1.Network.Testnet,
|
|
45
|
+
walletId: walletId,
|
|
46
|
+
});
|
|
47
|
+
testnetAccounts = (_o = (_m = wallet.state.accounts) === null || _m === void 0 ? void 0 : _m[walletId]) === null || _o === void 0 ? void 0 : _o.testnet;
|
|
48
|
+
expect(testnetAccounts === null || testnetAccounts === void 0 ? void 0 : testnetAccounts.length).not.toBe(0);
|
|
49
|
+
for (let i = 0; i < testnetAccounts.length; i++) {
|
|
50
|
+
if (mainnetAccounts) {
|
|
51
|
+
if (((_p = mainnetAccounts[i]) === null || _p === void 0 ? void 0 : _p.chain) !== 'fuse') {
|
|
52
|
+
expect((_r = (_q = mainnetAccounts[i]) === null || _q === void 0 ? void 0 : _q.addresses) === null || _r === void 0 ? void 0 : _r.length).toEqual(1);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}));
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=initializeAddresses.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializeAddresses.test.js","sourceRoot":"","sources":["../../../../src/store/actions/initializeAddresses.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AACtE,oCAAmC;AAEnC,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACxB,EAAE,CAAC,sDAAsD,EAAE,GAAS,EAAE;;QACpE,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,kFAAkF;YAC5F,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,MAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;YACjC,GAAG,EAAE,4CAA4C;SAClD,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC;QAC7C,IAAI,eAAe,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,0CAAG,QAAQ,CAAC,0CAAE,OAAO,CAAC;QACjE,IAAI,eAAe,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,0CAAG,QAAQ,CAAC,0CAAE,OAAO,CAAC;QACjE,MAAM,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,eAAe,EAAE;gBAEnB,MAAM,CAAC,MAAA,MAAA,eAAe,CAAC,CAAC,CAAC,0CAAE,SAAS,0CAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;aAC1D;SACF;QAED,MAAM,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACxC,OAAO,EAAE,eAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QACH,eAAe,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,0CAAG,QAAQ,CAAC,0CAAE,OAAO,CAAC;QAC7D,MAAM,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,eAAe,EAAE;gBACnB,IAAI,CAAA,MAAA,eAAe,CAAC,CAAC,CAAC,0CAAE,KAAK,MAAK,MAAM,EAAE;oBAExC,MAAM,CAAC,MAAA,MAAA,eAAe,CAAC,CAAC,CAAC,0CAAE,SAAS,0CAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBAC1D;aACF;SACF;QAED,MAAM,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACxC,OAAO,EAAE,eAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QACH,eAAe,GAAG,MAAA,MAAA,MAAM,CAAC,KAAK,CAAC,QAAQ,0CAAG,QAAQ,CAAC,0CAAE,OAAO,CAAC;QAC7D,MAAM,CAAC,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAChD,IAAI,eAAe,EAAE;gBACnB,IAAI,CAAA,MAAA,eAAe,CAAC,CAAC,CAAC,0CAAE,KAAK,MAAK,MAAM,EAAE;oBAExC,MAAM,CAAC,MAAA,MAAA,eAAe,CAAC,CAAC,CAAC,0CAAE,SAAS,0CAAE,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;iBAC1D;aACF;SACF;IACH,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lockWallet = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const lockWallet = (context) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
7
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
8
|
+
commit.LOCK_WALLET();
|
|
9
|
+
});
|
|
10
|
+
exports.lockWallet = lockWallet;
|
|
11
|
+
//# sourceMappingURL=lockWallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockWallet.js","sourceRoot":"","sources":["../../../../src/store/actions/lockWallet.ts"],"names":[],"mappings":";;;;AAAA,0BAAsD;AAE/C,MAAM,UAAU,GAAG,CAAO,OAAsB,EAAE,EAAE;IACzD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,WAAW,EAAE,CAAC;AACvB,CAAC,CAAA,CAAC;AAHW,QAAA,UAAU,cAGrB"}
|
|
@@ -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('lock', () => {
|
|
7
|
+
test('should be able to lock a wallet', () => 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.unlockedAt).not.toBe(0);
|
|
18
|
+
expect(wallet.state.wallets.length).not.toBe(0);
|
|
19
|
+
yield wallet.dispatch.lockWallet();
|
|
20
|
+
expect(wallet.state.unlockedAt).toBe(0);
|
|
21
|
+
expect(wallet.state.wallets.length).toBe(0);
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=lockWallet.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockWallet.test.js","sourceRoot":"","sources":["../../../../src/store/actions/lockWallet.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AAEtE,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;IACpB,IAAI,CAAC,iCAAiC,EAAE,GAAS,EAAE;QACjD,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;QACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QACnC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logError = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const logError = (context, error) => {
|
|
6
|
+
const { commit } = (0, __1.rootActionContext)(context);
|
|
7
|
+
commit.LOG_ERROR(error);
|
|
8
|
+
};
|
|
9
|
+
exports.logError = logError;
|
|
10
|
+
//# sourceMappingURL=logError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logError.js","sourceRoot":"","sources":["../../../../src/store/actions/logError.ts"],"names":[],"mappings":";;;AACA,0BAAsD;AAE/C,MAAM,QAAQ,GAAG,CAAC,OAAsB,EAAE,KAAyB,EAAE,EAAE;IAC5E,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAC9C,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC,CAAC;AAHW,QAAA,QAAQ,YAGnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
5
|
+
const index_1 = require("../../index");
|
|
6
|
+
const defaultOptions_1 = tslib_1.__importDefault(require("../../walletOptions/defaultOptions"));
|
|
7
|
+
test('should log error to state when analytics is disabled', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const ERROR = 'anyError';
|
|
9
|
+
const wallet = yield (0, index_1.setupWallet)(defaultOptions_1.default);
|
|
10
|
+
yield wallet.dispatch.createWallet({
|
|
11
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
12
|
+
mnemonic: 'test',
|
|
13
|
+
imported: true,
|
|
14
|
+
});
|
|
15
|
+
yield wallet.dispatch.unlockWallet({
|
|
16
|
+
key: '0x1234567890123456789012345678901234567890',
|
|
17
|
+
});
|
|
18
|
+
yield wallet.dispatch.initializeAnalyticsPreferences({ accepted: false });
|
|
19
|
+
expect(wallet.state.errorLog.length).toBe(0);
|
|
20
|
+
(0, error_parser_1.createInternalError)(ERROR);
|
|
21
|
+
expect(wallet.state.errorLog.length).toBe(1);
|
|
22
|
+
expect(wallet.state.errorLog[0].rawError).toBe(ERROR);
|
|
23
|
+
yield wallet.dispatch.initializeAnalyticsPreferences({ accepted: true });
|
|
24
|
+
(0, error_parser_1.createInternalError)(ERROR);
|
|
25
|
+
expect(wallet.state.errorLog.length).toBe(2);
|
|
26
|
+
}));
|
|
27
|
+
//# sourceMappingURL=logError.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logError.test.js","sourceRoot":"","sources":["../../../../src/store/actions/logError.test.ts"],"names":[],"mappings":";;;AAAA,uDAA2D;AAC3D,uCAA0C;AAC1C,gGAAsE;AAEtE,IAAI,CAAC,sDAAsD,EAAE,GAAS,EAAE;IACtE,MAAM,KAAK,GAAG,UAAU,CAAC;IACzB,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;IAEH,MAAM,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1E,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAA,kCAAmB,EAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzE,IAAA,kCAAmB,EAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC,CAAA,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionContext } from '..';
|
|
2
|
+
import { SwapQuote } from '../../swaps/types';
|
|
3
|
+
import { FeeLabel, Network, SwapHistoryItem, WalletId } from '../types';
|
|
4
|
+
export declare const newSwap: (context: ActionContext, { network, walletId, quote, fee, claimFee, feeLabel, claimFeeLabel, }: {
|
|
5
|
+
network: Network;
|
|
6
|
+
walletId: WalletId;
|
|
7
|
+
quote: SwapQuote;
|
|
8
|
+
fee: number;
|
|
9
|
+
claimFee: number;
|
|
10
|
+
feeLabel: FeeLabel;
|
|
11
|
+
claimFeeLabel: FeeLabel;
|
|
12
|
+
}) => Promise<SwapHistoryItem>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.newSwap = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const __1 = require("..");
|
|
6
|
+
const swap_1 = require("../../factory/swap");
|
|
7
|
+
const types_1 = require("../types");
|
|
8
|
+
const newSwap = (context, { network, walletId, quote, fee, claimFee, feeLabel, claimFeeLabel, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
+
const { commit, dispatch } = (0, __1.rootActionContext)(context);
|
|
10
|
+
const swap = Object.assign(Object.assign({}, quote), { type: types_1.TransactionType.Swap, network, startTime: Date.now(), walletId,
|
|
11
|
+
claimFee,
|
|
12
|
+
fee });
|
|
13
|
+
const swapProvider = (0, swap_1.getSwapProvider)(network, swap.provider);
|
|
14
|
+
const initiationParams = yield swapProvider.newSwap({
|
|
15
|
+
network,
|
|
16
|
+
walletId,
|
|
17
|
+
quote: swap,
|
|
18
|
+
});
|
|
19
|
+
const createdSwap = Object.assign(Object.assign(Object.assign({}, swap), initiationParams), { feeLabel,
|
|
20
|
+
claimFeeLabel });
|
|
21
|
+
commit.NEW_SWAP({
|
|
22
|
+
network,
|
|
23
|
+
walletId,
|
|
24
|
+
swap: createdSwap,
|
|
25
|
+
});
|
|
26
|
+
dispatch.performNextAction({
|
|
27
|
+
network,
|
|
28
|
+
walletId,
|
|
29
|
+
id: createdSwap.id,
|
|
30
|
+
});
|
|
31
|
+
return createdSwap;
|
|
32
|
+
});
|
|
33
|
+
exports.newSwap = newSwap;
|
|
34
|
+
//# sourceMappingURL=newSwap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"newSwap.js","sourceRoot":"","sources":["../../../../src/store/actions/newSwap.ts"],"names":[],"mappings":";;;;AAAA,0BAAsD;AACtD,6CAAqD;AAErD,oCAAyF;AAElF,MAAM,OAAO,GAAG,CACrB,OAAsB,EACtB,EACE,OAAO,EACP,QAAQ,EACR,KAAK,EACL,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,aAAa,GASd,EACyB,EAAE;IAC5B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAExD,MAAM,IAAI,mCACL,KAAK,KACR,IAAI,EAAE,uBAAe,CAAC,IAAI,EAC1B,OAAO,EACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EACrB,QAAQ;QACR,QAAQ;QACR,GAAG,GACJ,CAAC;IAEF,MAAM,YAAY,GAAG,IAAA,sBAAe,EAAC,OAAO,EAAE,IAAI,CAAC,QAAS,CAAC,CAAC;IAE9D,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC;QAClD,OAAO;QACP,QAAQ;QACR,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,MAAM,WAAW,iDACZ,IAAI,GACJ,gBAAgB,KACnB,QAAQ;QACR,aAAa,GACd,CAAC;IAEF,MAAM,CAAC,QAAQ,CAAC;QACd,OAAO;QACP,QAAQ;QACR,IAAI,EAAE,WAAW;KAClB,CAAC,CAAC;IAEH,QAAQ,CAAC,iBAAiB,CAAC;QACzB,OAAO;QACP,QAAQ;QACR,EAAE,EAAE,WAAW,CAAC,EAAE;KACnB,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC,CAAA,CAAC;AA5DW,QAAA,OAAO,WA4DlB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionContext } from '../..';
|
|
2
|
+
import { HistoryItem, Network, WalletId } from '../../types';
|
|
3
|
+
export declare const performNextAction: (context: ActionContext, { network, walletId, id }: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
id: string;
|
|
7
|
+
}) => Promise<Partial<HistoryItem> | undefined>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performNextAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const utils_1 = require("@yaswap/error-parser/dist/src/utils");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const swap_1 = require("../../../factory/swap");
|
|
8
|
+
const notification_1 = require("../../broker/notification");
|
|
9
|
+
const types_1 = require("../../types");
|
|
10
|
+
const send_1 = require("./send");
|
|
11
|
+
const sendNFT_1 = require("./sendNFT");
|
|
12
|
+
const performNextAction = (context, { network, walletId, id }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
+
const { dispatch, commit, getters } = (0, __1.rootActionContext)(context);
|
|
14
|
+
const item = getters.historyItemById(network, walletId, id);
|
|
15
|
+
if (!item)
|
|
16
|
+
return;
|
|
17
|
+
if (!item.status)
|
|
18
|
+
return;
|
|
19
|
+
let updates;
|
|
20
|
+
try {
|
|
21
|
+
if (item.type === types_1.TransactionType.Swap) {
|
|
22
|
+
const swapProvider = (0, swap_1.getSwapProvider)(network, item.provider);
|
|
23
|
+
updates = yield swapProvider.performNextSwapAction(context, {
|
|
24
|
+
network,
|
|
25
|
+
walletId,
|
|
26
|
+
swap: item,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (item.type === types_1.TransactionType.Send) {
|
|
30
|
+
updates = yield (0, send_1.performNextTransactionAction)(context, {
|
|
31
|
+
network,
|
|
32
|
+
walletId,
|
|
33
|
+
transaction: item,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (item.type === types_1.TransactionType.NFT) {
|
|
37
|
+
updates = yield (0, sendNFT_1.performNextNFTTransactionAction)(context, {
|
|
38
|
+
network,
|
|
39
|
+
walletId,
|
|
40
|
+
transaction: item,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
updates = { error: (0, utils_1.errorToLiqualityErrorString)(e) };
|
|
46
|
+
}
|
|
47
|
+
if (updates) {
|
|
48
|
+
if (!updates.error) {
|
|
49
|
+
updates.error = null;
|
|
50
|
+
}
|
|
51
|
+
commit.UPDATE_HISTORY({
|
|
52
|
+
network,
|
|
53
|
+
walletId,
|
|
54
|
+
id,
|
|
55
|
+
updates,
|
|
56
|
+
});
|
|
57
|
+
(0, notification_1.createHistoryNotification)(Object.assign(Object.assign({}, item), updates));
|
|
58
|
+
if (!updates.error) {
|
|
59
|
+
dispatch.performNextAction({ network, walletId, id });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return updates;
|
|
63
|
+
});
|
|
64
|
+
exports.performNextAction = performNextAction;
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/store/actions/performNextAction/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAkF;AAClF,6BAAyD;AACzD,gDAAwD;AACxD,4DAAsE;AACtE,uCAA8E;AAC9E,iCAAsD;AACtD,uCAA4D;AAErD,MAAM,iBAAiB,GAAG,CAC/B,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAwD,EACpC,EAAE;IAC7C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC5D,IAAI,CAAC,IAAI;QAAE,OAAO;IAClB,IAAI,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO;IAEzB,IAAI,OAAO,CAAC;IACZ,IAAI;QACF,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAe,CAAC,IAAI,EAAE;YACtC,MAAM,YAAY,GAAG,IAAA,sBAAe,EAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAG7D,OAAO,GAAG,MAAM,YAAY,CAAC,qBAAqB,CAAC,OAAO,EAAE;gBAC1D,OAAO;gBACP,QAAQ;gBACR,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;SACJ;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAe,CAAC,IAAI,EAAE;YACtC,OAAO,GAAG,MAAM,IAAA,mCAA4B,EAAC,OAAO,EAAE;gBACpD,OAAO;gBACP,QAAQ;gBACR,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;SACJ;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,uBAAe,CAAC,GAAG,EAAE;YACrC,OAAO,GAAG,MAAM,IAAA,yCAA+B,EAAC,OAAO,EAAE;gBACvD,OAAO;gBACP,QAAQ;gBACR,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC;SACJ;KACF;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,GAAG,EAAE,KAAK,EAAE,IAAA,mCAA2B,EAAC,CAAC,CAAC,EAAE,CAAC;KACrD;IACD,IAAI,OAAO,EAAE;QACX,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAElB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;SACtB;QAED,MAAM,CAAC,cAAc,CAAC;YACpB,OAAO;YACP,QAAQ;YACR,EAAE;YACF,OAAO;SACR,CAAC,CAAC;QAEH,IAAA,wCAAyB,EAAC,gCACrB,IAAI,GACJ,OAAO,CACI,CAAC,CAAC;QAElB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE;YAClB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;SACvD;KACF;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAA,CAAC;AA9DW,QAAA,iBAAiB,qBA8D5B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionContext } from '../..';
|
|
2
|
+
import { Network, SendHistoryItem, WalletId } from '../../types';
|
|
3
|
+
export declare const performNextTransactionAction: (context: ActionContext, { network, walletId, transaction }: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
transaction: SendHistoryItem;
|
|
7
|
+
}) => Promise<Partial<SendHistoryItem> | undefined>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performNextTransactionAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const types_1 = require("@yaswap/types");
|
|
6
|
+
const __1 = require("../..");
|
|
7
|
+
const types_2 = require("../../types");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
const isTransactionNotFoundError_1 = require("../../../utils/isTransactionNotFoundError");
|
|
10
|
+
function txStatusToSendStatus(txStatus) {
|
|
11
|
+
switch (txStatus) {
|
|
12
|
+
case types_1.TxStatus.Success:
|
|
13
|
+
return types_2.SendStatus.SUCCESS;
|
|
14
|
+
case types_1.TxStatus.Failed:
|
|
15
|
+
return types_2.SendStatus.FAILED;
|
|
16
|
+
case types_1.TxStatus.Pending:
|
|
17
|
+
return types_2.SendStatus.WAITING_FOR_CONFIRMATIONS;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function waitForConfirmations(context, { transaction, network, walletId }) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { getters, dispatch } = (0, __1.rootActionContext)(context);
|
|
23
|
+
const { from, accountId } = transaction;
|
|
24
|
+
const chain = getters.cryptoassets[from].chain;
|
|
25
|
+
const client = getters.client({ network, walletId, chainId: chain, accountId });
|
|
26
|
+
try {
|
|
27
|
+
const tx = yield client.chain.getTransactionByHash(transaction.txHash);
|
|
28
|
+
if (tx && tx.confirmations && tx.confirmations > 0) {
|
|
29
|
+
dispatch.updateBalances({
|
|
30
|
+
network,
|
|
31
|
+
walletId,
|
|
32
|
+
accountIds: [transaction.accountId],
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
endTime: Date.now(),
|
|
36
|
+
status: txStatusToSendStatus(tx.status),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
if ((0, isTransactionNotFoundError_1.isTransactionNotFoundError)(e))
|
|
42
|
+
console.warn(e);
|
|
43
|
+
else
|
|
44
|
+
throw e;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const performNextTransactionAction = (context, { network, walletId, transaction }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
if (transaction.status === types_2.SendStatus.WAITING_FOR_CONFIRMATIONS) {
|
|
50
|
+
return (0, utils_1.withInterval)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return waitForConfirmations(context, { transaction, network, walletId }); }));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
exports.performNextTransactionAction = performNextTransactionAction;
|
|
54
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../../../src/store/actions/performNextAction/send.ts"],"names":[],"mappings":";;;;AAAA,yCAAyC;AACzC,6BAAyD;AACzD,uCAA6E;AAC7E,mCAAuC;AACvC,0FAAuF;AAEvF,SAAS,oBAAoB,CAAC,QAAkB;IAC9C,QAAQ,QAAQ,EAAE;QAChB,KAAK,gBAAQ,CAAC,OAAO;YACnB,OAAO,kBAAU,CAAC,OAAO,CAAC;QAC5B,KAAK,gBAAQ,CAAC,MAAM;YAClB,OAAO,kBAAU,CAAC,MAAM,CAAC;QAC3B,KAAK,gBAAQ,CAAC,OAAO;YACnB,OAAO,kBAAU,CAAC,yBAAyB,CAAC;KAC/C;AACH,CAAC;AAED,SAAe,oBAAoB,CACjC,OAAsB,EACtB,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAA0E;;QAE1G,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;QACzD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC/C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAChF,IAAI;YACF,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACvE,IAAI,EAAE,IAAI,EAAE,CAAC,aAAa,IAAI,EAAE,CAAC,aAAa,GAAG,CAAC,EAAE;gBAClD,QAAQ,CAAC,cAAc,CAAC;oBACtB,OAAO;oBACP,QAAQ;oBACR,UAAU,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC;iBACpC,CAAC,CAAC;gBAEH,OAAO;oBACL,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;oBACnB,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,MAAO,CAAC;iBACzC,CAAC;aACH;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,IAAA,uDAA0B,EAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;gBAC9C,MAAM,CAAC,CAAC;SACd;IACH,CAAC;CAAA;AAEM,MAAM,4BAA4B,GAAG,CAC1C,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAA0E,EAC1G,EAAE;IACF,IAAI,WAAW,CAAC,MAAM,KAAK,kBAAU,CAAC,yBAAyB,EAAE;QAC/D,OAAO,IAAA,oBAAY,EAAC,GAAS,EAAE,0DAAC,OAAA,oBAAoB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA,GAAA,CAAC,CAAC;KACpG;AACH,CAAC,CAAA,CAAC;AAPW,QAAA,4BAA4B,gCAOvC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionContext } from '../..';
|
|
2
|
+
import { Network, NFTSendHistoryItem, WalletId } from '../../types';
|
|
3
|
+
export declare const performNextNFTTransactionAction: (context: ActionContext, { network, walletId, transaction }: {
|
|
4
|
+
network: Network;
|
|
5
|
+
walletId: WalletId;
|
|
6
|
+
transaction: NFTSendHistoryItem;
|
|
7
|
+
}) => Promise<Partial<NFTSendHistoryItem> | undefined>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performNextNFTTransactionAction = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const types_1 = require("@yaswap/types");
|
|
6
|
+
const isTransactionNotFoundError_1 = require("../../../utils/isTransactionNotFoundError");
|
|
7
|
+
const __1 = require("../..");
|
|
8
|
+
const types_2 = require("../../types");
|
|
9
|
+
const utils_1 = require("./utils");
|
|
10
|
+
function txStatusToSendStatus(txStatus) {
|
|
11
|
+
switch (txStatus) {
|
|
12
|
+
case types_1.TxStatus.Success:
|
|
13
|
+
return types_2.SendStatus.SUCCESS;
|
|
14
|
+
case types_1.TxStatus.Failed:
|
|
15
|
+
return types_2.SendStatus.FAILED;
|
|
16
|
+
case types_1.TxStatus.Pending:
|
|
17
|
+
return types_2.SendStatus.WAITING_FOR_CONFIRMATIONS;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function waitForConfirmations(context, { transaction, network, walletId }) {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { getters, dispatch } = (0, __1.rootActionContext)(context);
|
|
23
|
+
const { from, accountId } = transaction;
|
|
24
|
+
const chainId = getters.cryptoassets[from].chain;
|
|
25
|
+
const client = getters.client({ network, walletId, chainId, accountId });
|
|
26
|
+
try {
|
|
27
|
+
const tx = yield client.chain.getTransactionByHash(transaction.txHash);
|
|
28
|
+
if (tx && tx.confirmations && tx.confirmations > 0) {
|
|
29
|
+
yield dispatch.updateNFTs({ network, walletId, accountIds: [transaction.accountId] });
|
|
30
|
+
return {
|
|
31
|
+
endTime: Date.now(),
|
|
32
|
+
status: txStatusToSendStatus(tx.status),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
if ((0, isTransactionNotFoundError_1.isTransactionNotFoundError)(e))
|
|
38
|
+
console.warn(e);
|
|
39
|
+
else
|
|
40
|
+
throw e;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const performNextNFTTransactionAction = (context, { network, walletId, transaction }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
if (transaction.status === types_2.SendStatus.WAITING_FOR_CONFIRMATIONS) {
|
|
46
|
+
return (0, utils_1.withInterval)(() => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return waitForConfirmations(context, { transaction, network, walletId }); }));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
exports.performNextNFTTransactionAction = performNextNFTTransactionAction;
|
|
50
|
+
//# sourceMappingURL=sendNFT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendNFT.js","sourceRoot":"","sources":["../../../../../src/store/actions/performNextAction/sendNFT.ts"],"names":[],"mappings":";;;;AAAA,yCAAyC;AACzC,0FAAuF;AACvF,6BAAyD;AACzD,uCAAgF;AAChF,mCAAuC;AAEvC,SAAS,oBAAoB,CAAC,QAAkB;IAC9C,QAAQ,QAAQ,EAAE;QAChB,KAAK,gBAAQ,CAAC,OAAO;YACnB,OAAO,kBAAU,CAAC,OAAO,CAAC;QAC5B,KAAK,gBAAQ,CAAC,MAAM;YAClB,OAAO,kBAAU,CAAC,MAAM,CAAC;QAC3B,KAAK,gBAAQ,CAAC,OAAO;YACnB,OAAO,kBAAU,CAAC,yBAAyB,CAAC;KAC/C;AACH,CAAC;AAED,SAAe,oBAAoB,CACjC,OAAsB,EACtB,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAA6E;;QAE7G,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;QACzD,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,WAAW,CAAC;QACxC,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QACjD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;QACzE,IAAI;YACF,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACvE,IAAI,EAAE,IAAI,EAAE,CAAC,aAAa,IAAI,EAAE,CAAC,aAAa,GAAG,CAAC,EAAE;gBAClD,MAAM,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;gBAEtF,OAAO;oBACL,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;oBACnB,MAAM,EAAE,oBAAoB,CAAC,EAAE,CAAC,MAAO,CAAC;iBACzC,CAAC;aACH;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,IAAA,uDAA0B,EAAC,CAAC,CAAC;gBAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;gBAC9C,MAAM,CAAC,CAAC;SACd;IACH,CAAC;CAAA;AAEM,MAAM,+BAA+B,GAAG,CAC7C,OAAsB,EACtB,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAA6E,EAC7G,EAAE;IACF,IAAI,WAAW,CAAC,MAAM,KAAK,kBAAU,CAAC,yBAAyB,EAAE;QAC/D,OAAO,IAAA,oBAAY,EAAC,GAAS,EAAE,0DAAC,OAAA,oBAAoB,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA,GAAA,CAAC,CAAC;KACpG;AACH,CAAC,CAAA,CAAC;AAPW,QAAA,+BAA+B,mCAO1C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionContext } from '../..';
|
|
2
|
+
import { Asset, Network, WalletId } from '../../types';
|
|
3
|
+
declare type HistoryUpdateFunction<T> = () => Promise<Partial<T> | undefined>;
|
|
4
|
+
export declare function withLock<T>({ dispatch }: ActionContext, { item, network, walletId, asset }: {
|
|
5
|
+
item: T;
|
|
6
|
+
network: Network;
|
|
7
|
+
walletId: WalletId;
|
|
8
|
+
asset: Asset;
|
|
9
|
+
}, func: () => Promise<Partial<T>>): Promise<Partial<T>>;
|
|
10
|
+
export declare function withInterval<T>(func: HistoryUpdateFunction<T>): Promise<Partial<T>>;
|
|
11
|
+
export {};
|