@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":"updateMarketData.test.js","sourceRoot":"","sources":["../../../../src/store/actions/updateMarketData.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AACtE,oCAAmC;AAEnC,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACvB,MAAM,MAAM,GAAG,IAAA,mBAAW,EAAC,wBAAoB,CAAC,CAAC;IACjD,UAAU,CAAC,GAAS,EAAE;QACpB,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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AC,CAAC;QAG5C,MAAM,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACxC,OAAO,EAAE,eAAO,CAAC,OAAO;SACzB,CAAC,CAAC;QAEH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC;YACrC,OAAO,EAAE,eAAO,CAAC,OAAO;SACzB,CAAC,CAAC;QACH,MAAM,CAAC,MAAA,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,0CAAE,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionContext } from '..';
|
|
2
|
+
import { AccountId, Network, NFT, WalletId } from '../types';
|
|
3
|
+
export declare const updateNFTs: (context: ActionContext, { walletId, network, accountIds, }: {
|
|
4
|
+
walletId: WalletId;
|
|
5
|
+
network: Network;
|
|
6
|
+
accountIds: AccountId[];
|
|
7
|
+
}) => Promise<NFT[][]>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateNFTs = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const bluebird_1 = tslib_1.__importDefault(require("bluebird"));
|
|
6
|
+
const __1 = require("..");
|
|
7
|
+
const updateNFTs = (context, { walletId, network, accountIds, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
+
const { commit, getters } = (0, __1.rootActionContext)(context);
|
|
9
|
+
const nfts = yield bluebird_1.default.map(accountIds, (accountId) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
|
+
const account = getters.accountItem(accountId);
|
|
11
|
+
const client = getters.client({
|
|
12
|
+
network,
|
|
13
|
+
walletId,
|
|
14
|
+
chainId: account.chain,
|
|
15
|
+
accountId: account.id,
|
|
16
|
+
});
|
|
17
|
+
if (!client.nft) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
const nftAssetsStoredInState = account.nfts || [];
|
|
21
|
+
const nftAssetsFetched = yield client.nft.fetch();
|
|
22
|
+
const nfts = nftAssetsFetched.map((nftAsset) => {
|
|
23
|
+
const nftAssetStoredInState = nftAssetsStoredInState.find((asset) => asset.token_id === nftAsset.token_id);
|
|
24
|
+
const starred = nftAssetStoredInState ? nftAssetStoredInState.starred : false;
|
|
25
|
+
if (!nftAsset.token_id && nftAsset.name) {
|
|
26
|
+
const hash = nftAsset.name.match(/#(\d+)/);
|
|
27
|
+
if (hash) {
|
|
28
|
+
nftAsset.token_id = hash[1];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return Object.assign(Object.assign({}, nftAsset), { starred });
|
|
32
|
+
});
|
|
33
|
+
commit.UPDATE_NFTS({ network, walletId, accountId: account.id, nfts });
|
|
34
|
+
return nfts;
|
|
35
|
+
}), { concurrency: 3 });
|
|
36
|
+
return nfts;
|
|
37
|
+
});
|
|
38
|
+
exports.updateNFTs = updateNFTs;
|
|
39
|
+
//# sourceMappingURL=updateNFTs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateNFTs.js","sourceRoot":"","sources":["../../../../src/store/actions/updateNFTs.ts"],"names":[],"mappings":";;;;AAAA,gEAAgC;AAChC,0BAAsD;AAG/C,MAAM,UAAU,GAAG,CACxB,OAAsB,EACtB,EACE,QAAQ,EACR,OAAO,EACP,UAAU,GAKX,EACiB,EAAE;IACpB,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,qBAAiB,EAAC,OAAO,CAAC,CAAC;IAEvD,MAAM,IAAI,GAAG,MAAM,kBAAQ,CAAC,GAAG,CAC7B,UAAU,EACV,CAAO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d,CAAC,CAAA,EACD,EAAE,WAAW,EAAE,CAAC,EAAE,CACnB,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC,CAAA,CAAC;AAvDW,QAAA,UAAU,cAuDrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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('updateNFTs tests', () => {
|
|
7
|
+
it('should getNFT assets for ETH', () => 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: 'rough symbol license spirit advance pact catalog vibrant dream great usage empty',
|
|
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
|
+
const accountIds = [wallet.getters.accountsData.find((a) => a.chain === 'ethereum').id];
|
|
24
|
+
const assets = yield wallet.dispatch.updateNFTs({
|
|
25
|
+
walletId: wallet.state.activeWalletId,
|
|
26
|
+
network: wallet.state.activeNetwork,
|
|
27
|
+
accountIds,
|
|
28
|
+
});
|
|
29
|
+
expect(assets).toEqual(Array(accountIds.length).fill([]));
|
|
30
|
+
}));
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=updateNFTs.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateNFTs.test.js","sourceRoot":"","sources":["../../../../src/store/actions/updateNFTs.test.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,gGAAsE;AAEtE,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,8BAA8B,EAAE,GAAS,EAAE;QAC5C,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,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAE5C,MAAM,MAAM,CAAC,QAAQ,CAAC,8BAA8B,CAAC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,UAAU,CAAE,CAAC,EAAE,CAAC,CAAC;QACzF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;YAC9C,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,cAAc;YACrC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,aAAa;YACnC,UAAU;SACX,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Transaction } from '@yaswap/types';
|
|
2
|
+
import { ActionContext } from '..';
|
|
3
|
+
import { Asset, Network, WalletId } from '../types';
|
|
4
|
+
export declare const updateTransactionFee: (context: ActionContext, { network, walletId, asset, id, hash, newFee, }: {
|
|
5
|
+
network: Network;
|
|
6
|
+
walletId: WalletId;
|
|
7
|
+
asset: Asset;
|
|
8
|
+
id: string;
|
|
9
|
+
hash: string;
|
|
10
|
+
newFee: number;
|
|
11
|
+
}) => Promise<Transaction>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTransactionFee = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const error_parser_1 = require("@yaswap/error-parser");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
const __1 = require("..");
|
|
8
|
+
const swap_1 = require("../../factory/swap");
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
const utils_1 = require("../utils");
|
|
11
|
+
const updateTransactionFee = (context, { network, walletId, asset, id, hash, newFee, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
const { dispatch, commit, getters } = (0, __1.rootActionContext)(context);
|
|
13
|
+
const item = getters.historyItemById(network, walletId, id);
|
|
14
|
+
if (!item) {
|
|
15
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.History.Item);
|
|
16
|
+
}
|
|
17
|
+
const hashKey = Object.keys(item).find((key) => item[key] === hash);
|
|
18
|
+
const txKey = Object.keys(item).find((key) => (0, lodash_1.isObject)(item[key]) && item[key].hash === hash);
|
|
19
|
+
if (!hashKey || !txKey) {
|
|
20
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.NotFound.History.Transaction);
|
|
21
|
+
}
|
|
22
|
+
const feeKey = {
|
|
23
|
+
tx: 'fee',
|
|
24
|
+
fromFundTx: 'fee',
|
|
25
|
+
toClaimTx: 'claimFee',
|
|
26
|
+
refundTx: 'fee',
|
|
27
|
+
}[txKey];
|
|
28
|
+
const accountId = item.type === types_1.TransactionType.Swap ? item.fromAccountId : item.accountId;
|
|
29
|
+
const account = getters.accountItem(accountId);
|
|
30
|
+
const client = getters.client({
|
|
31
|
+
network,
|
|
32
|
+
walletId,
|
|
33
|
+
chainId: account.chain,
|
|
34
|
+
accountId,
|
|
35
|
+
});
|
|
36
|
+
const oldTx = item[txKey];
|
|
37
|
+
let newTx;
|
|
38
|
+
const lock = yield dispatch.getLockForAsset({
|
|
39
|
+
item,
|
|
40
|
+
network,
|
|
41
|
+
walletId,
|
|
42
|
+
asset,
|
|
43
|
+
});
|
|
44
|
+
try {
|
|
45
|
+
if (client.swap.canUpdateFee()) {
|
|
46
|
+
newTx = yield client.swap.updateTransactionFee(oldTx, newFee);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
newTx = yield client.wallet.updateTransactionFee(oldTx, newFee);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
console.warn(e);
|
|
54
|
+
throw e;
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
(0, utils_1.unlockAsset)(lock);
|
|
58
|
+
}
|
|
59
|
+
const updates = {
|
|
60
|
+
[hashKey]: newTx.hash,
|
|
61
|
+
[txKey]: newTx,
|
|
62
|
+
[feeKey]: newTx.feePrice,
|
|
63
|
+
};
|
|
64
|
+
commit.UPDATE_HISTORY({
|
|
65
|
+
network,
|
|
66
|
+
walletId,
|
|
67
|
+
id: id,
|
|
68
|
+
updates,
|
|
69
|
+
});
|
|
70
|
+
const isFundingUpdate = hashKey === 'fromFundHash';
|
|
71
|
+
if (isFundingUpdate) {
|
|
72
|
+
if (item.type !== types_1.TransactionType.Swap) {
|
|
73
|
+
throw (0, error_parser_1.createInternalError)(error_parser_1.CUSTOM_ERRORS.Invalid.Default);
|
|
74
|
+
}
|
|
75
|
+
const swapProvider = (0, swap_1.getSwapProvider)(network, item.provider);
|
|
76
|
+
yield swapProvider.updateOrder(item);
|
|
77
|
+
}
|
|
78
|
+
return newTx;
|
|
79
|
+
});
|
|
80
|
+
exports.updateTransactionFee = updateTransactionFee;
|
|
81
|
+
//# sourceMappingURL=updateTransactionFee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateTransactionFee.js","sourceRoot":"","sources":["../../../../src/store/actions/updateTransactionFee.ts"],"names":[],"mappings":";;;;AACA,uDAA0E;AAC1E,mCAAkC;AAClC,0BAAsD;AACtD,6CAAqD;AAErD,oCAAkF;AAClF,oCAAuC;AAEhC,MAAM,oBAAoB,GAAG,CAClC,OAAsB,EACtB,EACE,OAAO,EACP,QAAQ,EACR,KAAK,EACL,EAAE,EACF,IAAI,EACJ,MAAM,GAC2F,EAC7E,EAAE;IACxB,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;IAE5D,IAAI,CAAC,IAAI,EAAE;QACT,MAAM,IAAA,kCAAmB,EAAC,4BAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,C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true });
|
|
3
|
+
exports.createHistoryNotification = exports.createNotification = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
|
|
6
|
+
const swap_1 = require("../../factory/swap");
|
|
7
|
+
const coinFormatter_1 = require("../../utils/coinFormatter");
|
|
8
|
+
const walletOptions_1 = require("../../walletOptions");
|
|
9
|
+
const SEND_STATUS_MAP = {
|
|
10
|
+
WAITING_FOR_CONFIRMATIONS(item) {
|
|
11
|
+
return {
|
|
12
|
+
title: `New ${item.from} Transaction`,
|
|
13
|
+
message: `Sending ${(0, coinFormatter_1.prettyBalance)(new bignumber_js_1.default(item.amount), item.from)} ${item.from} to ${item.toAddress}`,
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
FAILED(item) {
|
|
17
|
+
return {
|
|
18
|
+
title: `${item.from} Transaction Failed`,
|
|
19
|
+
message: `Failed to send ${(0, coinFormatter_1.prettyBalance)(new bignumber_js_1.default(item.amount), item.from)} ${item.from} to ${item.toAddress}`,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
SUCCESS(item) {
|
|
23
|
+
return {
|
|
24
|
+
title: `${item.from} Transaction Confirmed`,
|
|
25
|
+
message: `Sent ${(0, coinFormatter_1.prettyBalance)(new bignumber_js_1.default(item.amount), item.from)} ${item.from} to ${item.toAddress}`,
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const NFT_SEND_STATUS_MAP = {
|
|
30
|
+
WAITING_FOR_CONFIRMATIONS(item) {
|
|
31
|
+
return {
|
|
32
|
+
title: `New ${item.from} Transaction`,
|
|
33
|
+
message: `Sending ${item.from} NFT to ${item.toAddress}`,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
FAILED(item) {
|
|
37
|
+
return {
|
|
38
|
+
title: `${item.from} NFT Transaction Failed`,
|
|
39
|
+
message: `Failed to send ${item.from} NFT to ${item.toAddress}`,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
SUCCESS(item) {
|
|
43
|
+
return {
|
|
44
|
+
title: `${item.from} NFT Transaction Confirmed`,
|
|
45
|
+
message: `Sent ${item.from} NFT to ${item.toAddress}`,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const createNotification = (config) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return walletOptions_1.walletOptionsStore.walletOptions.createNotification(config); });
|
|
50
|
+
exports.createNotification = createNotification;
|
|
51
|
+
const createSwapNotification = (item) => {
|
|
52
|
+
const swapProvider = (0, swap_1.getSwapProvider)(item.network, item.provider);
|
|
53
|
+
const notificationFunction = swapProvider.statuses[item.status].notification;
|
|
54
|
+
if (!notificationFunction)
|
|
55
|
+
return;
|
|
56
|
+
const notification = notificationFunction(item);
|
|
57
|
+
return (0, exports.createNotification)(Object.assign({ title: `${item.from} -> ${item.to}` }, notification));
|
|
58
|
+
};
|
|
59
|
+
const createSendNotification = (item) => {
|
|
60
|
+
if (!(item.status in SEND_STATUS_MAP))
|
|
61
|
+
return;
|
|
62
|
+
const notification = SEND_STATUS_MAP[item.status](item);
|
|
63
|
+
return (0, exports.createNotification)(Object.assign({}, notification));
|
|
64
|
+
};
|
|
65
|
+
const createSendNFTNotification = (item) => {
|
|
66
|
+
if (!(item.status in NFT_SEND_STATUS_MAP)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const notification = NFT_SEND_STATUS_MAP[item.status](item);
|
|
70
|
+
return (0, exports.createNotification)(Object.assign({}, notification));
|
|
71
|
+
};
|
|
72
|
+
const createHistoryNotification = (item) => {
|
|
73
|
+
if (item.type === 'SEND') {
|
|
74
|
+
return createSendNotification(item);
|
|
75
|
+
}
|
|
76
|
+
else if (item.type === 'SWAP') {
|
|
77
|
+
return createSwapNotification(item);
|
|
78
|
+
}
|
|
79
|
+
else if (item.type === 'NFT') {
|
|
80
|
+
return createSendNFTNotification(item);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
exports.createHistoryNotification = createHistoryNotification;
|
|
84
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sourceRoot":"","sources":["../../../../src/store/broker/notification.ts"],"names":[],"mappings":";;;;AAAA,wEAAqC;AACrC,6CAAqD;AAErD,6DAA0D;AAC1D,uDAAyD;AAGzD,MAAM,eAAe,GAAG;IACtB,yBAAyB,CAAC,IAAqB;QAC7C,OAAO;YACL,KAAK,EAAE,OAAO,IAAI,CAAC,IAAI,cAAc;YACrC,OAAO,EAAE,WAAW,IAAA,6BAAa,EAAC,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,SAAS,EAAE;SAC7G,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,IAAqB;QAC1B,OAAO;YACL,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,qBAAqB;YACxC,OAAO,EAAE,kBAAkB,IAAA,6BAAa,EAAC,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,OAC1F,IAAI,CAAC,SACP,EAAE;SACH,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,IAAqB;QAC3B,OAAO;YACL,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,wBAAwB;YAC3C,OAAO,EAAE,QAAQ,IAAA,6BAAa,EAAC,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,OAAO,IAAI,CAAC,SAAS,EAAE;SAC1G,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG;IAC1B,yBAAyB,CAAC,IAAwB;QAChD,OAAO;YACL,KAAK,EAAE,OAAO,IAA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AC,MAAM,IAAI,eAAe,CAAC;QAAE,OAAO;IAC9C,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;IAExD,OAAO,IAAA,0BAAkB,oBACpB,YAAY,EACf,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,yBAAyB,GAAG,CAAC,IAAwB,EAAE,EAAE;IAC7D,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,mBAAmB,CAAC,EAAE;QACzC,OAAO;KACR;IACD,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;IAE5D,OAAO,IAAA,0BAAkB,oBACpB,YAAY,EACf,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,yBAAyB,GAAG,CAAC,IAAiB,EAAE,EAAE;IAC7D,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;QACxB,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;KACrC;SAAM,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE;QAC/B,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;KACrC;SAAM,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,EAAE;QAC9B,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;KACxC;AACH,CAAC,CAAC;AARW,QAAA,yBAAyB,6BAQpC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Client } from '@yaswap/client';
|
|
2
|
+
import { FeeDetails, Nullable } from '@yaswap/types';
|
|
3
|
+
import { ChainifyNetwork } from '../types';
|
|
4
|
+
import { ChainId, IAsset } from '@yaswap/cryptoassets';
|
|
5
|
+
import { BigNumber } from 'bignumber.js';
|
|
6
|
+
import { Account, AccountId, AccountType, Asset as AssetType, HistoryItem, Network, NFT, NFTCollections, NFTWithAccount, WalletId } from './types';
|
|
7
|
+
declare type Cryptoassets = {
|
|
8
|
+
[asset: string]: IAsset;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: {
|
|
11
|
+
client(context_0: any, context_1: any): ({ network, walletId, chainId, accountId, useCache, accountType, accountIndex, }: {
|
|
12
|
+
network: Network;
|
|
13
|
+
walletId: WalletId;
|
|
14
|
+
chainId: ChainId;
|
|
15
|
+
accountId?: string | undefined;
|
|
16
|
+
useCache?: boolean | undefined;
|
|
17
|
+
accountType?: AccountType | undefined;
|
|
18
|
+
accountIndex?: number | undefined;
|
|
19
|
+
}) => Client;
|
|
20
|
+
historyItemById(context_0: any, context_1: any): (network: Network, walletId: WalletId, id: string) => HistoryItem | undefined;
|
|
21
|
+
cryptoassets(context_0: any, context_1: any): Cryptoassets;
|
|
22
|
+
networkAccounts(context_0: any, context_1: any): Account[];
|
|
23
|
+
networkAssets(context_0: any, context_1: any): AssetType[];
|
|
24
|
+
allNetworkAssets(context_0: any, context_1: any): AssetType[];
|
|
25
|
+
activity(context_0: any, context_1: any): HistoryItem[];
|
|
26
|
+
totalFiatBalance(context_0: any, context_1: any): BigNumber;
|
|
27
|
+
accountItem(context_0: any, context_1: any): (accountId: AccountId) => Account | undefined;
|
|
28
|
+
suggestedFeePrices(context_0: any, context_1: any): (asset: AssetType) => FeeDetails | undefined;
|
|
29
|
+
accountsWithBalance(context_0: any, context_1: any): Account[];
|
|
30
|
+
accountsData(context_0: any, context_1: any): Account[];
|
|
31
|
+
accountFiatBalance(context_0: any, context_1: any): (walletId: WalletId, network: Network, accountId: AccountId) => BigNumber;
|
|
32
|
+
assetFiatBalance(context_0: any, context_1: any): (asset: AssetType, balance: BigNumber) => BigNumber | null;
|
|
33
|
+
assetMarketCap(context_0: any, context_1: any): (asset: AssetType) => Nullable<BigNumber>;
|
|
34
|
+
chainAssets(context_0: any, context_1: any): {
|
|
35
|
+
yacoin?: string[] | undefined;
|
|
36
|
+
bitcoin?: string[] | undefined;
|
|
37
|
+
ethereum?: string[] | undefined;
|
|
38
|
+
rsk?: string[] | undefined;
|
|
39
|
+
bsc?: string[] | undefined;
|
|
40
|
+
near?: string[] | undefined;
|
|
41
|
+
polygon?: string[] | undefined;
|
|
42
|
+
arbitrum?: string[] | undefined;
|
|
43
|
+
solana?: string[] | undefined;
|
|
44
|
+
fuse?: string[] | undefined;
|
|
45
|
+
terra?: string[] | undefined;
|
|
46
|
+
avalanche?: string[] | undefined;
|
|
47
|
+
optimism?: string[] | undefined;
|
|
48
|
+
};
|
|
49
|
+
analyticsEnabled(context_0: any, context_1: any): boolean;
|
|
50
|
+
allNftCollections(context_0: any, context_1: any): NFTCollections<NFTWithAccount>;
|
|
51
|
+
accountNftCollections(context_0: any, context_1: any): (accountId: AccountId) => NFTCollections<NFT>;
|
|
52
|
+
mergedChainSettings(context_0: any, context_1: any): Record<ChainId, ChainifyNetwork>;
|
|
53
|
+
chainSettings(context_0: any, context_1: any): {
|
|
54
|
+
chain: string;
|
|
55
|
+
asset: string;
|
|
56
|
+
network: ChainifyNetwork;
|
|
57
|
+
}[];
|
|
58
|
+
};
|
|
59
|
+
export default _default;
|