From 0e95bdc3f58ae285a9b2fdbadb4189cec9b29f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Leszczyk?= Date: Thu, 1 Aug 2024 15:22:15 +0200 Subject: [PATCH] chore: update sdk names (#10) --- docs/09-Keystone.md | 2 +- package.json | 28 +-- .../DAppConnectionController.ts | 2 +- .../connections/dAppConnection/models.ts | 2 +- .../ExtensionConnectionController.ts | 2 +- .../middlewares/RPCCallsMiddleware.ts | 2 +- src/background/providers/CoreProvider.ts | 2 +- .../providers/MultiWalletProviderProxy.ts | 2 +- .../services/accounts/AccountsService.test.ts | 2 +- .../services/accounts/AccountsService.ts | 2 +- .../avalanche_getAddressesInRange.test.ts | 4 +- .../handlers/avalanche_getAddressesInRange.ts | 2 +- .../accounts/handlers/getPrivateKey.test.ts | 6 +- .../accounts/handlers/getPrivateKey.ts | 2 +- .../analytics/AnalyticsServicePosthog.test.ts | 6 +- .../analytics/AnalyticsServicePosthog.ts | 4 +- .../balances/BalanceAggregatorService.test.ts | 4 +- .../balances/BalanceAggregatorService.ts | 2 +- .../services/balances/BalancesService.test.ts | 6 +- .../services/balances/BalancesService.ts | 2 +- .../balances/BalancesServiceAVM.test.ts | 2 +- .../services/balances/BalancesServiceAVM.ts | 4 +- .../services/balances/BalancesServiceBTC.ts | 8 +- .../services/balances/BalancesServiceEVM.ts | 6 +- .../balances/BalancesServiceGlacier.ts | 4 +- .../balances/BalancesServicePVM.test.ts | 5 +- .../services/balances/BalancesServicePVM.ts | 4 +- .../services/balances/TokenPricesService.ts | 9 +- .../balances/handlers/getAvaxBalance.ts | 2 +- src/background/services/balances/models.ts | 4 +- .../balances/nft/NFTBalancesService.ts | 2 +- .../nft/NFTBalancesServiceCovalent.ts | 4 +- .../balances/nft/NFTBalancesServiceGlacier.ts | 2 +- .../services/balances/nft/models.ts | 2 +- .../utils/getPriceChangeValues.test.ts | 2 +- .../services/blockaid/BlockaidService.test.ts | 3 +- .../services/blockaid/BlockaidService.ts | 2 +- .../services/bridge/BridgeService.test.ts | 10 +- .../services/bridge/BridgeService.ts | 6 +- .../services/bridge/events/listeners.ts | 2 +- .../bridge/fixtures/mockBridgeConfig.ts | 2 +- .../handlers/avalanche_bridgeAsset.test.ts | 10 +- .../bridge/handlers/avalanche_bridgeAsset.ts | 6 +- .../handlers/estimateGasForBridgeTx.test.ts | 2 +- .../bridge/handlers/estimateGasForBridgeTx.ts | 2 +- .../bridge/handlers/getBridgeConfig.ts | 2 +- .../handlers/getEthMaxTransferAmount.test.ts | 10 +- .../handlers/getEthMaxTransferAmount.ts | 6 +- .../services/bridge/handlers/setIsDevEnv.ts | 2 +- .../services/bridge/handlers/transferAsset.ts | 2 +- src/background/services/bridge/models.ts | 4 +- src/background/services/bridge/utils.ts | 2 +- .../services/debank/DebankService.test.ts | 3 +- .../services/debank/DebankService.ts | 2 +- .../utils/mapTokenItemToTransactionToken.ts | 2 +- .../debank/utils/txParamsToTransactionData.ts | 2 +- .../featureFlags/FeatureFlagService.test.ts | 2 +- .../fireblocks/FireblocksBTCSigner.test.ts | 2 +- .../fireblocks/FireblocksBTCSigner.ts | 4 +- .../services/glacier/GlacierService.test.ts | 6 +- .../services/glacier/GlacierService.ts | 2 +- .../services/history/HistoryService.test.ts | 3 +- .../services/history/HistoryService.ts | 2 +- .../services/history/HistoryServiceAVM.ts | 4 +- .../services/history/HistoryServiceBTC.ts | 10 +- .../history/HistoryServiceBridgeHelper.ts | 6 +- .../services/history/HistoryServiceETH.ts | 6 +- .../history/HistoryServiceGlacier.test.ts | 3 +- .../services/history/HistoryServiceGlacier.ts | 4 +- .../services/history/HistoryServicePVM.ts | 4 +- .../services/history/utils/getAvaxAssetId.ts | 2 +- .../keystone/BitcoinKeystoneWallet.test.ts | 4 +- .../keystone/BitcoinKeystoneWallet.ts | 2 +- ...migrateMissingPublicKeysFromLedger.test.ts | 4 +- .../migrateMissingPublicKeysFromLedger.ts | 2 +- .../handlers/avalanche_signMessage.test.ts | 2 +- .../services/network/NetworkService.test.ts | 12 +- .../services/network/NetworkService.ts | 6 +- .../network/events/networksUpdatedEvent.ts | 2 +- .../handlers/avalanche_setDeveloperMode.ts | 2 +- .../network/handlers/setDeveloperMode.ts | 2 +- .../handlers/wallet_addEthereumChain.test.ts | 3 +- .../handlers/wallet_addEthereumChain.ts | 2 +- .../handlers/wallet_getEthereumChain.test.ts | 5 +- .../handlers/wallet_getEthereumChain.ts | 2 +- .../wallet_switchEthereumChain.test.ts | 4 +- src/background/services/network/models.ts | 2 +- .../network/utils/isAvalancheNetwork.ts | 2 +- .../utils/isAvalanchePchainNetwork.test.ts | 3 +- .../network/utils/isAvalanchePchainNetwork.ts | 2 +- .../utils/isAvalancheXchainNetwork.test.ts | 3 +- .../network/utils/isAvalancheXchainNetwork.ts | 2 +- .../network/utils/isBitcoinNetwork.ts | 2 +- .../network/utils/isEthereumNetwork.ts | 2 +- .../networkFee/NetworkFeeService.test.ts | 2 +- .../services/networkFee/NetworkFeeService.ts | 4 +- .../onboarding/finalizeOnboarding.test.ts | 6 +- .../services/onboarding/finalizeOnboarding.ts | 2 +- .../keystoneOnboardingHandler.test.ts | 6 +- .../handlers/keystoneOnboardingHandler.ts | 2 +- .../handlers/ledgerOnboardingHandler.test.ts | 6 +- .../handlers/ledgerOnboardingHandler.ts | 2 +- .../mnemonicOnboardingHandler.test.ts | 6 +- .../handlers/mnemonicOnboardingHandler.ts | 2 +- .../seedlessOnboardingHandler.test.ts | 6 +- .../handlers/seedlessOnboardingHandler.ts | 2 +- .../onboarding/startOnboarding.test.ts | 4 +- .../addXPChainsToFavoriteIfNeeded.test.ts | 2 +- .../utils/addXPChainsToFavoriteIfNeeded.ts | 2 +- .../services/secrets/SecretsService.test.ts | 4 +- src/background/services/secrets/models.ts | 2 +- .../seedless/SeedlessBtcSigner.test.ts | 6 +- .../services/seedless/SeedlessBtcSigner.ts | 4 +- .../services/seedless/SeedlessWallet.test.ts | 8 +- .../services/seedless/SeedlessWallet.ts | 4 +- .../services/settings/SettingService.test.ts | 3 +- .../services/settings/SettingsService.ts | 2 +- .../settings/events/wallet_watchAsset.ts | 2 +- .../settings/handlers/addCustomToken.ts | 2 +- .../handlers/getTokenDataByAddress.ts | 2 +- src/background/services/settings/models.ts | 2 +- .../schemaMigrations/migrations/network_v2.ts | 2 +- .../schemaMigrations/migrations/network_v3.ts | 2 +- .../schemaMigrations/migrations/network_v4.ts | 2 +- .../migrations/settings_v2.test.ts | 2 +- .../migrations/settings_v2.ts | 2 +- .../migrations/wallet_v2.test.ts | 4 +- .../schemaMigrations/migrations/wallet_v2.ts | 2 +- .../migrations/wallet_v3.test.ts | 4 +- .../migrations/wallet_v4/wallet_v4.test.ts | 4 +- .../migrations/wallet_v4/wallet_v4.ts | 2 +- .../services/tokens/TokenManagerService.ts | 4 +- .../services/tokens/handlers/getTokenList.ts | 2 +- .../services/tokens/utils/isTokenSupported.ts | 2 +- .../unifiedBridge/UnifiedBridgeService.ts | 2 +- .../services/wallet/WalletService.test.ts | 9 +- .../services/wallet/WalletService.ts | 4 +- .../avalanche_sendTransaction.test.ts | 6 +- .../handlers/avalanche_sendTransaction.ts | 4 +- .../avalanche_signTransaction.test.ts | 4 +- .../handlers/avalanche_signTransaction.ts | 2 +- .../handlers/bitcoin_sendTransaction.test.ts | 6 +- .../handlers/bitcoin_sendTransaction.ts | 6 +- .../contracts/contractParsers/addLiquidity.ts | 2 +- .../contractParsers/addLiquidityAVAX.ts | 2 +- .../contracts/contractParsers/approve.ts | 2 +- .../contracts/contractParsers/models.ts | 2 +- .../contractParsers/parseWithERC20Abi.ts | 2 +- .../contracts/contractParsers/simpleSwap.ts | 2 +- .../contractParsers/swapAvaxForExactTokens.ts | 2 +- .../contractParsers/swapExactTokensForAVAX.ts | 2 +- .../swapExactTokensForTokens.ts | 2 +- .../contractParsers/utils/helpers.ts | 2 +- .../utils/parseBasicDisplayValues.ts | 2 +- .../eth_sendTransaction.test.ts | 5 +- .../eth_sendTransaction.ts | 4 +- .../utils/getTargetNetworkForTx.test.ts | 2 +- .../utils/getTargetNetworkForTx.ts | 2 +- .../utils/getTxDescription.ts | 2 +- .../eth_sendTransaction/utils/getTxInfo.ts | 4 +- .../wallet/handlers/getWalletDetails.test.ts | 2 +- .../wallet/handlers/importLedger.test.ts | 2 +- .../services/wallet/handlers/importLedger.ts | 2 +- .../wallet/handlers/importSeedPhrase.test.ts | 2 +- .../wallet/handlers/importSeedPhrase.ts | 2 +- .../storeBtcWalletPolicyDetails.test.ts | 7 +- .../handlers/storeBtcWalletPolicyDetails.ts | 5 +- src/background/services/wallet/models.ts | 2 +- .../wallet/utils/getDerivationPath.test.ts | 2 +- .../wallet/utils/getDerivationPath.ts | 2 +- .../wallet/utils/prepareBtcTxForLedger.ts | 2 +- .../walletConnect/WalletConnectSigner.ts | 2 +- src/background/utils/findToken.ts | 4 +- .../vmModules/ModuleManager.test.ts | 2 +- src/background/vmModules/mocks/avm.ts | 4 +- src/background/vmModules/mocks/bitcoin.ts | 4 +- src/background/vmModules/mocks/coreEth.ts | 4 +- src/background/vmModules/mocks/evm.ts | 4 +- src/background/vmModules/mocks/pvm.ts | 4 +- src/components/common/AddressK2.tsx | 2 +- src/components/common/AppBackground.tsx | 2 +- src/components/common/ArcProgress.tsx | 2 +- src/components/common/BNInput.tsx | 4 +- src/components/common/BalanceColumn.tsx | 2 +- .../common/CameraAccessDeniedDialog.tsx | 2 +- .../common/CameraAccessPromptDialog.tsx | 2 +- src/components/common/ConfirmationTracker.tsx | 2 +- .../common/ConnectionIndicatorK2.tsx | 2 +- src/components/common/ContainedDropdown.tsx | 2 +- src/components/common/CustomFees.tsx | 4 +- src/components/common/CustomGasSettings.tsx | 4 +- src/components/common/Dialog.tsx | 2 +- src/components/common/Dropdown.tsx | 2 +- src/components/common/EmptyContent.tsx | 2 +- src/components/common/Flipper.tsx | 2 +- src/components/common/FunctionIsOffline.tsx | 6 +- .../common/FunctionIsUnavailable.tsx | 2 +- .../common/InAppApprovalOverlay.tsx | 2 +- src/components/common/InlineBold.tsx | 2 +- src/components/common/InlineTokenEllipsis.tsx | 2 +- src/components/common/InvalidQRCodeDialog.tsx | 2 +- src/components/common/LoadingOverlay.tsx | 2 +- src/components/common/NetworkLogo.tsx | 7 +- src/components/common/NetworkLogoK2.tsx | 2 +- .../common/NotSupportedByWallet.tsx | 2 +- src/components/common/Overlay.tsx | 2 +- src/components/common/PageTitle.tsx | 2 +- src/components/common/PasswordStrength.tsx | 7 +- src/components/common/ProfitAndLoss.tsx | 2 +- src/components/common/QRCodeWithLogo.tsx | 2 +- src/components/common/SimpleAddress.tsx | 2 +- src/components/common/SiteAvatar.tsx | 2 +- src/components/common/StyledNumberList.tsx | 2 +- src/components/common/TestnetBanner.tsx | 7 +- src/components/common/TextFieldLabel.tsx | 2 +- src/components/common/TokenAmount.tsx | 2 +- src/components/common/TokenCard.tsx | 2 +- .../common/TokenCardWithBalance.tsx | 2 +- src/components/common/TokenEllipsis.tsx | 4 +- src/components/common/TokenIcon.tsx | 6 +- src/components/common/TokenSelect.tsx | 4 +- src/components/common/TokenSelector.tsx | 2 +- src/components/common/TxWarningBox.tsx | 2 +- src/components/common/VerticalStack.tsx | 2 +- src/components/common/VirtualizedList.tsx | 2 +- src/components/common/WalletChip.tsx | 7 +- .../common/account/AccountSelectorButton.tsx | 2 +- .../common/approval/ApprovalSection.tsx | 2 +- .../common/approval/TxDetailsRow.tsx | 2 +- src/components/common/fab/FAB.tsx | 2 +- src/components/common/header/Header.tsx | 2 +- .../NetworkSwitcher/NetworkSwitcher.tsx | 4 +- .../common/infiniteScroll/InfiniteScroll.tsx | 6 +- .../common/scrollbars/Scrollbars.tsx | 2 +- .../common/seedless/SeedlessAuthPrompt.tsx | 2 +- .../components/AuthenticationError.tsx | 6 +- .../seedless/components/ExportError.tsx | 2 +- .../seedless/components/ExportPending.tsx | 2 +- .../seedless/components/FIDOChallenge.tsx | 2 +- .../seedless/components/MfaChoicePrompt.tsx | 2 +- .../components/PhraseReadyToExport.tsx | 2 +- .../seedless/components/RecoveryMethod.tsx | 2 +- .../seedless/components/TOTPChallenge.tsx | 7 +- .../components/WaitingForAuthentication.tsx | 6 +- .../dialogs/AnalyticsOptInDialog.tsx | 2 +- src/components/icons/BrandName.tsx | 2 +- .../icons/CameraAccessDeniedIcon.tsx | 2 +- src/components/icons/DangerIcon.tsx | 2 +- src/components/icons/InvalidQRCodeIcon.tsx | 6 +- src/components/icons/QRCodeLogos.tsx | 2 +- src/components/ledger/LedgerConnector.tsx | 4 +- src/components/ledger/LedgerTroublesSteps.tsx | 2 +- src/components/settings/SettingsHeader.tsx | 2 +- src/components/settings/SettingsMenu.tsx | 2 +- .../settings/components/ContactForm.tsx | 2 +- .../settings/components/ContactInfo.tsx | 2 +- .../settings/components/ContactListItem.tsx | 2 +- .../settings/components/ContactProfile.tsx | 2 +- .../components/StyledListItemButton.tsx | 2 +- src/components/settings/pages/AddContact.tsx | 2 +- src/components/settings/pages/Advanced.tsx | 2 +- .../settings/pages/ChangePassword.tsx | 2 +- .../settings/pages/ConnectedSites.tsx | 2 +- src/components/settings/pages/ContactList.tsx | 2 +- src/components/settings/pages/Currencies.tsx | 2 +- .../settings/pages/ExportRecoveryPhrase.tsx | 2 +- src/components/settings/pages/Feedback.tsx | 2 +- src/components/settings/pages/Language.tsx | 2 +- src/components/settings/pages/Ledger.tsx | 2 +- src/components/settings/pages/Legal.tsx | 2 +- src/components/settings/pages/MainPage.tsx | 2 +- .../RecoveryMethods/AddNewRecoveryMethod.tsx | 2 +- .../RecoveryMethods/AuthenticatorDetails.tsx | 2 +- .../AuthenticatorVerifyScreen.tsx | 2 +- .../pages/RecoveryMethods/FIDODetails.tsx | 2 +- .../pages/RecoveryMethods/RecoveryMethods.tsx | 2 +- .../RecoveryMethods/RecoveryMethodsList.tsx | 2 +- .../settings/pages/RecoveryPhrase.tsx | 2 +- .../settings/pages/SecurityAndPrivacy.tsx | 2 +- src/contexts/BridgeProvider.tsx | 4 +- src/contexts/LedgerProvider.test.tsx | 4 +- src/contexts/LedgerProvider.tsx | 2 +- src/contexts/NetworkProvider.tsx | 7 +- src/contexts/OnboardingProvider.tsx | 2 +- .../SwapProvider/SwapProvider.test.tsx | 2 +- src/contexts/SwapProvider/SwapProvider.tsx | 2 +- src/hooks/useApprovalHelpers.ts | 2 +- src/hooks/useCoinGeckoId.test.ts | 4 +- src/hooks/useCoinGeckoId.ts | 2 +- src/hooks/useDAppScan.ts | 2 +- src/hooks/useDisplayTokenList.ts | 4 +- src/hooks/useIsFunctionAvailable.ts | 2 +- src/hooks/useKeystoneScannerContents.tsx | 2 +- src/hooks/useSeedlessMfa.tsx | 6 +- src/hooks/useTokenPrice.ts | 2 +- src/pages/Accounts/AccountBalance.tsx | 2 +- src/pages/Accounts/AccountDetailsView.tsx | 2 +- src/pages/Accounts/AccountItemChip.tsx | 2 +- src/pages/Accounts/Accounts.tsx | 2 +- src/pages/Accounts/AddAccountError.tsx | 2 +- .../Accounts/AddWalletWithKeystoreFile.tsx | 2 +- src/pages/Accounts/AddWalletWithLedger.tsx | 4 +- .../Accounts/AddWalletWithSeedPhrase.tsx | 7 +- .../components/AccountDetailsAddressRow.tsx | 2 +- src/pages/Accounts/components/AccountItem.tsx | 2 +- .../Accounts/components/AccountItemMenu.tsx | 2 +- src/pages/Accounts/components/AccountList.tsx | 2 +- .../components/AccountListPrimary.tsx | 2 +- .../Accounts/components/AccountNameInput.tsx | 2 +- .../components/AccountsActionButton.tsx | 4 +- .../ConfirmAccountRemovalDialog.tsx | 2 +- .../components/CurrentAddressSneakPeek.tsx | 2 +- .../components/KeystoreFileConfirmation.tsx | 2 +- .../Accounts/components/KeystoreFileError.tsx | 2 +- .../components/KeystoreFileUpload.tsx | 2 +- .../Accounts/components/MenuFilterItem.tsx | 7 +- .../Accounts/components/NameYourWallet.tsx | 7 +- .../Accounts/components/NoAccountsFound.tsx | 2 +- .../Accounts/components/WalletTypeIcon.tsx | 2 +- src/pages/Accounts/components/XPChainIcon.tsx | 2 +- src/pages/Activity/Activity.tsx | 2 +- src/pages/ApproveAction/ApproveAction.tsx | 2 +- src/pages/ApproveAction/AvalancheSignTx.tsx | 4 +- src/pages/ApproveAction/BitcoinSignTx.tsx | 8 +- .../ApproveAction/BridgeTransferAsset.tsx | 2 +- src/pages/ApproveAction/SelectWallet.tsx | 2 +- src/pages/ApproveAction/SetDeveloperMode.tsx | 4 +- src/pages/ApproveAction/UpdateContacts.tsx | 2 +- .../components/ApproveAddDelegator.tsx | 11 +- .../ApproveAddPermissionlessDelegator.tsx | 4 +- .../ApproveAddPermissionlessValidator.tsx | 4 +- .../components/ApproveAddSubnetValidator.tsx | 4 +- .../components/ApproveAddValidator.tsx | 4 +- .../components/ApproveBaseTx.tsx | 6 +- .../components/ApproveCreateChain.tsx | 4 +- .../components/ApproveCreateSubnet.tsx | 4 +- .../components/ApproveExportTx.tsx | 6 +- .../components/ApproveImportTx.tsx | 6 +- .../ApproveRemoveSubnetValidator.tsx | 2 +- .../components/AvalancheTxHeader.tsx | 4 +- .../ApproveAction/components/AvaxAmount.tsx | 4 +- .../components/BlockchainGenesisFile.tsx | 2 +- .../components/ExcessiveBurnWarningDialog.tsx | 2 +- .../components/TruncatedIdentifier.tsx | 2 +- src/pages/Bridge/Bridge.tsx | 6 +- src/pages/Bridge/BridgeConfirmation.tsx | 4 +- src/pages/Bridge/BridgeTransactionStatus.tsx | 6 +- src/pages/Bridge/components/BridgeCard.tsx | 2 +- src/pages/Bridge/components/BridgeConfirm.tsx | 2 +- .../Bridge/components/BridgeSanctions.tsx | 6 +- .../components/BridgeUnknownNetwork.tsx | 4 +- src/pages/Bridge/components/ElapsedTimer.tsx | 2 +- .../Bridge/components/NetworkSelector.tsx | 4 +- .../Bridge/components/OffloadTimerTooltip.tsx | 2 +- src/pages/Bridge/hooks/useAssetBalancesEVM.ts | 2 +- .../Bridge/hooks/useAvailableBlockchains.ts | 2 +- src/pages/Bridge/hooks/useAvalancheBridge.ts | 2 +- src/pages/Bridge/hooks/useBridge.ts | 4 +- src/pages/Bridge/hooks/useBridgeAmounts.ts | 2 +- .../Bridge/hooks/useBridgeNetworkPrice.ts | 2 +- .../Bridge/hooks/useBridgeTransferStatus.ts | 2 +- src/pages/Bridge/hooks/useBtcBridge.ts | 6 +- src/pages/Bridge/hooks/useEthBridge.ts | 2 +- .../hooks/useLogoUriForBridgeTransaction.ts | 4 +- .../hooks/useSetBridgeChainFromNetwork.ts | 4 +- src/pages/Bridge/hooks/useSyncBridgeConfig.ts | 2 +- src/pages/Bridge/hooks/useUnifiedBridge.ts | 4 +- src/pages/Bridge/models.ts | 2 +- .../Bridge/utils/blockchainConversion.test.ts | 9 +- .../Bridge/utils/blockchainConversion.ts | 4 +- .../Bridge/utils/findTokenForAsset.test.ts | 2 +- src/pages/Bridge/utils/findTokenForAsset.ts | 2 +- src/pages/Bridge/utils/getBalances.ts | 4 +- .../Bridge/utils/getLedgerAppForBlockchain.ts | 2 +- .../Bridge/utils/getNativeTokenSymbol.ts | 2 +- src/pages/Bridge/utils/getTokenAddress.ts | 2 +- .../Bridge/utils/isUnifiedBridgeTransfer.ts | 2 +- src/pages/Collectibles/CollectibleDetails.tsx | 2 +- src/pages/Collectibles/CollectibleSend.tsx | 6 +- src/pages/Collectibles/Collectibles.tsx | 2 +- src/pages/Collectibles/SendEVMCollectible.tsx | 4 +- .../components/CollectibleGrid.tsx | 2 +- .../components/CollectibleList.tsx | 2 +- .../components/CollectibleListEmpty.tsx | 2 +- .../components/CollectibleMedia.tsx | 2 +- .../components/CollectibleSkeleton.tsx | 2 +- .../components/CollectibleWrapper.tsx | 2 +- .../Collectibles/components/ImageWrapper.tsx | 2 +- src/pages/DeFi/DeFi.tsx | 2 +- src/pages/DeFi/DefiProtocolDetails.tsx | 2 +- src/pages/DeFi/components/DefiErrorState.tsx | 2 +- .../DeFi/components/DefiPortfolioCommon.tsx | 2 +- .../components/DefiPortfolioInsurance.tsx | 2 +- .../components/DefiPortfolioItemGroup.tsx | 2 +- .../DeFi/components/DefiPortfolioLending.tsx | 2 +- .../components/DefiPortfolioPerpetual.tsx | 7 +- .../DeFi/components/DefiPortfolioRewards.tsx | 2 +- .../DeFi/components/DefiPortfolioVesting.tsx | 2 +- .../components/DefiProtocolDetailsHeader.tsx | 2 +- .../DeFi/components/DefiProtocolListItem.tsx | 2 +- .../DeFi/components/DefiTokenAvatarGroup.tsx | 2 +- src/pages/DeFi/components/DefiZeroState.tsx | 7 +- src/pages/ExportPrivateKey/EnterPassword.tsx | 2 +- .../ExportPrivateKey/ExportPrivateKey.tsx | 2 +- src/pages/ExportPrivateKey/ShowPrivateKey.tsx | 2 +- src/pages/Fireblocks/ConnectBitcoinWallet.tsx | 2 +- .../components/FireblocksAvatar.tsx | 2 +- .../components/FireblocksBitcoinDialog.tsx | 2 +- src/pages/Home/Home.tsx | 2 +- .../Home/components/Portfolio/Assets.tsx | 2 +- .../NetworkWidget/ActiveNetworkWidget.tsx | 2 +- .../Portfolio/NetworkWidget/Assetlist.tsx | 4 +- .../Portfolio/NetworkWidget/NetworkList.tsx | 4 +- .../NetworkWidget/NetworksWidget.tsx | 2 +- .../PchainActiveNetworkWidgetContent.tsx | 2 +- .../NetworkWidget/SeeAllNetworksButton.tsx | 2 +- .../XchainActiveNetworkWidgetContent.tsx | 2 +- .../Portfolio/NetworkWidget/ZeroWidget.tsx | 9 +- .../NetworkWidget/common/NetworkCard.tsx | 2 +- .../Home/components/Portfolio/Portfolio.tsx | 2 +- .../Home/components/Portfolio/TokenList.tsx | 2 +- .../components/Portfolio/WalletBalances.tsx | 2 +- .../components/Portfolio/WalletIsEmpty.tsx | 7 +- .../ImportPrivateKey/ImportPrivateKey.tsx | 4 +- .../components/DerivedAddress.tsx | 2 +- .../ImportWithWalletConnect.tsx | 2 +- .../components/WalletConnectCircledIcon.tsx | 2 +- .../components/WalletConnectConnector.tsx | 2 +- .../components/WalletConnectQRCode.tsx | 2 +- .../components/WalletConnectStatusMessage.tsx | 2 +- .../components/WalletConnectURIField.tsx | 2 +- src/pages/Ledger/Connect.tsx | 2 +- src/pages/Ledger/LedgerDisconnected.tsx | 2 +- src/pages/Ledger/LedgerIncorrectApp.tsx | 2 +- src/pages/Ledger/LedgerIncorrectDevice.tsx | 2 +- .../Ledger/LedgerRegisterBtcWalletPolicy.tsx | 2 +- src/pages/Ledger/LedgerWrongVersion.tsx | 2 +- .../Ledger/LedgerWrongVersionOverlay.tsx | 2 +- .../Ledger/hooks/useIsIncorrectDevice.ts | 2 +- .../hooks/useRegisterBtcWalletPolicy.ts | 2 +- src/pages/ManageTokens/AddToken.tsx | 2 +- src/pages/ManageTokens/AddTokenApproval.tsx | 2 +- src/pages/ManageTokens/ManageTokens.tsx | 2 +- src/pages/ManageTokens/ManageTokensList.tsx | 7 +- src/pages/Network/AddCustomNetworkPopup.tsx | 2 +- src/pages/Network/SwitchActiveNetwork.tsx | 4 +- src/pages/Networks/AddNetwork.tsx | 4 +- src/pages/Networks/CustomsTab.tsx | 2 +- src/pages/Networks/EditNetwork.tsx | 2 +- src/pages/Networks/FavoritesTab.tsx | 2 +- src/pages/Networks/NetworkDetails.tsx | 4 +- src/pages/Networks/NetworkDetailsDialogs.tsx | 2 +- src/pages/Networks/NetworkForm.tsx | 2 +- src/pages/Networks/NetworkRpcHeaders.tsx | 2 +- .../Networks/NetworkRpcHeadersManager.tsx | 2 +- src/pages/Networks/Networks.tsx | 2 +- src/pages/Networks/NetworksTab.tsx | 2 +- src/pages/Networks/common/NetworkList.tsx | 4 +- src/pages/Networks/common/NetworkListItem.ts | 2 +- src/pages/Networks/common/NetworkLogo.ts | 2 +- src/pages/Onboarding/Onboarding.tsx | 2 +- .../components/DerivationPathDropDown.tsx | 9 +- .../components/DerivedAddresses.tsx | 2 +- .../components/LanguageSelector.tsx | 2 +- .../Onboarding/components/OnboardButton.tsx | 2 +- .../components/OnboardingStepHeader.tsx | 2 +- src/pages/Onboarding/components/PageNav.tsx | 2 +- .../Onboarding/components/PageTracker.tsx | 2 +- .../Onboarding/components/TypographyLink.tsx | 2 +- .../components/WordsLengthSelector.tsx | 2 +- .../Onboarding/hooks/useSeedlessActions.ts | 2 +- .../Onboarding/pages/AnalyticsConsent.tsx | 7 +- src/pages/Onboarding/pages/CreatePassword.tsx | 2 +- .../pages/CreateWallet/ConfirmMnemonic.tsx | 7 +- .../pages/CreateWallet/ConfirmPhrase.tsx | 2 +- .../pages/CreateWallet/CopyPhrase.tsx | 7 +- .../pages/CreateWallet/ShowMnemonic.tsx | 2 +- src/pages/Onboarding/pages/ImportWallet.tsx | 2 +- .../Onboarding/pages/Keystone/Keystone.tsx | 4 +- .../pages/Keystone/KeystoneQRCodeScanner.tsx | 2 +- .../Onboarding/pages/Ledger/LedgerConnect.tsx | 2 +- .../Onboarding/pages/Ledger/LedgerTrouble.tsx | 2 +- .../pages/Seedless/RecoveryMethods.tsx | 2 +- .../pages/Seedless/RecoveryMethodsLogin.tsx | 2 +- .../pages/Seedless/components/AppleButton.tsx | 2 +- .../components/ExistingWalletButton.tsx | 2 +- .../Seedless/components/GoogleButton.tsx | 2 +- .../pages/Seedless/components/MethodCard.tsx | 2 +- .../Seedless/modals/AuthenticatorModal.tsx | 2 +- .../pages/Seedless/modals/FIDOModal.tsx | 2 +- .../pages/Seedless/modals/TOTPModal.tsx | 2 +- .../Seedless/modals/VerifyGoBackModal.tsx | 2 +- .../pages/Welcome/SignUpWithSeedless.tsx | 2 +- .../Onboarding/pages/Welcome/Welcome.tsx | 2 +- src/pages/Permissions/Permissions.tsx | 2 +- .../components/AccountsDropdown.tsx | 2 +- src/pages/Permissions/components/AlertBox.tsx | 2 +- .../Permissions/components/AlertDialog.tsx | 2 +- .../Permissions/components/WarningBox.tsx | 2 +- src/pages/Receive/Receive.tsx | 8 +- .../SeedlessPopups/SeedlessAuthPopup.tsx | 2 +- .../SeedlessPopups/SeedlessExportPopup.tsx | 2 +- .../SeedlessPopups/SeedlessRemoveTotp.tsx | 2 +- .../SeedlessUpdateRecoveryMethod.tsx | 2 +- src/pages/Send/Send.tsx | 6 +- .../Send/components/AddressDropdownList.tsx | 2 +- .../components/AddressDropdownListItem.tsx | 2 +- .../AddressDropdownListMyAccounts.tsx | 2 +- src/pages/Send/components/ContactAddress.tsx | 2 +- src/pages/Send/components/ContactInput.tsx | 6 +- src/pages/Send/components/ContactSelect.tsx | 4 +- src/pages/Send/components/LoadingSendForm.tsx | 2 +- src/pages/Send/components/SendAVM.tsx | 4 +- src/pages/Send/components/SendBTC.tsx | 4 +- src/pages/Send/components/SendEVM.tsx | 4 +- src/pages/Send/components/SendForm.tsx | 2 +- src/pages/Send/components/SendPVM.tsx | 4 +- .../Send/components/TruncatedAddress.tsx | 2 +- src/pages/Send/hooks/useSend/models.ts | 4 +- src/pages/Send/hooks/useSend/useAVMSend.ts | 4 +- src/pages/Send/hooks/useSend/useBTCSend.ts | 7 +- src/pages/Send/hooks/useSend/useEVMSend.ts | 2 +- src/pages/Send/hooks/useSend/usePVMSend.ts | 4 +- src/pages/Send/utils/buildSendTx.test.ts | 2 +- src/pages/Send/utils/buildSendTx.ts | 4 +- src/pages/Send/utils/getMaxUtxos.ts | 4 +- src/pages/SignMessage/SignMessage.tsx | 2 +- src/pages/SignMessage/components/EthSign.tsx | 7 +- .../SignMessage/components/PersonalSign.tsx | 7 +- .../components/ScrollableMessageCard.tsx | 2 +- src/pages/SignMessage/components/SignData.tsx | 2 +- .../SignMessage/components/SignDataV3.tsx | 2 +- .../SignMessage/components/SignDataV4.tsx | 2 +- src/pages/SignTransaction/SignTransaction.tsx | 2 +- .../components/ApprovalTxDetails.tsx | 4 +- .../FireblocksApprovalOverlay.tsx | 2 +- .../FireblocksApprovalReview.tsx | 2 +- .../components/KeystoneApprovalOverlay.tsx | 2 +- .../components/LedgerApprovalDialog.tsx | 2 +- .../components/LedgerApprovalOverlay.tsx | 2 +- .../components/LedgerDisconnectDialog.tsx | 6 +- .../components/NftAccordion.tsx | 2 +- .../components/RawTransactionData.tsx | 2 +- .../RemoteApprovalConfirmation.tsx | 9 +- .../RemoteApproval/RemoteApprovalDialog.tsx | 7 +- .../components/SignTxErrorBoundary.tsx | 2 +- .../SpendLimitInfo/CustomSpendLimit.tsx | 2 +- .../NftCollectionSpendLimit.tsx | 2 +- .../SpendLimitInfo/NftSpendLimit.tsx | 2 +- .../SpendLimitInfo/TokenSpendLimit.tsx | 2 +- .../ApproveContractCallDetails.tsx | 4 +- .../ApproveNftCollectionDetails.tsx | 4 +- .../ApproveNftDetails.tsx | 4 +- .../ApproveSendDetails.tsx | 4 +- .../ApproveTokenDetails.tsx | 4 +- .../components/TransactionErrorDialog.tsx | 2 +- .../components/TransactionTokenCard.tsx | 4 +- .../components/TxBalanceChange.tsx | 2 +- .../WalletConnectApprovalConnect.tsx | 2 +- .../WalletConnectApprovalOverlay.tsx | 2 +- .../WalletConnectApprovalReview.tsx | 2 +- .../WalletConnectApprovalSent.tsx | 2 +- .../hooks/useGetTransaction.tsx | 2 +- .../useLedgerDisconnectedDialog.test.tsx | 2 +- .../hooks/useLedgerDisconnectedDialog.tsx | 2 +- src/pages/Swap/Swap.tsx | 2 +- src/pages/Swap/components/ParaswapNotice.tsx | 2 +- src/pages/Swap/components/SlippageToolTip.tsx | 2 +- src/pages/Swap/components/SwapError.tsx | 2 +- .../Swap/components/SwapRefreshTimer.tsx | 2 +- .../Swap/components/TransactionDetails.tsx | 2 +- src/pages/Swap/hooks/useSwapStateFunctions.ts | 4 +- src/pages/Swap/utils/index.tsx | 2 +- src/pages/Wallet/SwitchAccount.tsx | 2 +- src/pages/Wallet/TokenFlow.tsx | 4 +- src/pages/Wallet/WalletLocked.tsx | 2 +- src/pages/Wallet/WalletRecentTxs.tsx | 2 +- .../components/ActivityCard/ActivityCard.tsx | 6 +- .../ActivityCard/ActivityCardAmount.tsx | 2 +- .../ActivityCard/ActivityCardDetails.tsx | 4 +- .../ActivityCard/ActivityCardIcon.tsx | 2 +- .../ActivityCard/ActivityCardSummary.tsx | 2 +- .../ActivityCard/PchainActivityCard.tsx | 4 +- .../ActivityCard/PrimaryNetworkMethodIcon.tsx | 2 +- .../ActivityCard/XchainActivityCard.tsx | 4 +- .../InProgressBridgeActivityCard.tsx | 4 +- .../InProgressBridge/InProgressBridgeIcon.tsx | 2 +- .../components/History/useBlockchainNames.ts | 4 +- .../Wallet/components/NoTransactions.tsx | 2 +- .../components/WalletExtensionButton.tsx | 2 +- src/popup/AppRoutes.tsx | 2 +- src/popup/ApprovalRoutes.tsx | 2 +- src/popup/LoadingContent.tsx | 2 +- src/popup/OfflineContent.tsx | 2 +- src/popup/index.tsx | 2 +- src/popup/popup.tsx | 2 +- src/tests/resolver.js | 2 +- src/utils/bigintToBig.ts | 2 +- src/utils/bridgeTransactionUtils.ts | 2 +- src/utils/caipConversion.ts | 4 +- src/utils/calculateGasAndFees.ts | 2 +- src/utils/calculateTotalBalance.test.ts | 3 +- src/utils/calculateTotalBalance.ts | 2 +- src/utils/getAddressForChain.test.ts | 2 +- src/utils/getExplorerAddress.ts | 4 +- src/utils/hasAccountBalances.test.ts | 2 +- src/utils/ipsfResolverWithFallback.ts | 2 +- src/utils/isAddressValid.ts | 2 +- src/utils/isBitcoin.ts | 2 +- src/utils/isBtcAddressInNetwork.ts | 2 +- src/utils/isContactValid.test.ts | 4 +- src/utils/isContactValid.ts | 2 +- src/utils/isPrimarySubnet.ts | 2 +- src/utils/isSwimmerNetwork.ts | 2 +- src/utils/jsonRpcEngine.ts | 2 +- .../network/getProviderForNetwork.test.ts | 13 +- src/utils/network/getProviderForNetwork.ts | 4 +- src/utils/send/btcSendUtils.test.ts | 4 +- src/utils/send/btcSendUtils.ts | 2 +- .../shouldUseWalletConnectApproval.test.ts | 3 +- src/utils/shouldUseWalletConnectApproval.ts | 2 +- src/utils/toastCardWithLink.tsx | 2 +- yarn.lock | 176 +++++++++--------- 623 files changed, 1138 insertions(+), 931 deletions(-) diff --git a/docs/09-Keystone.md b/docs/09-Keystone.md index aea5823ed..a89921792 100644 --- a/docs/09-Keystone.md +++ b/docs/09-Keystone.md @@ -20,7 +20,7 @@ import { CryptoMultiAccounts } from '@keystonehq/bc-ur-registry-eth'; import { getAddressFromXPub, getBech32AddressFromXPub, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; const decoder = new URDecoder(); decoder.receivePart(qrcode2); diff --git a/package.json b/package.json index 5dcdec306..0a931bfe1 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "avalanche-extension", "version": "0.0.0", "license": "Limited Ecosystem License", + "private": true, "scripts": { "start": "yarn dev", "build:inpage": "webpack --config webpack.inpage.js", @@ -22,22 +23,22 @@ "sentry": "node sentryscript.js" }, "dependencies": { - "@avalabs/vm-module-types": "0.0.15", + "@avalabs/vm-module-types": "0.1.0", "@avalabs/avalanchejs": "4.0.5", - "@avalabs/bridge-sdk": "2.8.0-alpha.188", "@avalabs/bridge-unified": "2.1.0", - "@avalabs/chains-sdk": "2.8.0-alpha.188", - "@avalabs/coingecko-sdk": "2.8.0-alpha.188", - "@avalabs/covalent-sdk": "2.8.0-alpha.188", - "@avalabs/etherscan-sdk": "2.8.0-alpha.188", + "@avalabs/core-bridge-sdk": "3.0.0", + "@avalabs/core-chains-sdk": "3.0.0", + "@avalabs/core-coingecko-sdk": "3.0.0", + "@avalabs/core-covalent-sdk": "3.0.0", + "@avalabs/core-etherscan-sdk": "3.0.0", + "@avalabs/core-snowtrace-sdk": "3.0.0", + "@avalabs/core-token-prices-sdk": "3.0.0", + "@avalabs/core-utils-sdk": "3.0.0", + "@avalabs/core-wallets-sdk": "3.0.0", "@avalabs/glacier-sdk": "2.8.0-alpha.188", "@avalabs/hw-app-avalanche": "0.14.1", - "@avalabs/k2-components": "4.18.0-alpha.41", - "@avalabs/snowtrace-sdk": "2.8.0-alpha.188", - "@avalabs/token-prices-sdk": "2.8.0-alpha.188", + "@avalabs/core-k2-components": "4.18.0-alpha.44", "@avalabs/types": "2.8.0-alpha.188", - "@avalabs/utils-sdk": "2.8.0-alpha.188", - "@avalabs/wallets-sdk": "2.8.0-alpha.188", "@blockaid/client": "0.10.0", "@coinbase/cbpay-js": "1.6.0", "@cubist-labs/cubesigner-sdk": "0.3.28", @@ -243,7 +244,10 @@ "@avalabs/vm-module-types": false, "@avalabs/vm-module-types>@avalabs/wallets-sdk>@avalabs/hw-app-avalanche>@ledgerhq/hw-app-eth>@ledgerhq/domain-service>eip55>keccak": false, "@avalabs/vm-module-types>@avalabs/wallets-sdk>@ledgerhq/hw-app-btc>bitcoinjs-lib>bip32>tiny-secp256k1": false, - "@avalabs/vm-module-types>@avalabs/wallets-sdk>hdkey>secp256k1": false + "@avalabs/vm-module-types>@avalabs/wallets-sdk>hdkey>secp256k1": false, + "@avalabs/core-bridge-sdk>@avalabs/core-wallets-sdk>@avalabs/hw-app-avalanche>@ledgerhq/hw-app-eth>@ledgerhq/domain-service>eip55>keccak": false, + "@avalabs/core-bridge-sdk>@avalabs/core-wallets-sdk>@ledgerhq/hw-app-btc>bitcoinjs-lib>bip32>tiny-secp256k1": false, + "@avalabs/core-bridge-sdk>@avalabs/core-wallets-sdk>hdkey>secp256k1": false } } } diff --git a/src/background/connections/dAppConnection/DAppConnectionController.ts b/src/background/connections/dAppConnection/DAppConnectionController.ts index c4abda202..79a30232f 100644 --- a/src/background/connections/dAppConnection/DAppConnectionController.ts +++ b/src/background/connections/dAppConnection/DAppConnectionController.ts @@ -1,5 +1,5 @@ import { DEFERRED_RESPONSE } from './../middlewares/models'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { connectionLog, disconnectLog, diff --git a/src/background/connections/dAppConnection/models.ts b/src/background/connections/dAppConnection/models.ts index e2f3c831a..76315496c 100644 --- a/src/background/connections/dAppConnection/models.ts +++ b/src/background/connections/dAppConnection/models.ts @@ -1,4 +1,4 @@ -import { Maybe } from '@avalabs/utils-sdk'; +import { Maybe } from '@avalabs/core-utils-sdk'; import { DomainMetadata } from '@src/background/models'; import { EthereumProviderError } from 'eth-rpc-errors'; import { SerializedEthereumRpcError } from 'eth-rpc-errors/dist/classes'; diff --git a/src/background/connections/extensionConnection/ExtensionConnectionController.ts b/src/background/connections/extensionConnection/ExtensionConnectionController.ts index 245cfb28d..7b710bd6e 100644 --- a/src/background/connections/extensionConnection/ExtensionConnectionController.ts +++ b/src/background/connections/extensionConnection/ExtensionConnectionController.ts @@ -19,7 +19,7 @@ import { responseLog, } from '@src/utils/logging'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { isDevelopment } from '@src/utils/environment'; import './registry'; import '../dAppConnection/registry'; diff --git a/src/background/connections/middlewares/RPCCallsMiddleware.ts b/src/background/connections/middlewares/RPCCallsMiddleware.ts index c655bd177..e4c2aa69c 100644 --- a/src/background/connections/middlewares/RPCCallsMiddleware.ts +++ b/src/background/connections/middlewares/RPCCallsMiddleware.ts @@ -1,6 +1,6 @@ import { Middleware } from './models'; import { NetworkService } from '@src/background/services/network/NetworkService'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { JsonRpcRequest, JsonRpcResponse } from '../dAppConnection/models'; export function RPCCallsMiddleware( diff --git a/src/background/providers/CoreProvider.ts b/src/background/providers/CoreProvider.ts index 2c9e1b626..93994e69e 100644 --- a/src/background/providers/CoreProvider.ts +++ b/src/background/providers/CoreProvider.ts @@ -19,7 +19,7 @@ import { } from '../connections/dAppConnection/models'; import { PartialBy, ProviderInfo } from '../models'; import AbstractConnection from '../utils/messaging/AbstractConnection'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; interface ProviderState { accounts: string[] | null; diff --git a/src/background/providers/MultiWalletProviderProxy.ts b/src/background/providers/MultiWalletProviderProxy.ts index 449a5bf20..0042edc36 100644 --- a/src/background/providers/MultiWalletProviderProxy.ts +++ b/src/background/providers/MultiWalletProviderProxy.ts @@ -6,7 +6,7 @@ import { } from '../connections/dAppConnection/models'; import { getWalletExtensionType } from './utils/getWalletExtensionType'; import { CoreProvider } from './CoreProvider'; -import { Maybe } from '@avalabs/utils-sdk'; +import { Maybe } from '@avalabs/core-utils-sdk'; import EventEmitter from 'events'; export class MultiWalletProviderProxy extends EventEmitter { diff --git a/src/background/services/accounts/AccountsService.test.ts b/src/background/services/accounts/AccountsService.test.ts index 657ffd50a..86ddde0ea 100644 --- a/src/background/services/accounts/AccountsService.test.ts +++ b/src/background/services/accounts/AccountsService.test.ts @@ -11,7 +11,7 @@ import { ImportType, ImportData, } from './models'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { WalletConnectStorage } from '../walletConnect/WalletConnectStorage'; import { WalletConnectService } from '../walletConnect/WalletConnectService'; import { PermissionsService } from '../permissions/PermissionsService'; diff --git a/src/background/services/accounts/AccountsService.ts b/src/background/services/accounts/AccountsService.ts index 0f8754340..bb27f0976 100644 --- a/src/background/services/accounts/AccountsService.ts +++ b/src/background/services/accounts/AccountsService.ts @@ -17,7 +17,7 @@ import { import { OnLock, OnUnlock } from '@src/background/runtime/lifecycleCallbacks'; import { WalletService } from '../wallet/WalletService'; import { NetworkService } from '../network/NetworkService'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { PermissionsService } from '../permissions/PermissionsService'; import { isProductionBuild } from '@src/utils/environment'; import { DerivedAddresses, SecretType } from '../secrets/models'; diff --git a/src/background/services/accounts/handlers/avalanche_getAddressesInRange.test.ts b/src/background/services/accounts/handlers/avalanche_getAddressesInRange.test.ts index 0e5f285da..0a25a744b 100644 --- a/src/background/services/accounts/handlers/avalanche_getAddressesInRange.test.ts +++ b/src/background/services/accounts/handlers/avalanche_getAddressesInRange.test.ts @@ -1,10 +1,10 @@ -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { ethErrors } from 'eth-rpc-errors'; import { AvalancheGetAddressesInRangeHandler } from './avalanche_getAddressesInRange'; import { buildRpcCall } from '@src/tests/test-utils'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); describe('background/services/accounts/handlers/avalanche_getAddressesInRange.ts', () => { const getPrimaryAccountSecretsMock = jest.fn(); diff --git a/src/background/services/accounts/handlers/avalanche_getAddressesInRange.ts b/src/background/services/accounts/handlers/avalanche_getAddressesInRange.ts index 735bef5fd..6c5efe34b 100644 --- a/src/background/services/accounts/handlers/avalanche_getAddressesInRange.ts +++ b/src/background/services/accounts/handlers/avalanche_getAddressesInRange.ts @@ -2,7 +2,7 @@ import { ethErrors } from 'eth-rpc-errors'; import { injectable } from 'tsyringe'; import { DAppRequestHandler } from '@src/background/connections/dAppConnection/DAppRequestHandler'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { SecretsService } from '../../secrets/SecretsService'; import { NetworkService } from '../../network/NetworkService'; diff --git a/src/background/services/accounts/handlers/getPrivateKey.test.ts b/src/background/services/accounts/handlers/getPrivateKey.test.ts index 6be01384e..56889c80b 100644 --- a/src/background/services/accounts/handlers/getPrivateKey.test.ts +++ b/src/background/services/accounts/handlers/getPrivateKey.test.ts @@ -3,11 +3,11 @@ import { GetPrivateKeyHandler } from './getPrivateKey'; import { AccountType, GetPrivateKeyErrorTypes } from '../models'; import { LockService } from '../../lock/LockService'; import { SecretType } from '../../secrets/models'; -import { getWalletFromMnemonic } from '@avalabs/wallets-sdk'; +import { getWalletFromMnemonic } from '@avalabs/core-wallets-sdk'; import { buildRpcCall } from '@src/tests/test-utils'; -jest.mock('@avalabs/wallets-sdk', () => ({ - ...jest.requireActual('@avalabs/wallets-sdk'), +jest.mock('@avalabs/core-wallets-sdk', () => ({ + ...jest.requireActual('@avalabs/core-wallets-sdk'), getWalletFromMnemonic: jest.fn(), })); diff --git a/src/background/services/accounts/handlers/getPrivateKey.ts b/src/background/services/accounts/handlers/getPrivateKey.ts index e039d017f..8a8151520 100644 --- a/src/background/services/accounts/handlers/getPrivateKey.ts +++ b/src/background/services/accounts/handlers/getPrivateKey.ts @@ -2,7 +2,7 @@ import { ExtensionRequest } from '@src/background/connections/extensionConnectio import { ExtensionRequestHandler } from '@src/background/connections/models'; import { injectable } from 'tsyringe'; import { SecretsService } from '../../secrets/SecretsService'; -import { getWalletFromMnemonic } from '@avalabs/wallets-sdk'; +import { getWalletFromMnemonic } from '@avalabs/core-wallets-sdk'; import { AccountType, GetPrivateKeyErrorTypes } from '../models'; import { utils } from '@avalabs/avalanchejs'; import { LockService } from '../../lock/LockService'; diff --git a/src/background/services/analytics/AnalyticsServicePosthog.test.ts b/src/background/services/analytics/AnalyticsServicePosthog.test.ts index b9a6a410d..cb9d39395 100644 --- a/src/background/services/analytics/AnalyticsServicePosthog.test.ts +++ b/src/background/services/analytics/AnalyticsServicePosthog.test.ts @@ -1,7 +1,7 @@ import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; import { FeatureGates } from '../featureFlags/models'; -import { HttpClient } from '@avalabs/utils-sdk'; +import { HttpClient } from '@avalabs/core-utils-sdk'; import { AnalyticsServicePosthog } from './AnalyticsServicePosthog'; import { AnalyticsService } from './AnalyticsService'; import { SettingsService } from '../settings/SettingsService'; @@ -11,10 +11,10 @@ import sentryCaptureException, { import browser from 'webextension-polyfill'; import { encryptAnalyticsData } from './utils/encryptAnalyticsData'; import { AnalyticsConsent } from '../settings/models'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { BlockchainId } from './models'; -jest.mock('@avalabs/utils-sdk'); +jest.mock('@avalabs/core-utils-sdk'); jest.mock('@src/monitoring/sentryCaptureException'); jest.mock('webextension-polyfill'); jest.mock('./utils/encryptAnalyticsData'); diff --git a/src/background/services/analytics/AnalyticsServicePosthog.ts b/src/background/services/analytics/AnalyticsServicePosthog.ts index bfdaeb124..c11e961e5 100644 --- a/src/background/services/analytics/AnalyticsServicePosthog.ts +++ b/src/background/services/analytics/AnalyticsServicePosthog.ts @@ -1,4 +1,4 @@ -import { HttpClient } from '@avalabs/utils-sdk'; +import { HttpClient } from '@avalabs/core-utils-sdk'; import { getUserEnvironment } from '@src/utils/getUserEnvironment'; import { singleton } from 'tsyringe'; import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; @@ -11,7 +11,7 @@ import { encryptAnalyticsData } from './utils/encryptAnalyticsData'; import sentryCaptureException, { SentryExceptionTypes, } from '@src/monitoring/sentryCaptureException'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; @singleton() export class AnalyticsServicePosthog { diff --git a/src/background/services/balances/BalanceAggregatorService.test.ts b/src/background/services/balances/BalanceAggregatorService.test.ts index 701ccc866..c7395b774 100644 --- a/src/background/services/balances/BalanceAggregatorService.test.ts +++ b/src/background/services/balances/BalanceAggregatorService.test.ts @@ -1,6 +1,6 @@ import BN from 'bn.js'; import * as Sentry from '@sentry/browser'; -import { Network, NetworkToken, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkToken, NetworkVMType } from '@avalabs/core-chains-sdk'; import { StorageService } from '../storage/StorageService'; import { SettingsService } from '../settings/SettingsService'; @@ -51,6 +51,7 @@ describe('src/background/services/balances/BalanceAggregatorService.ts', () => { chainId: 1, vmName: NetworkVMType.EVM, rpcUrl: 'test.one.com/rpc', + explorerUrl: 'https://explorer.url', networkToken: networkToken1, logoUri: 'test.one.com/logo', primaryColor: 'purple', @@ -69,6 +70,7 @@ describe('src/background/services/balances/BalanceAggregatorService.ts', () => { chainId: 2, vmName: NetworkVMType.EVM, rpcUrl: 'test.two.com/rpc', + explorerUrl: 'https://explorer.url', networkToken: networkToken2, logoUri: 'test.two.com/logo', primaryColor: 'brown', diff --git a/src/background/services/balances/BalanceAggregatorService.ts b/src/background/services/balances/BalanceAggregatorService.ts index 6b2f762ae..c620c4535 100644 --- a/src/background/services/balances/BalanceAggregatorService.ts +++ b/src/background/services/balances/BalanceAggregatorService.ts @@ -18,7 +18,7 @@ import { TokensPriceShortData, priceChangeRefreshRate, } from '../tokens/models'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { SettingsService } from '../settings/SettingsService'; import { isFulfilled } from '@src/utils/typeUtils'; diff --git a/src/background/services/balances/BalancesService.test.ts b/src/background/services/balances/BalancesService.test.ts index 9d0a01c9b..6bddfe70b 100644 --- a/src/background/services/balances/BalancesService.test.ts +++ b/src/background/services/balances/BalancesService.test.ts @@ -1,4 +1,7 @@ -import { AVALANCHE_XP_TEST_NETWORK, NetworkVMType } from '@avalabs/chains-sdk'; +import { + AVALANCHE_XP_TEST_NETWORK, + NetworkVMType, +} from '@avalabs/core-chains-sdk'; import { BalancesService } from './BalancesService'; import { AccountType } from '../accounts/models'; import BN from 'bn.js'; @@ -47,6 +50,7 @@ describe('src/background/services/balances/BalancesService.ts', () => { chainId: 123, vmName: NetworkVMType.EVM, rpcUrl: 'testChainRpcUrl', + explorerUrl: 'https://explorer.url', networkToken: { name: 'testChainName', symbol: 'TEST', diff --git a/src/background/services/balances/BalancesService.ts b/src/background/services/balances/BalancesService.ts index a90f87b69..762ec92a8 100644 --- a/src/background/services/balances/BalancesService.ts +++ b/src/background/services/balances/BalancesService.ts @@ -7,7 +7,7 @@ import { GlacierUnhealthyError, TokenWithBalance, } from '@src/background/services/balances/models'; -import { ChainId, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, NetworkVMType } from '@avalabs/core-chains-sdk'; import { Account } from '../accounts/models'; import { isEthereumNetwork } from '../network/utils/isEthereumNetwork'; import { BalancesServiceGlacier } from './BalancesServiceGlacier'; diff --git a/src/background/services/balances/BalancesServiceAVM.test.ts b/src/background/services/balances/BalancesServiceAVM.test.ts index 6ad33ab86..933d47ad7 100644 --- a/src/background/services/balances/BalancesServiceAVM.test.ts +++ b/src/background/services/balances/BalancesServiceAVM.test.ts @@ -2,7 +2,7 @@ import { AVALANCHE_XP_TEST_NETWORK, ChainId, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '../accounts/models'; import BN from 'bn.js'; import { diff --git a/src/background/services/balances/BalancesServiceAVM.ts b/src/background/services/balances/BalancesServiceAVM.ts index 9c70820ad..217abc0d7 100644 --- a/src/background/services/balances/BalancesServiceAVM.ts +++ b/src/background/services/balances/BalancesServiceAVM.ts @@ -3,7 +3,7 @@ import { GlacierService } from '../glacier/GlacierService'; import { TokenPricesService } from './TokenPricesService'; import { SettingsService } from '../settings/SettingsService'; import { Account } from '../accounts/models'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { NetworkTokenWithBalance, TokenType, @@ -22,7 +22,7 @@ import { import sentryCaptureException, { SentryExceptionTypes, } from '@src/monitoring/sentryCaptureException'; -import { balanceToDisplayValue, bnToBig } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue, bnToBig } from '@avalabs/core-utils-sdk'; import BN from 'bn.js'; import { getTokenValue } from './utils/getTokenValue'; import { calculateTotalBalance } from './utils/calculateTotalBalance'; diff --git a/src/background/services/balances/BalancesServiceBTC.ts b/src/background/services/balances/BalancesServiceBTC.ts index d6a25a6f8..2b6ba3cc6 100644 --- a/src/background/services/balances/BalancesServiceBTC.ts +++ b/src/background/services/balances/BalancesServiceBTC.ts @@ -1,6 +1,6 @@ -import { satoshiToBtc } from '@avalabs/bridge-sdk'; -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; -import { balanceToDisplayValue, bigToBN } from '@avalabs/utils-sdk'; +import { satoshiToBtc } from '@avalabs/core-bridge-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; +import { balanceToDisplayValue, bigToBN } from '@avalabs/core-utils-sdk'; import { TokenPricesService } from '@src/background/services/balances/TokenPricesService'; import { NetworkService } from '@src/background/services/network/NetworkService'; import { singleton } from 'tsyringe'; @@ -9,7 +9,7 @@ import { SettingsService } from '../settings/SettingsService'; import { TokenType, TokenWithBalance } from './models'; import * as Sentry from '@sentry/browser'; import { TokensPriceShortData } from '../tokens/models'; -import { BitcoinProvider } from '@avalabs/wallets-sdk'; +import { BitcoinProvider } from '@avalabs/core-wallets-sdk'; import { getPriceChangeValues } from './utils/getPriceChangeValues'; @singleton() diff --git a/src/background/services/balances/BalancesServiceEVM.ts b/src/background/services/balances/BalancesServiceEVM.ts index fc4db570c..187a9e560 100644 --- a/src/background/services/balances/BalancesServiceEVM.ts +++ b/src/background/services/balances/BalancesServiceEVM.ts @@ -5,14 +5,14 @@ import { bigToBN, numberToBN, bnToBig, -} from '@avalabs/utils-sdk'; +} from '@avalabs/core-utils-sdk'; import { NetworkService } from '@src/background/services/network/NetworkService'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; import { TokenPricesService } from '@src/background/services/balances/TokenPricesService'; import { NetworkTokenWithBalance, TokenWithBalance, TokenType } from './models'; -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; import { TokenManagerService } from '../tokens/TokenManagerService'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { SettingsService } from '../settings/SettingsService'; import BN from 'bn.js'; import { Account } from '../accounts/models'; diff --git a/src/background/services/balances/BalancesServiceGlacier.ts b/src/background/services/balances/BalancesServiceGlacier.ts index 0b223e687..f70a50dcb 100644 --- a/src/background/services/balances/BalancesServiceGlacier.ts +++ b/src/background/services/balances/BalancesServiceGlacier.ts @@ -1,4 +1,4 @@ -import { Network, NetworkContractToken } from '@avalabs/chains-sdk'; +import { Network, NetworkContractToken } from '@avalabs/core-chains-sdk'; import { NativeTokenBalance, Erc20TokenBalance, @@ -8,7 +8,7 @@ import { ListErc721BalancesResponse, ListErc1155BalancesResponse, } from '@avalabs/glacier-sdk'; -import { balanceToDisplayValue, bnToBig } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue, bnToBig } from '@avalabs/core-utils-sdk'; import { singleton } from 'tsyringe'; import { SettingsService } from '../settings/SettingsService'; import { TokenManagerService } from '../tokens/TokenManagerService'; diff --git a/src/background/services/balances/BalancesServicePVM.test.ts b/src/background/services/balances/BalancesServicePVM.test.ts index 15dbbb9da..604c44c99 100644 --- a/src/background/services/balances/BalancesServicePVM.test.ts +++ b/src/background/services/balances/BalancesServicePVM.test.ts @@ -1,4 +1,7 @@ -import { AVALANCHE_XP_TEST_NETWORK, NetworkVMType } from '@avalabs/chains-sdk'; +import { + AVALANCHE_XP_TEST_NETWORK, + NetworkVMType, +} from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '../accounts/models'; import BN from 'bn.js'; import { diff --git a/src/background/services/balances/BalancesServicePVM.ts b/src/background/services/balances/BalancesServicePVM.ts index e562b1685..7d1d3cbea 100644 --- a/src/background/services/balances/BalancesServicePVM.ts +++ b/src/background/services/balances/BalancesServicePVM.ts @@ -1,5 +1,5 @@ import { stripAddressPrefix } from '@src/utils/stripAddressPrefix'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { BlockchainId, CChainAtomicBalances, @@ -18,7 +18,7 @@ import { TokenWithBalancePVM, } from './models'; import BN from 'bn.js'; -import { balanceToDisplayValue, bnToBig } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue, bnToBig } from '@avalabs/core-utils-sdk'; import * as Sentry from '@sentry/browser'; import sentryCaptureException, { SentryExceptionTypes, diff --git a/src/background/services/balances/TokenPricesService.ts b/src/background/services/balances/TokenPricesService.ts index 09181d9c6..8c0cda9d9 100644 --- a/src/background/services/balances/TokenPricesService.ts +++ b/src/background/services/balances/TokenPricesService.ts @@ -1,8 +1,11 @@ import { singleton } from 'tsyringe'; -import { SimplePriceInCurrency } from '@avalabs/coingecko-sdk'; +import { SimplePriceInCurrency } from '@avalabs/core-coingecko-sdk'; import { SettingsService } from '../settings/SettingsService'; -import { getTokensPrice } from '@avalabs/token-prices-sdk'; -import { simplePrice, getBasicCoingeckoHttp } from '@avalabs/coingecko-sdk'; +import { getTokensPrice } from '@avalabs/core-token-prices-sdk'; +import { + simplePrice, + getBasicCoingeckoHttp, +} from '@avalabs/core-coingecko-sdk'; import LRUCache from 'lru-cache'; /** diff --git a/src/background/services/balances/handlers/getAvaxBalance.ts b/src/background/services/balances/handlers/getAvaxBalance.ts index 03f57192f..9e8708c7d 100644 --- a/src/background/services/balances/handlers/getAvaxBalance.ts +++ b/src/background/services/balances/handlers/getAvaxBalance.ts @@ -1,4 +1,4 @@ -import { Avalanche, BitcoinProvider } from '@avalabs/wallets-sdk'; +import { Avalanche, BitcoinProvider } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; diff --git a/src/background/services/balances/models.ts b/src/background/services/balances/models.ts index eec6983f2..17545b0cd 100644 --- a/src/background/services/balances/models.ts +++ b/src/background/services/balances/models.ts @@ -1,9 +1,9 @@ -import { NetworkContractToken, NetworkToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken, NetworkToken } from '@avalabs/core-chains-sdk'; import { PChainBalance as GlacierPchainBalance, XChainBalances as GlacierXchainBalance, } from '@avalabs/glacier-sdk'; -import { BitcoinInputUTXOWithOptionalScript } from '@avalabs/wallets-sdk'; +import { BitcoinInputUTXOWithOptionalScript } from '@avalabs/core-wallets-sdk'; import { EnsureDefined } from '@src/background/models'; import BN from 'bn.js'; diff --git a/src/background/services/balances/nft/NFTBalancesService.ts b/src/background/services/balances/nft/NFTBalancesService.ts index 2d56400ad..1899d92e2 100644 --- a/src/background/services/balances/nft/NFTBalancesService.ts +++ b/src/background/services/balances/nft/NFTBalancesService.ts @@ -1,5 +1,5 @@ import { injectAll, singleton } from 'tsyringe'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; import { NFTService } from './models'; import './registry'; import { NFTBalancesServiceCovalent } from './NFTBalancesServiceCovalent'; diff --git a/src/background/services/balances/nft/NFTBalancesServiceCovalent.ts b/src/background/services/balances/nft/NFTBalancesServiceCovalent.ts index e4e883521..f56f8b991 100644 --- a/src/background/services/balances/nft/NFTBalancesServiceCovalent.ts +++ b/src/background/services/balances/nft/NFTBalancesServiceCovalent.ts @@ -1,6 +1,6 @@ import { BN } from 'bn.js'; -import { Network } from '@avalabs/chains-sdk'; -import { Covalent, GetAddressBalanceV2Item } from '@avalabs/covalent-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; +import { Covalent, GetAddressBalanceV2Item } from '@avalabs/core-covalent-sdk'; import { singleton } from 'tsyringe'; import { SettingsService } from '../../settings/SettingsService'; import { TokenType, NftTokenWithBalance, NftBalanceResponse } from '../models'; diff --git a/src/background/services/balances/nft/NFTBalancesServiceGlacier.ts b/src/background/services/balances/nft/NFTBalancesServiceGlacier.ts index 48f108531..50f49d30d 100644 --- a/src/background/services/balances/nft/NFTBalancesServiceGlacier.ts +++ b/src/background/services/balances/nft/NFTBalancesServiceGlacier.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { singleton } from 'tsyringe'; import { GlacierService } from '../../glacier/GlacierService'; import { SettingsService } from '../../settings/SettingsService'; diff --git a/src/background/services/balances/nft/models.ts b/src/background/services/balances/nft/models.ts index 3f5e4043e..53af3c87d 100644 --- a/src/background/services/balances/nft/models.ts +++ b/src/background/services/balances/nft/models.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { NftBalanceResponse, NftPageTokens } from '../models'; export interface NFTService { diff --git a/src/background/services/balances/utils/getPriceChangeValues.test.ts b/src/background/services/balances/utils/getPriceChangeValues.test.ts index d6dc5edce..5e38eea2a 100644 --- a/src/background/services/balances/utils/getPriceChangeValues.test.ts +++ b/src/background/services/balances/utils/getPriceChangeValues.test.ts @@ -1,4 +1,4 @@ -import { NetworkToken } from '@avalabs/chains-sdk'; +import { NetworkToken } from '@avalabs/core-chains-sdk'; import { NetworkTokenWithBalance, TokenType, diff --git a/src/background/services/blockaid/BlockaidService.test.ts b/src/background/services/blockaid/BlockaidService.test.ts index f39512b81..08d0fc3c2 100644 --- a/src/background/services/blockaid/BlockaidService.test.ts +++ b/src/background/services/blockaid/BlockaidService.test.ts @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; import { FeatureGates } from '../featureFlags/models'; import { BlockaidService } from './BlockaidService'; @@ -122,6 +122,7 @@ const networkMock = { chainId: 123, vmName: NetworkVMType.EVM, rpcUrl: 'https://rpcurl.example', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test network token', symbol: 'TNT', diff --git a/src/background/services/blockaid/BlockaidService.ts b/src/background/services/blockaid/BlockaidService.ts index 51cb3279d..7fea4911c 100644 --- a/src/background/services/blockaid/BlockaidService.ts +++ b/src/background/services/blockaid/BlockaidService.ts @@ -1,7 +1,7 @@ import { singleton } from 'tsyringe'; import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; import Blockaid from '@blockaid/client'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { EthSendTransactionParamsWithGas, TransactionAction, diff --git a/src/background/services/bridge/BridgeService.test.ts b/src/background/services/bridge/BridgeService.test.ts index 1ecb378df..04b623e4a 100644 --- a/src/background/services/bridge/BridgeService.test.ts +++ b/src/background/services/bridge/BridgeService.test.ts @@ -2,9 +2,9 @@ import { Blockchain, estimateGas, getBtcTransactionDetails, -} from '@avalabs/bridge-sdk'; -import { BITCOIN_NETWORK, ChainId } from '@avalabs/chains-sdk'; -import { BitcoinProvider } from '@avalabs/wallets-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { BITCOIN_NETWORK, ChainId } from '@avalabs/core-chains-sdk'; +import { BitcoinProvider } from '@avalabs/core-wallets-sdk'; import Big from 'big.js'; import { AccountsService } from '../accounts/AccountsService'; @@ -22,11 +22,11 @@ import { FireblocksErrorCode } from '../fireblocks/models'; import { ethErrors } from 'eth-rpc-errors'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; -jest.mock('@avalabs/bridge-sdk', () => { +jest.mock('@avalabs/core-bridge-sdk', () => { const { mockConfig } = require('./fixtures/mockBridgeConfig'); return { - ...jest.requireActual('@avalabs/bridge-sdk'), + ...jest.requireActual('@avalabs/core-bridge-sdk'), getBtcTransactionDetails: jest.fn(), estimateGas: jest.fn(), fetchConfig: jest.fn().mockResolvedValue({ config: mockConfig }), diff --git a/src/background/services/bridge/BridgeService.ts b/src/background/services/bridge/BridgeService.ts index c54fd0cc7..5ede29d0b 100644 --- a/src/background/services/bridge/BridgeService.ts +++ b/src/background/services/bridge/BridgeService.ts @@ -1,4 +1,4 @@ -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { Asset, BitcoinConfigAsset, @@ -18,7 +18,7 @@ import { TrackerSubscription, transferAssetEVM as transferAssetSDK, WrapStatus, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import { isNil, omit, omitBy } from 'lodash'; import { EventEmitter } from 'events'; import { NetworkService } from '../network/NetworkService'; @@ -43,7 +43,7 @@ import { import Big from 'big.js'; import { NetworkFeeService } from '../networkFee/NetworkFeeService'; import { BalanceAggregatorService } from '../balances/BalanceAggregatorService'; -import { Avalanche, JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { Avalanche, JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { isWalletConnectAccount } from '../accounts/utils/typeGuards'; import { FeatureGates } from '../featureFlags/models'; import { wrapError } from '@src/utils/errors'; diff --git a/src/background/services/bridge/events/listeners.ts b/src/background/services/bridge/events/listeners.ts index 1a5d393ad..6caa81ccf 100644 --- a/src/background/services/bridge/events/listeners.ts +++ b/src/background/services/bridge/events/listeners.ts @@ -1,4 +1,4 @@ -import { BridgeConfig } from '@avalabs/bridge-sdk'; +import { BridgeConfig } from '@avalabs/core-bridge-sdk'; import { ExtensionConnectionEvent } from '@src/background/connections/models'; import { BridgeEvents, BridgeState, TransferEvent } from '../models'; diff --git a/src/background/services/bridge/fixtures/mockBridgeConfig.ts b/src/background/services/bridge/fixtures/mockBridgeConfig.ts index 29ecb10bb..054efdb53 100644 --- a/src/background/services/bridge/fixtures/mockBridgeConfig.ts +++ b/src/background/services/bridge/fixtures/mockBridgeConfig.ts @@ -5,7 +5,7 @@ import { Blockchain, EthereumStaticFeeAssetConfig, NativeAsset, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; export const btcAsset: BitcoinStaticFeeConfigAsset = { additionalTxFeeAmount: 0, diff --git a/src/background/services/bridge/handlers/avalanche_bridgeAsset.test.ts b/src/background/services/bridge/handlers/avalanche_bridgeAsset.test.ts index f0aba1b84..a89ef8a12 100644 --- a/src/background/services/bridge/handlers/avalanche_bridgeAsset.test.ts +++ b/src/background/services/bridge/handlers/avalanche_bridgeAsset.test.ts @@ -1,6 +1,6 @@ -import { Blockchain, BridgeConfig, getAssets } from '@avalabs/bridge-sdk'; -import { ChainId } from '@avalabs/chains-sdk'; -import { bnToBig, stringToBN } from '@avalabs/utils-sdk'; +import { Blockchain, BridgeConfig, getAssets } from '@avalabs/core-bridge-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; +import { bnToBig, stringToBN } from '@avalabs/core-utils-sdk'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; import { AccountType, PrimaryAccount } from '../../accounts/models'; @@ -21,8 +21,8 @@ import { buildRpcCall } from '@src/tests/test-utils'; jest.mock('@src/background/runtime/openApprovalWindow'); -jest.mock('@avalabs/bridge-sdk', () => { - const originalModule = jest.requireActual('@avalabs/bridge-sdk'); +jest.mock('@avalabs/core-bridge-sdk', () => { + const originalModule = jest.requireActual('@avalabs/core-bridge-sdk'); return { ...originalModule, getAssets: jest.fn(), diff --git a/src/background/services/bridge/handlers/avalanche_bridgeAsset.ts b/src/background/services/bridge/handlers/avalanche_bridgeAsset.ts index 366540a22..f6036c213 100644 --- a/src/background/services/bridge/handlers/avalanche_bridgeAsset.ts +++ b/src/background/services/bridge/handlers/avalanche_bridgeAsset.ts @@ -8,9 +8,9 @@ import { EthereumConfigAsset, getAssets, isNativeAsset, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import Big from 'big.js'; -import { bnToBig, stringToBN } from '@avalabs/utils-sdk'; +import { bnToBig, stringToBN } from '@avalabs/core-utils-sdk'; import { DAppRequestHandler } from '@src/background/connections/dAppConnection/DAppRequestHandler'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; @@ -18,7 +18,7 @@ import { injectable } from 'tsyringe'; import { Action } from '../../actions/models'; import { BridgeService } from '../BridgeService'; import { BalanceAggregatorService } from '../../balances/BalanceAggregatorService'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { blockchainToNetwork } from '@src/pages/Bridge/utils/blockchainConversion'; import { findTokenForAsset } from '@src/pages/Bridge/utils/findTokenForAsset'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; diff --git a/src/background/services/bridge/handlers/estimateGasForBridgeTx.test.ts b/src/background/services/bridge/handlers/estimateGasForBridgeTx.test.ts index 0a85e1998..d014123b5 100644 --- a/src/background/services/bridge/handlers/estimateGasForBridgeTx.test.ts +++ b/src/background/services/bridge/handlers/estimateGasForBridgeTx.test.ts @@ -1,5 +1,5 @@ import Big from 'big.js'; -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { serializeToJSON } from '@src/background/serialization/serialize'; diff --git a/src/background/services/bridge/handlers/estimateGasForBridgeTx.ts b/src/background/services/bridge/handlers/estimateGasForBridgeTx.ts index 5657d660a..1e8ab581d 100644 --- a/src/background/services/bridge/handlers/estimateGasForBridgeTx.ts +++ b/src/background/services/bridge/handlers/estimateGasForBridgeTx.ts @@ -1,6 +1,6 @@ import Big from 'big.js'; import { injectable } from 'tsyringe'; -import { Asset, Blockchain } from '@avalabs/bridge-sdk'; +import { Asset, Blockchain } from '@avalabs/core-bridge-sdk'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; diff --git a/src/background/services/bridge/handlers/getBridgeConfig.ts b/src/background/services/bridge/handlers/getBridgeConfig.ts index 5ae597c7c..404aebd18 100644 --- a/src/background/services/bridge/handlers/getBridgeConfig.ts +++ b/src/background/services/bridge/handlers/getBridgeConfig.ts @@ -1,4 +1,4 @@ -import { BridgeConfig } from '@avalabs/bridge-sdk'; +import { BridgeConfig } from '@avalabs/core-bridge-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { injectable } from 'tsyringe'; diff --git a/src/background/services/bridge/handlers/getEthMaxTransferAmount.test.ts b/src/background/services/bridge/handlers/getEthMaxTransferAmount.test.ts index aaf2bc73b..34252e27e 100644 --- a/src/background/services/bridge/handlers/getEthMaxTransferAmount.test.ts +++ b/src/background/services/bridge/handlers/getEthMaxTransferAmount.test.ts @@ -2,8 +2,8 @@ import { Blockchain, getAssets, getMaxTransferAmount, -} from '@avalabs/bridge-sdk'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import Big from 'big.js'; import { BN } from 'bn.js'; @@ -11,10 +11,10 @@ import { TokenType, TokenWithBalance } from '../../balances/models'; import { GetEthMaxTransferAmountHandler } from './getEthMaxTransferAmount'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; import { buildRpcCall } from '@src/tests/test-utils'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; -jest.mock('@avalabs/bridge-sdk', () => { - const originalModule = jest.requireActual('@avalabs/bridge-sdk'); +jest.mock('@avalabs/core-bridge-sdk', () => { + const originalModule = jest.requireActual('@avalabs/core-bridge-sdk'); return { ...originalModule, getAssets: jest.fn(), diff --git a/src/background/services/bridge/handlers/getEthMaxTransferAmount.ts b/src/background/services/bridge/handlers/getEthMaxTransferAmount.ts index 8bb35c909..3493802a5 100644 --- a/src/background/services/bridge/handlers/getEthMaxTransferAmount.ts +++ b/src/background/services/bridge/handlers/getEthMaxTransferAmount.ts @@ -2,8 +2,8 @@ import { Blockchain, getAssets, getMaxTransferAmount as getEVMMaxTransferAmount, -} from '@avalabs/bridge-sdk'; -import { bnToBig } from '@avalabs/utils-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { bnToBig } from '@avalabs/core-utils-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { networkToBlockchain } from '@src/pages/Bridge/utils/blockchainConversion'; @@ -11,7 +11,7 @@ import Big from 'big.js'; import { injectable } from 'tsyringe'; import { NetworkService } from '../../network/NetworkService'; import { BridgeService } from '../BridgeService'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { BalanceAggregatorService } from '../../balances/BalanceAggregatorService'; import { AccountsService } from '../../accounts/AccountsService'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; diff --git a/src/background/services/bridge/handlers/setIsDevEnv.ts b/src/background/services/bridge/handlers/setIsDevEnv.ts index bdd2a43f8..370af09a2 100644 --- a/src/background/services/bridge/handlers/setIsDevEnv.ts +++ b/src/background/services/bridge/handlers/setIsDevEnv.ts @@ -2,7 +2,7 @@ import { ExtensionRequestHandler } from '@src/background/connections/models'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { BridgeService } from '../BridgeService'; import { injectable } from 'tsyringe'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; type HandlerType = ExtensionRequestHandler< ExtensionRequest.BRIDGE_SET_IS_DEV_ENV, diff --git a/src/background/services/bridge/handlers/transferAsset.ts b/src/background/services/bridge/handlers/transferAsset.ts index d92c881e3..7210f554c 100644 --- a/src/background/services/bridge/handlers/transferAsset.ts +++ b/src/background/services/bridge/handlers/transferAsset.ts @@ -1,4 +1,4 @@ -import { Asset, Blockchain } from '@avalabs/bridge-sdk'; +import { Asset, Blockchain } from '@avalabs/core-bridge-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import Big from 'big.js'; diff --git a/src/background/services/bridge/models.ts b/src/background/services/bridge/models.ts index 366ed1a08..122641779 100644 --- a/src/background/services/bridge/models.ts +++ b/src/background/services/bridge/models.ts @@ -3,8 +3,8 @@ import { Blockchain, BridgeTransaction, WrapStatus, -} from '@avalabs/bridge-sdk'; -import { Network } from '@avalabs/chains-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TokenWithBalance } from '../balances/models'; export enum TransferEventType { diff --git a/src/background/services/bridge/utils.ts b/src/background/services/bridge/utils.ts index 4073ebffe..235c209b1 100644 --- a/src/background/services/bridge/utils.ts +++ b/src/background/services/bridge/utils.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { BridgeState } from './models'; import { isAvalancheNetwork } from '../network/utils/isAvalancheNetwork'; import { isEthereumNetwork } from '../network/utils/isEthereumNetwork'; diff --git a/src/background/services/debank/DebankService.test.ts b/src/background/services/debank/DebankService.test.ts index 9a105abb0..d51c47585 100644 --- a/src/background/services/debank/DebankService.test.ts +++ b/src/background/services/debank/DebankService.test.ts @@ -1,4 +1,4 @@ -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { DefiItemType } from '../defi/models'; import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; import { FeatureGates } from '../featureFlags/models'; @@ -457,6 +457,7 @@ describe('src/background/services/defi/debank/DebankService.ts', () => { vmName: NetworkVMType.EVM, chainName: '', rpcUrl: '', + explorerUrl: 'https://explorer.url', logoUri: '', networkToken: { name: 'Avalanche', diff --git a/src/background/services/debank/DebankService.ts b/src/background/services/debank/DebankService.ts index bf6a8aa33..bcaec54f7 100644 --- a/src/background/services/debank/DebankService.ts +++ b/src/background/services/debank/DebankService.ts @@ -26,7 +26,7 @@ import { } from './models'; import { FeatureFlagService } from '../featureFlags/FeatureFlagService'; import { FeatureGates } from '../featureFlags/models'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { txParamsToTransactionData } from './utils/txParamsToTransactionData'; import { EthSendTransactionParamsWithGas, diff --git a/src/background/services/debank/utils/mapTokenItemToTransactionToken.ts b/src/background/services/debank/utils/mapTokenItemToTransactionToken.ts index 18f001069..1ba3095eb 100644 --- a/src/background/services/debank/utils/mapTokenItemToTransactionToken.ts +++ b/src/background/services/debank/utils/mapTokenItemToTransactionToken.ts @@ -1,6 +1,6 @@ import Big from 'big.js'; import { DebankTokenItem } from '../models'; -import { bigToBigInt } from '@avalabs/utils-sdk'; +import { bigToBigInt } from '@avalabs/core-utils-sdk'; import { TransactionToken } from '../../wallet/handlers/eth_sendTransaction/models'; export const mapTokenItemToTransactionToken = ( diff --git a/src/background/services/debank/utils/txParamsToTransactionData.ts b/src/background/services/debank/utils/txParamsToTransactionData.ts index d3b9ca679..32d1b2140 100644 --- a/src/background/services/debank/utils/txParamsToTransactionData.ts +++ b/src/background/services/debank/utils/txParamsToTransactionData.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { DebankTransactionData } from '../models'; import { EthSendTransactionParams } from '../../wallet/handlers/eth_sendTransaction/models'; diff --git a/src/background/services/featureFlags/FeatureFlagService.test.ts b/src/background/services/featureFlags/FeatureFlagService.test.ts index 5372f69fa..593facd86 100644 --- a/src/background/services/featureFlags/FeatureFlagService.test.ts +++ b/src/background/services/featureFlags/FeatureFlagService.test.ts @@ -1,4 +1,4 @@ -import { noop } from '@avalabs/utils-sdk'; +import { noop } from '@avalabs/core-utils-sdk'; import browser from 'webextension-polyfill'; import { AnalyticsEvents } from '../analytics/models'; diff --git a/src/background/services/fireblocks/FireblocksBTCSigner.test.ts b/src/background/services/fireblocks/FireblocksBTCSigner.test.ts index 50b9c54bf..b9c610e83 100644 --- a/src/background/services/fireblocks/FireblocksBTCSigner.test.ts +++ b/src/background/services/fireblocks/FireblocksBTCSigner.test.ts @@ -10,7 +10,7 @@ import { import { CommonError } from '@src/utils/errors'; import { ethErrors } from 'eth-rpc-errors'; -jest.mock('@avalabs/utils-sdk'); +jest.mock('@avalabs/core-utils-sdk'); jest.mock('ethers', () => ({ ...jest.requireActual('ethers'), diff --git a/src/background/services/fireblocks/FireblocksBTCSigner.ts b/src/background/services/fireblocks/FireblocksBTCSigner.ts index e8fe31578..463e2344e 100644 --- a/src/background/services/fireblocks/FireblocksBTCSigner.ts +++ b/src/background/services/fireblocks/FireblocksBTCSigner.ts @@ -10,8 +10,8 @@ import type { TransactionResponse, TransactionArguments, } from 'fireblocks-sdk'; -import { wait } from '@avalabs/utils-sdk'; -import { satoshiToBtc } from '@avalabs/bridge-sdk'; +import { wait } from '@avalabs/core-utils-sdk'; +import { satoshiToBtc } from '@avalabs/core-bridge-sdk'; import { wrapError } from '@src/utils/errors'; diff --git a/src/background/services/glacier/GlacierService.test.ts b/src/background/services/glacier/GlacierService.test.ts index cebf6d34d..bb165c1b8 100644 --- a/src/background/services/glacier/GlacierService.test.ts +++ b/src/background/services/glacier/GlacierService.test.ts @@ -7,11 +7,11 @@ import { } from '@avalabs/glacier-sdk'; import { GlacierService } from './GlacierService'; -import { wait } from '@avalabs/utils-sdk'; +import { wait } from '@avalabs/core-utils-sdk'; jest.mock('@avalabs/glacier-sdk'); -jest.mock('@avalabs/utils-sdk', () => ({ - ...jest.requireActual('@avalabs/utils-sdk'), +jest.mock('@avalabs/core-utils-sdk', () => ({ + ...jest.requireActual('@avalabs/core-utils-sdk'), wait: jest.fn(), })); diff --git a/src/background/services/glacier/GlacierService.ts b/src/background/services/glacier/GlacierService.ts index b13a854d7..43e288946 100644 --- a/src/background/services/glacier/GlacierService.ts +++ b/src/background/services/glacier/GlacierService.ts @@ -8,7 +8,7 @@ import { SortOrder, } from '@avalabs/glacier-sdk'; import { singleton } from 'tsyringe'; -import { wait } from '@avalabs/utils-sdk'; +import { wait } from '@avalabs/core-utils-sdk'; import { CommonError } from '@src/utils/errors'; diff --git a/src/background/services/history/HistoryService.test.ts b/src/background/services/history/HistoryService.test.ts index eb8f6e8ad..51d559124 100644 --- a/src/background/services/history/HistoryService.test.ts +++ b/src/background/services/history/HistoryService.test.ts @@ -7,7 +7,7 @@ import { Network, NetworkToken, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { HistoryService } from './HistoryService'; import { PchainTxHistoryItem, @@ -32,6 +32,7 @@ describe('src/background/services/history/HistoryService.ts', () => { chainId: 1, vmName: NetworkVMType.EVM, rpcUrl: 'test.one.com/rpc', + explorerUrl: 'https://explorer.url', networkToken: networkToken1, logoUri: 'test.one.com/logo', primaryColor: 'purple', diff --git a/src/background/services/history/HistoryService.ts b/src/background/services/history/HistoryService.ts index 44d4e786e..ba5455bf2 100644 --- a/src/background/services/history/HistoryService.ts +++ b/src/background/services/history/HistoryService.ts @@ -1,5 +1,5 @@ import { singleton } from 'tsyringe'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { Network } from '../network/models'; import { GlacierService } from '../glacier/GlacierService'; diff --git a/src/background/services/history/HistoryServiceAVM.ts b/src/background/services/history/HistoryServiceAVM.ts index c9447f9ba..e4b6e3bf7 100644 --- a/src/background/services/history/HistoryServiceAVM.ts +++ b/src/background/services/history/HistoryServiceAVM.ts @@ -1,6 +1,6 @@ import { singleton } from 'tsyringe'; -import { Network } from '@avalabs/chains-sdk'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { AccountsService } from '../accounts/AccountsService'; import { BlockchainId, diff --git a/src/background/services/history/HistoryServiceBTC.ts b/src/background/services/history/HistoryServiceBTC.ts index e7d04e958..7ded28452 100644 --- a/src/background/services/history/HistoryServiceBTC.ts +++ b/src/background/services/history/HistoryServiceBTC.ts @@ -1,6 +1,10 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; -import { BITCOIN_NETWORK, Network, NetworkVMType } from '@avalabs/chains-sdk'; -import { BitcoinHistoryTx, BitcoinProvider } from '@avalabs/wallets-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; +import { + BITCOIN_NETWORK, + Network, + NetworkVMType, +} from '@avalabs/core-chains-sdk'; +import { BitcoinHistoryTx, BitcoinProvider } from '@avalabs/core-wallets-sdk'; import { getExplorerAddress } from '@src/utils/getExplorerAddress'; import { singleton } from 'tsyringe'; import { AccountsService } from '../accounts/AccountsService'; diff --git a/src/background/services/history/HistoryServiceBridgeHelper.ts b/src/background/services/history/HistoryServiceBridgeHelper.ts index 957a9d9df..aaa371c2a 100644 --- a/src/background/services/history/HistoryServiceBridgeHelper.ts +++ b/src/background/services/history/HistoryServiceBridgeHelper.ts @@ -1,9 +1,9 @@ import { ETHEREUM_ADDRESS } from '@src/utils/bridgeTransactionUtils'; import { BridgeService } from '../bridge/BridgeService'; -import { BitcoinHistoryTx } from '@avalabs/wallets-sdk'; +import { BitcoinHistoryTx } from '@avalabs/core-wallets-sdk'; import { singleton } from 'tsyringe'; -import { Erc20Tx } from '@avalabs/snowtrace-sdk'; -import { Network } from '@avalabs/chains-sdk'; +import { Erc20Tx } from '@avalabs/core-snowtrace-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { isEthereumNetwork } from '../network/utils/isEthereumNetwork'; import { UnifiedBridgeService } from '../unifiedBridge/UnifiedBridgeService'; diff --git a/src/background/services/history/HistoryServiceETH.ts b/src/background/services/history/HistoryServiceETH.ts index 0c6f03bbd..4d4bf09d0 100644 --- a/src/background/services/history/HistoryServiceETH.ts +++ b/src/background/services/history/HistoryServiceETH.ts @@ -1,12 +1,12 @@ import { isEthereumChainId } from '@src/background/services/network/utils/isEthereumNetwork'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { singleton } from 'tsyringe'; import { AccountsService } from '../accounts/AccountsService'; import { HistoryServiceBridgeHelper } from './HistoryServiceBridgeHelper'; import { TransactionType, TxHistoryItem } from './models'; -import { balanceToDisplayValue } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue } from '@avalabs/core-utils-sdk'; import { BN } from 'bn.js'; import { getExplorerAddressByNetwork } from '@src/utils/getExplorerAddress'; import { @@ -14,7 +14,7 @@ import { getErc20Txs, getNormalTxs, NormalTx, -} from '@avalabs/etherscan-sdk'; +} from '@avalabs/core-etherscan-sdk'; import { TokenType } from '../balances/models'; @singleton() diff --git a/src/background/services/history/HistoryServiceGlacier.test.ts b/src/background/services/history/HistoryServiceGlacier.test.ts index 76bdf83e3..ff1e8f033 100644 --- a/src/background/services/history/HistoryServiceGlacier.test.ts +++ b/src/background/services/history/HistoryServiceGlacier.test.ts @@ -3,7 +3,7 @@ import { Network, NetworkToken, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { CurrencyCode, Erc20Token, @@ -166,6 +166,7 @@ const network: Network = { chainId: 123, vmName: NetworkVMType.EVM, rpcUrl: 'network.rpc.url', + explorerUrl: 'https://explorer.url', networkToken: networkToken, logoUri: 'network.logo.uri', }; diff --git a/src/background/services/history/HistoryServiceGlacier.ts b/src/background/services/history/HistoryServiceGlacier.ts index 4d261af6c..3f9bcc4ee 100644 --- a/src/background/services/history/HistoryServiceGlacier.ts +++ b/src/background/services/history/HistoryServiceGlacier.ts @@ -1,5 +1,5 @@ import { BN } from 'bn.js'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { Glacier, TransactionDetails } from '@avalabs/glacier-sdk'; import { ETHEREUM_ADDRESS } from '@src/utils/bridgeTransactionUtils'; import { startCase } from 'lodash'; @@ -14,7 +14,7 @@ import { TxHistoryItemToken, } from './models'; import { getExplorerAddressByNetwork } from '@src/utils/getExplorerAddress'; -import { balanceToDisplayValue } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue } from '@avalabs/core-utils-sdk'; import { getNftMetadata } from '@src/utils/getNftMetadata'; import { getSmallImageForNFT } from '../balances/nft/utils/getSmallImageForNFT'; import { resolve } from '@src/utils/promiseResolver'; diff --git a/src/background/services/history/HistoryServicePVM.ts b/src/background/services/history/HistoryServicePVM.ts index 52dc6d069..2a713f659 100644 --- a/src/background/services/history/HistoryServicePVM.ts +++ b/src/background/services/history/HistoryServicePVM.ts @@ -1,6 +1,6 @@ import { singleton } from 'tsyringe'; -import { Network } from '@avalabs/chains-sdk'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { isPchainNetwork } from '../network/utils/isAvalanchePchainNetwork'; import { AccountsService } from '../accounts/AccountsService'; import { diff --git a/src/background/services/history/utils/getAvaxAssetId.ts b/src/background/services/history/utils/getAvaxAssetId.ts index 5d0c9e36f..1ab05ae9c 100644 --- a/src/background/services/history/utils/getAvaxAssetId.ts +++ b/src/background/services/history/utils/getAvaxAssetId.ts @@ -1,4 +1,4 @@ -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; export const getAvaxAssetId = (isTestnet: boolean) => isTestnet diff --git a/src/background/services/keystone/BitcoinKeystoneWallet.test.ts b/src/background/services/keystone/BitcoinKeystoneWallet.test.ts index 09f76c808..323cec823 100644 --- a/src/background/services/keystone/BitcoinKeystoneWallet.test.ts +++ b/src/background/services/keystone/BitcoinKeystoneWallet.test.ts @@ -1,10 +1,10 @@ -import * as WalletsSDK from '@avalabs/wallets-sdk'; +import * as WalletsSDK from '@avalabs/core-wallets-sdk'; import { CryptoPSBT } from '@keystonehq/bc-ur-registry-eth'; import { Network, Psbt } from 'bitcoinjs-lib'; import { BitcoinKeystoneWallet } from './BitcoinKeystoneWallet'; import { KeystoneTransport } from './models'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); const FIXTURES = { MOCKED_PSBT: Buffer.from( diff --git a/src/background/services/keystone/BitcoinKeystoneWallet.ts b/src/background/services/keystone/BitcoinKeystoneWallet.ts index 296fbe01c..58203c8fe 100644 --- a/src/background/services/keystone/BitcoinKeystoneWallet.ts +++ b/src/background/services/keystone/BitcoinKeystoneWallet.ts @@ -1,4 +1,4 @@ -import { BitcoinProviderAbstract, createPsbt } from '@avalabs/wallets-sdk'; +import { BitcoinProviderAbstract, createPsbt } from '@avalabs/core-wallets-sdk'; import { CryptoPSBT } from '@keystonehq/bc-ur-registry-eth'; import { Psbt, Transaction } from 'bitcoinjs-lib'; diff --git a/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.test.ts b/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.test.ts index 83a1e6f0f..1703e448b 100644 --- a/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.test.ts +++ b/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.test.ts @@ -2,7 +2,7 @@ import { DerivationPath, getLedgerExtendedPublicKey, getPubKeyFromTransport, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { SecretType } from '../../secrets/models'; import { SecretsService } from '../../secrets/SecretsService'; @@ -11,7 +11,7 @@ import { MigrateMissingPublicKeysFromLedgerHandler } from './migrateMissingPubli import { buildRpcCall } from '@src/tests/test-utils'; jest.mock('../../secrets/SecretsService'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); const WALLET_ID = 'wallet_id'; describe('src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.ts', () => { diff --git a/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.ts b/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.ts index 68432cd2d..e72c5d5cd 100644 --- a/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.ts +++ b/src/background/services/ledger/handlers/migrateMissingPublicKeysFromLedger.ts @@ -3,7 +3,7 @@ import { DerivationPath, getLedgerExtendedPublicKey, getPubKeyFromTransport, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { injectable } from 'tsyringe'; diff --git a/src/background/services/messages/handlers/avalanche_signMessage.test.ts b/src/background/services/messages/handlers/avalanche_signMessage.test.ts index 3b947b0d4..dcf33e540 100644 --- a/src/background/services/messages/handlers/avalanche_signMessage.test.ts +++ b/src/background/services/messages/handlers/avalanche_signMessage.test.ts @@ -4,7 +4,7 @@ import { Action } from '@src/background/services/actions/models'; import { utils } from '@avalabs/avalanchejs'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; import { buildRpcCall } from '@src/tests/test-utils'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; jest.mock('@avalabs/avalanchejs'); jest.mock('@src/background/runtime/openApprovalWindow'); diff --git a/src/background/services/network/NetworkService.test.ts b/src/background/services/network/NetworkService.test.ts index 2a68eec52..11bb456f2 100644 --- a/src/background/services/network/NetworkService.test.ts +++ b/src/background/services/network/NetworkService.test.ts @@ -2,7 +2,7 @@ import { ChainId, getChainsAndTokens, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { FetchRequest } from 'ethers'; import { Signal } from 'micro-signals'; @@ -18,12 +18,12 @@ import { FeatureGates } from '../featureFlags/models'; import { runtime } from 'webextension-polyfill'; import { decorateWithCaipId } from '@src/utils/caipConversion'; -jest.mock('@avalabs/wallets-sdk', () => { +jest.mock('@avalabs/core-wallets-sdk', () => { const BitcoinProviderMock = jest.fn(); const JsonRpcBatchInternalMock = jest.fn(); const getDefaultFujiProviderMock = jest.fn(); const getDefaultMainnetProviderMock = jest.fn(); - const actual = jest.requireActual('@avalabs/wallets-sdk'); + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, @@ -48,8 +48,8 @@ jest.mock('@src/utils/network/addGlacierAPIKeyIfNeeded', () => ({ addGlacierAPIKeyIfNeeded: jest.fn(), })); -jest.mock('@avalabs/chains-sdk', () => ({ - ...jest.requireActual('@avalabs/chains-sdk'), +jest.mock('@avalabs/core-chains-sdk', () => ({ + ...jest.requireActual('@avalabs/core-chains-sdk'), getChainsAndTokens: jest.fn(), })); @@ -63,6 +63,7 @@ const mockNetwork = ( chainId: 123, vmName, rpcUrl: 'https://rpcurl.example', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test network token', symbol: 'TNT', @@ -120,6 +121,7 @@ describe('background/services/network/NetworkService', () => { chainId: 123, vmName: NetworkVMType.EVM, rpcUrl: 'https://rpcurl.example', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test network token', symbol: 'TNT', diff --git a/src/background/services/network/NetworkService.ts b/src/background/services/network/NetworkService.ts index 3e3b6ee9e..fcd9ec1be 100644 --- a/src/background/services/network/NetworkService.ts +++ b/src/background/services/network/NetworkService.ts @@ -26,14 +26,14 @@ import { ChainId, NetworkVMType, getChainsAndTokens, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { ReadableSignal, Signal, ValueCache } from 'micro-signals'; import { Avalanche, BitcoinProvider, JsonRpcBatchInternal, -} from '@avalabs/wallets-sdk'; -import { resolve, wait } from '@avalabs/utils-sdk'; +} from '@avalabs/core-wallets-sdk'; +import { resolve, wait } from '@avalabs/core-utils-sdk'; import { Network as EthersNetwork } from 'ethers'; import { SigningResult } from '../wallet/models'; import { getExponentialBackoffDelay } from '@src/utils/exponentialBackoff'; diff --git a/src/background/services/network/events/networksUpdatedEvent.ts b/src/background/services/network/events/networksUpdatedEvent.ts index 9f6fb02de..984f336d5 100644 --- a/src/background/services/network/events/networksUpdatedEvent.ts +++ b/src/background/services/network/events/networksUpdatedEvent.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { ExtensionConnectionEvent, ExtensionEventEmitter, diff --git a/src/background/services/network/handlers/avalanche_setDeveloperMode.ts b/src/background/services/network/handlers/avalanche_setDeveloperMode.ts index 879d8a18a..83b81df7f 100644 --- a/src/background/services/network/handlers/avalanche_setDeveloperMode.ts +++ b/src/background/services/network/handlers/avalanche_setDeveloperMode.ts @@ -6,7 +6,7 @@ import { Action } from '../../actions/models'; import { NetworkService } from '../NetworkService'; import { ethErrors } from 'eth-rpc-errors'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; @injectable() export class AvalancheSetDeveloperModeHandler extends DAppRequestHandler { diff --git a/src/background/services/network/handlers/setDeveloperMode.ts b/src/background/services/network/handlers/setDeveloperMode.ts index 26174adda..5c2f9564a 100644 --- a/src/background/services/network/handlers/setDeveloperMode.ts +++ b/src/background/services/network/handlers/setDeveloperMode.ts @@ -1,6 +1,6 @@ import { injectable } from 'tsyringe'; import { runtime } from 'webextension-polyfill'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; diff --git a/src/background/services/network/handlers/wallet_addEthereumChain.test.ts b/src/background/services/network/handlers/wallet_addEthereumChain.test.ts index 1d576e53f..2832ab468 100644 --- a/src/background/services/network/handlers/wallet_addEthereumChain.test.ts +++ b/src/background/services/network/handlers/wallet_addEthereumChain.test.ts @@ -1,4 +1,4 @@ -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; import { openExtensionNewWindow } from '@src/utils/extensionUtils'; @@ -23,6 +23,7 @@ const mockActiveNetwork: Network = { vmName: NetworkVMType.EVM, subnetExplorerUriId: 'c-chain', rpcUrl: 'https://api.avax.network/ext/bc/C/rpc', + explorerUrl: 'https://explorer.url', networkToken: { name: 'Avalanche', symbol: 'AVAX', diff --git a/src/background/services/network/handlers/wallet_addEthereumChain.ts b/src/background/services/network/handlers/wallet_addEthereumChain.ts index 46957faa8..0cbb5af44 100644 --- a/src/background/services/network/handlers/wallet_addEthereumChain.ts +++ b/src/background/services/network/handlers/wallet_addEthereumChain.ts @@ -1,4 +1,4 @@ -import { ChainList, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainList, NetworkVMType } from '@avalabs/core-chains-sdk'; import { DAppRequestHandler } from '@src/background/connections/dAppConnection/DAppRequestHandler'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; diff --git a/src/background/services/network/handlers/wallet_getEthereumChain.test.ts b/src/background/services/network/handlers/wallet_getEthereumChain.test.ts index 147bc0fcf..e0d4d57b0 100644 --- a/src/background/services/network/handlers/wallet_getEthereumChain.test.ts +++ b/src/background/services/network/handlers/wallet_getEthereumChain.test.ts @@ -1,4 +1,7 @@ -import { BITCOIN_NETWORK, BITCOIN_TEST_NETWORK } from '@avalabs/chains-sdk'; +import { + BITCOIN_NETWORK, + BITCOIN_TEST_NETWORK, +} from '@avalabs/core-chains-sdk'; import { WalletGetEthereumChainHandler, networkToGetEthChainResponse, diff --git a/src/background/services/network/handlers/wallet_getEthereumChain.ts b/src/background/services/network/handlers/wallet_getEthereumChain.ts index 46f77990b..b4791bf58 100644 --- a/src/background/services/network/handlers/wallet_getEthereumChain.ts +++ b/src/background/services/network/handlers/wallet_getEthereumChain.ts @@ -4,7 +4,7 @@ import { injectable } from 'tsyringe'; import { NetworkService } from '../NetworkService'; import { AddEthereumChainParameter } from '../models'; import { ethErrors } from 'eth-rpc-errors'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; export const networkToGetEthChainResponse = ( network: Network diff --git a/src/background/services/network/handlers/wallet_switchEthereumChain.test.ts b/src/background/services/network/handlers/wallet_switchEthereumChain.test.ts index bbf1f41d7..a41729345 100644 --- a/src/background/services/network/handlers/wallet_switchEthereumChain.test.ts +++ b/src/background/services/network/handlers/wallet_switchEthereumChain.test.ts @@ -3,7 +3,7 @@ import { openExtensionNewWindow } from './../../../../utils/extensionUtils'; import { buildRpcCall } from './../../../../tests/test-utils'; import { DAppProviderRequest } from './../../../connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from './../../../connections/middlewares/models'; -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { ethErrors } from 'eth-rpc-errors'; import { container } from 'tsyringe'; import { ActionsService } from '../../actions/ActionsService'; @@ -20,6 +20,7 @@ const mockActiveNetwork: Network = { vmName: NetworkVMType.EVM, subnetExplorerUriId: 'c-chain', rpcUrl: 'https://api.avax.network/ext/bc/C/rpc', + explorerUrl: 'https://explorer.url', networkToken: { name: 'Avalanche', symbol: 'AVAX', @@ -123,6 +124,7 @@ describe('src/background/services/network/handlers/wallet_switchEthereumChain.ts vmName: NetworkVMType.EVM, primaryColor: 'violet', rpcUrl: 'https://api.avax.network/ext/bc/C/rpc', + explorerUrl: 'https://explorer.url', subnetExplorerUriId: 'c-chain', tokens: [], networkToken: { diff --git a/src/background/services/network/models.ts b/src/background/services/network/models.ts index a24d7f250..d89ba4dcf 100644 --- a/src/background/services/network/models.ts +++ b/src/background/services/network/models.ts @@ -1,4 +1,4 @@ -import { Network as _Network } from '@avalabs/chains-sdk'; +import { Network as _Network } from '@avalabs/core-chains-sdk'; import { EnsureDefined, PartialBy } from '@src/background/models'; import { runtime } from 'webextension-polyfill'; diff --git a/src/background/services/network/utils/isAvalancheNetwork.ts b/src/background/services/network/utils/isAvalancheNetwork.ts index 325cb4ceb..efe735731 100644 --- a/src/background/services/network/utils/isAvalancheNetwork.ts +++ b/src/background/services/network/utils/isAvalancheNetwork.ts @@ -1,4 +1,4 @@ -import { Network, ChainId } from '@avalabs/chains-sdk'; +import { Network, ChainId } from '@avalabs/core-chains-sdk'; export function isAvalancheNetwork(network: Network) { return isAvalancheChainId(network.chainId); diff --git a/src/background/services/network/utils/isAvalanchePchainNetwork.test.ts b/src/background/services/network/utils/isAvalanchePchainNetwork.test.ts index de8c3f03f..218c6f447 100644 --- a/src/background/services/network/utils/isAvalanchePchainNetwork.test.ts +++ b/src/background/services/network/utils/isAvalanchePchainNetwork.test.ts @@ -1,4 +1,4 @@ -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { isPchainNetwork, isPchainNetworkId } from './isAvalanchePchainNetwork'; describe('src/background/services/network/utils/isAvalanchePchainNetwork.ts', () => { @@ -7,6 +7,7 @@ describe('src/background/services/network/utils/isAvalanchePchainNetwork.ts', () chainId: 132, vmName: NetworkVMType.EVM, rpcUrl: 'rpcUrl', + explorerUrl: 'https://explorer.url', networkToken: { name: 'networkTokenName', symbol: 'TEST', diff --git a/src/background/services/network/utils/isAvalanchePchainNetwork.ts b/src/background/services/network/utils/isAvalanchePchainNetwork.ts index 10d750c3b..db405e347 100644 --- a/src/background/services/network/utils/isAvalanchePchainNetwork.ts +++ b/src/background/services/network/utils/isAvalanchePchainNetwork.ts @@ -1,4 +1,4 @@ -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; export function isPchainNetwork(network?: Network) { if (!network) { diff --git a/src/background/services/network/utils/isAvalancheXchainNetwork.test.ts b/src/background/services/network/utils/isAvalancheXchainNetwork.test.ts index 4b60d1cc5..c7fab1143 100644 --- a/src/background/services/network/utils/isAvalancheXchainNetwork.test.ts +++ b/src/background/services/network/utils/isAvalancheXchainNetwork.test.ts @@ -1,4 +1,4 @@ -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { isXchainNetwork, isXchainNetworkId } from './isAvalancheXchainNetwork'; describe('src/background/services/network/utils/isAvalancheXchainNetwork.ts', () => { @@ -7,6 +7,7 @@ describe('src/background/services/network/utils/isAvalancheXchainNetwork.ts', () chainId: ChainId.AVALANCHE_TEST_X, vmName: NetworkVMType.EVM, rpcUrl: 'rpcUrl', + explorerUrl: 'https://explorer.url', networkToken: { name: 'networkTokenName', symbol: 'TEST', diff --git a/src/background/services/network/utils/isAvalancheXchainNetwork.ts b/src/background/services/network/utils/isAvalancheXchainNetwork.ts index 1984a22f6..34e8de206 100644 --- a/src/background/services/network/utils/isAvalancheXchainNetwork.ts +++ b/src/background/services/network/utils/isAvalancheXchainNetwork.ts @@ -1,4 +1,4 @@ -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; export function isXchainNetwork(network?: Network) { if (!network) { diff --git a/src/background/services/network/utils/isBitcoinNetwork.ts b/src/background/services/network/utils/isBitcoinNetwork.ts index a6624631a..c33fa1ace 100644 --- a/src/background/services/network/utils/isBitcoinNetwork.ts +++ b/src/background/services/network/utils/isBitcoinNetwork.ts @@ -1,4 +1,4 @@ -import { Network, ChainId } from '@avalabs/chains-sdk'; +import { Network, ChainId } from '@avalabs/core-chains-sdk'; export function isBitcoinNetwork(network: Network) { return isBitcoinChainId(network.chainId); diff --git a/src/background/services/network/utils/isEthereumNetwork.ts b/src/background/services/network/utils/isEthereumNetwork.ts index e05e6692d..9fc74d622 100644 --- a/src/background/services/network/utils/isEthereumNetwork.ts +++ b/src/background/services/network/utils/isEthereumNetwork.ts @@ -1,4 +1,4 @@ -import { Network, ChainId } from '@avalabs/chains-sdk'; +import { Network, ChainId } from '@avalabs/core-chains-sdk'; export function isEthereumNetwork(network: Network) { return isEthereumChainId(network.chainId); diff --git a/src/background/services/networkFee/NetworkFeeService.test.ts b/src/background/services/networkFee/NetworkFeeService.test.ts index 6303427d3..4a090e4ed 100644 --- a/src/background/services/networkFee/NetworkFeeService.test.ts +++ b/src/background/services/networkFee/NetworkFeeService.test.ts @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { NetworkFeeService } from './NetworkFeeService'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; diff --git a/src/background/services/networkFee/NetworkFeeService.ts b/src/background/services/networkFee/NetworkFeeService.ts index 3e75a7f4f..147b86292 100644 --- a/src/background/services/networkFee/NetworkFeeService.ts +++ b/src/background/services/networkFee/NetworkFeeService.ts @@ -1,8 +1,8 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { BitcoinProviderAbstract, JsonRpcBatchInternal, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { isSwimmer } from '@src/utils/isSwimmerNetwork'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; import { singleton } from 'tsyringe'; diff --git a/src/background/services/onboarding/finalizeOnboarding.test.ts b/src/background/services/onboarding/finalizeOnboarding.test.ts index c23fdae37..77a75ccad 100644 --- a/src/background/services/onboarding/finalizeOnboarding.test.ts +++ b/src/background/services/onboarding/finalizeOnboarding.test.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { finalizeOnboarding } from './finalizeOnboarding'; import { OnboardingService } from './OnboardingService'; import { LockService } from '../lock/LockService'; @@ -9,8 +9,8 @@ import { addXPChainToFavoriteIfNeeded } from './utils/addXPChainsToFavoriteIfNee jest.mock('./utils/addXPChainsToFavoriteIfNeeded'); -jest.mock('@avalabs/wallets-sdk', () => { - const actual = jest.requireActual('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk', () => { + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, diff --git a/src/background/services/onboarding/finalizeOnboarding.ts b/src/background/services/onboarding/finalizeOnboarding.ts index 9c86b333b..0f7789729 100644 --- a/src/background/services/onboarding/finalizeOnboarding.ts +++ b/src/background/services/onboarding/finalizeOnboarding.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { NetworkService } from '../network/NetworkService'; import { AccountsService } from '../accounts/AccountsService'; import { OnboardingService } from './OnboardingService'; diff --git a/src/background/services/onboarding/handlers/keystoneOnboardingHandler.test.ts b/src/background/services/onboarding/handlers/keystoneOnboardingHandler.test.ts index 7863a7dc9..9cdc8ca23 100644 --- a/src/background/services/onboarding/handlers/keystoneOnboardingHandler.test.ts +++ b/src/background/services/onboarding/handlers/keystoneOnboardingHandler.test.ts @@ -3,7 +3,7 @@ import { Avalanche, DerivationPath, getXpubFromMnemonic, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { OnboardingService } from '../OnboardingService'; import { StorageService } from '../../storage/StorageService'; @@ -19,8 +19,8 @@ import { addXPChainToFavoriteIfNeeded } from '../utils/addXPChainsToFavoriteIfNe jest.mock('../utils/addXPChainsToFavoriteIfNeeded'); -jest.mock('@avalabs/wallets-sdk', () => { - const actual = jest.requireActual('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk', () => { + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, diff --git a/src/background/services/onboarding/handlers/keystoneOnboardingHandler.ts b/src/background/services/onboarding/handlers/keystoneOnboardingHandler.ts index 2742c6b07..d473ab810 100644 --- a/src/background/services/onboarding/handlers/keystoneOnboardingHandler.ts +++ b/src/background/services/onboarding/handlers/keystoneOnboardingHandler.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SecretType } from '../../secrets/models'; import { SettingsService } from '../../settings/SettingsService'; import { StorageService } from '../../storage/StorageService'; diff --git a/src/background/services/onboarding/handlers/ledgerOnboardingHandler.test.ts b/src/background/services/onboarding/handlers/ledgerOnboardingHandler.test.ts index 9c6bf4d2c..fdef9947a 100644 --- a/src/background/services/onboarding/handlers/ledgerOnboardingHandler.test.ts +++ b/src/background/services/onboarding/handlers/ledgerOnboardingHandler.test.ts @@ -2,7 +2,7 @@ import { Avalanche, DerivationPath, getXpubFromMnemonic, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { AccountsService } from '../../accounts/AccountsService'; import { AnalyticsService } from '../../analytics/AnalyticsService'; @@ -21,8 +21,8 @@ jest.mock('../utils/addXPChainsToFavoriteIfNeeded'); const WALLET_ID = 'wallet-id'; -jest.mock('@avalabs/wallets-sdk', () => { - const actual = jest.requireActual('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk', () => { + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, diff --git a/src/background/services/onboarding/handlers/ledgerOnboardingHandler.ts b/src/background/services/onboarding/handlers/ledgerOnboardingHandler.ts index 74320c596..bd37516c5 100644 --- a/src/background/services/onboarding/handlers/ledgerOnboardingHandler.ts +++ b/src/background/services/onboarding/handlers/ledgerOnboardingHandler.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SecretType } from '../../secrets/models'; import { SettingsService } from '../../settings/SettingsService'; import { StorageService } from '../../storage/StorageService'; diff --git a/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.test.ts b/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.test.ts index b897b0630..0f9b27cff 100644 --- a/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.test.ts +++ b/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.test.ts @@ -3,7 +3,7 @@ import { Avalanche, DerivationPath, getXpubFromMnemonic, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { MnemonicOnboardingHandler } from './mnemonicOnboardingHandler'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { OnboardingService } from '../OnboardingService'; @@ -19,8 +19,8 @@ import { addXPChainToFavoriteIfNeeded } from '../utils/addXPChainsToFavoriteIfNe jest.mock('../utils/addXPChainsToFavoriteIfNeeded'); -jest.mock('@avalabs/wallets-sdk', () => { - const actual = jest.requireActual('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk', () => { + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, diff --git a/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.ts b/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.ts index 0730d5985..c69f33302 100644 --- a/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.ts +++ b/src/background/services/onboarding/handlers/mnemonicOnboardingHandler.ts @@ -9,7 +9,7 @@ import { Avalanche, DerivationPath, getXpubFromMnemonic, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { AccountsService } from '../../accounts/AccountsService'; import { OnboardingService } from '../OnboardingService'; import { LockService } from '../../lock/LockService'; diff --git a/src/background/services/onboarding/handlers/seedlessOnboardingHandler.test.ts b/src/background/services/onboarding/handlers/seedlessOnboardingHandler.test.ts index 999b90a4f..9def74837 100644 --- a/src/background/services/onboarding/handlers/seedlessOnboardingHandler.test.ts +++ b/src/background/services/onboarding/handlers/seedlessOnboardingHandler.test.ts @@ -1,5 +1,5 @@ import { SecretType } from '../../secrets/models'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { OnboardingService } from '../OnboardingService'; import { StorageService } from '../../storage/StorageService'; @@ -34,8 +34,8 @@ const mockrMemorySession = { jest.mock('../../seedless/SeedlessWallet'); -jest.mock('@avalabs/wallets-sdk', () => { - const actual = jest.requireActual('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk', () => { + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, diff --git a/src/background/services/onboarding/handlers/seedlessOnboardingHandler.ts b/src/background/services/onboarding/handlers/seedlessOnboardingHandler.ts index e79ef30ee..4e3c15c4b 100644 --- a/src/background/services/onboarding/handlers/seedlessOnboardingHandler.ts +++ b/src/background/services/onboarding/handlers/seedlessOnboardingHandler.ts @@ -8,7 +8,7 @@ import { injectable } from 'tsyringe'; import { SecretType } from '../../secrets/models'; import { SeedlessWallet } from '../../seedless/SeedlessWallet'; import { SeedlessAuthProvider } from '../../wallet/models'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SecretsService } from '../../secrets/SecretsService'; import { NetworkService } from '../../network/NetworkService'; import { WalletService } from '../../wallet/WalletService'; diff --git a/src/background/services/onboarding/startOnboarding.test.ts b/src/background/services/onboarding/startOnboarding.test.ts index a2519b0ad..6a6aaefc9 100644 --- a/src/background/services/onboarding/startOnboarding.test.ts +++ b/src/background/services/onboarding/startOnboarding.test.ts @@ -3,8 +3,8 @@ import { SettingsService } from '../settings/SettingsService'; import { AnalyticsService } from '../analytics/AnalyticsService'; import { StorageService } from '../storage/StorageService'; -jest.mock('@avalabs/wallets-sdk', () => ({ - ...jest.requireActual('@avalabs/wallets-sdk'), +jest.mock('@avalabs/core-wallets-sdk', () => ({ + ...jest.requireActual('@avalabs/core-wallets-sdk'), getXpubFromMnemonic: jest.fn(), Avalanche: { getXpubFromMnemonic: jest.fn(), diff --git a/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.test.ts b/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.test.ts index c88f5f09d..e3fffaea8 100644 --- a/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.test.ts +++ b/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.test.ts @@ -1,5 +1,5 @@ import { BN } from 'bn.js'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { container } from 'tsyringe'; import { addXPChainToFavoriteIfNeeded } from './addXPChainsToFavoriteIfNeeded'; diff --git a/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.ts b/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.ts index ed18593d7..fa5f4bd3d 100644 --- a/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.ts +++ b/src/background/services/onboarding/utils/addXPChainsToFavoriteIfNeeded.ts @@ -1,6 +1,6 @@ import { BalanceAggregatorService } from '../../balances/BalanceAggregatorService'; import { NetworkService } from '../../network/NetworkService'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { Balances } from '../../balances/models'; import { PrimaryAccount } from '../../accounts/models'; import BN from 'bn.js'; diff --git a/src/background/services/secrets/SecretsService.test.ts b/src/background/services/secrets/SecretsService.test.ts index c5929f807..6b5d7465f 100644 --- a/src/background/services/secrets/SecretsService.test.ts +++ b/src/background/services/secrets/SecretsService.test.ts @@ -1,5 +1,5 @@ import { container } from 'tsyringe'; -import { Avalanche, DerivationPath } from '@avalabs/wallets-sdk'; +import { Avalanche, DerivationPath } from '@avalabs/core-wallets-sdk'; import { CallbackManager } from '@src/background/runtime/CallbackManager'; @@ -18,7 +18,7 @@ import { SecretsService } from './SecretsService'; jest.mock('../storage/StorageService'); jest.mock('../network/NetworkService'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('tsyringe', () => { const tsyringe = jest.requireActual('tsyringe'); diff --git a/src/background/services/secrets/models.ts b/src/background/services/secrets/models.ts index 281b1c8d7..4679c7e77 100644 --- a/src/background/services/secrets/models.ts +++ b/src/background/services/secrets/models.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import { diff --git a/src/background/services/seedless/SeedlessBtcSigner.test.ts b/src/background/services/seedless/SeedlessBtcSigner.test.ts index 0aec83edf..418c11e4f 100644 --- a/src/background/services/seedless/SeedlessBtcSigner.test.ts +++ b/src/background/services/seedless/SeedlessBtcSigner.test.ts @@ -1,11 +1,11 @@ -import { strip0x } from '@avalabs/utils-sdk'; -import { getBtcAddressFromPubKey } from '@avalabs/wallets-sdk'; +import { strip0x } from '@avalabs/core-utils-sdk'; +import { getBtcAddressFromPubKey } from '@avalabs/core-wallets-sdk'; import { networks, payments } from 'bitcoinjs-lib'; import { evmKey } from './fixtures/rawKeys'; import { SeedlessBtcSigner } from './SeedlessBtcSigner'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); describe('src/background/services/seedless/SeedlessWallet', () => { it('validates the provided public key', () => { diff --git a/src/background/services/seedless/SeedlessBtcSigner.ts b/src/background/services/seedless/SeedlessBtcSigner.ts index a8b7d378e..5c3986545 100644 --- a/src/background/services/seedless/SeedlessBtcSigner.ts +++ b/src/background/services/seedless/SeedlessBtcSigner.ts @@ -1,8 +1,8 @@ -import { strip0x } from '@avalabs/utils-sdk'; +import { strip0x } from '@avalabs/core-utils-sdk'; import { BitcoinInputUTXO, getBtcAddressFromPubKey, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { SignerSession } from '@cubist-labs/cubesigner-sdk'; import { Network, Psbt, SignerAsync, payments } from 'bitcoinjs-lib'; diff --git a/src/background/services/seedless/SeedlessWallet.test.ts b/src/background/services/seedless/SeedlessWallet.test.ts index 5b4810863..fce10715e 100644 --- a/src/background/services/seedless/SeedlessWallet.test.ts +++ b/src/background/services/seedless/SeedlessWallet.test.ts @@ -1,12 +1,12 @@ import { utils } from '@avalabs/avalanchejs'; -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; -import { strip0x } from '@avalabs/utils-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; +import { strip0x } from '@avalabs/core-utils-sdk'; import { Avalanche, BitcoinProvider, getEvmAddressFromPubKey, createPsbt, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import * as cs from '@cubist-labs/cubesigner-sdk'; import { Signer } from '@cubist-labs/cubesigner-sdk-ethers-v6'; import { networks } from 'bitcoinjs-lib'; @@ -44,7 +44,7 @@ import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork' jest.mock('@cubist-labs/cubesigner-sdk'); jest.mock('@cubist-labs/cubesigner-sdk-ethers-v6'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('../network/NetworkService'); jest.mock('./SeedlessBtcSigner'); jest.mock('./SeedlessMfaService'); diff --git a/src/background/services/seedless/SeedlessWallet.ts b/src/background/services/seedless/SeedlessWallet.ts index 5fab49800..29d91f353 100644 --- a/src/background/services/seedless/SeedlessWallet.ts +++ b/src/background/services/seedless/SeedlessWallet.ts @@ -1,6 +1,6 @@ import * as cs from '@cubist-labs/cubesigner-sdk'; import { Signer } from '@cubist-labs/cubesigner-sdk-ethers-v6'; -import { strip0x } from '@avalabs/utils-sdk'; +import { strip0x } from '@avalabs/core-utils-sdk'; import { JsonRpcApiProvider, TransactionRequest, @@ -15,7 +15,7 @@ import { BitcoinProvider, createPsbt, getEvmAddressFromPubKey, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { sha256 } from '@noble/hashes/sha256'; import { utils } from '@avalabs/avalanchejs'; import { diff --git a/src/background/services/settings/SettingService.test.ts b/src/background/services/settings/SettingService.test.ts index 1278e419f..ee3b29ebf 100644 --- a/src/background/services/settings/SettingService.test.ts +++ b/src/background/services/settings/SettingService.test.ts @@ -3,7 +3,7 @@ import { NetworkContractToken, NetworkToken, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { SettingsService } from './SettingsService'; import { AnalyticsConsent, @@ -47,6 +47,7 @@ describe('background/services/settings/SettingsService.ts', () => { chainId: 123, vmName: NetworkVMType.EVM, rpcUrl: 'test.chain.com/rpc', + explorerUrl: 'https://explorer.url', networkToken: testNetworkToken, logoUri: 'test.chain.com/logo', primaryColor: 'orange', diff --git a/src/background/services/settings/SettingsService.ts b/src/background/services/settings/SettingsService.ts index 7c3df5709..3775f5f73 100644 --- a/src/background/services/settings/SettingsService.ts +++ b/src/background/services/settings/SettingsService.ts @@ -1,4 +1,4 @@ -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; import { OnLock, OnStorageReady, diff --git a/src/background/services/settings/events/wallet_watchAsset.ts b/src/background/services/settings/events/wallet_watchAsset.ts index 9d3700ef4..eaf0e3c47 100644 --- a/src/background/services/settings/events/wallet_watchAsset.ts +++ b/src/background/services/settings/events/wallet_watchAsset.ts @@ -1,5 +1,5 @@ import { SettingsService } from './../SettingsService'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; import { injectable } from 'tsyringe'; diff --git a/src/background/services/settings/handlers/addCustomToken.ts b/src/background/services/settings/handlers/addCustomToken.ts index 51dbb777a..677b450b4 100644 --- a/src/background/services/settings/handlers/addCustomToken.ts +++ b/src/background/services/settings/handlers/addCustomToken.ts @@ -1,4 +1,4 @@ -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { injectable } from 'tsyringe'; diff --git a/src/background/services/settings/handlers/getTokenDataByAddress.ts b/src/background/services/settings/handlers/getTokenDataByAddress.ts index 844f298cc..dc4d21594 100644 --- a/src/background/services/settings/handlers/getTokenDataByAddress.ts +++ b/src/background/services/settings/handlers/getTokenDataByAddress.ts @@ -1,4 +1,4 @@ -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { injectable } from 'tsyringe'; diff --git a/src/background/services/settings/models.ts b/src/background/services/settings/models.ts index 68359d5a1..e0ae0811a 100644 --- a/src/background/services/settings/models.ts +++ b/src/background/services/settings/models.ts @@ -1,4 +1,4 @@ -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; import { EnsureDefined } from '@src/background/models'; export enum ThemeVariant { diff --git a/src/background/services/storage/schemaMigrations/migrations/network_v2.ts b/src/background/services/storage/schemaMigrations/migrations/network_v2.ts index 78fd6c37a..a0ac033c0 100644 --- a/src/background/services/storage/schemaMigrations/migrations/network_v2.ts +++ b/src/background/services/storage/schemaMigrations/migrations/network_v2.ts @@ -1,5 +1,5 @@ import Joi from 'joi'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; const VERSION = 2; enum OldChainIDs { diff --git a/src/background/services/storage/schemaMigrations/migrations/network_v3.ts b/src/background/services/storage/schemaMigrations/migrations/network_v3.ts index 9b3a2ac67..d8897b2f6 100644 --- a/src/background/services/storage/schemaMigrations/migrations/network_v3.ts +++ b/src/background/services/storage/schemaMigrations/migrations/network_v3.ts @@ -1,5 +1,5 @@ import Joi from 'joi'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; const VERSION = 3; type PreviousSchema = { diff --git a/src/background/services/storage/schemaMigrations/migrations/network_v4.ts b/src/background/services/storage/schemaMigrations/migrations/network_v4.ts index a26b6f6e4..a569f05ef 100644 --- a/src/background/services/storage/schemaMigrations/migrations/network_v4.ts +++ b/src/background/services/storage/schemaMigrations/migrations/network_v4.ts @@ -1,5 +1,5 @@ import Joi from 'joi'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; import { runtime } from 'webextension-polyfill'; import { chainIdToCaip } from '@src/utils/caipConversion'; diff --git a/src/background/services/storage/schemaMigrations/migrations/settings_v2.test.ts b/src/background/services/storage/schemaMigrations/migrations/settings_v2.test.ts index 3fafefd16..e68a6e062 100644 --- a/src/background/services/storage/schemaMigrations/migrations/settings_v2.test.ts +++ b/src/background/services/storage/schemaMigrations/migrations/settings_v2.test.ts @@ -1,5 +1,5 @@ import Joi from 'joi'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { AnalyticsConsent, diff --git a/src/background/services/storage/schemaMigrations/migrations/settings_v2.ts b/src/background/services/storage/schemaMigrations/migrations/settings_v2.ts index feb49c813..dcfde7566 100644 --- a/src/background/services/storage/schemaMigrations/migrations/settings_v2.ts +++ b/src/background/services/storage/schemaMigrations/migrations/settings_v2.ts @@ -6,7 +6,7 @@ import { ThemeVariant, TokensVisibility, } from '@src/background/services/settings/models'; -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; const VERSION = 2; diff --git a/src/background/services/storage/schemaMigrations/migrations/wallet_v2.test.ts b/src/background/services/storage/schemaMigrations/migrations/wallet_v2.test.ts index e6bab25f4..ef54d6dd3 100644 --- a/src/background/services/storage/schemaMigrations/migrations/wallet_v2.test.ts +++ b/src/background/services/storage/schemaMigrations/migrations/wallet_v2.test.ts @@ -1,7 +1,7 @@ import wallet_v2 from './wallet_v2'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import Joi from 'joi'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); describe('background/services/storage/schemaMigrations/migrations/wallet_v2', () => { const validInputMnemonic = { diff --git a/src/background/services/storage/schemaMigrations/migrations/wallet_v2.ts b/src/background/services/storage/schemaMigrations/migrations/wallet_v2.ts index f3b4b4110..192bb9e77 100644 --- a/src/background/services/storage/schemaMigrations/migrations/wallet_v2.ts +++ b/src/background/services/storage/schemaMigrations/migrations/wallet_v2.ts @@ -1,6 +1,6 @@ import Joi from 'joi'; import { ImportType } from '@src/background/services/accounts/models'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; const VERSION = 2; diff --git a/src/background/services/storage/schemaMigrations/migrations/wallet_v3.test.ts b/src/background/services/storage/schemaMigrations/migrations/wallet_v3.test.ts index e6c2d8326..768095013 100644 --- a/src/background/services/storage/schemaMigrations/migrations/wallet_v3.test.ts +++ b/src/background/services/storage/schemaMigrations/migrations/wallet_v3.test.ts @@ -1,9 +1,9 @@ import wallet_v3 from './wallet_v3'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import Joi from 'joi'; import getDerivationPath from '@src/background/services/wallet/utils/getDerivationPath'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('@src/background/services/wallet/utils/getDerivationPath'); describe('background/services/storage/schemaMigrations/migrations/wallet_v3', () => { diff --git a/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.test.ts b/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.test.ts index 50a615260..59cdd1b88 100644 --- a/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.test.ts +++ b/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.test.ts @@ -1,10 +1,10 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import Joi from 'joi'; import wallet_v4 from './wallet_v4'; import { ImportType } from '@src/background/services/accounts/models'; import { SecretType } from '@src/background/services/secrets/models'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('@src/background/services/wallet/utils/getDerivationPath'); describe('background/services/storage/schemaMigrations/migrations/wallet_v4', () => { diff --git a/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.ts b/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.ts index f8e892535..81ecec799 100644 --- a/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.ts +++ b/src/background/services/storage/schemaMigrations/migrations/wallet_v4/wallet_v4.ts @@ -1,5 +1,5 @@ import Joi from 'joi'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { WALLET_ID } from '../../models'; import { getSecretsType } from './utils/getSecretsType'; import { SecretType } from '@src/background/services/secrets/models'; diff --git a/src/background/services/tokens/TokenManagerService.ts b/src/background/services/tokens/TokenManagerService.ts index fd791997b..5606187f3 100644 --- a/src/background/services/tokens/TokenManagerService.ts +++ b/src/background/services/tokens/TokenManagerService.ts @@ -2,13 +2,13 @@ import { Network, NetworkContractToken, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { ethers } from 'ethers'; import { singleton } from 'tsyringe'; import { NetworkService } from '../network/NetworkService'; import { SettingsService } from '../settings/SettingsService'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import xss from 'xss'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; import { EnsureDefined } from '@src/background/models'; diff --git a/src/background/services/tokens/handlers/getTokenList.ts b/src/background/services/tokens/handlers/getTokenList.ts index d8afb6c24..f4501a253 100644 --- a/src/background/services/tokens/handlers/getTokenList.ts +++ b/src/background/services/tokens/handlers/getTokenList.ts @@ -1,4 +1,4 @@ -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { resolve } from '@src/utils/promiseResolver'; diff --git a/src/background/services/tokens/utils/isTokenSupported.ts b/src/background/services/tokens/utils/isTokenSupported.ts index 77b54acdb..347c441ea 100644 --- a/src/background/services/tokens/utils/isTokenSupported.ts +++ b/src/background/services/tokens/utils/isTokenSupported.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { SettingsState } from '../../settings/models'; export async function isTokenSupported( diff --git a/src/background/services/unifiedBridge/UnifiedBridgeService.ts b/src/background/services/unifiedBridge/UnifiedBridgeService.ts index bc2fc1bde..1ecdd5884 100644 --- a/src/background/services/unifiedBridge/UnifiedBridgeService.ts +++ b/src/background/services/unifiedBridge/UnifiedBridgeService.ts @@ -44,7 +44,7 @@ import sentryCaptureException, { } from '@src/monitoring/sentryCaptureException'; import { FeeRate } from '../networkFee/models'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; @singleton() export class UnifiedBridgeService implements OnStorageReady { diff --git a/src/background/services/wallet/WalletService.test.ts b/src/background/services/wallet/WalletService.test.ts index 4e646a123..bcd07067f 100644 --- a/src/background/services/wallet/WalletService.test.ts +++ b/src/background/services/wallet/WalletService.test.ts @@ -14,7 +14,10 @@ import { AvalancheTransactionRequest, WalletEvents, } from './models'; -import { AVALANCHE_XP_TEST_NETWORK, NetworkVMType } from '@avalabs/chains-sdk'; +import { + AVALANCHE_XP_TEST_NETWORK, + NetworkVMType, +} from '@avalabs/core-chains-sdk'; import { BitcoinLedgerWallet, BitcoinWallet, @@ -30,7 +33,7 @@ import { Avalanche, createWalletPolicy, LedgerSigner, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { prepareBtcTxForLedger } from './utils/prepareBtcTxForLedger'; import { LedgerTransport } from '../ledger/LedgerTransport'; import getDerivationPath from './utils/getDerivationPath'; @@ -62,7 +65,7 @@ jest.mock('../keystone/KeystoneService'); jest.mock('../lock/LockService'); jest.mock('./utils/prepareBtcTxForLedger'); jest.mock('./utils/ensureMessageFormatIsValid'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('./utils/getDerivationPath'); jest.mock('../seedless/SeedlessWallet'); jest.mock('../seedless/SeedlessSessionManager'); diff --git a/src/background/services/wallet/WalletService.ts b/src/background/services/wallet/WalletService.ts index 47cf46807..b01677165 100644 --- a/src/background/services/wallet/WalletService.ts +++ b/src/background/services/wallet/WalletService.ts @@ -32,9 +32,9 @@ import { getWalletFromMnemonic, JsonRpcBatchInternal, LedgerSigner, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { NetworkService } from '../network/NetworkService'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { OnLock, OnUnlock } from '@src/background/runtime/lifecycleCallbacks'; import { personalSign, diff --git a/src/background/services/wallet/handlers/avalanche_sendTransaction.test.ts b/src/background/services/wallet/handlers/avalanche_sendTransaction.test.ts index 54b88d344..92841bb4a 100644 --- a/src/background/services/wallet/handlers/avalanche_sendTransaction.test.ts +++ b/src/background/services/wallet/handlers/avalanche_sendTransaction.test.ts @@ -10,15 +10,15 @@ import { } from '@avalabs/avalanchejs'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; import { Action } from '../../actions/models'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import getProvidedUtxos from '../utils/getProvidedUtxos'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { encryptAnalyticsData } from '../../analytics/utils/encryptAnalyticsData'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; import { buildRpcCall } from '@src/tests/test-utils'; jest.mock('@avalabs/avalanchejs'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('../utils/getProvidedUtxos'); jest.mock('../../analytics/utils/encryptAnalyticsData'); jest.mock('@src/background/runtime/openApprovalWindow'); diff --git a/src/background/services/wallet/handlers/avalanche_sendTransaction.ts b/src/background/services/wallet/handlers/avalanche_sendTransaction.ts index f369fc3ad..1c4d87030 100644 --- a/src/background/services/wallet/handlers/avalanche_sendTransaction.ts +++ b/src/background/services/wallet/handlers/avalanche_sendTransaction.ts @@ -19,10 +19,10 @@ import { NetworkService } from '@src/background/services/network/NetworkService' import { ethErrors } from 'eth-rpc-errors'; import { AccountsService } from '../../accounts/AccountsService'; import getAddressByVM from '../utils/getAddressByVM'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import getProvidedUtxos from '../utils/getProvidedUtxos'; import { AnalyticsServicePosthog } from '../../analytics/AnalyticsServicePosthog'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; type TxParams = { diff --git a/src/background/services/wallet/handlers/avalanche_signTransaction.test.ts b/src/background/services/wallet/handlers/avalanche_signTransaction.test.ts index 0c416673c..e3f6e480c 100644 --- a/src/background/services/wallet/handlers/avalanche_signTransaction.test.ts +++ b/src/background/services/wallet/handlers/avalanche_signTransaction.test.ts @@ -5,7 +5,7 @@ import { UnsignedTx, avaxSerial, } from '@avalabs/avalanchejs'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { ethErrors } from 'eth-rpc-errors'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; import { AvalancheSignTransactionHandler } from './avalanche_signTransaction'; @@ -16,7 +16,7 @@ import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; import { buildRpcCall } from '@src/tests/test-utils'; jest.mock('@avalabs/avalanchejs'); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('../utils/getProvidedUtxos'); jest.mock('@src/background/runtime/openApprovalWindow'); diff --git a/src/background/services/wallet/handlers/avalanche_signTransaction.ts b/src/background/services/wallet/handlers/avalanche_signTransaction.ts index 8e387b01a..42809dbc4 100644 --- a/src/background/services/wallet/handlers/avalanche_signTransaction.ts +++ b/src/background/services/wallet/handlers/avalanche_signTransaction.ts @@ -17,7 +17,7 @@ import { NetworkService } from '@src/background/services/network/NetworkService' import { ethErrors } from 'eth-rpc-errors'; import { AccountsService } from '../../accounts/AccountsService'; import getAddressByVM from '../utils/getAddressByVM'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import getProvidedUtxos from '../utils/getProvidedUtxos'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; diff --git a/src/background/services/wallet/handlers/bitcoin_sendTransaction.test.ts b/src/background/services/wallet/handlers/bitcoin_sendTransaction.test.ts index fb26ac484..f938a7e6b 100644 --- a/src/background/services/wallet/handlers/bitcoin_sendTransaction.test.ts +++ b/src/background/services/wallet/handlers/bitcoin_sendTransaction.test.ts @@ -5,14 +5,14 @@ import { isBtcAddressInNetwork } from '@src/utils/isBtcAddressInNetwork'; import { DEFERRED_RESPONSE } from '@src/background/connections/middlewares/models'; import { Action } from '@src/background/services/actions/models'; import { AccountType } from '../../accounts/models'; -import { ChainId, NetworkVMType } from '@avalabs/chains-sdk'; -import { createTransferTx } from '@avalabs/wallets-sdk'; +import { ChainId, NetworkVMType } from '@avalabs/core-chains-sdk'; +import { createTransferTx } from '@avalabs/core-wallets-sdk'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; import { buildRpcCall } from '@src/tests/test-utils'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('@src/utils/isBtcAddressInNetwork'); jest.mock('@src/background/runtime/openApprovalWindow'); jest.mock('@src/utils/network/getProviderForNetwork'); diff --git a/src/background/services/wallet/handlers/bitcoin_sendTransaction.ts b/src/background/services/wallet/handlers/bitcoin_sendTransaction.ts index 3f9b47703..a57f58428 100644 --- a/src/background/services/wallet/handlers/bitcoin_sendTransaction.ts +++ b/src/background/services/wallet/handlers/bitcoin_sendTransaction.ts @@ -11,10 +11,10 @@ import { NetworkService } from '@src/background/services/network/NetworkService' import { ethErrors } from 'eth-rpc-errors'; import { DisplayData_BitcoinSendTx } from '@src/background/services/wallet/handlers/models'; import { AccountsService } from '@src/background/services/accounts/AccountsService'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { BalanceAggregatorService } from '@src/background/services/balances/BalanceAggregatorService'; import { Account, WalletConnectAccount } from '../../accounts/models'; -import { BitcoinProvider } from '@avalabs/wallets-sdk'; +import { BitcoinProvider } from '@avalabs/core-wallets-sdk'; import { TokenWithBalanceBTC } from '../../balances/models'; import { BtcSendOptions } from '@src/pages/Send/models'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; @@ -26,7 +26,7 @@ import { validateBtcSend, } from '@src/utils/send/btcSendUtils'; import { SendErrorMessage } from '@src/utils/send/models'; -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import { openApprovalWindow } from '@src/background/runtime/openApprovalWindow'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidity.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidity.ts index 147b6cd76..d121bb55c 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidity.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidity.ts @@ -1,7 +1,7 @@ import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; import { findToken } from '../../../../../../utils/findToken'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { bigintToBig } from '@src/utils/bigintToBig'; import { EthSendTransactionParamsWithGas, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidityAVAX.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidityAVAX.ts index 81e8377dc..027ad1b05 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidityAVAX.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/addLiquidityAVAX.ts @@ -6,7 +6,7 @@ import { } from '@src/background/services/wallet/handlers/eth_sendTransaction/models'; import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { bigintToBig } from '@src/utils/bigintToBig'; import { TransactionDescription } from 'ethers'; import { findToken } from '../../../../../../utils/findToken'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/approve.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/approve.ts index 8460e97d0..b656b5dfa 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/approve.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/approve.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { EthSendTransactionParamsWithGas, TransactionDisplayValues, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/models.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/models.ts index 0978f7f76..eb7fcb723 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/models.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/models.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { EthSendTransactionParamsWithGas, TransactionDisplayValues, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/parseWithERC20Abi.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/parseWithERC20Abi.ts index 408f49921..cbe498a17 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/parseWithERC20Abi.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/parseWithERC20Abi.ts @@ -5,7 +5,7 @@ import { } from '@src/background/services/wallet/handlers/eth_sendTransaction/models'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; import { ethers } from 'ethers'; -import { NetworkContractToken } from '@avalabs/chains-sdk'; +import { NetworkContractToken } from '@avalabs/core-chains-sdk'; export function parseWithERC20Abi( tx: EthSendTransactionParamsWithGas, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/simpleSwap.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/simpleSwap.ts index b70d026d4..35d35fdd9 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/simpleSwap.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/simpleSwap.ts @@ -1,7 +1,7 @@ import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; import { findToken } from '../../../../../../utils/findToken'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TokenType } from '@src/background/services/balances/models'; import { TransactionDescription } from 'ethers'; import { diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapAvaxForExactTokens.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapAvaxForExactTokens.ts index 7f6f66713..685930de3 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapAvaxForExactTokens.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapAvaxForExactTokens.ts @@ -7,7 +7,7 @@ import { import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; import { findToken } from '../../../../../../utils/findToken'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TransactionDescription } from 'ethers'; import { bigintToBig } from '@src/utils/bigintToBig'; import { TokenType } from '@src/background/services/balances/models'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForAVAX.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForAVAX.ts index 821ce64d1..e861bffc3 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForAVAX.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForAVAX.ts @@ -7,7 +7,7 @@ import { import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; import { findToken } from '../../../../../../utils/findToken'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TransactionDescription } from 'ethers'; import { bigintToBig } from '@src/utils/bigintToBig'; import { TokenType } from '@src/background/services/balances/models'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForTokens.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForTokens.ts index af0cb953a..206103e3d 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForTokens.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/swapExactTokensForTokens.ts @@ -7,7 +7,7 @@ import { import { ContractCall, ContractParser } from './models'; import { parseBasicDisplayValues } from './utils/parseBasicDisplayValues'; import { findToken } from '../../../../../../utils/findToken'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TransactionDescription } from 'ethers'; import { bigintToBig } from '@src/utils/bigintToBig'; import { TokenType } from '@src/background/services/balances/models'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/helpers.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/helpers.ts index 716c8e055..e1694267d 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/helpers.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/helpers.ts @@ -1,4 +1,4 @@ -import { bigToLocaleString, bnToBig, hexToBN } from '@avalabs/utils-sdk'; +import { bigToLocaleString, bnToBig, hexToBN } from '@avalabs/core-utils-sdk'; import { NetworkTokenWithBalance, TokenWithBalanceERC20, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/parseBasicDisplayValues.ts b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/parseBasicDisplayValues.ts index 1c5de303a..0cd2830e0 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/parseBasicDisplayValues.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/contracts/contractParsers/utils/parseBasicDisplayValues.ts @@ -1,5 +1,5 @@ import { calculateGasAndFees } from '@src/utils/calculateGasAndFees'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { TransactionDescription } from 'ethers'; import { EthSendTransactionParamsWithGas, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.test.ts b/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.test.ts index 9b6f31aea..5c74ea948 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.test.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.test.ts @@ -15,8 +15,8 @@ import { } from './models'; import { ethErrors } from 'eth-rpc-errors'; import { AccountType } from '@src/background/services/accounts/models'; -import { NetworkContractToken, NetworkVMType } from '@avalabs/chains-sdk'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { NetworkContractToken, NetworkVMType } from '@avalabs/core-chains-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { isBitcoinNetwork } from '@src/background/services/network/utils/isBitcoinNetwork'; import getTargetNetworkForTx from './utils/getTargetNetworkForTx'; import { encryptAnalyticsData } from '@src/background/services/analytics/utils/encryptAnalyticsData'; @@ -190,6 +190,7 @@ describe('background/services/wallet/handlers/eth_sendTransaction/eth_sendTransa vmName: NetworkVMType.EVM, chainName: '', rpcUrl: '', + explorerUrl: 'https://explorer.url', logoUri: '', networkToken: { name: 'Ethereum', diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.ts b/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.ts index 09b6ccd92..7ef1011e0 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/eth_sendTransaction.ts @@ -30,9 +30,9 @@ import { parseBasicDisplayValues } from './contracts/contractParsers/utils/parse import browser from 'webextension-polyfill'; import { getExplorerAddressByNetwork } from '@src/utils/getExplorerAddress'; import { txToCustomEvmTx } from './utils/txToCustomEvmTx'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { WalletService } from '@src/background/services/wallet/WalletService'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { AnalyticsServicePosthog } from '@src/background/services/analytics/AnalyticsServicePosthog'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; import { BlockaidService } from '@src/background/services/blockaid/BlockaidService'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.test.ts b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.test.ts index e1a71171f..aafb67fa8 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.test.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.test.ts @@ -1,5 +1,5 @@ import { jest } from '@jest/globals'; -import { ChainId, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, NetworkVMType } from '@avalabs/core-chains-sdk'; import getTargetNetworkForTx from './getTargetNetworkForTx'; import { NetworkService } from '@src/background/services/network/NetworkService'; import { StorageService } from '@src/background/services/storage/StorageService'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.ts b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.ts index 0a2d99957..7129948d4 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTargetNetworkForTx.ts @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { NetworkService } from '@src/background/services/network/NetworkService'; import { ethErrors } from 'eth-rpc-errors'; import { EthSendTransactionParams } from '@src/background/services/wallet/handlers/eth_sendTransaction/models'; diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxDescription.ts b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxDescription.ts index 7ccc1f989..1a9d0e9e7 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxDescription.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxDescription.ts @@ -2,7 +2,7 @@ import { getTxInfo } from './getTxInfo'; import { resolve } from '@src/utils/promiseResolver'; import { JsonRpcApiProvider, TransactionDescription } from 'ethers'; import { EthSendTransactionParams } from '../models'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; export async function getTxDescription( network: Network, diff --git a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxInfo.ts b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxInfo.ts index 6815b992a..82b47bda0 100644 --- a/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxInfo.ts +++ b/src/background/services/wallet/handlers/eth_sendTransaction/utils/getTxInfo.ts @@ -2,8 +2,8 @@ import { Interface, TransactionDescription } from 'ethers'; import { getABIForContract, getSourceForContract, -} from '@avalabs/snowtrace-sdk'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +} from '@avalabs/core-snowtrace-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; function parseDataWithABI( diff --git a/src/background/services/wallet/handlers/getWalletDetails.test.ts b/src/background/services/wallet/handlers/getWalletDetails.test.ts index 35477b3d6..4cf4713ec 100644 --- a/src/background/services/wallet/handlers/getWalletDetails.test.ts +++ b/src/background/services/wallet/handlers/getWalletDetails.test.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { SecretType } from '../../secrets/models'; import { SeedlessAuthProvider } from '../models'; diff --git a/src/background/services/wallet/handlers/importLedger.test.ts b/src/background/services/wallet/handlers/importLedger.test.ts index c1e6a3be8..23c83233e 100644 --- a/src/background/services/wallet/handlers/importLedger.test.ts +++ b/src/background/services/wallet/handlers/importLedger.test.ts @@ -4,7 +4,7 @@ import { SecretsService } from '../../secrets/SecretsService'; import { AccountsService } from '../../accounts/AccountsService'; import { ImportLedgerHandler } from './importLedger'; import { SecretType } from '../../secrets/models'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { buildRpcCall } from '@src/tests/test-utils'; describe('src/background/services/wallet/handlers/importLedger', () => { diff --git a/src/background/services/wallet/handlers/importLedger.ts b/src/background/services/wallet/handlers/importLedger.ts index 2e35997d2..f3c308a44 100644 --- a/src/background/services/wallet/handlers/importLedger.ts +++ b/src/background/services/wallet/handlers/importLedger.ts @@ -1,5 +1,5 @@ import { injectable } from 'tsyringe'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; diff --git a/src/background/services/wallet/handlers/importSeedPhrase.test.ts b/src/background/services/wallet/handlers/importSeedPhrase.test.ts index 2b12ca0cf..4ae5d31bc 100644 --- a/src/background/services/wallet/handlers/importSeedPhrase.test.ts +++ b/src/background/services/wallet/handlers/importSeedPhrase.test.ts @@ -7,7 +7,7 @@ import { AccountsService } from '../../accounts/AccountsService'; import { ImportSeedPhraseHandler } from './importSeedPhrase'; import { SeedphraseImportError } from './models'; import { SecretType } from '../../secrets/models'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { buildRpcCall } from '@src/tests/test-utils'; describe('src/background/services/wallet/handlers/importSeedPhrase', () => { diff --git a/src/background/services/wallet/handlers/importSeedPhrase.ts b/src/background/services/wallet/handlers/importSeedPhrase.ts index 6d55c3dbe..c1d7f7e1e 100644 --- a/src/background/services/wallet/handlers/importSeedPhrase.ts +++ b/src/background/services/wallet/handlers/importSeedPhrase.ts @@ -3,7 +3,7 @@ import { getXpubFromMnemonic, Avalanche, DerivationPath, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ethErrors } from 'eth-rpc-errors'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; diff --git a/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.test.ts b/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.test.ts index 3c84ffdfd..d4e78ba27 100644 --- a/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.test.ts +++ b/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.test.ts @@ -1,4 +1,7 @@ -import { DerivationPath, getBech32AddressFromXPub } from '@avalabs/wallets-sdk'; +import { + DerivationPath, + getBech32AddressFromXPub, +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { networks } from 'bitcoinjs-lib'; import { AccountType } from '../../accounts/models'; @@ -7,7 +10,7 @@ import { SecretsService } from '../../secrets/SecretsService'; import { StoreBtcWalletPolicyDetails } from './storeBtcWalletPolicyDetails'; import { buildRpcCall } from '@src/tests/test-utils'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); describe('src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.ts', () => { const request = { diff --git a/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.ts b/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.ts index f885c0ac1..d1523f67f 100644 --- a/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.ts +++ b/src/background/services/wallet/handlers/storeBtcWalletPolicyDetails.ts @@ -1,4 +1,7 @@ -import { DerivationPath, getBech32AddressFromXPub } from '@avalabs/wallets-sdk'; +import { + DerivationPath, + getBech32AddressFromXPub, +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { ExtensionRequestHandler } from '@src/background/connections/models'; import { networks } from 'bitcoinjs-lib'; diff --git a/src/background/services/wallet/models.ts b/src/background/services/wallet/models.ts index 21c5a083d..b53d37323 100644 --- a/src/background/services/wallet/models.ts +++ b/src/background/services/wallet/models.ts @@ -2,7 +2,7 @@ import { BitcoinInputUTXO, BitcoinOutputUTXO, DerivationPath, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { FireblocksApiData, ImportType } from '../accounts/models'; import { UnsignedTx } from '@avalabs/avalanchejs'; import { TransactionRequest } from 'ethers'; diff --git a/src/background/services/wallet/utils/getDerivationPath.test.ts b/src/background/services/wallet/utils/getDerivationPath.test.ts index 609a5e3be..6ba66698c 100644 --- a/src/background/services/wallet/utils/getDerivationPath.test.ts +++ b/src/background/services/wallet/utils/getDerivationPath.test.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import getDerivationPath from './getDerivationPath'; diff --git a/src/background/services/wallet/utils/getDerivationPath.ts b/src/background/services/wallet/utils/getDerivationPath.ts index b0ddb0b7f..9826db3e3 100644 --- a/src/background/services/wallet/utils/getDerivationPath.ts +++ b/src/background/services/wallet/utils/getDerivationPath.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import { PubKeyType } from '../models'; diff --git a/src/background/services/wallet/utils/prepareBtcTxForLedger.ts b/src/background/services/wallet/utils/prepareBtcTxForLedger.ts index 7a10d654c..218c1b0c8 100644 --- a/src/background/services/wallet/utils/prepareBtcTxForLedger.ts +++ b/src/background/services/wallet/utils/prepareBtcTxForLedger.ts @@ -1,4 +1,4 @@ -import { BitcoinProviderAbstract } from '@avalabs/wallets-sdk'; +import { BitcoinProviderAbstract } from '@avalabs/core-wallets-sdk'; import { BtcTransactionRequest } from '../models'; export async function prepareBtcTxForLedger( diff --git a/src/background/services/walletConnect/WalletConnectSigner.ts b/src/background/services/walletConnect/WalletConnectSigner.ts index 50d665595..edc82c92d 100644 --- a/src/background/services/walletConnect/WalletConnectSigner.ts +++ b/src/background/services/walletConnect/WalletConnectSigner.ts @@ -1,5 +1,5 @@ import { TransactionRequest } from 'ethers'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { AVM, PVM } from '@avalabs/avalanchejs'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; diff --git a/src/background/utils/findToken.ts b/src/background/utils/findToken.ts index 4363297c2..5048d8eba 100644 --- a/src/background/utils/findToken.ts +++ b/src/background/utils/findToken.ts @@ -1,4 +1,4 @@ -import { Network, NetworkContractToken } from '@avalabs/chains-sdk'; +import { Network, NetworkContractToken } from '@avalabs/core-chains-sdk'; import { AccountsService } from '@src/background/services/accounts/AccountsService'; import { Balances, @@ -12,7 +12,7 @@ import BN from 'bn.js'; import { ethers } from 'ethers'; import { container } from 'tsyringe'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { getProviderForNetwork } from '@src/utils/network/getProviderForNetwork'; const UNKNOWN_TOKEN = (address: string): TokenWithBalanceERC20 => ({ diff --git a/src/background/vmModules/ModuleManager.test.ts b/src/background/vmModules/ModuleManager.test.ts index e041519bf..d407a29ed 100644 --- a/src/background/vmModules/ModuleManager.test.ts +++ b/src/background/vmModules/ModuleManager.test.ts @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import ModuleManager from './ModuleManager'; import { VMModuleError } from './models'; diff --git a/src/background/vmModules/mocks/avm.ts b/src/background/vmModules/mocks/avm.ts index 02432e777..04255f738 100644 --- a/src/background/vmModules/mocks/avm.ts +++ b/src/background/vmModules/mocks/avm.ts @@ -41,8 +41,8 @@ export class AVMModule implements Module { }); } - getAddress(): Promise { - return Promise.resolve('AVM address'); + async getAddress() { + return {}; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/background/vmModules/mocks/bitcoin.ts b/src/background/vmModules/mocks/bitcoin.ts index adf079600..aaa1d959b 100644 --- a/src/background/vmModules/mocks/bitcoin.ts +++ b/src/background/vmModules/mocks/bitcoin.ts @@ -40,8 +40,8 @@ export class BitcoinModule implements Module { }); } - getAddress(): Promise { - return Promise.resolve('Bitcoin address'); + async getAddress() { + return {}; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/background/vmModules/mocks/coreEth.ts b/src/background/vmModules/mocks/coreEth.ts index c3baf508b..a26fc1bf8 100644 --- a/src/background/vmModules/mocks/coreEth.ts +++ b/src/background/vmModules/mocks/coreEth.ts @@ -41,8 +41,8 @@ export class CoreEthModule implements Module { }); } - getAddress(): Promise { - return Promise.resolve('EVM address'); + async getAddress() { + return {}; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/background/vmModules/mocks/evm.ts b/src/background/vmModules/mocks/evm.ts index 3fbb2a159..f75b7856d 100644 --- a/src/background/vmModules/mocks/evm.ts +++ b/src/background/vmModules/mocks/evm.ts @@ -40,8 +40,8 @@ export class EVMModule implements Module { }); } - getAddress() { - return Promise.resolve('EVM address'); + async getAddress() { + return {}; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/background/vmModules/mocks/pvm.ts b/src/background/vmModules/mocks/pvm.ts index 7992dd225..a48ce466c 100644 --- a/src/background/vmModules/mocks/pvm.ts +++ b/src/background/vmModules/mocks/pvm.ts @@ -40,8 +40,8 @@ export class PVMModule implements Module { }); } - getAddress() { - return Promise.resolve('PVM address'); + async getAddress() { + return {}; } // eslint-disable-next-line @typescript-eslint/no-unused-vars diff --git a/src/components/common/AddressK2.tsx b/src/components/common/AddressK2.tsx index 068ec91c3..2bdd2d99c 100644 --- a/src/components/common/AddressK2.tsx +++ b/src/components/common/AddressK2.tsx @@ -6,7 +6,7 @@ import { Stack, IconButton, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { truncateAddress } from '@src/utils/truncateAddress'; interface AddressProps { diff --git a/src/components/common/AppBackground.tsx b/src/components/common/AppBackground.tsx index de768f883..e9fbfc6dd 100644 --- a/src/components/common/AppBackground.tsx +++ b/src/components/common/AppBackground.tsx @@ -1,4 +1,4 @@ -import { Stack, styled } from '@avalabs/k2-components'; +import { Stack, styled } from '@avalabs/core-k2-components'; import { Suspense } from 'react'; const FallbackImage = styled(Stack)` diff --git a/src/components/common/ArcProgress.tsx b/src/components/common/ArcProgress.tsx index f4398aaec..7e81a8324 100644 --- a/src/components/common/ArcProgress.tsx +++ b/src/components/common/ArcProgress.tsx @@ -1,4 +1,4 @@ -import { useTheme } from '@avalabs/k2-components'; +import { useTheme } from '@avalabs/core-k2-components'; type Props = { size: number; diff --git a/src/components/common/BNInput.tsx b/src/components/common/BNInput.tsx index ff4dff72d..5f861fc95 100644 --- a/src/components/common/BNInput.tsx +++ b/src/components/common/BNInput.tsx @@ -8,8 +8,8 @@ import { Button, styled, CircularProgress, -} from '@avalabs/k2-components'; -import { bnToLocaleString, numberToBN } from '@avalabs/utils-sdk'; +} from '@avalabs/core-k2-components'; +import { bnToLocaleString, numberToBN } from '@avalabs/core-utils-sdk'; Big.PE = 99; Big.NE = -18; diff --git a/src/components/common/BalanceColumn.tsx b/src/components/common/BalanceColumn.tsx index 09817ab79..3ea7125af 100644 --- a/src/components/common/BalanceColumn.tsx +++ b/src/components/common/BalanceColumn.tsx @@ -1,4 +1,4 @@ -import { Stack, styled } from '@avalabs/k2-components'; +import { Stack, styled } from '@avalabs/core-k2-components'; export const BalanceColumn = styled(Stack)` align-items: end; diff --git a/src/components/common/CameraAccessDeniedDialog.tsx b/src/components/common/CameraAccessDeniedDialog.tsx index 847aa04d5..7fc96b501 100644 --- a/src/components/common/CameraAccessDeniedDialog.tsx +++ b/src/components/common/CameraAccessDeniedDialog.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, Dialog, Button } from '@avalabs/k2-components'; +import { Stack, Typography, Dialog, Button } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import CameraBlockedIcon from '../icons/CameraAccessDeniedIcon'; diff --git a/src/components/common/CameraAccessPromptDialog.tsx b/src/components/common/CameraAccessPromptDialog.tsx index 9c41e9ac0..d047a68a2 100644 --- a/src/components/common/CameraAccessPromptDialog.tsx +++ b/src/components/common/CameraAccessPromptDialog.tsx @@ -5,7 +5,7 @@ import { Button, ExternalLinkIcon, CircularProgress, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; export const CameraAccessPromptDialog = ({ QRScanner }) => { diff --git a/src/components/common/ConfirmationTracker.tsx b/src/components/common/ConfirmationTracker.tsx index fc2149e6e..18ee8d96e 100644 --- a/src/components/common/ConfirmationTracker.tsx +++ b/src/components/common/ConfirmationTracker.tsx @@ -1,5 +1,5 @@ import { Fragment, memo, useRef } from 'react'; -import { Box, styled, Theme, Typography } from '@avalabs/k2-components'; +import { Box, styled, Theme, Typography } from '@avalabs/core-k2-components'; import { keyframes } from '@emotion/react'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/common/ConnectionIndicatorK2.tsx b/src/components/common/ConnectionIndicatorK2.tsx index a2107a95d..6f37503fb 100644 --- a/src/components/common/ConnectionIndicatorK2.tsx +++ b/src/components/common/ConnectionIndicatorK2.tsx @@ -7,7 +7,7 @@ import { StackProps, Box, BoxProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; interface ConnectionIndicatorProps { diff --git a/src/components/common/ContainedDropdown.tsx b/src/components/common/ContainedDropdown.tsx index 6c8b33b52..ed2fa72b2 100644 --- a/src/components/common/ContainedDropdown.tsx +++ b/src/components/common/ContainedDropdown.tsx @@ -1,4 +1,4 @@ -import { Stack, StackProps, useTheme } from '@avalabs/k2-components'; +import { Stack, StackProps, useTheme } from '@avalabs/core-k2-components'; import { forwardRef, MutableRefObject, diff --git a/src/components/common/CustomFees.tsx b/src/components/common/CustomFees.tsx index 410f1aec1..ac511bf72 100644 --- a/src/components/common/CustomFees.tsx +++ b/src/components/common/CustomFees.tsx @@ -2,7 +2,7 @@ import { calculateGasAndFees } from '@src/utils/calculateGasAndFees'; import { useCallback, useEffect, useRef, useState } from 'react'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; import { useNativeTokenPrice } from '@src/hooks/useTokenPrice'; -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { formatUnits, parseUnits } from 'ethers'; import { Trans, useTranslation } from 'react-i18next'; import { @@ -18,7 +18,7 @@ import { Stack, Typography, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ApprovalSection, ApprovalSectionBody, diff --git a/src/components/common/CustomGasSettings.tsx b/src/components/common/CustomGasSettings.tsx index cffbffdb1..1cf69b847 100644 --- a/src/components/common/CustomGasSettings.tsx +++ b/src/components/common/CustomGasSettings.tsx @@ -3,7 +3,7 @@ import { calculateGasAndFees } from '@src/utils/calculateGasAndFees'; import { useEffect, useState } from 'react'; import { PageTitle } from './PageTitle'; import { useTranslation } from 'react-i18next'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { Box, Button, @@ -13,7 +13,7 @@ import { TextField, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; import { TextFieldLabel } from './TextFieldLabel'; import { parseUnits } from 'ethers'; diff --git a/src/components/common/Dialog.tsx b/src/components/common/Dialog.tsx index 73791de71..21b3a5dcf 100644 --- a/src/components/common/Dialog.tsx +++ b/src/components/common/Dialog.tsx @@ -1,5 +1,5 @@ import { ReactNode } from 'react'; -import { Dialog as K2Dialog, Typography } from '@avalabs/k2-components'; +import { Dialog as K2Dialog, Typography } from '@avalabs/core-k2-components'; export interface DialogProps { open: boolean; diff --git a/src/components/common/Dropdown.tsx b/src/components/common/Dropdown.tsx index 4529c85ca..5cc255eff 100644 --- a/src/components/common/Dropdown.tsx +++ b/src/components/common/Dropdown.tsx @@ -6,7 +6,7 @@ import { Select, TextFieldProps, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; const TriggerIcon = ({ ...rest }: IconBaseProps) => { const theme = useTheme(); diff --git a/src/components/common/EmptyContent.tsx b/src/components/common/EmptyContent.tsx index c24211f22..21893642b 100644 --- a/src/components/common/EmptyContent.tsx +++ b/src/components/common/EmptyContent.tsx @@ -1,4 +1,4 @@ -import { Stack, Grow, Typography } from '@avalabs/k2-components'; +import { Stack, Grow, Typography } from '@avalabs/core-k2-components'; interface EmptyContentProps { text: string; diff --git a/src/components/common/Flipper.tsx b/src/components/common/Flipper.tsx index 98c0edd10..1774b09e9 100644 --- a/src/components/common/Flipper.tsx +++ b/src/components/common/Flipper.tsx @@ -1,5 +1,5 @@ import { cloneElement } from 'react'; -import { Box } from '@avalabs/k2-components'; +import { Box } from '@avalabs/core-k2-components'; type FlipperProps = { size: number; diff --git a/src/components/common/FunctionIsOffline.tsx b/src/components/common/FunctionIsOffline.tsx index 61565cd3a..896e96aa4 100644 --- a/src/components/common/FunctionIsOffline.tsx +++ b/src/components/common/FunctionIsOffline.tsx @@ -1,7 +1,11 @@ import { PropsWithChildren } from 'react'; import { PageTitle, PageTitleVariant } from './PageTitle'; import { t as translate } from 'i18next'; -import { AlertCircleIcon, Stack, Typography } from '@avalabs/k2-components'; +import { + AlertCircleIcon, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { FunctionNames } from '@src/hooks/useIsFunctionAvailable'; diff --git a/src/components/common/FunctionIsUnavailable.tsx b/src/components/common/FunctionIsUnavailable.tsx index 0967a3a04..9457d1834 100644 --- a/src/components/common/FunctionIsUnavailable.tsx +++ b/src/components/common/FunctionIsUnavailable.tsx @@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react'; import { PageTitle, PageTitleVariant } from './PageTitle'; import { Trans, useTranslation } from 'react-i18next'; import { getTranslatedFunctionName } from './FunctionIsOffline'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { FunctionNames } from '@src/hooks/useIsFunctionAvailable'; interface FunctionIsOfflineProps { functionName: FunctionNames; diff --git a/src/components/common/InAppApprovalOverlay.tsx b/src/components/common/InAppApprovalOverlay.tsx index 16d4d3954..96a2b1c32 100644 --- a/src/components/common/InAppApprovalOverlay.tsx +++ b/src/components/common/InAppApprovalOverlay.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { Fade, Stack, useTheme } from '@avalabs/k2-components'; +import { Fade, Stack, useTheme } from '@avalabs/core-k2-components'; import { useApprovalsContext } from '@src/contexts/ApprovalsProvider'; import { ApprovalRoutes } from '@src/popup/ApprovalRoutes'; diff --git a/src/components/common/InlineBold.tsx b/src/components/common/InlineBold.tsx index 920fad019..131bf424a 100644 --- a/src/components/common/InlineBold.tsx +++ b/src/components/common/InlineBold.tsx @@ -1,4 +1,4 @@ -import { styled } from '@avalabs/k2-components'; +import { styled } from '@avalabs/core-k2-components'; export const InlineBold = styled('span')` font-weight: bold; diff --git a/src/components/common/InlineTokenEllipsis.tsx b/src/components/common/InlineTokenEllipsis.tsx index ff187c465..6155fcbb6 100644 --- a/src/components/common/InlineTokenEllipsis.tsx +++ b/src/components/common/InlineTokenEllipsis.tsx @@ -1,4 +1,4 @@ -import { styled } from '@avalabs/k2-components'; +import { styled } from '@avalabs/core-k2-components'; import { TokenEllipsis } from './TokenEllipsis'; export const InlineTokenEllipsis = styled(TokenEllipsis)` diff --git a/src/components/common/InvalidQRCodeDialog.tsx b/src/components/common/InvalidQRCodeDialog.tsx index 18209cea0..e203e223b 100644 --- a/src/components/common/InvalidQRCodeDialog.tsx +++ b/src/components/common/InvalidQRCodeDialog.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, Dialog, Button } from '@avalabs/k2-components'; +import { Stack, Typography, Dialog, Button } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import InvalidQRCodeIcon from '../icons/InvalidQRCodeIcon'; diff --git a/src/components/common/LoadingOverlay.tsx b/src/components/common/LoadingOverlay.tsx index ce212b4eb..1e04bb17e 100644 --- a/src/components/common/LoadingOverlay.tsx +++ b/src/components/common/LoadingOverlay.tsx @@ -1,4 +1,4 @@ -import { CircularProgress } from '@avalabs/k2-components'; +import { CircularProgress } from '@avalabs/core-k2-components'; import { Overlay } from './Overlay'; export function LoadingOverlay() { diff --git a/src/components/common/NetworkLogo.tsx b/src/components/common/NetworkLogo.tsx index a61286e7c..0ffcf8b06 100644 --- a/src/components/common/NetworkLogo.tsx +++ b/src/components/common/NetworkLogo.tsx @@ -1,4 +1,9 @@ -import { CheckIcon, GlobeIcon, Stack, styled } from '@avalabs/k2-components'; +import { + CheckIcon, + GlobeIcon, + Stack, + styled, +} from '@avalabs/core-k2-components'; import { ipfsResolverWithFallback } from '@src/utils/ipsfResolverWithFallback'; export const GlobeIconContainer = styled('div')` diff --git a/src/components/common/NetworkLogoK2.tsx b/src/components/common/NetworkLogoK2.tsx index b808a2e83..049ed977a 100644 --- a/src/components/common/NetworkLogoK2.tsx +++ b/src/components/common/NetworkLogoK2.tsx @@ -1,4 +1,4 @@ -import { GlobeIcon, styled } from '@avalabs/k2-components'; +import { GlobeIcon, styled } from '@avalabs/core-k2-components'; import { ipfsResolverWithFallback } from '@src/utils/ipsfResolverWithFallback'; export const GlobeIconContainer = styled('div')` diff --git a/src/components/common/NotSupportedByWallet.tsx b/src/components/common/NotSupportedByWallet.tsx index 65e4a23cb..f70581bb1 100644 --- a/src/components/common/NotSupportedByWallet.tsx +++ b/src/components/common/NotSupportedByWallet.tsx @@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react'; import { PageTitle, PageTitleVariant } from './PageTitle'; import { Trans, useTranslation } from 'react-i18next'; import { getTranslatedFunctionName } from './FunctionIsOffline'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { FunctionNames } from '@src/hooks/useIsFunctionAvailable'; interface NotSupportedByWalleteProps { functionName: FunctionNames; diff --git a/src/components/common/Overlay.tsx b/src/components/common/Overlay.tsx index d1de8ce78..86febb4c0 100644 --- a/src/components/common/Overlay.tsx +++ b/src/components/common/Overlay.tsx @@ -5,7 +5,7 @@ import { SxProps, Theme, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface OverlayProps { children: ReactNode; diff --git a/src/components/common/PageTitle.tsx b/src/components/common/PageTitle.tsx index 9a2cc7ce8..7cc85aa2f 100644 --- a/src/components/common/PageTitle.tsx +++ b/src/components/common/PageTitle.tsx @@ -8,7 +8,7 @@ import { Typography, styled, keyframes, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; const ShowThumbnailImageAnimation = keyframes` 0% { diff --git a/src/components/common/PasswordStrength.tsx b/src/components/common/PasswordStrength.tsx index 5c9da4805..92eff0d1d 100644 --- a/src/components/common/PasswordStrength.tsx +++ b/src/components/common/PasswordStrength.tsx @@ -1,6 +1,11 @@ import { t as translate } from 'i18next'; import { useTranslation } from 'react-i18next'; -import { useTheme, darkTheme, Typography, Stack } from '@avalabs/k2-components'; +import { + useTheme, + darkTheme, + Typography, + Stack, +} from '@avalabs/core-k2-components'; import zxcvbn from 'zxcvbn'; import { useEffect } from 'react'; diff --git a/src/components/common/ProfitAndLoss.tsx b/src/components/common/ProfitAndLoss.tsx index b4369c70c..89049c3cd 100644 --- a/src/components/common/ProfitAndLoss.tsx +++ b/src/components/common/ProfitAndLoss.tsx @@ -1,4 +1,4 @@ -import { Stack, Trend, ProfitAndLoss } from '@avalabs/k2-components'; +import { Stack, Trend, ProfitAndLoss } from '@avalabs/core-k2-components'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; interface PandLProps { diff --git a/src/components/common/QRCodeWithLogo.tsx b/src/components/common/QRCodeWithLogo.tsx index 8eb4a01d7..0e776d6ab 100644 --- a/src/components/common/QRCodeWithLogo.tsx +++ b/src/components/common/QRCodeWithLogo.tsx @@ -1,6 +1,6 @@ import QRCode from 'qrcode.react'; import { PropsWithChildren } from 'react'; -import { Stack, useTheme } from '@avalabs/k2-components'; +import { Stack, useTheme } from '@avalabs/core-k2-components'; export function QRCodeWithLogo({ value, diff --git a/src/components/common/SimpleAddress.tsx b/src/components/common/SimpleAddress.tsx index 915ff5a14..6c29a3dd4 100644 --- a/src/components/common/SimpleAddress.tsx +++ b/src/components/common/SimpleAddress.tsx @@ -5,7 +5,7 @@ import { toast, CopyIcon, TypographyProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { truncateAddress } from '@src/utils/truncateAddress'; diff --git a/src/components/common/SiteAvatar.tsx b/src/components/common/SiteAvatar.tsx index ecaed52f0..efcb52a9d 100644 --- a/src/components/common/SiteAvatar.tsx +++ b/src/components/common/SiteAvatar.tsx @@ -1,4 +1,4 @@ -import { Stack, styled } from '@avalabs/k2-components'; +import { Stack, styled } from '@avalabs/core-k2-components'; export const SiteAvatar = styled(Stack)<{ margin?: string }>` width: 80px; diff --git a/src/components/common/StyledNumberList.tsx b/src/components/common/StyledNumberList.tsx index 27d0cef92..6f96cab53 100644 --- a/src/components/common/StyledNumberList.tsx +++ b/src/components/common/StyledNumberList.tsx @@ -1,4 +1,4 @@ -import { styled, Typography } from '@avalabs/k2-components'; +import { styled, Typography } from '@avalabs/core-k2-components'; export const StyledNumberList = styled(Typography)` ${({ theme }) => ({ diff --git a/src/components/common/TestnetBanner.tsx b/src/components/common/TestnetBanner.tsx index c1c2dd672..289fd0ced 100644 --- a/src/components/common/TestnetBanner.tsx +++ b/src/components/common/TestnetBanner.tsx @@ -1,4 +1,9 @@ -import { Slide, Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { + Slide, + Stack, + Typography, + useTheme, +} from '@avalabs/core-k2-components'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { t } from 'i18next'; diff --git a/src/components/common/TextFieldLabel.tsx b/src/components/common/TextFieldLabel.tsx index 6ca25867c..b2d0dcadf 100644 --- a/src/components/common/TextFieldLabel.tsx +++ b/src/components/common/TextFieldLabel.tsx @@ -3,7 +3,7 @@ import { Stack, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface TextFieldLabelProps { label: string; diff --git a/src/components/common/TokenAmount.tsx b/src/components/common/TokenAmount.tsx index d179132ee..03decd77d 100644 --- a/src/components/common/TokenAmount.tsx +++ b/src/components/common/TokenAmount.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TokenWithBalance } from '@src/background/services/balances/models'; diff --git a/src/components/common/TokenCard.tsx b/src/components/common/TokenCard.tsx index 3bc3cb57d..c8c6f9311 100644 --- a/src/components/common/TokenCard.tsx +++ b/src/components/common/TokenCard.tsx @@ -1,5 +1,5 @@ import { PropsWithChildren } from 'react'; -import { Card, Stack, Typography } from '@avalabs/k2-components'; +import { Card, Stack, Typography } from '@avalabs/core-k2-components'; interface TokenCardProps { name: string; diff --git a/src/components/common/TokenCardWithBalance.tsx b/src/components/common/TokenCardWithBalance.tsx index 2761a9306..0a2fc2511 100644 --- a/src/components/common/TokenCardWithBalance.tsx +++ b/src/components/common/TokenCardWithBalance.tsx @@ -1,4 +1,4 @@ -import { Card, Stack, Tooltip, Typography } from '@avalabs/k2-components'; +import { Card, Stack, Tooltip, Typography } from '@avalabs/core-k2-components'; import { useEffect, useRef, useState } from 'react'; import { PAndL } from './ProfitAndLoss'; import { TokenWithBalance } from '@src/background/services/balances/models'; diff --git a/src/components/common/TokenEllipsis.tsx b/src/components/common/TokenEllipsis.tsx index 8232c81aa..71ba1a965 100644 --- a/src/components/common/TokenEllipsis.tsx +++ b/src/components/common/TokenEllipsis.tsx @@ -1,6 +1,6 @@ import { PropsWithChildren } from 'react'; -import { Tooltip } from '@avalabs/k2-components'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { Tooltip } from '@avalabs/core-k2-components'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; interface TokenEllipsisProps { maxLength: number; diff --git a/src/components/common/TokenIcon.tsx b/src/components/common/TokenIcon.tsx index bd6714b1c..9b4d60934 100644 --- a/src/components/common/TokenIcon.tsx +++ b/src/components/common/TokenIcon.tsx @@ -1,4 +1,8 @@ -import { CircularProgress, Stack, Typography } from '@avalabs/k2-components'; +import { + CircularProgress, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { ipfsResolverWithFallback } from '@src/utils/ipsfResolverWithFallback'; import { useEffect, useState } from 'react'; diff --git a/src/components/common/TokenSelect.tsx b/src/components/common/TokenSelect.tsx index 105fd1ae7..cb113af11 100644 --- a/src/components/common/TokenSelect.tsx +++ b/src/components/common/TokenSelect.tsx @@ -16,7 +16,7 @@ import { hasUnconfirmedBTCBalance, isAvaxWithUnavailableBalance, } from '@src/background/services/balances/models'; -import { bnToLocaleString, numberToBN } from '@avalabs/utils-sdk'; +import { bnToLocaleString, numberToBN } from '@avalabs/core-utils-sdk'; import BN from 'bn.js'; import { useTranslation } from 'react-i18next'; import { BalanceColumn } from '@src/components/common/BalanceColumn'; @@ -31,7 +31,7 @@ import { Divider, Card, SearchBar, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { BNInput } from '@src/components/common/BNInput'; import { TokenSelector } from './TokenSelector'; import { TokenEllipsis } from './TokenEllipsis'; diff --git a/src/components/common/TokenSelector.tsx b/src/components/common/TokenSelector.tsx index f6e13266b..b0fd8f61e 100644 --- a/src/components/common/TokenSelector.tsx +++ b/src/components/common/TokenSelector.tsx @@ -4,7 +4,7 @@ import { ChevronDownIcon, Stack, ChevronUpIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; export interface Token { diff --git a/src/components/common/TxWarningBox.tsx b/src/components/common/TxWarningBox.tsx index 3c8601f10..4407a561d 100644 --- a/src/components/common/TxWarningBox.tsx +++ b/src/components/common/TxWarningBox.tsx @@ -1,4 +1,4 @@ -import { Box } from '@avalabs/k2-components'; +import { Box } from '@avalabs/core-k2-components'; import { AlertBox } from '@src/pages/Permissions/components/AlertBox'; import { WarningBox } from '@src/pages/Permissions/components/WarningBox'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/common/VerticalStack.tsx b/src/components/common/VerticalStack.tsx index 46b89a5fd..e1f5640e0 100644 --- a/src/components/common/VerticalStack.tsx +++ b/src/components/common/VerticalStack.tsx @@ -1,4 +1,4 @@ -import { Stack, StackProps } from '@avalabs/k2-components'; +import { Stack, StackProps } from '@avalabs/core-k2-components'; export const VerticalStack = (props: Exclude) => ( diff --git a/src/components/common/VirtualizedList.tsx b/src/components/common/VirtualizedList.tsx index 687bb7fe0..04bfb7f5e 100644 --- a/src/components/common/VirtualizedList.tsx +++ b/src/components/common/VirtualizedList.tsx @@ -1,4 +1,4 @@ -import { styled } from '@avalabs/k2-components'; +import { styled } from '@avalabs/core-k2-components'; import { List } from 'react-virtualized'; const VirtualizedList = styled(List)` diff --git a/src/components/common/WalletChip.tsx b/src/components/common/WalletChip.tsx index 13130ce9f..5db2a3ce4 100644 --- a/src/components/common/WalletChip.tsx +++ b/src/components/common/WalletChip.tsx @@ -1,5 +1,10 @@ import { useCallback, useState } from 'react'; -import { Chip, ChipProps, Tooltip, Typography } from '@avalabs/k2-components'; +import { + Chip, + ChipProps, + Tooltip, + Typography, +} from '@avalabs/core-k2-components'; import { WalletDetails } from '@src/background/services/wallet/models'; import { WalletTypeIcon } from '@src/pages/Accounts/components/WalletTypeIcon'; diff --git a/src/components/common/account/AccountSelectorButton.tsx b/src/components/common/account/AccountSelectorButton.tsx index fabb12a62..660ea49aa 100644 --- a/src/components/common/account/AccountSelectorButton.tsx +++ b/src/components/common/account/AccountSelectorButton.tsx @@ -4,7 +4,7 @@ import { ChevronDownIcon, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/components/common/approval/ApprovalSection.tsx b/src/components/common/approval/ApprovalSection.tsx index 7465b3e62..684b60c78 100644 --- a/src/components/common/approval/ApprovalSection.tsx +++ b/src/components/common/approval/ApprovalSection.tsx @@ -6,7 +6,7 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import React from 'react'; type ApprovalSectionHeaderProps = { diff --git a/src/components/common/approval/TxDetailsRow.tsx b/src/components/common/approval/TxDetailsRow.tsx index dda6c2cdb..2f545ec35 100644 --- a/src/components/common/approval/TxDetailsRow.tsx +++ b/src/components/common/approval/TxDetailsRow.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { Stack, Typography, useTheme } from '@avalabs/core-k2-components'; type TxDetailsRowProps = { label: string }; diff --git a/src/components/common/fab/FAB.tsx b/src/components/common/fab/FAB.tsx index dfe947d6d..29d2fa3fc 100644 --- a/src/components/common/fab/FAB.tsx +++ b/src/components/common/fab/FAB.tsx @@ -19,7 +19,7 @@ import { Collapse, XIcon, IconButton, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { FunctionNames, diff --git a/src/components/common/header/Header.tsx b/src/components/common/header/Header.tsx index 21b6f74a8..33940a363 100644 --- a/src/components/common/header/Header.tsx +++ b/src/components/common/header/Header.tsx @@ -5,7 +5,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { SettingsMenu } from '@src/components/settings/SettingsMenu'; diff --git a/src/components/common/header/NetworkSwitcher/NetworkSwitcher.tsx b/src/components/common/header/NetworkSwitcher/NetworkSwitcher.tsx index b15c64266..d5873ac62 100644 --- a/src/components/common/header/NetworkSwitcher/NetworkSwitcher.tsx +++ b/src/components/common/header/NetworkSwitcher/NetworkSwitcher.tsx @@ -1,6 +1,6 @@ import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { useRef, useState } from 'react'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { useHistory } from 'react-router-dom'; import { NetworkLogo } from '../../NetworkLogo'; import { useTranslation } from 'react-i18next'; @@ -18,7 +18,7 @@ import { Grow, ClickAwayListener, Box, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; const defaultNetworks = [ diff --git a/src/components/common/infiniteScroll/InfiniteScroll.tsx b/src/components/common/infiniteScroll/InfiniteScroll.tsx index d8e249607..18e4299fb 100644 --- a/src/components/common/infiniteScroll/InfiniteScroll.tsx +++ b/src/components/common/infiniteScroll/InfiniteScroll.tsx @@ -1,6 +1,10 @@ import { useTranslation } from 'react-i18next'; import { useCallback, useEffect, useRef } from 'react'; -import { CircularProgress, Stack, Typography } from '@avalabs/k2-components'; +import { + CircularProgress, + Stack, + Typography, +} from '@avalabs/core-k2-components'; export interface InfiniteScrollProps { loadMore: () => void; diff --git a/src/components/common/scrollbars/Scrollbars.tsx b/src/components/common/scrollbars/Scrollbars.tsx index 9116e86a5..973acef39 100644 --- a/src/components/common/scrollbars/Scrollbars.tsx +++ b/src/components/common/scrollbars/Scrollbars.tsx @@ -1,6 +1,6 @@ import * as CustomScrollbars from 'react-custom-scrollbars-2'; import { forwardRef, LegacyRef } from 'react'; -import { useTheme } from '@avalabs/k2-components'; +import { useTheme } from '@avalabs/core-k2-components'; export type ScrollbarsRef = CustomScrollbars.Scrollbars; diff --git a/src/components/common/seedless/SeedlessAuthPrompt.tsx b/src/components/common/seedless/SeedlessAuthPrompt.tsx index 6f771e152..b74c474c1 100644 --- a/src/components/common/seedless/SeedlessAuthPrompt.tsx +++ b/src/components/common/seedless/SeedlessAuthPrompt.tsx @@ -7,7 +7,7 @@ import { DialogContent, DialogTitle, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useWalletContext } from '@src/contexts/WalletProvider'; import { openExtensionNewWindow } from '@src/utils/extensionUtils'; diff --git a/src/components/common/seedless/components/AuthenticationError.tsx b/src/components/common/seedless/components/AuthenticationError.tsx index 32531aff8..c9d93fcce 100644 --- a/src/components/common/seedless/components/AuthenticationError.tsx +++ b/src/components/common/seedless/components/AuthenticationError.tsx @@ -1,5 +1,9 @@ import { useTranslation } from 'react-i18next'; -import { AlertCircleIcon, Stack, Typography } from '@avalabs/k2-components'; +import { + AlertCircleIcon, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { AuthErrorCode } from '@src/background/services/seedless/models'; type Props = { diff --git a/src/components/common/seedless/components/ExportError.tsx b/src/components/common/seedless/components/ExportError.tsx index 1c41c4b85..f3982c5ac 100644 --- a/src/components/common/seedless/components/ExportError.tsx +++ b/src/components/common/seedless/components/ExportError.tsx @@ -3,7 +3,7 @@ import { Button, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ExportErrorCode } from '@src/hooks/useSeedlessMnemonicExport'; import { useTranslation } from 'react-i18next'; diff --git a/src/components/common/seedless/components/ExportPending.tsx b/src/components/common/seedless/components/ExportPending.tsx index 1bc299f9c..85566fe0b 100644 --- a/src/components/common/seedless/components/ExportPending.tsx +++ b/src/components/common/seedless/components/ExportPending.tsx @@ -9,7 +9,7 @@ import { Stack, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ArcProgress } from '@src/components/common/ArcProgress'; diff --git a/src/components/common/seedless/components/FIDOChallenge.tsx b/src/components/common/seedless/components/FIDOChallenge.tsx index b7f1ab8e1..4867ec0be 100644 --- a/src/components/common/seedless/components/FIDOChallenge.tsx +++ b/src/components/common/seedless/components/FIDOChallenge.tsx @@ -5,7 +5,7 @@ import { CircularProgress, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useFidoErrorMessage } from '@src/hooks/useFidoErrorMessage'; import { Trans, useTranslation } from 'react-i18next'; import { AuthErrorCode } from '@src/background/services/seedless/models'; diff --git a/src/components/common/seedless/components/MfaChoicePrompt.tsx b/src/components/common/seedless/components/MfaChoicePrompt.tsx index 345c8cee4..52d5ca3aa 100644 --- a/src/components/common/seedless/components/MfaChoicePrompt.tsx +++ b/src/components/common/seedless/components/MfaChoicePrompt.tsx @@ -4,7 +4,7 @@ import { DialogContent, DialogTitle, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { diff --git a/src/components/common/seedless/components/PhraseReadyToExport.tsx b/src/components/common/seedless/components/PhraseReadyToExport.tsx index fd312d129..d519a6bf4 100644 --- a/src/components/common/seedless/components/PhraseReadyToExport.tsx +++ b/src/components/common/seedless/components/PhraseReadyToExport.tsx @@ -15,7 +15,7 @@ import { Stack, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SeedlessExportAnalytics } from '@src/background/services/seedless/seedlessAnalytics'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/components/common/seedless/components/RecoveryMethod.tsx b/src/components/common/seedless/components/RecoveryMethod.tsx index 88d544bca..e842a2b58 100644 --- a/src/components/common/seedless/components/RecoveryMethod.tsx +++ b/src/components/common/seedless/components/RecoveryMethod.tsx @@ -6,7 +6,7 @@ import { Typography, styled, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; const MethodName = styled(Typography)` ${({ theme }) => ({ diff --git a/src/components/common/seedless/components/TOTPChallenge.tsx b/src/components/common/seedless/components/TOTPChallenge.tsx index ab59d36e9..ce26f40f2 100644 --- a/src/components/common/seedless/components/TOTPChallenge.tsx +++ b/src/components/common/seedless/components/TOTPChallenge.tsx @@ -1,4 +1,9 @@ -import { Button, Stack, TextField, Typography } from '@avalabs/k2-components'; +import { + Button, + Stack, + TextField, + Typography, +} from '@avalabs/core-k2-components'; import { AuthErrorCode } from '@src/background/services/seedless/models'; import { PageTitle, PageTitleVariant } from '@src/components/common/PageTitle'; import { useTotpErrorMessage } from '@src/hooks/useTotpErrorMessage'; diff --git a/src/components/common/seedless/components/WaitingForAuthentication.tsx b/src/components/common/seedless/components/WaitingForAuthentication.tsx index 7492d42c9..9628eb4c4 100644 --- a/src/components/common/seedless/components/WaitingForAuthentication.tsx +++ b/src/components/common/seedless/components/WaitingForAuthentication.tsx @@ -1,5 +1,9 @@ import { Trans, useTranslation } from 'react-i18next'; -import { CircularProgress, Stack, Typography } from '@avalabs/k2-components'; +import { + CircularProgress, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { SeedlessAuthProvider } from '@src/background/services/wallet/models'; diff --git a/src/components/dialogs/AnalyticsOptInDialog.tsx b/src/components/dialogs/AnalyticsOptInDialog.tsx index 17d4b2a64..29fe55444 100644 --- a/src/components/dialogs/AnalyticsOptInDialog.tsx +++ b/src/components/dialogs/AnalyticsOptInDialog.tsx @@ -6,7 +6,7 @@ import { DialogTitle, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Trans, useTranslation } from 'react-i18next'; import { TypographyLink } from '@src/pages/Onboarding/components/TypographyLink'; diff --git a/src/components/icons/BrandName.tsx b/src/components/icons/BrandName.tsx index f201b313a..cb9dd552a 100644 --- a/src/components/icons/BrandName.tsx +++ b/src/components/icons/BrandName.tsx @@ -1,4 +1,4 @@ -import { Stack, useTheme } from '@avalabs/k2-components'; +import { Stack, useTheme } from '@avalabs/core-k2-components'; interface BrandNameProps { height?: number; diff --git a/src/components/icons/CameraAccessDeniedIcon.tsx b/src/components/icons/CameraAccessDeniedIcon.tsx index 8944c5ac6..4a3cf10a2 100644 --- a/src/components/icons/CameraAccessDeniedIcon.tsx +++ b/src/components/icons/CameraAccessDeniedIcon.tsx @@ -2,7 +2,7 @@ import { CameraBlockedIcon, IconBaseProps, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export default function CameraAccessDeniedIcon(props: IconBaseProps) { const theme = useTheme(); diff --git a/src/components/icons/DangerIcon.tsx b/src/components/icons/DangerIcon.tsx index 9456b48ec..edd449960 100644 --- a/src/components/icons/DangerIcon.tsx +++ b/src/components/icons/DangerIcon.tsx @@ -1,4 +1,4 @@ -import { AlertCircleIcon, Stack, useTheme } from '@avalabs/k2-components'; +import { AlertCircleIcon, Stack, useTheme } from '@avalabs/core-k2-components'; type DangerIconProps = { size?: number; diff --git a/src/components/icons/InvalidQRCodeIcon.tsx b/src/components/icons/InvalidQRCodeIcon.tsx index 4fb0dcb8a..e87e82ddc 100644 --- a/src/components/icons/InvalidQRCodeIcon.tsx +++ b/src/components/icons/InvalidQRCodeIcon.tsx @@ -1,4 +1,8 @@ -import { IconBaseProps, QRCodeIcon, useTheme } from '@avalabs/k2-components'; +import { + IconBaseProps, + QRCodeIcon, + useTheme, +} from '@avalabs/core-k2-components'; export default function InvalidQRCodeIcon(props: IconBaseProps) { const theme = useTheme(); diff --git a/src/components/icons/QRCodeLogos.tsx b/src/components/icons/QRCodeLogos.tsx index 3fd0193ae..cc1a74a35 100644 --- a/src/components/icons/QRCodeLogos.tsx +++ b/src/components/icons/QRCodeLogos.tsx @@ -1,4 +1,4 @@ -import { Stack, useTheme } from '@avalabs/k2-components'; +import { Stack, useTheme } from '@avalabs/core-k2-components'; import { ReactNode } from 'react'; const innerCirclToOuterCircleRatio = 49.5 / 63; diff --git a/src/components/ledger/LedgerConnector.tsx b/src/components/ledger/LedgerConnector.tsx index 31d1665a1..b18d7aa2f 100644 --- a/src/components/ledger/LedgerConnector.tsx +++ b/src/components/ledger/LedgerConnector.tsx @@ -6,7 +6,7 @@ import { DerivationPath, getAddressFromXPub, getEvmAddressFromPubKey, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { useGetAvaxBalance } from '@src/hooks/useGetAvaxBalance'; import { PubKeyType } from '@src/background/services/wallet/models'; import { Trans, useTranslation } from 'react-i18next'; @@ -16,7 +16,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { DerivationPathDropdown } from '@src/pages/Onboarding/components/DerivationPathDropDown'; import { DerivedAddresses } from '@src/pages/Onboarding/components/DerivedAddresses'; diff --git a/src/components/ledger/LedgerTroublesSteps.tsx b/src/components/ledger/LedgerTroublesSteps.tsx index 969956013..b79701355 100644 --- a/src/components/ledger/LedgerTroublesSteps.tsx +++ b/src/components/ledger/LedgerTroublesSteps.tsx @@ -6,7 +6,7 @@ import { SxProps, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TypographyLink } from '../../pages/Onboarding/components/TypographyLink'; export enum LedgerTroubleStepsFontVariant { diff --git a/src/components/settings/SettingsHeader.tsx b/src/components/settings/SettingsHeader.tsx index d0eb87719..6eda4bf1d 100644 --- a/src/components/settings/SettingsHeader.tsx +++ b/src/components/settings/SettingsHeader.tsx @@ -4,7 +4,7 @@ import { Stack, Typography, ChevronLeftIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SettingsPageProps } from './models'; interface SettingsHeaderProps { title: string; diff --git a/src/components/settings/SettingsMenu.tsx b/src/components/settings/SettingsMenu.tsx index be03dbf45..01b2a1605 100644 --- a/src/components/settings/SettingsMenu.tsx +++ b/src/components/settings/SettingsMenu.tsx @@ -23,7 +23,7 @@ import { MenuIcon, Stack, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ExportRecoveryPhrase } from './pages/ExportRecoveryPhrase'; import { ExportState, diff --git a/src/components/settings/components/ContactForm.tsx b/src/components/settings/components/ContactForm.tsx index 33739f497..bd2b4d566 100644 --- a/src/components/settings/components/ContactForm.tsx +++ b/src/components/settings/components/ContactForm.tsx @@ -7,7 +7,7 @@ import { } from '@src/utils/isAddressValid'; import { useTranslation } from 'react-i18next'; import { useContactsContext } from '@src/contexts/ContactsProvider'; -import { Stack, TextField } from '@avalabs/k2-components'; +import { Stack, TextField } from '@avalabs/core-k2-components'; interface ContactFormProps { contact: Contact; handleChange: (contact: Contact, formValid: boolean) => void; diff --git a/src/components/settings/components/ContactInfo.tsx b/src/components/settings/components/ContactInfo.tsx index b6b4044a8..ec2aba48d 100644 --- a/src/components/settings/components/ContactInfo.tsx +++ b/src/components/settings/components/ContactInfo.tsx @@ -6,7 +6,7 @@ import { AvalancheColorIcon, BitcoinColorIcon, XAndPChainsIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const ContactInfo = ({ contact }: { contact: Contact }) => { return ( diff --git a/src/components/settings/components/ContactListItem.tsx b/src/components/settings/components/ContactListItem.tsx index c6b331c0b..1f7d622b3 100644 --- a/src/components/settings/components/ContactListItem.tsx +++ b/src/components/settings/components/ContactListItem.tsx @@ -2,7 +2,7 @@ import type { Contact } from '@avalabs/types'; import { SettingsPages } from '../models'; import { useHistory, useLocation } from 'react-router-dom'; import { ContactInfo } from './ContactInfo'; -import { Divider, ListItem, ListItemButton } from '@avalabs/k2-components'; +import { Divider, ListItem, ListItemButton } from '@avalabs/core-k2-components'; interface ContactListItemProps { contact: Contact; diff --git a/src/components/settings/components/ContactProfile.tsx b/src/components/settings/components/ContactProfile.tsx index f5e415605..ee374be68 100644 --- a/src/components/settings/components/ContactProfile.tsx +++ b/src/components/settings/components/ContactProfile.tsx @@ -16,7 +16,7 @@ import { toast, Scrollbars, CopyIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import Dialog from '@src/components/common/Dialog'; import { truncateAddress } from '@src/utils/truncateAddress'; diff --git a/src/components/settings/components/StyledListItemButton.tsx b/src/components/settings/components/StyledListItemButton.tsx index 90f8ed7de..97546731d 100644 --- a/src/components/settings/components/StyledListItemButton.tsx +++ b/src/components/settings/components/StyledListItemButton.tsx @@ -1,4 +1,4 @@ -import { ListItemButton, styled } from '@avalabs/k2-components'; +import { ListItemButton, styled } from '@avalabs/core-k2-components'; export const StyledListButton = styled(ListItemButton)` justify-content: space-between; diff --git a/src/components/settings/pages/AddContact.tsx b/src/components/settings/pages/AddContact.tsx index 5c21647a3..4b8672603 100644 --- a/src/components/settings/pages/AddContact.tsx +++ b/src/components/settings/pages/AddContact.tsx @@ -11,7 +11,7 @@ import { Scrollbars, styled, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; const FlexScrollbars = styled(Scrollbars)` diff --git a/src/components/settings/pages/Advanced.tsx b/src/components/settings/pages/Advanced.tsx index 5e1bda646..f857de99a 100644 --- a/src/components/settings/pages/Advanced.tsx +++ b/src/components/settings/pages/Advanced.tsx @@ -7,7 +7,7 @@ import { Switch, Tooltip, InfoCircleIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { isProductionBuild } from '@src/utils/environment'; diff --git a/src/components/settings/pages/ChangePassword.tsx b/src/components/settings/pages/ChangePassword.tsx index e1e722539..07ce03c09 100644 --- a/src/components/settings/pages/ChangePassword.tsx +++ b/src/components/settings/pages/ChangePassword.tsx @@ -13,7 +13,7 @@ import { Typography, Button, AlertTriangleIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; export function ChangePassword({ diff --git a/src/components/settings/pages/ConnectedSites.tsx b/src/components/settings/pages/ConnectedSites.tsx index d38376a5f..12761a5bd 100644 --- a/src/components/settings/pages/ConnectedSites.tsx +++ b/src/components/settings/pages/ConnectedSites.tsx @@ -11,7 +11,7 @@ import { IconButton, EmptySitesIcon, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { usePermissionContext } from '@src/contexts/PermissionsProvider'; import { SettingsPageProps } from '../models'; diff --git a/src/components/settings/pages/ContactList.tsx b/src/components/settings/pages/ContactList.tsx index 66ebc58a2..fd90300ff 100644 --- a/src/components/settings/pages/ContactList.tsx +++ b/src/components/settings/pages/ContactList.tsx @@ -13,7 +13,7 @@ import { IconButton, List, SearchBar, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; export function ContactList({ goBack, navigateTo, width }: SettingsPageProps) { diff --git a/src/components/settings/pages/Currencies.tsx b/src/components/settings/pages/Currencies.tsx index fe9ec1154..9cee5c45d 100644 --- a/src/components/settings/pages/Currencies.tsx +++ b/src/components/settings/pages/Currencies.tsx @@ -7,7 +7,7 @@ import { List, CheckIcon, SearchBar, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SettingsPageProps } from '../models'; import { SettingsHeader } from '../SettingsHeader'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; diff --git a/src/components/settings/pages/ExportRecoveryPhrase.tsx b/src/components/settings/pages/ExportRecoveryPhrase.tsx index 19e5be6c7..a133e32c8 100644 --- a/src/components/settings/pages/ExportRecoveryPhrase.tsx +++ b/src/components/settings/pages/ExportRecoveryPhrase.tsx @@ -15,7 +15,7 @@ import { Typography, Skeleton, CheckCircleIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useState } from 'react'; import { diff --git a/src/components/settings/pages/Feedback.tsx b/src/components/settings/pages/Feedback.tsx index a4f9f1653..3dd94573b 100644 --- a/src/components/settings/pages/Feedback.tsx +++ b/src/components/settings/pages/Feedback.tsx @@ -7,7 +7,7 @@ import { ListItemText, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import browser from 'webextension-polyfill'; import { useEffect, useState } from 'react'; diff --git a/src/components/settings/pages/Language.tsx b/src/components/settings/pages/Language.tsx index 1480cb7fa..3c309ed71 100644 --- a/src/components/settings/pages/Language.tsx +++ b/src/components/settings/pages/Language.tsx @@ -10,7 +10,7 @@ import { ListItem, List, CheckIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { StyledListButton } from '../components/StyledListItemButton'; export function Language({ goBack, navigateTo, width }: SettingsPageProps) { diff --git a/src/components/settings/pages/Ledger.tsx b/src/components/settings/pages/Ledger.tsx index f4329ae56..7093c8064 100644 --- a/src/components/settings/pages/Ledger.tsx +++ b/src/components/settings/pages/Ledger.tsx @@ -8,7 +8,7 @@ import { Box, Divider, Scrollbars, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SettingsPageProps } from '../models'; import { SettingsHeader } from '../SettingsHeader'; import { diff --git a/src/components/settings/pages/Legal.tsx b/src/components/settings/pages/Legal.tsx index b87fd4618..5a74de381 100644 --- a/src/components/settings/pages/Legal.tsx +++ b/src/components/settings/pages/Legal.tsx @@ -7,7 +7,7 @@ import { ListItemText, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; export function Legal({ goBack, navigateTo, width }) { diff --git a/src/components/settings/pages/MainPage.tsx b/src/components/settings/pages/MainPage.tsx index 89486af65..8460256dc 100644 --- a/src/components/settings/pages/MainPage.tsx +++ b/src/components/settings/pages/MainPage.tsx @@ -30,7 +30,7 @@ import { ComputerIcon, Badge, Box, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import browser from 'webextension-polyfill'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { useSeedlessMfaManager } from '@src/contexts/SeedlessMfaManagementProvider'; diff --git a/src/components/settings/pages/RecoveryMethods/AddNewRecoveryMethod.tsx b/src/components/settings/pages/RecoveryMethods/AddNewRecoveryMethod.tsx index 2706af622..bb1aa8a07 100644 --- a/src/components/settings/pages/RecoveryMethods/AddNewRecoveryMethod.tsx +++ b/src/components/settings/pages/RecoveryMethods/AddNewRecoveryMethod.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import { PageTitle } from '@src/components/common/PageTitle'; diff --git a/src/components/settings/pages/RecoveryMethods/AuthenticatorDetails.tsx b/src/components/settings/pages/RecoveryMethods/AuthenticatorDetails.tsx index 089b8fa3f..2673475a7 100644 --- a/src/components/settings/pages/RecoveryMethods/AuthenticatorDetails.tsx +++ b/src/components/settings/pages/RecoveryMethods/AuthenticatorDetails.tsx @@ -15,7 +15,7 @@ import { AlertCircleIcon, TrashIcon, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useEffect, useState } from 'react'; import browser from 'webextension-polyfill'; diff --git a/src/components/settings/pages/RecoveryMethods/AuthenticatorVerifyScreen.tsx b/src/components/settings/pages/RecoveryMethods/AuthenticatorVerifyScreen.tsx index 486c75b30..6fb7cf665 100644 --- a/src/components/settings/pages/RecoveryMethods/AuthenticatorVerifyScreen.tsx +++ b/src/components/settings/pages/RecoveryMethods/AuthenticatorVerifyScreen.tsx @@ -11,7 +11,7 @@ import { Typography, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import QRCode from 'qrcode.react'; import { PageTitle } from '@src/components/common/PageTitle'; diff --git a/src/components/settings/pages/RecoveryMethods/FIDODetails.tsx b/src/components/settings/pages/RecoveryMethods/FIDODetails.tsx index e2187db25..52a539fcd 100644 --- a/src/components/settings/pages/RecoveryMethods/FIDODetails.tsx +++ b/src/components/settings/pages/RecoveryMethods/FIDODetails.tsx @@ -14,7 +14,7 @@ import { TrashIcon, toast, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useState } from 'react'; import { Overlay } from '@src/components/common/Overlay'; diff --git a/src/components/settings/pages/RecoveryMethods/RecoveryMethods.tsx b/src/components/settings/pages/RecoveryMethods/RecoveryMethods.tsx index 1c38de578..515494fa3 100644 --- a/src/components/settings/pages/RecoveryMethods/RecoveryMethods.tsx +++ b/src/components/settings/pages/RecoveryMethods/RecoveryMethods.tsx @@ -1,6 +1,6 @@ import { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Stack, Button, PlusIcon, Skeleton } from '@avalabs/k2-components'; +import { Stack, Button, PlusIcon, Skeleton } from '@avalabs/core-k2-components'; import browser from 'webextension-polyfill'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/components/settings/pages/RecoveryMethods/RecoveryMethodsList.tsx b/src/components/settings/pages/RecoveryMethods/RecoveryMethodsList.tsx index 32968866b..fd7f4ce0f 100644 --- a/src/components/settings/pages/RecoveryMethods/RecoveryMethodsList.tsx +++ b/src/components/settings/pages/RecoveryMethods/RecoveryMethodsList.tsx @@ -1,5 +1,5 @@ import { t } from 'i18next'; -import { KeyIcon, QRCodeIcon, UsbIcon } from '@avalabs/k2-components'; +import { KeyIcon, QRCodeIcon, UsbIcon } from '@avalabs/core-k2-components'; import { RecoveryMethodType } from '@src/background/services/seedless/models'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/components/settings/pages/RecoveryPhrase.tsx b/src/components/settings/pages/RecoveryPhrase.tsx index 5662a02c0..58d19de8b 100644 --- a/src/components/settings/pages/RecoveryPhrase.tsx +++ b/src/components/settings/pages/RecoveryPhrase.tsx @@ -10,7 +10,7 @@ import { TextField, Typography, LoadingDots, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export function RecoveryPhrase({ goBack, diff --git a/src/components/settings/pages/SecurityAndPrivacy.tsx b/src/components/settings/pages/SecurityAndPrivacy.tsx index 655a74096..a9a8466f9 100644 --- a/src/components/settings/pages/SecurityAndPrivacy.tsx +++ b/src/components/settings/pages/SecurityAndPrivacy.tsx @@ -21,7 +21,7 @@ import { Switch, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useState } from 'react'; import Dialog from '@src/components/common/Dialog'; import { SeedlessExportAnalytics } from '@src/background/services/seedless/seedlessAnalytics'; diff --git a/src/contexts/BridgeProvider.tsx b/src/contexts/BridgeProvider.tsx index 552cef03d..34295ffb9 100644 --- a/src/contexts/BridgeProvider.tsx +++ b/src/contexts/BridgeProvider.tsx @@ -5,8 +5,8 @@ import { setBridgeEnvironment, useBridgeSDK, WrapStatus, -} from '@avalabs/bridge-sdk'; -import { ChainId } from '@avalabs/chains-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { isBridgeStateUpdateEventListener, diff --git a/src/contexts/LedgerProvider.test.tsx b/src/contexts/LedgerProvider.test.tsx index 2618a91be..c925f0573 100644 --- a/src/contexts/LedgerProvider.test.tsx +++ b/src/contexts/LedgerProvider.test.tsx @@ -29,7 +29,7 @@ import { getLedgerExtendedPublicKey, getPubKeyFromTransport, quitLedgerApp, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { LockEvents } from '@src/background/services/lock/models'; import TransportWebUSB from '@ledgerhq/hw-transport-webusb'; import Eth from '@ledgerhq/hw-app-eth'; @@ -44,7 +44,7 @@ jest.mock('./ConnectionProvider', () => { }; }); -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); jest.mock('@avalabs/hw-app-avalanche'); jest.mock('@ledgerhq/hw-app-eth'); jest.mock('ledger-bitcoin'); diff --git a/src/contexts/LedgerProvider.tsx b/src/contexts/LedgerProvider.tsx index ecad36b03..f168894b1 100644 --- a/src/contexts/LedgerProvider.tsx +++ b/src/contexts/LedgerProvider.tsx @@ -40,7 +40,7 @@ import { getLedgerExtendedPublicKey, getPubKeyFromTransport, quitLedgerApp, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { CloseLedgerTransportHandler } from '@src/background/services/ledger/handlers/closeOpenTransporters'; import { GetLedgerVersionWarningHandler } from '@src/background/services/ledger/handlers/getLedgerVersionWarning'; import { LedgerVersionWarningClosedHandler } from '@src/background/services/ledger/handlers/setLedgerVersionWarningClosed'; diff --git a/src/contexts/NetworkProvider.tsx b/src/contexts/NetworkProvider.tsx index 4b3612cd7..ceb439775 100644 --- a/src/contexts/NetworkProvider.tsx +++ b/src/contexts/NetworkProvider.tsx @@ -9,7 +9,7 @@ import { import { useConnectionContext } from './ConnectionProvider'; import { filter, map } from 'rxjs'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { networksUpdatedEventListener } from '@src/background/services/network/events/networksUpdatedEventListener'; import { useAnalyticsContext } from './AnalyticsProvider'; import { SetDevelopermodeNetworkHandler } from '@src/background/services/network/handlers/setDeveloperMode'; @@ -19,7 +19,10 @@ import { RemoveFavoriteNetworkHandler } from '@src/background/services/network/h import { SaveCustomNetworkHandler } from '@src/background/services/network/handlers/saveCustomNetwork'; import { AddFavoriteNetworkHandler } from '@src/background/services/network/handlers/addFavoriteNetwork'; import { UpdateDefaultNetworkHandler } from '@src/background/services/network/handlers/updateDefaultNetwork'; -import { BitcoinProvider, JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { + BitcoinProvider, + JsonRpcBatchInternal, +} from '@avalabs/core-wallets-sdk'; import { CustomNetworkPayload, Network, diff --git a/src/contexts/OnboardingProvider.tsx b/src/contexts/OnboardingProvider.tsx index eaf476f92..04b87bf57 100644 --- a/src/contexts/OnboardingProvider.tsx +++ b/src/contexts/OnboardingProvider.tsx @@ -28,7 +28,7 @@ import { concat, filter, from, map } from 'rxjs'; import browser from 'webextension-polyfill'; import { useConnectionContext } from './ConnectionProvider'; import { LoadingContent } from '@src/popup/LoadingContent'; -import { toast } from '@avalabs/k2-components'; +import { toast } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import { useAnalyticsContext } from './AnalyticsProvider'; diff --git a/src/contexts/SwapProvider/SwapProvider.test.tsx b/src/contexts/SwapProvider/SwapProvider.test.tsx index 543cb3f2e..7d9424340 100644 --- a/src/contexts/SwapProvider/SwapProvider.test.tsx +++ b/src/contexts/SwapProvider/SwapProvider.test.tsx @@ -10,7 +10,7 @@ import { useNetworkContext } from '../NetworkProvider'; import { useConnectionContext } from '../ConnectionProvider'; import { useFeatureFlagContext } from '../FeatureFlagsProvider'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { Contract } from 'ethers'; import Big from 'big.js'; import { GetRateParams, SwapContextAPI, SwapParams } from './models'; diff --git a/src/contexts/SwapProvider/SwapProvider.tsx b/src/contexts/SwapProvider/SwapProvider.tsx index 3ff42a879..f25838184 100644 --- a/src/contexts/SwapProvider/SwapProvider.tsx +++ b/src/contexts/SwapProvider/SwapProvider.tsx @@ -15,7 +15,7 @@ import { useNetworkContext } from '../NetworkProvider'; import { useAccountsContext } from '../AccountsProvider'; import { useFeatureFlagContext } from '../FeatureFlagsProvider'; import { FeatureGates } from '@src/background/services/featureFlags/models'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; import Web3 from 'web3'; import { incrementalPromiseResolve } from '@src/utils/incrementalPromiseResolve'; diff --git a/src/hooks/useApprovalHelpers.ts b/src/hooks/useApprovalHelpers.ts index 01b625cfd..9f1cf620c 100644 --- a/src/hooks/useApprovalHelpers.ts +++ b/src/hooks/useApprovalHelpers.ts @@ -3,7 +3,7 @@ import { useCallback, useRef, useState } from 'react'; import useIsUsingLedgerWallet from './useIsUsingLedgerWallet'; import useIsUsingKeystoneWallet from './useIsUsingKeystoneWallet'; import useIsUsingWalletConnectAccount from './useIsUsingWalletConnectAccount'; -import { toast } from '@avalabs/k2-components'; +import { toast } from '@avalabs/core-k2-components'; import useIsUsingFireblocksAccount from './useIsUsingFireblocksAccount'; type UseApprovalHelpersProps = { diff --git a/src/hooks/useCoinGeckoId.test.ts b/src/hooks/useCoinGeckoId.test.ts index f19b0cfe5..9c05156e5 100644 --- a/src/hooks/useCoinGeckoId.test.ts +++ b/src/hooks/useCoinGeckoId.test.ts @@ -1,8 +1,8 @@ import { renderHook } from '@testing-library/react-hooks'; -import { TokenInfo, useTokenInfoContext } from '@avalabs/bridge-sdk'; +import { TokenInfo, useTokenInfoContext } from '@avalabs/core-bridge-sdk'; import { useCoinGeckoId } from './useCoinGeckoId'; -jest.mock('@avalabs/bridge-sdk', () => ({ +jest.mock('@avalabs/core-bridge-sdk', () => ({ useTokenInfoContext: jest.fn(), })); diff --git a/src/hooks/useCoinGeckoId.ts b/src/hooks/useCoinGeckoId.ts index 44f28f951..dd3977bf2 100644 --- a/src/hooks/useCoinGeckoId.ts +++ b/src/hooks/useCoinGeckoId.ts @@ -1,4 +1,4 @@ -import { useTokenInfoContext } from '@avalabs/bridge-sdk'; +import { useTokenInfoContext } from '@avalabs/core-bridge-sdk'; // This is a copy from https://github.com/ava-labs/core-web-properties/blob/develop/packages/web/src/hooks/bridge/useCoingeckoId.ts diff --git a/src/hooks/useDAppScan.ts b/src/hooks/useDAppScan.ts index b8b5d661c..e8a70977a 100644 --- a/src/hooks/useDAppScan.ts +++ b/src/hooks/useDAppScan.ts @@ -1,4 +1,4 @@ -import { resolve } from '@avalabs/utils-sdk'; +import { resolve } from '@avalabs/core-utils-sdk'; import Blockaid from '@blockaid/client'; import { FeatureGates } from '@src/background/services/featureFlags/models'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; diff --git a/src/hooks/useDisplayTokenList.ts b/src/hooks/useDisplayTokenList.ts index de1e9ce2d..e9fa1e4b3 100644 --- a/src/hooks/useDisplayTokenList.ts +++ b/src/hooks/useDisplayTokenList.ts @@ -1,8 +1,8 @@ -import { bnToBig } from '@avalabs/utils-sdk'; +import { bnToBig } from '@avalabs/core-utils-sdk'; import { TokenWithBalance } from '@src/background/services/balances/models'; import { AssetBalance } from '@src/pages/Bridge/models'; import { useMemo } from 'react'; -import { formatTokenAmount } from '@avalabs/bridge-sdk'; +import { formatTokenAmount } from '@avalabs/core-bridge-sdk'; import Big from 'big.js'; import BN from 'bn.js'; import { partition } from 'lodash'; diff --git a/src/hooks/useIsFunctionAvailable.ts b/src/hooks/useIsFunctionAvailable.ts index 5f66b6554..81b71ea8d 100644 --- a/src/hooks/useIsFunctionAvailable.ts +++ b/src/hooks/useIsFunctionAvailable.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { Account } from '@src/background/services/accounts/models'; import { isFireblocksAccount, diff --git a/src/hooks/useKeystoneScannerContents.tsx b/src/hooks/useKeystoneScannerContents.tsx index dd47a9f16..dde0ebee6 100644 --- a/src/hooks/useKeystoneScannerContents.tsx +++ b/src/hooks/useKeystoneScannerContents.tsx @@ -6,7 +6,7 @@ import { CircularProgress, QRCodeIcon, CameraBlockedIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { AnimatedQRScanner, Purpose, URType } from '@keystonehq/animated-qr'; diff --git a/src/hooks/useSeedlessMfa.tsx b/src/hooks/useSeedlessMfa.tsx index 54aad1e5e..ef1f00f5a 100644 --- a/src/hooks/useSeedlessMfa.tsx +++ b/src/hooks/useSeedlessMfa.tsx @@ -19,7 +19,11 @@ import { useConnectionContext } from '@src/contexts/ConnectionProvider'; import { launchFidoFlow } from '@src/utils/seedless/fido/launchFidoFlow'; import { FIDOApiEndpoint } from '@src/utils/seedless/fido/types'; -import { Dialog, DialogContent, DialogTitle } from '@avalabs/k2-components'; +import { + Dialog, + DialogContent, + DialogTitle, +} from '@avalabs/core-k2-components'; import { TOTPChallenge } from '@src/components/common/seedless/components/TOTPChallenge'; import { FIDOChallenge } from '@src/components/common/seedless/components/FIDOChallenge'; import { useTranslation } from 'react-i18next'; diff --git a/src/hooks/useTokenPrice.ts b/src/hooks/useTokenPrice.ts index 9e911bc50..a4722ef0e 100644 --- a/src/hooks/useTokenPrice.ts +++ b/src/hooks/useTokenPrice.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { GetTokenPriceHandler } from '@src/background/services/balances/handlers/getTokenPrice'; import { useConnectionContext } from '@src/contexts/ConnectionProvider'; diff --git a/src/pages/Accounts/AccountBalance.tsx b/src/pages/Accounts/AccountBalance.tsx index f03d41e38..8719da738 100644 --- a/src/pages/Accounts/AccountBalance.tsx +++ b/src/pages/Accounts/AccountBalance.tsx @@ -8,7 +8,7 @@ import { IconButton, Button, Grow, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; diff --git a/src/pages/Accounts/AccountDetailsView.tsx b/src/pages/Accounts/AccountDetailsView.tsx index 15c59392f..7cf8559c8 100644 --- a/src/pages/Accounts/AccountDetailsView.tsx +++ b/src/pages/Accounts/AccountDetailsView.tsx @@ -13,7 +13,7 @@ import { Tooltip, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useWalletContext } from '@src/contexts/WalletProvider'; diff --git a/src/pages/Accounts/AccountItemChip.tsx b/src/pages/Accounts/AccountItemChip.tsx index 59bbd48c6..cbfb0af7e 100644 --- a/src/pages/Accounts/AccountItemChip.tsx +++ b/src/pages/Accounts/AccountItemChip.tsx @@ -5,7 +5,7 @@ import { WalletConnectIcon, FireblocksIcon, Chip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Account, AccountType } from '@src/background/services/accounts/models'; diff --git a/src/pages/Accounts/Accounts.tsx b/src/pages/Accounts/Accounts.tsx index adcaf13bb..2c7601ab6 100644 --- a/src/pages/Accounts/Accounts.tsx +++ b/src/pages/Accounts/Accounts.tsx @@ -11,7 +11,7 @@ import { XIcon, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { t } from 'i18next'; import { useHistory } from 'react-router-dom'; diff --git a/src/pages/Accounts/AddAccountError.tsx b/src/pages/Accounts/AddAccountError.tsx index 22ae8bf13..8dd541b8d 100644 --- a/src/pages/Accounts/AddAccountError.tsx +++ b/src/pages/Accounts/AddAccountError.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { Stack, Typography, useTheme } from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Accounts/AddWalletWithKeystoreFile.tsx b/src/pages/Accounts/AddWalletWithKeystoreFile.tsx index 7764577c0..dc632010e 100644 --- a/src/pages/Accounts/AddWalletWithKeystoreFile.tsx +++ b/src/pages/Accounts/AddWalletWithKeystoreFile.tsx @@ -10,7 +10,7 @@ import { Typography, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Accounts/AddWalletWithLedger.tsx b/src/pages/Accounts/AddWalletWithLedger.tsx index 35986017a..4a88c3f06 100644 --- a/src/pages/Accounts/AddWalletWithLedger.tsx +++ b/src/pages/Accounts/AddWalletWithLedger.tsx @@ -7,7 +7,7 @@ import { Typography, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useTranslation } from 'react-i18next'; import { useCallback, useEffect, useState } from 'react'; @@ -15,7 +15,7 @@ import { useCallback, useEffect, useState } from 'react'; import { LedgerWrongVersionOverlay } from '../Ledger/LedgerWrongVersionOverlay'; import { PubKeyType } from '@src/background/services/wallet/models'; import { NameYourWallet } from './components/NameYourWallet'; -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { SecretType } from '@src/background/services/secrets/models'; import { useImportLedger } from './hooks/useImportLedger'; import { diff --git a/src/pages/Accounts/AddWalletWithSeedPhrase.tsx b/src/pages/Accounts/AddWalletWithSeedPhrase.tsx index a614cb199..a730bbf93 100644 --- a/src/pages/Accounts/AddWalletWithSeedPhrase.tsx +++ b/src/pages/Accounts/AddWalletWithSeedPhrase.tsx @@ -12,10 +12,13 @@ import { styled, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { getAddressFromXPub, getXpubFromMnemonic } from '@avalabs/wallets-sdk'; +import { + getAddressFromXPub, + getXpubFromMnemonic, +} from '@avalabs/core-wallets-sdk'; import { Account } from '@src/background/services/accounts/models'; import { PageTitle } from '@src/components/common/PageTitle'; diff --git a/src/pages/Accounts/components/AccountDetailsAddressRow.tsx b/src/pages/Accounts/components/AccountDetailsAddressRow.tsx index 0c0fe7b14..ec9086f32 100644 --- a/src/pages/Accounts/components/AccountDetailsAddressRow.tsx +++ b/src/pages/Accounts/components/AccountDetailsAddressRow.tsx @@ -3,7 +3,7 @@ import { IconButton, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { stripAddressPrefix } from '@src/utils/stripAddressPrefix'; diff --git a/src/pages/Accounts/components/AccountItem.tsx b/src/pages/Accounts/components/AccountItem.tsx index 299c05d3b..4b3581de9 100644 --- a/src/pages/Accounts/components/AccountItem.tsx +++ b/src/pages/Accounts/components/AccountItem.tsx @@ -7,7 +7,7 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { ForwardedRef, diff --git a/src/pages/Accounts/components/AccountItemMenu.tsx b/src/pages/Accounts/components/AccountItemMenu.tsx index 6307278fb..43f8e6e68 100644 --- a/src/pages/Accounts/components/AccountItemMenu.tsx +++ b/src/pages/Accounts/components/AccountItemMenu.tsx @@ -12,7 +12,7 @@ import { MenuList, MoreHorizontalIcon, Popper, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { MouseEvent, useCallback, useRef, useState } from 'react'; diff --git a/src/pages/Accounts/components/AccountList.tsx b/src/pages/Accounts/components/AccountList.tsx index 032470173..1f35cb3ee 100644 --- a/src/pages/Accounts/components/AccountList.tsx +++ b/src/pages/Accounts/components/AccountList.tsx @@ -3,7 +3,7 @@ import { ScrollbarsRef, Stack, SxProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useEffect, useRef } from 'react'; import { Account } from '@src/background/services/accounts/models'; diff --git a/src/pages/Accounts/components/AccountListPrimary.tsx b/src/pages/Accounts/components/AccountListPrimary.tsx index b96cd99a2..9efd346a0 100644 --- a/src/pages/Accounts/components/AccountListPrimary.tsx +++ b/src/pages/Accounts/components/AccountListPrimary.tsx @@ -5,7 +5,7 @@ import { Stack, SxProps, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useEffect, useRef } from 'react'; import { diff --git a/src/pages/Accounts/components/AccountNameInput.tsx b/src/pages/Accounts/components/AccountNameInput.tsx index 6053463ba..166cbe6fc 100644 --- a/src/pages/Accounts/components/AccountNameInput.tsx +++ b/src/pages/Accounts/components/AccountNameInput.tsx @@ -1,4 +1,4 @@ -import { TextFieldProps, useTheme } from '@avalabs/k2-components'; +import { TextFieldProps, useTheme } from '@avalabs/core-k2-components'; import { TextField } from '@mui/material'; export const AccountNameInput = (props: TextFieldProps) => { diff --git a/src/pages/Accounts/components/AccountsActionButton.tsx b/src/pages/Accounts/components/AccountsActionButton.tsx index a35cfba52..7efea82dc 100644 --- a/src/pages/Accounts/components/AccountsActionButton.tsx +++ b/src/pages/Accounts/components/AccountsActionButton.tsx @@ -15,7 +15,7 @@ import { ListIcon, Typography, TypographyProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useMemo, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; @@ -25,7 +25,7 @@ import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; import { FeatureGates } from '@src/background/services/featureFlags/models'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { isProductionBuild } from '@src/utils/environment'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; type AccountsActionButtonProps = { diff --git a/src/pages/Accounts/components/ConfirmAccountRemovalDialog.tsx b/src/pages/Accounts/components/ConfirmAccountRemovalDialog.tsx index d667564f7..ec1fe69d6 100644 --- a/src/pages/Accounts/components/ConfirmAccountRemovalDialog.tsx +++ b/src/pages/Accounts/components/ConfirmAccountRemovalDialog.tsx @@ -6,7 +6,7 @@ import { DialogProps, DialogTitle, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; type ConfirmAccountRemovalDialogProps = DialogProps & { diff --git a/src/pages/Accounts/components/CurrentAddressSneakPeek.tsx b/src/pages/Accounts/components/CurrentAddressSneakPeek.tsx index c1710a0ed..974802f9a 100644 --- a/src/pages/Accounts/components/CurrentAddressSneakPeek.tsx +++ b/src/pages/Accounts/components/CurrentAddressSneakPeek.tsx @@ -7,7 +7,7 @@ import { Tooltip, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { truncateAddress } from '@src/utils/truncateAddress'; diff --git a/src/pages/Accounts/components/KeystoreFileConfirmation.tsx b/src/pages/Accounts/components/KeystoreFileConfirmation.tsx index dea22afb4..3e7f0dcb3 100644 --- a/src/pages/Accounts/components/KeystoreFileConfirmation.tsx +++ b/src/pages/Accounts/components/KeystoreFileConfirmation.tsx @@ -4,7 +4,7 @@ import { Stack, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { KeystoreFileContentInfo } from '@src/utils/keystore/models'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Accounts/components/KeystoreFileError.tsx b/src/pages/Accounts/components/KeystoreFileError.tsx index 2d929a505..23dbdd626 100644 --- a/src/pages/Accounts/components/KeystoreFileError.tsx +++ b/src/pages/Accounts/components/KeystoreFileError.tsx @@ -4,7 +4,7 @@ import { Card, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useErrorMessage } from '@src/hooks/useErrorMessage'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Accounts/components/KeystoreFileUpload.tsx b/src/pages/Accounts/components/KeystoreFileUpload.tsx index 520b89d2a..4b30d1848 100644 --- a/src/pages/Accounts/components/KeystoreFileUpload.tsx +++ b/src/pages/Accounts/components/KeystoreFileUpload.tsx @@ -5,7 +5,7 @@ import { Typography, UploadIcon, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ChangeEventHandler, DragEventHandler, diff --git a/src/pages/Accounts/components/MenuFilterItem.tsx b/src/pages/Accounts/components/MenuFilterItem.tsx index a5363e17f..c55d149e3 100644 --- a/src/pages/Accounts/components/MenuFilterItem.tsx +++ b/src/pages/Accounts/components/MenuFilterItem.tsx @@ -1,4 +1,9 @@ -import { CheckIcon, MenuItem, Stack, Typography } from '@avalabs/k2-components'; +import { + CheckIcon, + MenuItem, + Stack, + Typography, +} from '@avalabs/core-k2-components'; export const MenuFilterItem = ({ itemText, diff --git a/src/pages/Accounts/components/NameYourWallet.tsx b/src/pages/Accounts/components/NameYourWallet.tsx index 702447d29..6d3189ad2 100644 --- a/src/pages/Accounts/components/NameYourWallet.tsx +++ b/src/pages/Accounts/components/NameYourWallet.tsx @@ -1,6 +1,11 @@ import { useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { Button, Stack, TextField, useTheme } from '@avalabs/k2-components'; +import { + Button, + Stack, + TextField, + useTheme, +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useKeyboardShortcuts } from '@src/hooks/useKeyboardShortcuts'; diff --git a/src/pages/Accounts/components/NoAccountsFound.tsx b/src/pages/Accounts/components/NoAccountsFound.tsx index 84e8c54cc..4431dd15d 100644 --- a/src/pages/Accounts/components/NoAccountsFound.tsx +++ b/src/pages/Accounts/components/NoAccountsFound.tsx @@ -4,7 +4,7 @@ import { SearchOffIcon, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; diff --git a/src/pages/Accounts/components/WalletTypeIcon.tsx b/src/pages/Accounts/components/WalletTypeIcon.tsx index 506ecef21..93dab261c 100644 --- a/src/pages/Accounts/components/WalletTypeIcon.tsx +++ b/src/pages/Accounts/components/WalletTypeIcon.tsx @@ -6,7 +6,7 @@ import { LedgerIcon, ListIcon, SxProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SecretType } from '@src/background/services/secrets/models'; import { diff --git a/src/pages/Accounts/components/XPChainIcon.tsx b/src/pages/Accounts/components/XPChainIcon.tsx index 55c6b5167..5ae536899 100644 --- a/src/pages/Accounts/components/XPChainIcon.tsx +++ b/src/pages/Accounts/components/XPChainIcon.tsx @@ -3,7 +3,7 @@ import { Avatar, Badge, Stack, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const XPChainIcon = () => ( { const { t } = useTranslation(); diff --git a/src/pages/Bridge/components/BridgeUnknownNetwork.tsx b/src/pages/Bridge/components/BridgeUnknownNetwork.tsx index 63f987e50..58f88b465 100644 --- a/src/pages/Bridge/components/BridgeUnknownNetwork.tsx +++ b/src/pages/Bridge/components/BridgeUnknownNetwork.tsx @@ -1,10 +1,10 @@ -import { Blockchain, useBridgeSDK } from '@avalabs/bridge-sdk'; +import { Blockchain, useBridgeSDK } from '@avalabs/core-bridge-sdk'; import { PageTitle, PageTitleVariant } from '@src/components/common/PageTitle'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { useAvailableBlockchains } from '../hooks/useAvailableBlockchains'; import { blockchainToNetwork } from '../utils/blockchainConversion'; import { useTranslation } from 'react-i18next'; -import { Button, Stack, Typography } from '@avalabs/k2-components'; +import { Button, Stack, Typography } from '@avalabs/core-k2-components'; export const BridgeUnknownNetwork = ({ onSelect }) => { const { t } = useTranslation(); diff --git a/src/pages/Bridge/components/ElapsedTimer.tsx b/src/pages/Bridge/components/ElapsedTimer.tsx index 715545524..871116401 100644 --- a/src/pages/Bridge/components/ElapsedTimer.tsx +++ b/src/pages/Bridge/components/ElapsedTimer.tsx @@ -5,7 +5,7 @@ import { Tooltip, Typography, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useEffect } from 'react'; import { useStopwatch } from 'react-timer-hook'; diff --git a/src/pages/Bridge/components/NetworkSelector.tsx b/src/pages/Bridge/components/NetworkSelector.tsx index 0bc1dbe1c..02ea5260d 100644 --- a/src/pages/Bridge/components/NetworkSelector.tsx +++ b/src/pages/Bridge/components/NetworkSelector.tsx @@ -1,4 +1,4 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { AvaxTokenIcon } from '@src/components/icons/AvaxTokenIcon'; import { BitcoinLogo } from '@src/components/icons/BitcoinLogo'; import { useRef, useState } from 'react'; @@ -13,7 +13,7 @@ import { MenuItem, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TokenIcon } from '@src/components/common/TokenIcon'; interface NetworkSelectorProps { diff --git a/src/pages/Bridge/components/OffloadTimerTooltip.tsx b/src/pages/Bridge/components/OffloadTimerTooltip.tsx index 41f1520b5..360987b72 100644 --- a/src/pages/Bridge/components/OffloadTimerTooltip.tsx +++ b/src/pages/Bridge/components/OffloadTimerTooltip.tsx @@ -1,4 +1,4 @@ -import { InfoCircleIcon, Link, Tooltip } from '@avalabs/k2-components'; +import { InfoCircleIcon, Link, Tooltip } from '@avalabs/core-k2-components'; import { Trans, useTranslation } from 'react-i18next'; import { formatDistance } from 'date-fns'; diff --git a/src/pages/Bridge/hooks/useAssetBalancesEVM.ts b/src/pages/Bridge/hooks/useAssetBalancesEVM.ts index 8f1e9cb13..1ba0bcd48 100644 --- a/src/pages/Bridge/hooks/useAssetBalancesEVM.ts +++ b/src/pages/Bridge/hooks/useAssetBalancesEVM.ts @@ -4,7 +4,7 @@ import { EthereumAssets, useBridgeSDK, useGetTokenSymbolOnNetwork, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import { uniqBy } from 'lodash'; import { getBalances } from '../utils/getBalances'; diff --git a/src/pages/Bridge/hooks/useAvailableBlockchains.ts b/src/pages/Bridge/hooks/useAvailableBlockchains.ts index 92ec113ef..f6ffa10de 100644 --- a/src/pages/Bridge/hooks/useAvailableBlockchains.ts +++ b/src/pages/Bridge/hooks/useAvailableBlockchains.ts @@ -1,4 +1,4 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; import { useEffect, useState } from 'react'; diff --git a/src/pages/Bridge/hooks/useAvalancheBridge.ts b/src/pages/Bridge/hooks/useAvalancheBridge.ts index ab326b19b..4735a6cf6 100644 --- a/src/pages/Bridge/hooks/useAvalancheBridge.ts +++ b/src/pages/Bridge/hooks/useAvalancheBridge.ts @@ -1,4 +1,4 @@ -import { BIG_ZERO, Blockchain, useBridgeSDK } from '@avalabs/bridge-sdk'; +import { BIG_ZERO, Blockchain, useBridgeSDK } from '@avalabs/core-bridge-sdk'; import { BridgeAdapter } from './useBridge'; import { useAssetBalancesEVM } from './useAssetBalancesEVM'; import { useCallback, useState } from 'react'; diff --git a/src/pages/Bridge/hooks/useBridge.ts b/src/pages/Bridge/hooks/useBridge.ts index 7ceab2ddd..08db25816 100644 --- a/src/pages/Bridge/hooks/useBridge.ts +++ b/src/pages/Bridge/hooks/useBridge.ts @@ -7,7 +7,7 @@ import { WrapStatus, useMinimumTransferAmount, Asset, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import { Dispatch, SetStateAction, useMemo, useState } from 'react'; import { AssetBalance } from '../models'; @@ -17,7 +17,7 @@ import { useAvalancheBridge } from './useAvalancheBridge'; import { useUnifiedBridgeContext } from '@src/contexts/UnifiedBridgeProvider'; import { useUnifiedBridge } from './useUnifiedBridge'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { BridgeStepDetails } from '@avalabs/bridge-unified'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; import { CustomGasSettings } from '@src/background/services/bridge/models'; diff --git a/src/pages/Bridge/hooks/useBridgeAmounts.ts b/src/pages/Bridge/hooks/useBridgeAmounts.ts index 5e6b7f40f..2bd60bfbf 100644 --- a/src/pages/Bridge/hooks/useBridgeAmounts.ts +++ b/src/pages/Bridge/hooks/useBridgeAmounts.ts @@ -1,5 +1,5 @@ import { useMemo } from 'react'; -import { BridgeTransaction } from '@avalabs/bridge-sdk'; +import { BridgeTransaction } from '@avalabs/core-bridge-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; import { bigintToBig } from '@src/utils/bigintToBig'; diff --git a/src/pages/Bridge/hooks/useBridgeNetworkPrice.ts b/src/pages/Bridge/hooks/useBridgeNetworkPrice.ts index 5a0beb4b9..1913322ed 100644 --- a/src/pages/Bridge/hooks/useBridgeNetworkPrice.ts +++ b/src/pages/Bridge/hooks/useBridgeNetworkPrice.ts @@ -1,4 +1,4 @@ -import { Blockchain, usePriceForChain } from '@avalabs/bridge-sdk'; +import { Blockchain, usePriceForChain } from '@avalabs/core-bridge-sdk'; import { Chain } from '@avalabs/bridge-unified'; import { useMemo } from 'react'; import { networkToBlockchain } from '../utils/blockchainConversion'; diff --git a/src/pages/Bridge/hooks/useBridgeTransferStatus.ts b/src/pages/Bridge/hooks/useBridgeTransferStatus.ts index a0df59037..c320488ed 100644 --- a/src/pages/Bridge/hooks/useBridgeTransferStatus.ts +++ b/src/pages/Bridge/hooks/useBridgeTransferStatus.ts @@ -1,4 +1,4 @@ -import { BridgeTransaction } from '@avalabs/bridge-sdk'; +import { BridgeTransaction } from '@avalabs/core-bridge-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; import { isUnifiedBridgeTransfer } from '../utils/isUnifiedBridgeTransfer'; diff --git a/src/pages/Bridge/hooks/useBtcBridge.ts b/src/pages/Bridge/hooks/useBtcBridge.ts index c15f08d26..d08f6ac1b 100644 --- a/src/pages/Bridge/hooks/useBtcBridge.ts +++ b/src/pages/Bridge/hooks/useBtcBridge.ts @@ -7,12 +7,12 @@ import { satoshiToBtc, useBridgeConfig, useBridgeSDK, -} from '@avalabs/bridge-sdk'; -import { ChainId } from '@avalabs/chains-sdk'; +} from '@avalabs/core-bridge-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { BitcoinInputUTXOWithOptionalScript, getMaxTransferAmount, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; diff --git a/src/pages/Bridge/hooks/useEthBridge.ts b/src/pages/Bridge/hooks/useEthBridge.ts index 429986083..dede48c99 100644 --- a/src/pages/Bridge/hooks/useEthBridge.ts +++ b/src/pages/Bridge/hooks/useEthBridge.ts @@ -5,7 +5,7 @@ import { isNativeAsset, useBridgeSDK, WrapStatus, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; import { useCallback, useEffect, useState } from 'react'; import { useAssetBalancesEVM } from './useAssetBalancesEVM'; diff --git a/src/pages/Bridge/hooks/useLogoUriForBridgeTransaction.ts b/src/pages/Bridge/hooks/useLogoUriForBridgeTransaction.ts index 752397284..5fff2af61 100644 --- a/src/pages/Bridge/hooks/useLogoUriForBridgeTransaction.ts +++ b/src/pages/Bridge/hooks/useLogoUriForBridgeTransaction.ts @@ -1,5 +1,5 @@ -import { Blockchain, BridgeTransaction } from '@avalabs/bridge-sdk'; -import { ChainId } from '@avalabs/chains-sdk'; +import { Blockchain, BridgeTransaction } from '@avalabs/core-bridge-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; diff --git a/src/pages/Bridge/hooks/useSetBridgeChainFromNetwork.ts b/src/pages/Bridge/hooks/useSetBridgeChainFromNetwork.ts index e2b366ad4..7fe4446b1 100644 --- a/src/pages/Bridge/hooks/useSetBridgeChainFromNetwork.ts +++ b/src/pages/Bridge/hooks/useSetBridgeChainFromNetwork.ts @@ -1,5 +1,5 @@ -import { Blockchain, useBridgeSDK } from '@avalabs/bridge-sdk'; -import { ChainId } from '@avalabs/chains-sdk'; +import { Blockchain, useBridgeSDK } from '@avalabs/core-bridge-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { useEffect } from 'react'; diff --git a/src/pages/Bridge/hooks/useSyncBridgeConfig.ts b/src/pages/Bridge/hooks/useSyncBridgeConfig.ts index db5c0bfcf..4f319493a 100644 --- a/src/pages/Bridge/hooks/useSyncBridgeConfig.ts +++ b/src/pages/Bridge/hooks/useSyncBridgeConfig.ts @@ -1,4 +1,4 @@ -import { useBridgeConfigUpdater, useBridgeSDK } from '@avalabs/bridge-sdk'; +import { useBridgeConfigUpdater, useBridgeSDK } from '@avalabs/core-bridge-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { isBridgeStateUpdateEventListener } from '@src/background/services/bridge/events/listeners'; import { BridgeGetConfigHandler } from '@src/background/services/bridge/handlers/getBridgeConfig'; diff --git a/src/pages/Bridge/hooks/useUnifiedBridge.ts b/src/pages/Bridge/hooks/useUnifiedBridge.ts index b8b7b4b17..627d48b74 100644 --- a/src/pages/Bridge/hooks/useUnifiedBridge.ts +++ b/src/pages/Bridge/hooks/useUnifiedBridge.ts @@ -1,5 +1,5 @@ import Big from 'big.js'; -import { bigToBigInt } from '@avalabs/utils-sdk'; +import { bigToBigInt } from '@avalabs/core-utils-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { Asset, @@ -7,7 +7,7 @@ import { Blockchain, isNativeAsset, useBridgeSDK, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; import { useUnifiedBridgeContext } from '@src/contexts/UnifiedBridgeProvider'; import { bigintToBig } from '@src/utils/bigintToBig'; diff --git a/src/pages/Bridge/models.ts b/src/pages/Bridge/models.ts index ba9eb2a6b..f5905c954 100644 --- a/src/pages/Bridge/models.ts +++ b/src/pages/Bridge/models.ts @@ -1,4 +1,4 @@ -import { Asset, Blockchain } from '@avalabs/bridge-sdk'; +import { Asset, Blockchain } from '@avalabs/core-bridge-sdk'; import { BridgeAsset } from '@avalabs/bridge-unified'; import Big from 'big.js'; diff --git a/src/pages/Bridge/utils/blockchainConversion.test.ts b/src/pages/Bridge/utils/blockchainConversion.test.ts index 35e97eb66..4e7b7a1f7 100644 --- a/src/pages/Bridge/utils/blockchainConversion.test.ts +++ b/src/pages/Bridge/utils/blockchainConversion.test.ts @@ -1,9 +1,9 @@ -import { ChainId, Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { ChainId, Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { blockchainToNetwork, networkToBlockchain, } from './blockchainConversion'; -import { Blockchain, BridgeConfig } from '@avalabs/bridge-sdk'; +import { Blockchain, BridgeConfig } from '@avalabs/core-bridge-sdk'; import { t } from 'i18next'; jest.mock('i18next', () => ({ @@ -17,6 +17,7 @@ describe('src/pages/Bridge/utils/blockchainConversion.ts', () => { chainId: ChainId.BITCOIN, vmName: NetworkVMType.BITCOIN, rpcUrl: 'https://www.test.com/', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test', symbol: btcSymbol, @@ -31,6 +32,7 @@ describe('src/pages/Bridge/utils/blockchainConversion.ts', () => { chainId: ChainId.BITCOIN_TESTNET, vmName: NetworkVMType.BITCOIN, rpcUrl: 'https://www.test1.com/', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test', symbol: btcSymbol, @@ -46,6 +48,7 @@ describe('src/pages/Bridge/utils/blockchainConversion.ts', () => { chainId: ChainId.AVALANCHE_MAINNET_ID, vmName: NetworkVMType.EVM, rpcUrl: 'https://www.test2.com/', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test', symbol: 'AVAX', @@ -61,6 +64,7 @@ describe('src/pages/Bridge/utils/blockchainConversion.ts', () => { chainId: ChainId.ETHEREUM_HOMESTEAD, vmName: NetworkVMType.EVM, rpcUrl: 'https://www.test3.com/', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test', symbol: 'ETH', @@ -257,6 +261,7 @@ describe('src/pages/Bridge/utils/blockchainConversion.ts', () => { chainId: ChainId.AVALANCHE_MAINNET_ID, vmName: NetworkVMType.EVM, rpcUrl: 'https://www.test10.com/', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test', symbol: 'AVAX', diff --git a/src/pages/Bridge/utils/blockchainConversion.ts b/src/pages/Bridge/utils/blockchainConversion.ts index 0f1f2e676..463a873ff 100644 --- a/src/pages/Bridge/utils/blockchainConversion.ts +++ b/src/pages/Bridge/utils/blockchainConversion.ts @@ -1,6 +1,6 @@ -import { Blockchain, BridgeConfig } from '@avalabs/bridge-sdk'; +import { Blockchain, BridgeConfig } from '@avalabs/core-bridge-sdk'; import { Chain } from '@avalabs/bridge-unified'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { Network } from '@src/background/services/network/models'; import { caipToChainId } from '@src/utils/caipConversion'; import { t } from 'i18next'; diff --git a/src/pages/Bridge/utils/findTokenForAsset.test.ts b/src/pages/Bridge/utils/findTokenForAsset.test.ts index 21c20137b..4c67f38c3 100644 --- a/src/pages/Bridge/utils/findTokenForAsset.test.ts +++ b/src/pages/Bridge/utils/findTokenForAsset.test.ts @@ -1,4 +1,4 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { findTokenForAsset } from './findTokenForAsset'; import { TokenType, diff --git a/src/pages/Bridge/utils/findTokenForAsset.ts b/src/pages/Bridge/utils/findTokenForAsset.ts index afb6e56a4..c8fd0de7e 100644 --- a/src/pages/Bridge/utils/findTokenForAsset.ts +++ b/src/pages/Bridge/utils/findTokenForAsset.ts @@ -1,4 +1,4 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { TokenWithBalance } from '@src/background/services/balances/models'; export function findTokenForAsset( diff --git a/src/pages/Bridge/utils/getBalances.ts b/src/pages/Bridge/utils/getBalances.ts index 9b5d11d9b..ca9fc0fd3 100644 --- a/src/pages/Bridge/utils/getBalances.ts +++ b/src/pages/Bridge/utils/getBalances.ts @@ -1,6 +1,6 @@ -import { Asset, isBtcAsset, isNativeAsset } from '@avalabs/bridge-sdk'; +import { Asset, isBtcAsset, isNativeAsset } from '@avalabs/core-bridge-sdk'; import { AssetBalance } from '@src/pages/Bridge/models'; -import { bnToBig } from '@avalabs/utils-sdk'; +import { bnToBig } from '@avalabs/core-utils-sdk'; import { TokenWithBalanceERC20, TokenWithBalance, diff --git a/src/pages/Bridge/utils/getLedgerAppForBlockchain.ts b/src/pages/Bridge/utils/getLedgerAppForBlockchain.ts index 0b9c8481a..2ba045a60 100644 --- a/src/pages/Bridge/utils/getLedgerAppForBlockchain.ts +++ b/src/pages/Bridge/utils/getLedgerAppForBlockchain.ts @@ -1,4 +1,4 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { LedgerAppType } from '@src/contexts/LedgerProvider'; export function getLedgerAppForBlockchain( diff --git a/src/pages/Bridge/utils/getNativeTokenSymbol.ts b/src/pages/Bridge/utils/getNativeTokenSymbol.ts index 2b94a18b4..bab75b6e5 100644 --- a/src/pages/Bridge/utils/getNativeTokenSymbol.ts +++ b/src/pages/Bridge/utils/getNativeTokenSymbol.ts @@ -1,4 +1,4 @@ -import { Blockchain, getNativeSymbol } from '@avalabs/bridge-sdk'; +import { Blockchain, getNativeSymbol } from '@avalabs/core-bridge-sdk'; import { Chain } from '@avalabs/bridge-unified'; export const getNativeTokenSymbol = (chain: Blockchain | Chain) => { diff --git a/src/pages/Bridge/utils/getTokenAddress.ts b/src/pages/Bridge/utils/getTokenAddress.ts index 402148936..2eb982518 100644 --- a/src/pages/Bridge/utils/getTokenAddress.ts +++ b/src/pages/Bridge/utils/getTokenAddress.ts @@ -1,4 +1,4 @@ -import { isEthAsset } from '@avalabs/bridge-sdk'; +import { isEthAsset } from '@avalabs/core-bridge-sdk'; import { AssetBalance } from '../models'; import { isUnifiedBridgeAsset } from './isUnifiedBridgeAsset'; diff --git a/src/pages/Bridge/utils/isUnifiedBridgeTransfer.ts b/src/pages/Bridge/utils/isUnifiedBridgeTransfer.ts index b47146ca0..918c4e076 100644 --- a/src/pages/Bridge/utils/isUnifiedBridgeTransfer.ts +++ b/src/pages/Bridge/utils/isUnifiedBridgeTransfer.ts @@ -1,4 +1,4 @@ -import { BridgeTransaction } from '@avalabs/bridge-sdk'; +import { BridgeTransaction } from '@avalabs/core-bridge-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; export const isUnifiedBridgeTransfer = ( diff --git a/src/pages/Collectibles/CollectibleDetails.tsx b/src/pages/Collectibles/CollectibleDetails.tsx index 0d5cb31f1..dcb89c34d 100644 --- a/src/pages/Collectibles/CollectibleDetails.tsx +++ b/src/pages/Collectibles/CollectibleDetails.tsx @@ -9,7 +9,7 @@ import { Typography, TypographyProps, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { Scrollbars } from '@src/components/common/scrollbars/Scrollbars'; diff --git a/src/pages/Collectibles/CollectibleSend.tsx b/src/pages/Collectibles/CollectibleSend.tsx index ae0fe5d48..f95b93e55 100644 --- a/src/pages/Collectibles/CollectibleSend.tsx +++ b/src/pages/Collectibles/CollectibleSend.tsx @@ -1,9 +1,9 @@ import { useCallback, useMemo } from 'react'; import { useHistory } from 'react-router-dom'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { useTranslation } from 'react-i18next'; -import { Stack, toast } from '@avalabs/k2-components'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { Stack, toast } from '@avalabs/core-k2-components'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { PageTitle } from '@src/components/common/PageTitle'; import { useTokensWithBalances } from '@src/hooks/useTokensWithBalances'; diff --git a/src/pages/Collectibles/Collectibles.tsx b/src/pages/Collectibles/Collectibles.tsx index 9f1868971..b5e2bed98 100644 --- a/src/pages/Collectibles/Collectibles.tsx +++ b/src/pages/Collectibles/Collectibles.tsx @@ -7,7 +7,7 @@ import { ToggleButton, ToggleButtonGroup, Stack, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { CollectibleGrid } from './components/CollectibleGrid'; import { CollectibleList } from './components/CollectibleList'; diff --git a/src/pages/Collectibles/SendEVMCollectible.tsx b/src/pages/Collectibles/SendEVMCollectible.tsx index 251a0f4d5..d02ac9fb2 100644 --- a/src/pages/Collectibles/SendEVMCollectible.tsx +++ b/src/pages/Collectibles/SendEVMCollectible.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Button, @@ -8,7 +8,7 @@ import { Stack, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { NetworkTokenWithBalance, diff --git a/src/pages/Collectibles/components/CollectibleGrid.tsx b/src/pages/Collectibles/components/CollectibleGrid.tsx index e3270de6b..34b4b58cc 100644 --- a/src/pages/Collectibles/components/CollectibleGrid.tsx +++ b/src/pages/Collectibles/components/CollectibleGrid.tsx @@ -5,7 +5,7 @@ import { import { useBalancesContext } from '@src/contexts/BalancesProvider'; import { CollectibleMedia } from './CollectibleMedia'; import { CollectibleWrapper } from './CollectibleWrapper'; -import { Button } from '@avalabs/k2-components'; +import { Button } from '@avalabs/core-k2-components'; export function CollectibleGrid({ onClick, diff --git a/src/pages/Collectibles/components/CollectibleList.tsx b/src/pages/Collectibles/components/CollectibleList.tsx index 78c0b8644..cd2634cc0 100644 --- a/src/pages/Collectibles/components/CollectibleList.tsx +++ b/src/pages/Collectibles/components/CollectibleList.tsx @@ -1,7 +1,7 @@ import { CollectibleMedia } from './CollectibleMedia'; import { useBalancesContext } from '@src/contexts/BalancesProvider'; import { NftTokenWithBalance } from '@src/background/services/balances/models'; -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { TokenCard } from '@src/components/common/TokenCard'; export function CollectibleList({ diff --git a/src/pages/Collectibles/components/CollectibleListEmpty.tsx b/src/pages/Collectibles/components/CollectibleListEmpty.tsx index 0af57b458..d0fcd4e7b 100644 --- a/src/pages/Collectibles/components/CollectibleListEmpty.tsx +++ b/src/pages/Collectibles/components/CollectibleListEmpty.tsx @@ -1,4 +1,4 @@ -import { Typography, Stack } from '@avalabs/k2-components'; +import { Typography, Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; export function CollectibleListEmpty() { diff --git a/src/pages/Collectibles/components/CollectibleMedia.tsx b/src/pages/Collectibles/components/CollectibleMedia.tsx index c09a8da95..06457779e 100644 --- a/src/pages/Collectibles/components/CollectibleMedia.tsx +++ b/src/pages/Collectibles/components/CollectibleMedia.tsx @@ -9,7 +9,7 @@ import { styled, TriangleRightIcon, ArrowsMaximizeIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import BN from 'bn.js'; const NftImage = styled(ImageWithFallback)<{ diff --git a/src/pages/Collectibles/components/CollectibleSkeleton.tsx b/src/pages/Collectibles/components/CollectibleSkeleton.tsx index fc22e0fd4..1ddfdb803 100644 --- a/src/pages/Collectibles/components/CollectibleSkeleton.tsx +++ b/src/pages/Collectibles/components/CollectibleSkeleton.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@avalabs/k2-components'; +import { Skeleton } from '@avalabs/core-k2-components'; import { CollectibleWrapper } from './CollectibleWrapper'; export function CollectibleSkeleton() { diff --git a/src/pages/Collectibles/components/CollectibleWrapper.tsx b/src/pages/Collectibles/components/CollectibleWrapper.tsx index c42bcc177..2398bd2f4 100644 --- a/src/pages/Collectibles/components/CollectibleWrapper.tsx +++ b/src/pages/Collectibles/components/CollectibleWrapper.tsx @@ -1,6 +1,6 @@ import { ReactNode } from 'react'; import Masonry from 'react-masonry-css'; -import { styled } from '@avalabs/k2-components'; +import { styled } from '@avalabs/core-k2-components'; const StyledMasonry = styled(Masonry)` display: flex; diff --git a/src/pages/Collectibles/components/ImageWrapper.tsx b/src/pages/Collectibles/components/ImageWrapper.tsx index 3bc852253..689713ac1 100644 --- a/src/pages/Collectibles/components/ImageWrapper.tsx +++ b/src/pages/Collectibles/components/ImageWrapper.tsx @@ -3,7 +3,7 @@ import { ChevronLeftIcon, IconButton, Stack, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import { PropsWithChildren } from 'react'; interface ImageWrapperProps { diff --git a/src/pages/DeFi/DeFi.tsx b/src/pages/DeFi/DeFi.tsx index 4227efa76..8b7164e9c 100644 --- a/src/pages/DeFi/DeFi.tsx +++ b/src/pages/DeFi/DeFi.tsx @@ -1,4 +1,4 @@ -import { CircularProgress, Stack } from '@avalabs/k2-components'; +import { CircularProgress, Stack } from '@avalabs/core-k2-components'; import { useDefiContext } from '@src/contexts/DefiProvider'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; diff --git a/src/pages/DeFi/DefiProtocolDetails.tsx b/src/pages/DeFi/DefiProtocolDetails.tsx index 190495c38..48c8756de 100644 --- a/src/pages/DeFi/DefiProtocolDetails.tsx +++ b/src/pages/DeFi/DefiProtocolDetails.tsx @@ -12,7 +12,7 @@ import { Scrollbars, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { openNewTab } from '@src/utils/extensionUtils'; import { useDefiContext } from '@src/contexts/DefiProvider'; diff --git a/src/pages/DeFi/components/DefiErrorState.tsx b/src/pages/DeFi/components/DefiErrorState.tsx index ee98ad4cd..878204e01 100644 --- a/src/pages/DeFi/components/DefiErrorState.tsx +++ b/src/pages/DeFi/components/DefiErrorState.tsx @@ -4,7 +4,7 @@ import { Stack, StackProps, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const DefiErrorState = (props: StackProps) => { const { t } = useTranslation(); diff --git a/src/pages/DeFi/components/DefiPortfolioCommon.tsx b/src/pages/DeFi/components/DefiPortfolioCommon.tsx index c147f3697..c288bfb46 100644 --- a/src/pages/DeFi/components/DefiPortfolioCommon.tsx +++ b/src/pages/DeFi/components/DefiPortfolioCommon.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { sumByProperty } from '@src/utils/sumByProperty'; import { DefiCommonItem } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiPortfolioInsurance.tsx b/src/pages/DeFi/components/DefiPortfolioInsurance.tsx index a9047a58b..de2aa451c 100644 --- a/src/pages/DeFi/components/DefiPortfolioInsurance.tsx +++ b/src/pages/DeFi/components/DefiPortfolioInsurance.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack, Tooltip, Typography } from '@avalabs/k2-components'; +import { Stack, Tooltip, Typography } from '@avalabs/core-k2-components'; import { DefiInsuranceBuyerItem } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiPortfolioItemGroup.tsx b/src/pages/DeFi/components/DefiPortfolioItemGroup.tsx index 477afedf7..950e97828 100644 --- a/src/pages/DeFi/components/DefiPortfolioItemGroup.tsx +++ b/src/pages/DeFi/components/DefiPortfolioItemGroup.tsx @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { DefiCommonItem, diff --git a/src/pages/DeFi/components/DefiPortfolioLending.tsx b/src/pages/DeFi/components/DefiPortfolioLending.tsx index c047b5bd0..a6f4f9e04 100644 --- a/src/pages/DeFi/components/DefiPortfolioLending.tsx +++ b/src/pages/DeFi/components/DefiPortfolioLending.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Avatar, Stack, Typography } from '@avalabs/k2-components'; +import { Avatar, Stack, Typography } from '@avalabs/core-k2-components'; import { DefiLendingItem, diff --git a/src/pages/DeFi/components/DefiPortfolioPerpetual.tsx b/src/pages/DeFi/components/DefiPortfolioPerpetual.tsx index 670968304..9c549cb8c 100644 --- a/src/pages/DeFi/components/DefiPortfolioPerpetual.tsx +++ b/src/pages/DeFi/components/DefiPortfolioPerpetual.tsx @@ -1,5 +1,10 @@ import { useTranslation } from 'react-i18next'; -import { Grid, GridProps, Stack, Typography } from '@avalabs/k2-components'; +import { + Grid, + GridProps, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { DefiPerpetualItem } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiPortfolioRewards.tsx b/src/pages/DeFi/components/DefiPortfolioRewards.tsx index 7aae09af8..f85c92925 100644 --- a/src/pages/DeFi/components/DefiPortfolioRewards.tsx +++ b/src/pages/DeFi/components/DefiPortfolioRewards.tsx @@ -1,6 +1,6 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { DefiRewardItem } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiPortfolioVesting.tsx b/src/pages/DeFi/components/DefiPortfolioVesting.tsx index f4cd73077..8a8681e54 100644 --- a/src/pages/DeFi/components/DefiPortfolioVesting.tsx +++ b/src/pages/DeFi/components/DefiPortfolioVesting.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Avatar, Stack, Typography } from '@avalabs/k2-components'; +import { Avatar, Stack, Typography } from '@avalabs/core-k2-components'; import { DefiVestingItem } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiProtocolDetailsHeader.tsx b/src/pages/DeFi/components/DefiProtocolDetailsHeader.tsx index 9406802d5..fed4e90ff 100644 --- a/src/pages/DeFi/components/DefiProtocolDetailsHeader.tsx +++ b/src/pages/DeFi/components/DefiProtocolDetailsHeader.tsx @@ -5,7 +5,7 @@ import { IconButton, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { openNewTab } from '@src/utils/extensionUtils'; import { DefiProtocol } from '@src/background/services/defi/models'; diff --git a/src/pages/DeFi/components/DefiProtocolListItem.tsx b/src/pages/DeFi/components/DefiProtocolListItem.tsx index fd372e8d8..22f9240f0 100644 --- a/src/pages/DeFi/components/DefiProtocolListItem.tsx +++ b/src/pages/DeFi/components/DefiProtocolListItem.tsx @@ -9,7 +9,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { DefiProtocol } from '@src/background/services/defi/models'; import { openNewTab } from '@src/utils/extensionUtils'; diff --git a/src/pages/DeFi/components/DefiTokenAvatarGroup.tsx b/src/pages/DeFi/components/DefiTokenAvatarGroup.tsx index 1a3106afc..8cb07267c 100644 --- a/src/pages/DeFi/components/DefiTokenAvatarGroup.tsx +++ b/src/pages/DeFi/components/DefiTokenAvatarGroup.tsx @@ -3,7 +3,7 @@ import { AvatarGroup, AvatarGroupProps, AvatarProps, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { DefiToken } from '@src/background/services/defi/models'; import { useMemo } from 'react'; diff --git a/src/pages/DeFi/components/DefiZeroState.tsx b/src/pages/DeFi/components/DefiZeroState.tsx index 3638e2703..302f3d4c9 100644 --- a/src/pages/DeFi/components/DefiZeroState.tsx +++ b/src/pages/DeFi/components/DefiZeroState.tsx @@ -1,6 +1,11 @@ import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import { Button, Stack, StackProps, Typography } from '@avalabs/k2-components'; +import { + Button, + Stack, + StackProps, + Typography, +} from '@avalabs/core-k2-components'; import { openNewTab } from '@src/utils/extensionUtils'; diff --git a/src/pages/ExportPrivateKey/EnterPassword.tsx b/src/pages/ExportPrivateKey/EnterPassword.tsx index ebb03ee53..2e856c390 100644 --- a/src/pages/ExportPrivateKey/EnterPassword.tsx +++ b/src/pages/ExportPrivateKey/EnterPassword.tsx @@ -4,7 +4,7 @@ import { Stack, TextField, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { Dispatch, SetStateAction } from 'react'; diff --git a/src/pages/ExportPrivateKey/ExportPrivateKey.tsx b/src/pages/ExportPrivateKey/ExportPrivateKey.tsx index 3e0a769dd..f991ce486 100644 --- a/src/pages/ExportPrivateKey/ExportPrivateKey.tsx +++ b/src/pages/ExportPrivateKey/ExportPrivateKey.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useState } from 'react'; import { EnterPassword } from './EnterPassword'; import { ShowPrivateKey } from './ShowPrivateKey'; -import { Stack, useTheme } from '@avalabs/k2-components'; +import { Stack, useTheme } from '@avalabs/core-k2-components'; import { GetPrivateKeyHandler } from '@src/background/services/accounts/handlers/getPrivateKey'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { useConnectionContext } from '@src/contexts/ConnectionProvider'; diff --git a/src/pages/ExportPrivateKey/ShowPrivateKey.tsx b/src/pages/ExportPrivateKey/ShowPrivateKey.tsx index 61c1a19d6..75c044b04 100644 --- a/src/pages/ExportPrivateKey/ShowPrivateKey.tsx +++ b/src/pages/ExportPrivateKey/ShowPrivateKey.tsx @@ -9,7 +9,7 @@ import { Typography, CopyIcon, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useTranslation } from 'react-i18next'; import { useHistory } from 'react-router-dom'; diff --git a/src/pages/Fireblocks/ConnectBitcoinWallet.tsx b/src/pages/Fireblocks/ConnectBitcoinWallet.tsx index ceb1448f1..ba52d0faf 100644 --- a/src/pages/Fireblocks/ConnectBitcoinWallet.tsx +++ b/src/pages/Fireblocks/ConnectBitcoinWallet.tsx @@ -7,7 +7,7 @@ import { useTheme, Scrollbars, Link, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { Trans, useTranslation } from 'react-i18next'; import { useHistory, useParams } from 'react-router-dom'; diff --git a/src/pages/Fireblocks/components/FireblocksAvatar.tsx b/src/pages/Fireblocks/components/FireblocksAvatar.tsx index 1d30cffc0..9f3b3a38e 100644 --- a/src/pages/Fireblocks/components/FireblocksAvatar.tsx +++ b/src/pages/Fireblocks/components/FireblocksAvatar.tsx @@ -4,7 +4,7 @@ import { BitcoinColorIcon, FireblocksIcon, WalletConnectIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface FireblocksAvatarProps { badgeIcon?: 'walletConnect' | 'bitcoin'; diff --git a/src/pages/Fireblocks/components/FireblocksBitcoinDialog.tsx b/src/pages/Fireblocks/components/FireblocksBitcoinDialog.tsx index ea2064474..a6551bd5a 100644 --- a/src/pages/Fireblocks/components/FireblocksBitcoinDialog.tsx +++ b/src/pages/Fireblocks/components/FireblocksBitcoinDialog.tsx @@ -6,7 +6,7 @@ import { Button, DialogContent, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { AccountsTab } from '@src/pages/Accounts/Accounts'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Home/Home.tsx b/src/pages/Home/Home.tsx index 9efccf989..387fa7b55 100644 --- a/src/pages/Home/Home.tsx +++ b/src/pages/Home/Home.tsx @@ -1,6 +1,6 @@ import { Portfolio } from './components/Portfolio/Portfolio'; import { LedgerWrongVersionOverlay } from '../Ledger/LedgerWrongVersionOverlay'; -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; export function Home() { return ( diff --git a/src/pages/Home/components/Portfolio/Assets.tsx b/src/pages/Home/components/Portfolio/Assets.tsx index 7272b1faa..ce5762dd4 100644 --- a/src/pages/Home/components/Portfolio/Assets.tsx +++ b/src/pages/Home/components/Portfolio/Assets.tsx @@ -13,7 +13,7 @@ import { Tabs, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Redirect, useHistory } from 'react-router-dom'; import { TokenIcon } from '@src/components/common/TokenIcon'; import { diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/ActiveNetworkWidget.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/ActiveNetworkWidget.tsx index 0779d6ea5..dcd71bbec 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/ActiveNetworkWidget.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/ActiveNetworkWidget.tsx @@ -19,7 +19,7 @@ import { AlertTriangleIcon, Badge, CheckIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TokenIcon } from '@src/components/common/TokenIcon'; import { NetworkLogoK2 } from '@src/components/common/NetworkLogoK2'; import { isBitcoin } from '@src/utils/isBitcoin'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/Assetlist.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/Assetlist.tsx index 009170f30..7a9fb0b82 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/Assetlist.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/Assetlist.tsx @@ -9,7 +9,7 @@ import { useSetSendDataInParams } from '@src/hooks/useSetSendDataInParams'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { InlineTokenEllipsis } from '@src/components/common/InlineTokenEllipsis'; -import { balanceToDisplayValue } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue } from '@avalabs/core-utils-sdk'; import { Button, ChevronRightIcon, @@ -17,7 +17,7 @@ import { Typography, keyframes, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TokenEllipsis } from '@src/components/common/TokenEllipsis'; import { BalanceColumn } from '@src/components/common/BalanceColumn'; import { PAndL } from '@src/components/common/ProfitAndLoss'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/NetworkList.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/NetworkList.tsx index a096e493f..7e2a8c4ef 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/NetworkList.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/NetworkList.tsx @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useBalancesContext } from '@src/contexts/BalancesProvider'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; @@ -16,7 +16,7 @@ import { styled, Skeleton, Badge, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; import { filterBridgeStateToNetwork } from '@src/background/services/bridge/utils'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/NetworksWidget.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/NetworksWidget.tsx index d619decee..6f4fa0ea6 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/NetworksWidget.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/NetworksWidget.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { TokenWithBalance } from '@src/background/services/balances/models'; import { useTokensWithBalances } from '@src/hooks/useTokensWithBalances'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/PchainActiveNetworkWidgetContent.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/PchainActiveNetworkWidgetContent.tsx index be047b802..209977953 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/PchainActiveNetworkWidgetContent.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/PchainActiveNetworkWidgetContent.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { BalanceColumn } from '@src/components/common/BalanceColumn'; import { TokenWithBalancePVM } from '@src/background/services/balances/models'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/SeeAllNetworksButton.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/SeeAllNetworksButton.tsx index c34188ddd..68aeb5cab 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/SeeAllNetworksButton.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/SeeAllNetworksButton.tsx @@ -1,7 +1,7 @@ import { useHistory } from 'react-router-dom'; import { NetworkCard } from './common/NetworkCard'; import { useTranslation } from 'react-i18next'; -import { Button, Stack, Typography } from '@avalabs/k2-components'; +import { Button, Stack, Typography } from '@avalabs/core-k2-components'; import { NetworkTab } from '@src/pages/Networks'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/XchainActiveNetworkWidgetContent.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/XchainActiveNetworkWidgetContent.tsx index 212d7656e..dfc2135a1 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/XchainActiveNetworkWidgetContent.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/XchainActiveNetworkWidgetContent.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { BalanceColumn } from '@src/components/common/BalanceColumn'; import { TokenWithBalanceAVM } from '@src/background/services/balances/models'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/ZeroWidget.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/ZeroWidget.tsx index dba71b8fb..470bee27c 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/ZeroWidget.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/ZeroWidget.tsx @@ -1,9 +1,14 @@ import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { useHistory } from 'react-router-dom'; -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { useTranslation } from 'react-i18next'; -import { Button, BuyIcon, QRCodeIcon, Stack } from '@avalabs/k2-components'; +import { + Button, + BuyIcon, + QRCodeIcon, + Stack, +} from '@avalabs/core-k2-components'; import { openNewTab } from '@src/utils/extensionUtils'; import { getCoreWebUrl } from '@src/utils/getCoreWebUrl'; diff --git a/src/pages/Home/components/Portfolio/NetworkWidget/common/NetworkCard.tsx b/src/pages/Home/components/Portfolio/NetworkWidget/common/NetworkCard.tsx index 6fae84eb7..aa59963da 100644 --- a/src/pages/Home/components/Portfolio/NetworkWidget/common/NetworkCard.tsx +++ b/src/pages/Home/components/Portfolio/NetworkWidget/common/NetworkCard.tsx @@ -1,4 +1,4 @@ -import { Card, styled } from '@avalabs/k2-components'; +import { Card, styled } from '@avalabs/core-k2-components'; export const NetworkCard = styled(Card)` padding: 16px; diff --git a/src/pages/Home/components/Portfolio/Portfolio.tsx b/src/pages/Home/components/Portfolio/Portfolio.tsx index db7489494..270dde12d 100644 --- a/src/pages/Home/components/Portfolio/Portfolio.tsx +++ b/src/pages/Home/components/Portfolio/Portfolio.tsx @@ -13,7 +13,7 @@ import { TabPanel, Tabs, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { useIsFunctionAvailable } from '@src/hooks/useIsFunctionAvailable'; import { Redirect } from 'react-router-dom'; diff --git a/src/pages/Home/components/Portfolio/TokenList.tsx b/src/pages/Home/components/Portfolio/TokenList.tsx index 0d8d7220b..e5165558f 100644 --- a/src/pages/Home/components/Portfolio/TokenList.tsx +++ b/src/pages/Home/components/Portfolio/TokenList.tsx @@ -14,7 +14,7 @@ import { TokenType } from '@src/background/services/balances/models'; import { useTranslation } from 'react-i18next'; import { AutoSizer } from 'react-virtualized'; import VirtualizedList from '@src/components/common/VirtualizedList'; -import { Button, Stack, styled } from '@avalabs/k2-components'; +import { Button, Stack, styled } from '@avalabs/core-k2-components'; import { TokenIcon } from '@src/components/common/TokenIcon'; import { BN } from 'bn.js'; diff --git a/src/pages/Home/components/Portfolio/WalletBalances.tsx b/src/pages/Home/components/Portfolio/WalletBalances.tsx index a108a0cab..68715b003 100644 --- a/src/pages/Home/components/Portfolio/WalletBalances.tsx +++ b/src/pages/Home/components/Portfolio/WalletBalances.tsx @@ -4,7 +4,7 @@ import { Tooltip, Typography, Skeleton, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PAndL } from '@src/components/common/ProfitAndLoss'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useBalancesContext } from '@src/contexts/BalancesProvider'; diff --git a/src/pages/Home/components/Portfolio/WalletIsEmpty.tsx b/src/pages/Home/components/Portfolio/WalletIsEmpty.tsx index a01d4b647..30dfc8350 100644 --- a/src/pages/Home/components/Portfolio/WalletIsEmpty.tsx +++ b/src/pages/Home/components/Portfolio/WalletIsEmpty.tsx @@ -4,7 +4,12 @@ import { } from '@src/hooks/useIsFunctionAvailable'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { Button, QRCodeIcon, Stack, Typography } from '@avalabs/k2-components'; +import { + Button, + QRCodeIcon, + Stack, + Typography, +} from '@avalabs/core-k2-components'; export function WalletIsEmpty() { const history = useHistory(); diff --git a/src/pages/ImportPrivateKey/ImportPrivateKey.tsx b/src/pages/ImportPrivateKey/ImportPrivateKey.tsx index 4792a223c..052b694b1 100644 --- a/src/pages/ImportPrivateKey/ImportPrivateKey.tsx +++ b/src/pages/ImportPrivateKey/ImportPrivateKey.tsx @@ -7,12 +7,12 @@ import { Typography, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { getBtcAddressFromPubKey, getEvmAddressFromPubKey, getPublicKeyFromPrivateKey, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { Account } from '@src/background/services/accounts/models'; import { PageTitle } from '@src/components/common/PageTitle'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/pages/ImportPrivateKey/components/DerivedAddress.tsx b/src/pages/ImportPrivateKey/components/DerivedAddress.tsx index cd1a9b84b..528656bb1 100644 --- a/src/pages/ImportPrivateKey/components/DerivedAddress.tsx +++ b/src/pages/ImportPrivateKey/components/DerivedAddress.tsx @@ -5,7 +5,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export enum NetworkType { AVALANCHE = 'avalanche', diff --git a/src/pages/ImportWithWalletConnect/ImportWithWalletConnect.tsx b/src/pages/ImportWithWalletConnect/ImportWithWalletConnect.tsx index cfccde637..d9b395de9 100644 --- a/src/pages/ImportWithWalletConnect/ImportWithWalletConnect.tsx +++ b/src/pages/ImportWithWalletConnect/ImportWithWalletConnect.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { Stack, useTheme } from '@avalabs/k2-components'; +import { Stack, useTheme } from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { WalletConnectCircledIcon } from './components/WalletConnectCircledIcon'; diff --git a/src/pages/ImportWithWalletConnect/components/WalletConnectCircledIcon.tsx b/src/pages/ImportWithWalletConnect/components/WalletConnectCircledIcon.tsx index 23997ac4c..0aa6f8001 100644 --- a/src/pages/ImportWithWalletConnect/components/WalletConnectCircledIcon.tsx +++ b/src/pages/ImportWithWalletConnect/components/WalletConnectCircledIcon.tsx @@ -1,4 +1,4 @@ -import { WalletConnectIcon, Avatar } from '@avalabs/k2-components'; +import { WalletConnectIcon, Avatar } from '@avalabs/core-k2-components'; export const WalletConnectCircledIcon = () => ( { diff --git a/src/pages/Ledger/LedgerIncorrectApp.tsx b/src/pages/Ledger/LedgerIncorrectApp.tsx index 90821240a..dee305183 100644 --- a/src/pages/Ledger/LedgerIncorrectApp.tsx +++ b/src/pages/Ledger/LedgerIncorrectApp.tsx @@ -1,4 +1,4 @@ -import { Typography, useTheme, Button } from '@avalabs/k2-components'; +import { Typography, useTheme, Button } from '@avalabs/core-k2-components'; import { Trans, useTranslation } from 'react-i18next'; import { LedgerAppType, useLedgerContext } from '@src/contexts/LedgerProvider'; import { diff --git a/src/pages/Ledger/LedgerIncorrectDevice.tsx b/src/pages/Ledger/LedgerIncorrectDevice.tsx index 5ed8bbcb9..141b0fd77 100644 --- a/src/pages/Ledger/LedgerIncorrectDevice.tsx +++ b/src/pages/Ledger/LedgerIncorrectDevice.tsx @@ -2,7 +2,7 @@ import Dialog from '@src/components/common/Dialog'; import { useEffect, useState } from 'react'; import { t } from 'i18next'; import DangerIcon from '@src/components/icons/DangerIcon'; -import { Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { Stack, Typography, useTheme } from '@avalabs/core-k2-components'; import useIsIncorrectDevice from './hooks/useIsIncorrectDevice'; import { useLedgerContext } from '@src/contexts/LedgerProvider'; diff --git a/src/pages/Ledger/LedgerRegisterBtcWalletPolicy.tsx b/src/pages/Ledger/LedgerRegisterBtcWalletPolicy.tsx index 20cdee61f..673993e6c 100644 --- a/src/pages/Ledger/LedgerRegisterBtcWalletPolicy.tsx +++ b/src/pages/Ledger/LedgerRegisterBtcWalletPolicy.tsx @@ -4,7 +4,7 @@ import { Divider, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useEffect, useState } from 'react'; import useRegisterBtcWalletPolicy from './hooks/useRegisterBtcWalletPolicy'; import { useLedgerContext } from '@src/contexts/LedgerProvider'; diff --git a/src/pages/Ledger/LedgerWrongVersion.tsx b/src/pages/Ledger/LedgerWrongVersion.tsx index 02748d073..3736b3039 100644 --- a/src/pages/Ledger/LedgerWrongVersion.tsx +++ b/src/pages/Ledger/LedgerWrongVersion.tsx @@ -7,7 +7,7 @@ import { Typography, useTheme, XIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const LedgerWrongVersionContent = () => ( <> diff --git a/src/pages/Ledger/LedgerWrongVersionOverlay.tsx b/src/pages/Ledger/LedgerWrongVersionOverlay.tsx index 53fef93d9..88919aab8 100644 --- a/src/pages/Ledger/LedgerWrongVersionOverlay.tsx +++ b/src/pages/Ledger/LedgerWrongVersionOverlay.tsx @@ -5,7 +5,7 @@ import { useLedgerContext, } from '@src/contexts/LedgerProvider'; import { isLedgerVersionCompatible } from '@src/utils/isLedgerVersionCompatible'; -import { Backdrop, Stack } from '@avalabs/k2-components'; +import { Backdrop, Stack } from '@avalabs/core-k2-components'; export function LedgerWrongVersionOverlay({ onClose, diff --git a/src/pages/Ledger/hooks/useIsIncorrectDevice.ts b/src/pages/Ledger/hooks/useIsIncorrectDevice.ts index d87dc0046..c6b0fcadc 100644 --- a/src/pages/Ledger/hooks/useIsIncorrectDevice.ts +++ b/src/pages/Ledger/hooks/useIsIncorrectDevice.ts @@ -1,4 +1,4 @@ -import { getEvmAddressFromPubKey } from '@avalabs/wallets-sdk'; +import { getEvmAddressFromPubKey } from '@avalabs/core-wallets-sdk'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { LedgerAppType, useLedgerContext } from '@src/contexts/LedgerProvider'; import { useWalletContext } from '@src/contexts/WalletProvider'; diff --git a/src/pages/Ledger/hooks/useRegisterBtcWalletPolicy.ts b/src/pages/Ledger/hooks/useRegisterBtcWalletPolicy.ts index 8bc382e14..58b3ea23e 100644 --- a/src/pages/Ledger/hooks/useRegisterBtcWalletPolicy.ts +++ b/src/pages/Ledger/hooks/useRegisterBtcWalletPolicy.ts @@ -1,4 +1,4 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { ExtensionRequest } from '@src/background/connections/extensionConnection/models'; import { AccountType } from '@src/background/services/accounts/models'; import { GetBtcWalletPolicyDetails } from '@src/background/services/wallet/handlers/getBtcWalletPolicyDetails'; diff --git a/src/pages/ManageTokens/AddToken.tsx b/src/pages/ManageTokens/AddToken.tsx index 39c0f7229..4537bc729 100644 --- a/src/pages/ManageTokens/AddToken.tsx +++ b/src/pages/ManageTokens/AddToken.tsx @@ -16,7 +16,7 @@ import { TextField, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TokenCardWithBalance } from '@src/components/common/TokenCardWithBalance'; import { TokenIcon } from '@src/components/common/TokenIcon'; diff --git a/src/pages/ManageTokens/AddTokenApproval.tsx b/src/pages/ManageTokens/AddTokenApproval.tsx index 07db03b22..168b1d06a 100644 --- a/src/pages/ManageTokens/AddTokenApproval.tsx +++ b/src/pages/ManageTokens/AddTokenApproval.tsx @@ -11,7 +11,7 @@ import { GlobeIcon, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Scrollbars } from '@src/components/common/scrollbars/Scrollbars'; import { AddCustomTokenData } from '@src/background/services/settings/models'; diff --git a/src/pages/ManageTokens/ManageTokens.tsx b/src/pages/ManageTokens/ManageTokens.tsx index 7ab46aaa9..7a0fbe593 100644 --- a/src/pages/ManageTokens/ManageTokens.tsx +++ b/src/pages/ManageTokens/ManageTokens.tsx @@ -10,7 +10,7 @@ import { SearchBar, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const ManageTokens = () => { const history = useHistory(); diff --git a/src/pages/ManageTokens/ManageTokensList.tsx b/src/pages/ManageTokens/ManageTokensList.tsx index adc30cb68..2a76ada56 100644 --- a/src/pages/ManageTokens/ManageTokensList.tsx +++ b/src/pages/ManageTokens/ManageTokensList.tsx @@ -5,7 +5,12 @@ import { TokenType, TokenWithBalance, } from '@src/background/services/balances/models'; -import { Divider, Stack, Switch, Typography } from '@avalabs/k2-components'; +import { + Divider, + Stack, + Switch, + Typography, +} from '@avalabs/core-k2-components'; type ManageTokensListProps = { searchQuery: string; diff --git a/src/pages/Network/AddCustomNetworkPopup.tsx b/src/pages/Network/AddCustomNetworkPopup.tsx index 0edf96b62..89cf81026 100644 --- a/src/pages/Network/AddCustomNetworkPopup.tsx +++ b/src/pages/Network/AddCustomNetworkPopup.tsx @@ -20,7 +20,7 @@ import { Stack, TextField, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SiteAvatar } from '@src/components/common/SiteAvatar'; import { buildGlacierAuthHeaders } from '@src/background/services/network/utils/buildGlacierAuthHeaders'; import { useKeyboardShortcuts } from '@src/hooks/useKeyboardShortcuts'; diff --git a/src/pages/Network/SwitchActiveNetwork.tsx b/src/pages/Network/SwitchActiveNetwork.tsx index 75ed58134..b94a2c3ae 100644 --- a/src/pages/Network/SwitchActiveNetwork.tsx +++ b/src/pages/Network/SwitchActiveNetwork.tsx @@ -5,8 +5,8 @@ import { Stack, Typography, styled, -} from '@avalabs/k2-components'; -import { Network } from '@avalabs/chains-sdk'; +} from '@avalabs/core-k2-components'; +import { Network } from '@avalabs/core-chains-sdk'; import { useTranslation } from 'react-i18next'; import { TokenIcon } from '@src/components/common/TokenIcon'; diff --git a/src/pages/Networks/AddNetwork.tsx b/src/pages/Networks/AddNetwork.tsx index b939612d1..af773d019 100644 --- a/src/pages/Networks/AddNetwork.tsx +++ b/src/pages/Networks/AddNetwork.tsx @@ -10,8 +10,8 @@ import { styled, toast, useTheme, -} from '@avalabs/k2-components'; -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +} from '@avalabs/core-k2-components'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { PageTitle } from '@src/components/common/PageTitle'; import { usePageHistory } from '@src/hooks/usePageHistory'; diff --git a/src/pages/Networks/CustomsTab.tsx b/src/pages/Networks/CustomsTab.tsx index e6e113c2e..f59b10b28 100644 --- a/src/pages/Networks/CustomsTab.tsx +++ b/src/pages/Networks/CustomsTab.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; diff --git a/src/pages/Networks/EditNetwork.tsx b/src/pages/Networks/EditNetwork.tsx index 0e96227a4..9113abb95 100644 --- a/src/pages/Networks/EditNetwork.tsx +++ b/src/pages/Networks/EditNetwork.tsx @@ -8,7 +8,7 @@ import { Stack, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; diff --git a/src/pages/Networks/FavoritesTab.tsx b/src/pages/Networks/FavoritesTab.tsx index 89f206238..43cf7e985 100644 --- a/src/pages/Networks/FavoritesTab.tsx +++ b/src/pages/Networks/FavoritesTab.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; diff --git a/src/pages/Networks/NetworkDetails.tsx b/src/pages/Networks/NetworkDetails.tsx index 059b802b2..38defb32c 100644 --- a/src/pages/Networks/NetworkDetails.tsx +++ b/src/pages/Networks/NetworkDetails.tsx @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { useEffect, useRef, useState } from 'react'; import { useHistory, useParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; @@ -20,7 +20,7 @@ import { TrashIcon, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { NetworkLogo } from '@src/components/common/NetworkLogo'; diff --git a/src/pages/Networks/NetworkDetailsDialogs.tsx b/src/pages/Networks/NetworkDetailsDialogs.tsx index 82bcd9fd4..0895f2b73 100644 --- a/src/pages/Networks/NetworkDetailsDialogs.tsx +++ b/src/pages/Networks/NetworkDetailsDialogs.tsx @@ -1,4 +1,4 @@ -import { Button, Stack, Typography } from '@avalabs/k2-components'; +import { Button, Stack, Typography } from '@avalabs/core-k2-components'; import Dialog from '@src/components/common/Dialog'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Networks/NetworkForm.tsx b/src/pages/Networks/NetworkForm.tsx index be100a814..43b60da66 100644 --- a/src/pages/Networks/NetworkForm.tsx +++ b/src/pages/Networks/NetworkForm.tsx @@ -12,7 +12,7 @@ import { Stack, TextField, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { TextFieldLabel } from '@src/components/common/TextFieldLabel'; diff --git a/src/pages/Networks/NetworkRpcHeaders.tsx b/src/pages/Networks/NetworkRpcHeaders.tsx index a7b108482..36d4c9750 100644 --- a/src/pages/Networks/NetworkRpcHeaders.tsx +++ b/src/pages/Networks/NetworkRpcHeaders.tsx @@ -6,7 +6,7 @@ import { Stack, TextField, TrashIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { diff --git a/src/pages/Networks/NetworkRpcHeadersManager.tsx b/src/pages/Networks/NetworkRpcHeadersManager.tsx index b0e95ebd9..5fa693116 100644 --- a/src/pages/Networks/NetworkRpcHeadersManager.tsx +++ b/src/pages/Networks/NetworkRpcHeadersManager.tsx @@ -5,7 +5,7 @@ import { DialogTitle, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { CustomRpcHeaders, Network, diff --git a/src/pages/Networks/Networks.tsx b/src/pages/Networks/Networks.tsx index ce3c529ad..4e9f69b70 100644 --- a/src/pages/Networks/Networks.tsx +++ b/src/pages/Networks/Networks.tsx @@ -10,7 +10,7 @@ import { TabPanel, Tabs, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { PageTitle } from '@src/components/common/PageTitle'; diff --git a/src/pages/Networks/NetworksTab.tsx b/src/pages/Networks/NetworksTab.tsx index 9d6986c85..2388a67f0 100644 --- a/src/pages/Networks/NetworksTab.tsx +++ b/src/pages/Networks/NetworksTab.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { EmptyContent } from '@src/components/common/EmptyContent'; diff --git a/src/pages/Networks/common/NetworkList.tsx b/src/pages/Networks/common/NetworkList.tsx index 63b1e9adc..3cfc991e5 100644 --- a/src/pages/Networks/common/NetworkList.tsx +++ b/src/pages/Networks/common/NetworkList.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { CSSTransition, TransitionGroup } from 'react-transition-group'; -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; import { Collapse, Divider, @@ -16,7 +16,7 @@ import { Typography, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { NetworkLogo } from '@src/components/common/NetworkLogo'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; diff --git a/src/pages/Networks/common/NetworkListItem.ts b/src/pages/Networks/common/NetworkListItem.ts index ed5362014..2fe77f01a 100644 --- a/src/pages/Networks/common/NetworkListItem.ts +++ b/src/pages/Networks/common/NetworkListItem.ts @@ -1,4 +1,4 @@ -import { Stack, styled } from '@avalabs/k2-components'; +import { Stack, styled } from '@avalabs/core-k2-components'; export const NetworkListItem = styled(Stack, { shouldForwardProp: (prop) => prop !== 'isActive', diff --git a/src/pages/Networks/common/NetworkLogo.ts b/src/pages/Networks/common/NetworkLogo.ts index b728e7650..34f251c0c 100644 --- a/src/pages/Networks/common/NetworkLogo.ts +++ b/src/pages/Networks/common/NetworkLogo.ts @@ -1,4 +1,4 @@ -import { styled } from '@avalabs/k2-components'; +import { styled } from '@avalabs/core-k2-components'; export const NetworkLogoContainer = styled('div')` width: 32px; diff --git a/src/pages/Onboarding/Onboarding.tsx b/src/pages/Onboarding/Onboarding.tsx index 3526fd318..31dc539d0 100644 --- a/src/pages/Onboarding/Onboarding.tsx +++ b/src/pages/Onboarding/Onboarding.tsx @@ -4,7 +4,7 @@ import { CircularProgress, HomeIcon, Box, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { LanguageSelector } from './components/LanguageSelector'; import { Redirect, diff --git a/src/pages/Onboarding/components/DerivationPathDropDown.tsx b/src/pages/Onboarding/components/DerivationPathDropDown.tsx index 839390c18..0ff3dd413 100644 --- a/src/pages/Onboarding/components/DerivationPathDropDown.tsx +++ b/src/pages/Onboarding/components/DerivationPathDropDown.tsx @@ -1,6 +1,11 @@ -import { DerivationPath } from '@avalabs/wallets-sdk'; +import { DerivationPath } from '@avalabs/core-wallets-sdk'; import { useTranslation } from 'react-i18next'; -import { CheckIcon, Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { + CheckIcon, + Stack, + Typography, + useTheme, +} from '@avalabs/core-k2-components'; import { Dropdown, DropdownItem } from '@src/components/common/Dropdown'; interface DerivationPathDropdownProps { diff --git a/src/pages/Onboarding/components/DerivedAddresses.tsx b/src/pages/Onboarding/components/DerivedAddresses.tsx index 999527aa9..cf40fcb89 100644 --- a/src/pages/Onboarding/components/DerivedAddresses.tsx +++ b/src/pages/Onboarding/components/DerivedAddresses.tsx @@ -12,7 +12,7 @@ import { Typography, useTheme, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface DerivedAddressesProps { addresses: AddressType[]; diff --git a/src/pages/Onboarding/components/LanguageSelector.tsx b/src/pages/Onboarding/components/LanguageSelector.tsx index 590dfa196..72570a79a 100644 --- a/src/pages/Onboarding/components/LanguageSelector.tsx +++ b/src/pages/Onboarding/components/LanguageSelector.tsx @@ -10,7 +10,7 @@ import { Popper, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { useLanguage } from '@src/hooks/useLanguages'; diff --git a/src/pages/Onboarding/components/OnboardButton.tsx b/src/pages/Onboarding/components/OnboardButton.tsx index c6ada08f5..e86dbeb6c 100644 --- a/src/pages/Onboarding/components/OnboardButton.tsx +++ b/src/pages/Onboarding/components/OnboardButton.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { Stack, Typography, useTheme } from '@avalabs/core-k2-components'; export function OnboardButton({ children, diff --git a/src/pages/Onboarding/components/OnboardingStepHeader.tsx b/src/pages/Onboarding/components/OnboardingStepHeader.tsx index 81641b923..dc4cb2ae4 100644 --- a/src/pages/Onboarding/components/OnboardingStepHeader.tsx +++ b/src/pages/Onboarding/components/OnboardingStepHeader.tsx @@ -1,4 +1,4 @@ -import { CoreIcon, Stack, Typography } from '@avalabs/k2-components'; +import { CoreIcon, Stack, Typography } from '@avalabs/core-k2-components'; interface OnboardingStepHeaderProps { testId?: string; diff --git a/src/pages/Onboarding/components/PageNav.tsx b/src/pages/Onboarding/components/PageNav.tsx index 842177215..f0a997625 100644 --- a/src/pages/Onboarding/components/PageNav.tsx +++ b/src/pages/Onboarding/components/PageNav.tsx @@ -1,4 +1,4 @@ -import { Button, Stack, Tooltip, useTheme } from '@avalabs/k2-components'; +import { Button, Stack, Tooltip, useTheme } from '@avalabs/core-k2-components'; import { PropsWithChildren } from 'react'; import { useTranslation } from 'react-i18next'; import { PageTracker } from './PageTracker'; diff --git a/src/pages/Onboarding/components/PageTracker.tsx b/src/pages/Onboarding/components/PageTracker.tsx index 846459645..de8c24926 100644 --- a/src/pages/Onboarding/components/PageTracker.tsx +++ b/src/pages/Onboarding/components/PageTracker.tsx @@ -1,4 +1,4 @@ -import { MobileStepper } from '@avalabs/k2-components'; +import { MobileStepper } from '@avalabs/core-k2-components'; interface PageTrackerrProps { steps: number; diff --git a/src/pages/Onboarding/components/TypographyLink.tsx b/src/pages/Onboarding/components/TypographyLink.tsx index d61009f12..f812356f9 100644 --- a/src/pages/Onboarding/components/TypographyLink.tsx +++ b/src/pages/Onboarding/components/TypographyLink.tsx @@ -1,4 +1,4 @@ -import { styled, Typography } from '@avalabs/k2-components'; +import { styled, Typography } from '@avalabs/core-k2-components'; export const TypographyLink = styled(Typography)` cursor: pointer; diff --git a/src/pages/Onboarding/components/WordsLengthSelector.tsx b/src/pages/Onboarding/components/WordsLengthSelector.tsx index f0d80eaaa..d948532d6 100644 --- a/src/pages/Onboarding/components/WordsLengthSelector.tsx +++ b/src/pages/Onboarding/components/WordsLengthSelector.tsx @@ -8,7 +8,7 @@ import { MenuItem, MenuList, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { wordPhraseLength } from '@src/utils/seedPhraseValidation'; import { useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Onboarding/hooks/useSeedlessActions.ts b/src/pages/Onboarding/hooks/useSeedlessActions.ts index 8ceedfe0f..09b2b5d41 100644 --- a/src/pages/Onboarding/hooks/useSeedlessActions.ts +++ b/src/pages/Onboarding/hooks/useSeedlessActions.ts @@ -3,7 +3,7 @@ import { SeedlessRegistartionResult, approveSeedlessRegistration, } from '../utils/approveSeedlessRegistration'; -import { toast } from '@avalabs/k2-components'; +import { toast } from '@avalabs/core-k2-components'; import { useOnboardingContext } from '@src/contexts/OnboardingProvider'; import { useHistory } from 'react-router-dom'; import { OnboardingURLs } from '@src/background/services/onboarding/models'; diff --git a/src/pages/Onboarding/pages/AnalyticsConsent.tsx b/src/pages/Onboarding/pages/AnalyticsConsent.tsx index a85cc9213..2a3b59842 100644 --- a/src/pages/Onboarding/pages/AnalyticsConsent.tsx +++ b/src/pages/Onboarding/pages/AnalyticsConsent.tsx @@ -5,7 +5,12 @@ import { } from '@src/background/services/onboarding/models'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { Trans, useTranslation } from 'react-i18next'; -import { AirdropIcon, Button, Stack, Typography } from '@avalabs/k2-components'; +import { + AirdropIcon, + Button, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { PageNav } from '../components/PageNav'; import { useEffect, useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; diff --git a/src/pages/Onboarding/pages/CreatePassword.tsx b/src/pages/Onboarding/pages/CreatePassword.tsx index 8aa5e95ea..b301b51e7 100644 --- a/src/pages/Onboarding/pages/CreatePassword.tsx +++ b/src/pages/Onboarding/pages/CreatePassword.tsx @@ -17,7 +17,7 @@ import { Typography, XIcon, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageNav } from '../components/PageNav'; import { PasswordStrength } from '@src/components/common/PasswordStrength'; import { useHistory } from 'react-router-dom'; diff --git a/src/pages/Onboarding/pages/CreateWallet/ConfirmMnemonic.tsx b/src/pages/Onboarding/pages/CreateWallet/ConfirmMnemonic.tsx index b9461c29b..8aaef010f 100644 --- a/src/pages/Onboarding/pages/CreateWallet/ConfirmMnemonic.tsx +++ b/src/pages/Onboarding/pages/CreateWallet/ConfirmMnemonic.tsx @@ -1,4 +1,9 @@ -import { Stack, Typography, styled, useTheme } from '@avalabs/k2-components'; +import { + Stack, + Typography, + styled, + useTheme, +} from '@avalabs/core-k2-components'; import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { MnemonicProps } from './Mnemonic'; diff --git a/src/pages/Onboarding/pages/CreateWallet/ConfirmPhrase.tsx b/src/pages/Onboarding/pages/CreateWallet/ConfirmPhrase.tsx index 11bed9c7d..7e9a5f762 100644 --- a/src/pages/Onboarding/pages/CreateWallet/ConfirmPhrase.tsx +++ b/src/pages/Onboarding/pages/CreateWallet/ConfirmPhrase.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { OnboardingStepHeader } from '../../components/OnboardingStepHeader'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { Trans, useTranslation } from 'react-i18next'; -import { Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { Stack, Typography, useTheme } from '@avalabs/core-k2-components'; import { Mnemonic } from './Mnemonic'; import { PageNav } from '../../components/PageNav'; diff --git a/src/pages/Onboarding/pages/CreateWallet/CopyPhrase.tsx b/src/pages/Onboarding/pages/CreateWallet/CopyPhrase.tsx index 42cc89a1e..a6c58ff8f 100644 --- a/src/pages/Onboarding/pages/CreateWallet/CopyPhrase.tsx +++ b/src/pages/Onboarding/pages/CreateWallet/CopyPhrase.tsx @@ -2,7 +2,12 @@ import { useState } from 'react'; import { OnboardingStepHeader } from '../../components/OnboardingStepHeader'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { Trans, useTranslation } from 'react-i18next'; -import { Checkbox, Stack, Typography, useTheme } from '@avalabs/k2-components'; +import { + Checkbox, + Stack, + Typography, + useTheme, +} from '@avalabs/core-k2-components'; import { Mnemonic } from './Mnemonic'; import { PageNav } from '../../components/PageNav'; diff --git a/src/pages/Onboarding/pages/CreateWallet/ShowMnemonic.tsx b/src/pages/Onboarding/pages/CreateWallet/ShowMnemonic.tsx index c7f55283b..8be806ff4 100644 --- a/src/pages/Onboarding/pages/CreateWallet/ShowMnemonic.tsx +++ b/src/pages/Onboarding/pages/CreateWallet/ShowMnemonic.tsx @@ -6,7 +6,7 @@ import { toast, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { MnemonicProps } from './Mnemonic'; diff --git a/src/pages/Onboarding/pages/ImportWallet.tsx b/src/pages/Onboarding/pages/ImportWallet.tsx index ad11c03f5..21795e870 100644 --- a/src/pages/Onboarding/pages/ImportWallet.tsx +++ b/src/pages/Onboarding/pages/ImportWallet.tsx @@ -14,7 +14,7 @@ import { TextField, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageNav } from '../components/PageNav'; import { useHistory } from 'react-router-dom'; import { WordsLengthSelector } from '../components/WordsLengthSelector'; diff --git a/src/pages/Onboarding/pages/Keystone/Keystone.tsx b/src/pages/Onboarding/pages/Keystone/Keystone.tsx index 188ae390f..03cc8ff4b 100644 --- a/src/pages/Onboarding/pages/Keystone/Keystone.tsx +++ b/src/pages/Onboarding/pages/Keystone/Keystone.tsx @@ -9,7 +9,7 @@ import { ExternalLinkIcon, Button, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageNav } from '../../components/PageNav'; import { FunctionIsOffline } from '@src/components/common/FunctionIsOffline'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; @@ -18,7 +18,7 @@ import { KEYSTONE_CONNECT_SUPPORT_URL, } from './KeystoneQRCodeScanner'; import { AddressType } from '../Ledger/LedgerConnect'; -import { getAddressFromXPub } from '@avalabs/wallets-sdk'; +import { getAddressFromXPub } from '@avalabs/core-wallets-sdk'; import { useGetAvaxBalance } from '@src/hooks/useGetAvaxBalance'; import { DerivedAddresses } from '../../components/DerivedAddresses'; import { useOnboardingContext } from '@src/contexts/OnboardingProvider'; diff --git a/src/pages/Onboarding/pages/Keystone/KeystoneQRCodeScanner.tsx b/src/pages/Onboarding/pages/Keystone/KeystoneQRCodeScanner.tsx index c54e3f0bf..8c7bbbf8f 100644 --- a/src/pages/Onboarding/pages/Keystone/KeystoneQRCodeScanner.tsx +++ b/src/pages/Onboarding/pages/Keystone/KeystoneQRCodeScanner.tsx @@ -13,7 +13,7 @@ import { ExternalLinkIcon, useTheme, XIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import { useTranslation } from 'react-i18next'; import { CryptoMultiAccounts } from '@keystonehq/bc-ur-registry-eth'; diff --git a/src/pages/Onboarding/pages/Ledger/LedgerConnect.tsx b/src/pages/Onboarding/pages/Ledger/LedgerConnect.tsx index 82f067ab1..d8fb2b0c6 100644 --- a/src/pages/Onboarding/pages/Ledger/LedgerConnect.tsx +++ b/src/pages/Onboarding/pages/Ledger/LedgerConnect.tsx @@ -12,7 +12,7 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PageNav } from '../../components/PageNav'; import { ONBOARDING_EVENT_NAMES, diff --git a/src/pages/Onboarding/pages/Ledger/LedgerTrouble.tsx b/src/pages/Onboarding/pages/Ledger/LedgerTrouble.tsx index 3afaa4cf0..115e2f8fb 100644 --- a/src/pages/Onboarding/pages/Ledger/LedgerTrouble.tsx +++ b/src/pages/Onboarding/pages/Ledger/LedgerTrouble.tsx @@ -7,7 +7,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useHistory } from 'react-router-dom'; import { OnboardingURLs } from '@src/background/services/onboarding/models'; import { useLanguage } from '@src/hooks/useLanguages'; diff --git a/src/pages/Onboarding/pages/Seedless/RecoveryMethods.tsx b/src/pages/Onboarding/pages/Seedless/RecoveryMethods.tsx index 1aaaf4b95..291f8a57b 100644 --- a/src/pages/Onboarding/pages/Seedless/RecoveryMethods.tsx +++ b/src/pages/Onboarding/pages/Seedless/RecoveryMethods.tsx @@ -4,7 +4,7 @@ import { Typography, UsbIcon, QRCodeIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { OnboardingStepHeader } from '../../components/OnboardingStepHeader'; import { Trans, useTranslation } from 'react-i18next'; import { MethodCard } from './components/MethodCard'; diff --git a/src/pages/Onboarding/pages/Seedless/RecoveryMethodsLogin.tsx b/src/pages/Onboarding/pages/Seedless/RecoveryMethodsLogin.tsx index a555bd7b9..802419a88 100644 --- a/src/pages/Onboarding/pages/Seedless/RecoveryMethodsLogin.tsx +++ b/src/pages/Onboarding/pages/Seedless/RecoveryMethodsLogin.tsx @@ -5,7 +5,7 @@ import { Stack, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { OnboardingStepHeader } from '../../components/OnboardingStepHeader'; import { Trans, useTranslation } from 'react-i18next'; import { MethodCard } from './components/MethodCard'; diff --git a/src/pages/Onboarding/pages/Seedless/components/AppleButton.tsx b/src/pages/Onboarding/pages/Seedless/components/AppleButton.tsx index e008ea3ed..0e2483ce5 100644 --- a/src/pages/Onboarding/pages/Seedless/components/AppleButton.tsx +++ b/src/pages/Onboarding/pages/Seedless/components/AppleButton.tsx @@ -1,4 +1,4 @@ -import { AppleIcon, Button } from '@avalabs/k2-components'; +import { AppleIcon, Button } from '@avalabs/core-k2-components'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { useOnboardingContext } from '@src/contexts/OnboardingProvider'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Onboarding/pages/Seedless/components/ExistingWalletButton.tsx b/src/pages/Onboarding/pages/Seedless/components/ExistingWalletButton.tsx index 14d3eca6b..8cc1c5b5f 100644 --- a/src/pages/Onboarding/pages/Seedless/components/ExistingWalletButton.tsx +++ b/src/pages/Onboarding/pages/Seedless/components/ExistingWalletButton.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { ReactNode } from 'react'; interface ExistingWalletButtonProps { diff --git a/src/pages/Onboarding/pages/Seedless/components/GoogleButton.tsx b/src/pages/Onboarding/pages/Seedless/components/GoogleButton.tsx index 28518688f..c2e9b76e5 100644 --- a/src/pages/Onboarding/pages/Seedless/components/GoogleButton.tsx +++ b/src/pages/Onboarding/pages/Seedless/components/GoogleButton.tsx @@ -1,5 +1,5 @@ import { Dispatch, SetStateAction } from 'react'; -import { GoogleColorIcon, Button } from '@avalabs/k2-components'; +import { GoogleColorIcon, Button } from '@avalabs/core-k2-components'; import { ONBOARDING_EVENT_NAMES, OnboardingPhase, diff --git a/src/pages/Onboarding/pages/Seedless/components/MethodCard.tsx b/src/pages/Onboarding/pages/Seedless/components/MethodCard.tsx index 0886f727b..efcc91b4e 100644 --- a/src/pages/Onboarding/pages/Seedless/components/MethodCard.tsx +++ b/src/pages/Onboarding/pages/Seedless/components/MethodCard.tsx @@ -5,7 +5,7 @@ import { ChevronRightIcon, CardActionArea, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ReactElement } from 'react'; import { InlineBold } from '@src/components/common/InlineBold'; diff --git a/src/pages/Onboarding/pages/Seedless/modals/AuthenticatorModal.tsx b/src/pages/Onboarding/pages/Seedless/modals/AuthenticatorModal.tsx index 03e9d0118..8adb215e0 100644 --- a/src/pages/Onboarding/pages/Seedless/modals/AuthenticatorModal.tsx +++ b/src/pages/Onboarding/pages/Seedless/modals/AuthenticatorModal.tsx @@ -8,7 +8,7 @@ import { CopyIcon, toast, CircularProgress, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Trans, useTranslation } from 'react-i18next'; import { Overlay } from '@src/components/common/Overlay'; import { TypographyLink } from '@src/pages/Onboarding/components/TypographyLink'; diff --git a/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx b/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx index f12225d54..c035f376f 100644 --- a/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx +++ b/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx @@ -7,7 +7,7 @@ import { XIcon, useTheme, AlertCircleIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import { useSeedlessActions } from '@src/pages/Onboarding/hooks/useSeedlessActions'; import { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/src/pages/Onboarding/pages/Seedless/modals/TOTPModal.tsx b/src/pages/Onboarding/pages/Seedless/modals/TOTPModal.tsx index 0f55b60d3..12f93c6c4 100644 --- a/src/pages/Onboarding/pages/Seedless/modals/TOTPModal.tsx +++ b/src/pages/Onboarding/pages/Seedless/modals/TOTPModal.tsx @@ -5,7 +5,7 @@ import { Typography, XIcon, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import { Overlay } from '@src/components/common/Overlay'; import { AuthStep, useSeedlessAuth } from '@src/hooks/useSeedlessAuth'; diff --git a/src/pages/Onboarding/pages/Seedless/modals/VerifyGoBackModal.tsx b/src/pages/Onboarding/pages/Seedless/modals/VerifyGoBackModal.tsx index a01b5bde1..3ba9f3187 100644 --- a/src/pages/Onboarding/pages/Seedless/modals/VerifyGoBackModal.tsx +++ b/src/pages/Onboarding/pages/Seedless/modals/VerifyGoBackModal.tsx @@ -5,7 +5,7 @@ import { Button, XIcon, AlertCircleIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Onboarding/pages/Welcome/SignUpWithSeedless.tsx b/src/pages/Onboarding/pages/Welcome/SignUpWithSeedless.tsx index a4c68aeaa..724e9972c 100644 --- a/src/pages/Onboarding/pages/Welcome/SignUpWithSeedless.tsx +++ b/src/pages/Onboarding/pages/Welcome/SignUpWithSeedless.tsx @@ -6,7 +6,7 @@ import { LedgerIcon, ArrowLeftIcon, ShieldLockIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; import { FeatureGates } from '@src/background/services/featureFlags/models'; diff --git a/src/pages/Onboarding/pages/Welcome/Welcome.tsx b/src/pages/Onboarding/pages/Welcome/Welcome.tsx index 9ca373fa3..1197dd668 100644 --- a/src/pages/Onboarding/pages/Welcome/Welcome.tsx +++ b/src/pages/Onboarding/pages/Welcome/Welcome.tsx @@ -1,5 +1,5 @@ import { SignUpWithSeedles } from './SignUpWithSeedless'; -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useOnboardingContext } from '@src/contexts/OnboardingProvider'; import { useEffect } from 'react'; diff --git a/src/pages/Permissions/Permissions.tsx b/src/pages/Permissions/Permissions.tsx index 9890d5179..161ba8331 100644 --- a/src/pages/Permissions/Permissions.tsx +++ b/src/pages/Permissions/Permissions.tsx @@ -7,7 +7,7 @@ import { Box, useTheme, GlobeIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { Account } from '@src/background/services/accounts/models'; import { TokenIcon } from '@src/components/common/TokenIcon'; diff --git a/src/pages/Permissions/components/AccountsDropdown.tsx b/src/pages/Permissions/components/AccountsDropdown.tsx index ad3e3a4af..5eefbfee2 100644 --- a/src/pages/Permissions/components/AccountsDropdown.tsx +++ b/src/pages/Permissions/components/AccountsDropdown.tsx @@ -6,7 +6,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { DropdownItem, Dropdown } from '@src/components/common/Dropdown'; import { useBalancesContext } from '@src/contexts/BalancesProvider'; import { useSettingsContext } from '@src/contexts/SettingsProvider'; diff --git a/src/pages/Permissions/components/AlertBox.tsx b/src/pages/Permissions/components/AlertBox.tsx index 1f920f9cc..5df5b2cc9 100644 --- a/src/pages/Permissions/components/AlertBox.tsx +++ b/src/pages/Permissions/components/AlertBox.tsx @@ -4,7 +4,7 @@ import { Typography, useTheme, RemoveModeratorIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface AlertBoxProps { title: string; diff --git a/src/pages/Permissions/components/AlertDialog.tsx b/src/pages/Permissions/components/AlertDialog.tsx index 84e98ad49..060330f2f 100644 --- a/src/pages/Permissions/components/AlertDialog.tsx +++ b/src/pages/Permissions/components/AlertDialog.tsx @@ -5,7 +5,7 @@ import { Typography, useTheme, RemoveModeratorIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; interface AlertDialogProps { diff --git a/src/pages/Permissions/components/WarningBox.tsx b/src/pages/Permissions/components/WarningBox.tsx index e3c6ac6f5..fdc3e828b 100644 --- a/src/pages/Permissions/components/WarningBox.tsx +++ b/src/pages/Permissions/components/WarningBox.tsx @@ -4,7 +4,7 @@ import { Typography, useTheme, GppMaybeIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface WarningBoxProps { title: string; diff --git a/src/pages/Receive/Receive.tsx b/src/pages/Receive/Receive.tsx index 45a6ee0ef..3d879bc5b 100644 --- a/src/pages/Receive/Receive.tsx +++ b/src/pages/Receive/Receive.tsx @@ -10,11 +10,15 @@ import { EthereumQRCodeLogo, AvalancheQRCodeLogo, } from '@src/components/icons/QRCodeLogos'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { isEthereumChainId } from '@src/background/services/network/utils/isEthereumNetwork'; import { useTranslation } from 'react-i18next'; import { PrimaryAddressK2 } from '@src/components/common/AddressK2'; -import { CircularProgress, Stack, Typography } from '@avalabs/k2-components'; +import { + CircularProgress, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { isPchainNetwork } from '@src/background/services/network/utils/isAvalanchePchainNetwork'; import { FunctionNames, diff --git a/src/pages/SeedlessPopups/SeedlessAuthPopup.tsx b/src/pages/SeedlessPopups/SeedlessAuthPopup.tsx index e3884751c..d70dc67cb 100644 --- a/src/pages/SeedlessPopups/SeedlessAuthPopup.tsx +++ b/src/pages/SeedlessPopups/SeedlessAuthPopup.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Button, Stack } from '@avalabs/k2-components'; +import { Button, Stack } from '@avalabs/core-k2-components'; import { SignerSessionData } from '@cubist-labs/cubesigner-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/src/pages/SeedlessPopups/SeedlessExportPopup.tsx b/src/pages/SeedlessPopups/SeedlessExportPopup.tsx index 048eabf75..a20239a92 100644 --- a/src/pages/SeedlessPopups/SeedlessExportPopup.tsx +++ b/src/pages/SeedlessPopups/SeedlessExportPopup.tsx @@ -8,7 +8,7 @@ import { DialogTitle, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ExportState, diff --git a/src/pages/SeedlessPopups/SeedlessRemoveTotp.tsx b/src/pages/SeedlessPopups/SeedlessRemoveTotp.tsx index aca5e96d6..8e5557c72 100644 --- a/src/pages/SeedlessPopups/SeedlessRemoveTotp.tsx +++ b/src/pages/SeedlessPopups/SeedlessRemoveTotp.tsx @@ -7,7 +7,7 @@ import { CircularProgress, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useSeedlessMfa } from '@src/hooks/useSeedlessMfa'; import { PageTitle, PageTitleVariant } from '@src/components/common/PageTitle'; diff --git a/src/pages/SeedlessPopups/SeedlessUpdateRecoveryMethod.tsx b/src/pages/SeedlessPopups/SeedlessUpdateRecoveryMethod.tsx index 547fed376..d9e108c03 100644 --- a/src/pages/SeedlessPopups/SeedlessUpdateRecoveryMethod.tsx +++ b/src/pages/SeedlessPopups/SeedlessUpdateRecoveryMethod.tsx @@ -8,7 +8,7 @@ import { Stack, TextField, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useSeedlessMfa } from '@src/hooks/useSeedlessMfa'; import { PageTitle, PageTitleVariant } from '@src/components/common/PageTitle'; diff --git a/src/pages/Send/Send.tsx b/src/pages/Send/Send.tsx index f455342a7..1b22ff6e6 100644 --- a/src/pages/Send/Send.tsx +++ b/src/pages/Send/Send.tsx @@ -4,7 +4,7 @@ import { useTokensWithBalances } from '@src/hooks/useTokensWithBalances'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; import { FunctionIsOffline } from '@src/components/common/FunctionIsOffline'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { NetworkTokenWithBalance, TokenType, @@ -14,7 +14,7 @@ import { TokenWithBalancePVM, } from '@src/background/services/balances/models'; import { useTranslation } from 'react-i18next'; -import { Stack, toast } from '@avalabs/k2-components'; +import { Stack, toast } from '@avalabs/core-k2-components'; import { FunctionNames, useIsFunctionAvailable, @@ -27,7 +27,7 @@ import { Avalanche, BitcoinProvider, JsonRpcBatchInternal, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { SendEVM } from './components/SendEVM'; import { toastCardWithLink } from '@src/utils/toastCardWithLink'; import { getExplorerAddressByNetwork } from '@src/utils/getExplorerAddress'; diff --git a/src/pages/Send/components/AddressDropdownList.tsx b/src/pages/Send/components/AddressDropdownList.tsx index 6bfc21348..9b0fc20a2 100644 --- a/src/pages/Send/components/AddressDropdownList.tsx +++ b/src/pages/Send/components/AddressDropdownList.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Scrollbars, Stack } from '@avalabs/k2-components'; +import { Box, Button, Scrollbars, Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import type { Contact } from '@avalabs/types'; diff --git a/src/pages/Send/components/AddressDropdownListItem.tsx b/src/pages/Send/components/AddressDropdownListItem.tsx index b763d2077..4cbf274fc 100644 --- a/src/pages/Send/components/AddressDropdownListItem.tsx +++ b/src/pages/Send/components/AddressDropdownListItem.tsx @@ -9,7 +9,7 @@ import { Typography, Tooltip, XAndPChainsIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ContactAddress } from './ContactAddress'; import { isPchainNetwork } from '@src/background/services/network/utils/isAvalanchePchainNetwork'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; diff --git a/src/pages/Send/components/AddressDropdownListMyAccounts.tsx b/src/pages/Send/components/AddressDropdownListMyAccounts.tsx index 53ec1d243..8190dcdfa 100644 --- a/src/pages/Send/components/AddressDropdownListMyAccounts.tsx +++ b/src/pages/Send/components/AddressDropdownListMyAccounts.tsx @@ -4,7 +4,7 @@ import { Scrollbars, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import type { Contact } from '@avalabs/types'; diff --git a/src/pages/Send/components/ContactAddress.tsx b/src/pages/Send/components/ContactAddress.tsx index 93b07b3ef..dfbddce26 100644 --- a/src/pages/Send/components/ContactAddress.tsx +++ b/src/pages/Send/components/ContactAddress.tsx @@ -4,7 +4,7 @@ import { toast, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { truncateAddress } from '@src/utils/truncateAddress'; diff --git a/src/pages/Send/components/ContactInput.tsx b/src/pages/Send/components/ContactInput.tsx index 8fda4a9b6..01386d2de 100644 --- a/src/pages/Send/components/ContactInput.tsx +++ b/src/pages/Send/components/ContactInput.tsx @@ -6,10 +6,10 @@ import { TextField, Tooltip, UserSearchIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import type { Contact } from '@avalabs/types'; -import { NetworkVMType } from '@avalabs/chains-sdk'; -import { isBech32Address } from '@avalabs/bridge-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; +import { isBech32Address } from '@avalabs/core-bridge-sdk'; import { isAddress } from 'ethers'; import { useTranslation } from 'react-i18next'; import { ContactSelect } from './ContactSelect'; diff --git a/src/pages/Send/components/ContactSelect.tsx b/src/pages/Send/components/ContactSelect.tsx index b8ce0055f..cc27f7019 100644 --- a/src/pages/Send/components/ContactSelect.tsx +++ b/src/pages/Send/components/ContactSelect.tsx @@ -1,6 +1,6 @@ import { useEffect, useMemo, useState } from 'react'; import type { Contact } from '@avalabs/types'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { useTranslation } from 'react-i18next'; import { Box, @@ -9,7 +9,7 @@ import { TabPanel, Tabs, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { useContactsContext } from '@src/contexts/ContactsProvider'; diff --git a/src/pages/Send/components/LoadingSendForm.tsx b/src/pages/Send/components/LoadingSendForm.tsx index 5f9f826a1..4db8c0b10 100644 --- a/src/pages/Send/components/LoadingSendForm.tsx +++ b/src/pages/Send/components/LoadingSendForm.tsx @@ -1,4 +1,4 @@ -import { Skeleton, Stack } from '@avalabs/k2-components'; +import { Skeleton, Stack } from '@avalabs/core-k2-components'; type Props = { withTitle?: boolean }; diff --git a/src/pages/Send/components/SendAVM.tsx b/src/pages/Send/components/SendAVM.tsx index e2ca0877c..15026f7b2 100644 --- a/src/pages/Send/components/SendAVM.tsx +++ b/src/pages/Send/components/SendAVM.tsx @@ -1,6 +1,6 @@ -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { TokenWithBalanceAVM } from '@src/background/services/balances/models'; import { handleTxOutcome } from '@src/utils/handleTxOutcome'; diff --git a/src/pages/Send/components/SendBTC.tsx b/src/pages/Send/components/SendBTC.tsx index ecd66e030..a7f37c6b3 100644 --- a/src/pages/Send/components/SendBTC.tsx +++ b/src/pages/Send/components/SendBTC.tsx @@ -1,6 +1,6 @@ -import { BitcoinProvider } from '@avalabs/wallets-sdk'; +import { BitcoinProvider } from '@avalabs/core-wallets-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { TokenWithBalanceBTC } from '@src/background/services/balances/models'; import { handleTxOutcome } from '@src/utils/handleTxOutcome'; diff --git a/src/pages/Send/components/SendEVM.tsx b/src/pages/Send/components/SendEVM.tsx index 0d43edba0..c89094e5d 100644 --- a/src/pages/Send/components/SendEVM.tsx +++ b/src/pages/Send/components/SendEVM.tsx @@ -1,6 +1,6 @@ -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { NetworkTokenWithBalance, diff --git a/src/pages/Send/components/SendForm.tsx b/src/pages/Send/components/SendForm.tsx index 6cb5d94f6..5b4dd1791 100644 --- a/src/pages/Send/components/SendForm.tsx +++ b/src/pages/Send/components/SendForm.tsx @@ -6,7 +6,7 @@ import { Stack, Scrollbars, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Contact } from '@avalabs/types'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/Send/components/SendPVM.tsx b/src/pages/Send/components/SendPVM.tsx index fbc20f09c..b90e3d3ef 100644 --- a/src/pages/Send/components/SendPVM.tsx +++ b/src/pages/Send/components/SendPVM.tsx @@ -1,6 +1,6 @@ -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { useCallback, useEffect, useMemo, useState } from 'react'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { TokenWithBalancePVM } from '@src/background/services/balances/models'; import { handleTxOutcome } from '@src/utils/handleTxOutcome'; diff --git a/src/pages/Send/components/TruncatedAddress.tsx b/src/pages/Send/components/TruncatedAddress.tsx index 73601395f..5e411fd01 100644 --- a/src/pages/Send/components/TruncatedAddress.tsx +++ b/src/pages/Send/components/TruncatedAddress.tsx @@ -3,7 +3,7 @@ import { Stack, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { truncateAddress } from '@src/utils/truncateAddress'; import React from 'react'; diff --git a/src/pages/Send/hooks/useSend/models.ts b/src/pages/Send/hooks/useSend/models.ts index 92893c808..8473f466d 100644 --- a/src/pages/Send/hooks/useSend/models.ts +++ b/src/pages/Send/hooks/useSend/models.ts @@ -2,8 +2,8 @@ import { Avalanche, BitcoinProvider, JsonRpcBatchInternal, -} from '@avalabs/wallets-sdk'; -import { Network } from '@avalabs/chains-sdk'; +} from '@avalabs/core-wallets-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { BaseSendOptions, NativeSendOptions, SendOptions } from '../../models'; diff --git a/src/pages/Send/hooks/useSend/useAVMSend.ts b/src/pages/Send/hooks/useSend/useAVMSend.ts index e06628907..54e7d7dc3 100644 --- a/src/pages/Send/hooks/useSend/useAVMSend.ts +++ b/src/pages/Send/hooks/useSend/useAVMSend.ts @@ -1,7 +1,7 @@ import Big from 'big.js'; import { utils } from '@avalabs/avalanchejs'; -import { Avalanche } from '@avalabs/wallets-sdk'; -import { bigToBigInt, resolve } from '@avalabs/utils-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; +import { bigToBigInt, resolve } from '@avalabs/core-utils-sdk'; import { useCallback, useMemo, useState } from 'react'; import { FeatureGates } from '@src/background/services/featureFlags/models'; diff --git a/src/pages/Send/hooks/useSend/useBTCSend.ts b/src/pages/Send/hooks/useSend/useBTCSend.ts index e64907a3f..2acad7829 100644 --- a/src/pages/Send/hooks/useSend/useBTCSend.ts +++ b/src/pages/Send/hooks/useSend/useBTCSend.ts @@ -1,6 +1,9 @@ -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { useCallback, useEffect, useState } from 'react'; -import { BitcoinInputUTXO, getMaxTransferAmount } from '@avalabs/wallets-sdk'; +import { + BitcoinInputUTXO, + getMaxTransferAmount, +} from '@avalabs/core-wallets-sdk'; import { SendErrorMessage } from '@src/utils/send/models'; import { DAppProviderRequest } from '@src/background/connections/dAppConnection/models'; diff --git a/src/pages/Send/hooks/useSend/useEVMSend.ts b/src/pages/Send/hooks/useSend/useEVMSend.ts index 33f880624..56bd8c86f 100644 --- a/src/pages/Send/hooks/useSend/useEVMSend.ts +++ b/src/pages/Send/hooks/useSend/useEVMSend.ts @@ -1,5 +1,5 @@ import BN from 'bn.js'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { useCallback, useState } from 'react'; import { TokenType } from '@src/background/services/balances/models'; diff --git a/src/pages/Send/hooks/useSend/usePVMSend.ts b/src/pages/Send/hooks/useSend/usePVMSend.ts index bb7424575..7f36590f2 100644 --- a/src/pages/Send/hooks/useSend/usePVMSend.ts +++ b/src/pages/Send/hooks/useSend/usePVMSend.ts @@ -1,7 +1,7 @@ import Big from 'big.js'; import { utils } from '@avalabs/avalanchejs'; -import { Avalanche } from '@avalabs/wallets-sdk'; -import { bigToBigInt } from '@avalabs/utils-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; +import { bigToBigInt } from '@avalabs/core-utils-sdk'; import { useCallback, useMemo, useState } from 'react'; import { resolve } from '@src/utils/promiseResolver'; diff --git a/src/pages/Send/utils/buildSendTx.test.ts b/src/pages/Send/utils/buildSendTx.test.ts index 53984d664..0b5297121 100644 --- a/src/pages/Send/utils/buildSendTx.test.ts +++ b/src/pages/Send/utils/buildSendTx.test.ts @@ -1,5 +1,5 @@ import { Contract } from 'ethers'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; import ERC721 from '@openzeppelin/contracts/build/contracts/ERC721.json'; import ERC1155 from '@openzeppelin/contracts/build/contracts/ERC1155.json'; diff --git a/src/pages/Send/utils/buildSendTx.ts b/src/pages/Send/utils/buildSendTx.ts index f07263445..389f04181 100644 --- a/src/pages/Send/utils/buildSendTx.ts +++ b/src/pages/Send/utils/buildSendTx.ts @@ -1,8 +1,8 @@ import ERC20 from '@openzeppelin/contracts/build/contracts/ERC20.json'; import ERC721 from '@openzeppelin/contracts/build/contracts/ERC721.json'; import ERC1155 from '@openzeppelin/contracts/build/contracts/ERC1155.json'; -import { stringToBN } from '@avalabs/utils-sdk'; -import { JsonRpcBatchInternal } from '@avalabs/wallets-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; +import { JsonRpcBatchInternal } from '@avalabs/core-wallets-sdk'; import { Contract, TransactionRequest } from 'ethers'; import { diff --git a/src/pages/Send/utils/getMaxUtxos.ts b/src/pages/Send/utils/getMaxUtxos.ts index 0785b0c08..0febff820 100644 --- a/src/pages/Send/utils/getMaxUtxos.ts +++ b/src/pages/Send/utils/getMaxUtxos.ts @@ -1,6 +1,6 @@ import { utils } from '@avalabs/avalanchejs'; -import { Network } from '@avalabs/chains-sdk'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { LEDGER_TX_SIZE_LIMIT_BYTES } from '@src/background/services/ledger/models'; import { isPchainNetwork } from '@src/background/services/network/utils/isAvalanchePchainNetwork'; const MAX_LEDGER_OUTPUTS = 64; diff --git a/src/pages/SignMessage/SignMessage.tsx b/src/pages/SignMessage/SignMessage.tsx index c7df86968..5810b2d4e 100644 --- a/src/pages/SignMessage/SignMessage.tsx +++ b/src/pages/SignMessage/SignMessage.tsx @@ -13,7 +13,7 @@ import { Stack, Tooltip, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import Dialog from '@src/components/common/Dialog'; import { ActionStatus } from '@src/background/services/actions/models'; diff --git a/src/pages/SignMessage/components/EthSign.tsx b/src/pages/SignMessage/components/EthSign.tsx index 5a41d515c..3302364d0 100644 --- a/src/pages/SignMessage/components/EthSign.tsx +++ b/src/pages/SignMessage/components/EthSign.tsx @@ -1,4 +1,9 @@ -import { Card, Scrollbars, Stack, Typography } from '@avalabs/k2-components'; +import { + Card, + Scrollbars, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { positionValues } from 'react-custom-scrollbars-2'; import { MessageParams } from '@src/background/services/messages/models'; diff --git a/src/pages/SignMessage/components/PersonalSign.tsx b/src/pages/SignMessage/components/PersonalSign.tsx index 835451e0d..70d183e56 100644 --- a/src/pages/SignMessage/components/PersonalSign.tsx +++ b/src/pages/SignMessage/components/PersonalSign.tsx @@ -1,7 +1,12 @@ import { toUtf8 } from 'ethereumjs-util'; import { positionValues } from 'react-custom-scrollbars-2'; import { useTranslation } from 'react-i18next'; -import { Card, Scrollbars, Stack, Typography } from '@avalabs/k2-components'; +import { + Card, + Scrollbars, + Stack, + Typography, +} from '@avalabs/core-k2-components'; import { MessageParams } from '@src/background/services/messages/models'; import { forwardRef, ForwardedRef } from 'react'; diff --git a/src/pages/SignMessage/components/ScrollableMessageCard.tsx b/src/pages/SignMessage/components/ScrollableMessageCard.tsx index d1e140c01..81fe1de8e 100644 --- a/src/pages/SignMessage/components/ScrollableMessageCard.tsx +++ b/src/pages/SignMessage/components/ScrollableMessageCard.tsx @@ -1,6 +1,6 @@ import React, { ForwardedRef, forwardRef } from 'react'; import { positionValues } from 'react-custom-scrollbars-2'; -import { Card, Scrollbars, useTheme } from '@avalabs/k2-components'; +import { Card, Scrollbars, useTheme } from '@avalabs/core-k2-components'; type Props = { scrollUpdateHandler: (values: positionValues) => void; diff --git a/src/pages/SignMessage/components/SignData.tsx b/src/pages/SignMessage/components/SignData.tsx index 8d725c6df..36204accc 100644 --- a/src/pages/SignMessage/components/SignData.tsx +++ b/src/pages/SignMessage/components/SignData.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { positionValues } from 'react-custom-scrollbars-2'; import { MessageParams } from '@src/background/services/messages/models'; diff --git a/src/pages/SignMessage/components/SignDataV3.tsx b/src/pages/SignMessage/components/SignDataV3.tsx index dc5f7e032..d4ba526a0 100644 --- a/src/pages/SignMessage/components/SignDataV3.tsx +++ b/src/pages/SignMessage/components/SignDataV3.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { positionValues } from 'react-custom-scrollbars-2'; import { MessageParams } from '@src/background/services/messages/models'; import { ForwardedRef, forwardRef } from 'react'; diff --git a/src/pages/SignMessage/components/SignDataV4.tsx b/src/pages/SignMessage/components/SignDataV4.tsx index 5fb0735e3..54de1003a 100644 --- a/src/pages/SignMessage/components/SignDataV4.tsx +++ b/src/pages/SignMessage/components/SignDataV4.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { positionValues } from 'react-custom-scrollbars-2'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/SignTransaction/SignTransaction.tsx b/src/pages/SignTransaction/SignTransaction.tsx index 91d28cc0e..a1343495b 100644 --- a/src/pages/SignTransaction/SignTransaction.tsx +++ b/src/pages/SignTransaction/SignTransaction.tsx @@ -8,7 +8,7 @@ import { Skeleton, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { BN } from 'bn.js'; import { useGetRequestId } from '@src/hooks/useGetRequestId'; import { useCallback, useMemo, useState } from 'react'; diff --git a/src/pages/SignTransaction/components/ApprovalTxDetails.tsx b/src/pages/SignTransaction/components/ApprovalTxDetails.tsx index 303ef5760..4cebb3718 100644 --- a/src/pages/SignTransaction/components/ApprovalTxDetails.tsx +++ b/src/pages/SignTransaction/components/ApprovalTxDetails.tsx @@ -6,8 +6,8 @@ import { ExternalLinkIcon, Link, Tooltip, -} from '@avalabs/k2-components'; -import { Network } from '@avalabs/chains-sdk'; +} from '@avalabs/core-k2-components'; +import { Network } from '@avalabs/core-chains-sdk'; import { useTranslation } from 'react-i18next'; import { truncateAddress } from '@src/utils/truncateAddress'; import { getExplorerAddressByNetwork } from '@src/utils/getExplorerAddress'; diff --git a/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalOverlay.tsx b/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalOverlay.tsx index 412fb0f03..fa5a27f6f 100644 --- a/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalOverlay.tsx +++ b/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalOverlay.tsx @@ -2,7 +2,7 @@ import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { useEffect, useMemo, useState } from 'react'; import { useRequiredSession } from '@src/components/common/walletConnect/useRequiredSession'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; -import { CircularProgress, Stack } from '@avalabs/k2-components'; +import { CircularProgress, Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { WalletConnectApprovalConnect } from '../WalletConnectApproval/WalletConnectApprovalConnect'; import shouldUseWalletConnectApproval from '@src/utils/shouldUseWalletConnectApproval'; diff --git a/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalReview.tsx b/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalReview.tsx index c0bddda4e..b7f5791d5 100644 --- a/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalReview.tsx +++ b/src/pages/SignTransaction/components/FireblocksApproval/FireblocksApprovalReview.tsx @@ -5,7 +5,7 @@ import { FireblocksIcon, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Trans } from 'react-i18next'; import { WalletConnectSessionInfo } from '@src/background/services/walletConnect/models'; import { Account } from '@src/background/services/accounts/models'; diff --git a/src/pages/SignTransaction/components/KeystoneApprovalOverlay.tsx b/src/pages/SignTransaction/components/KeystoneApprovalOverlay.tsx index 0eab67ee1..eacd81bc7 100644 --- a/src/pages/SignTransaction/components/KeystoneApprovalOverlay.tsx +++ b/src/pages/SignTransaction/components/KeystoneApprovalOverlay.tsx @@ -8,7 +8,7 @@ import { CircularProgress, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { AnimatedQRCode, AnimatedQRScanner, diff --git a/src/pages/SignTransaction/components/LedgerApprovalDialog.tsx b/src/pages/SignTransaction/components/LedgerApprovalDialog.tsx index 5d15a94b7..3c22a8769 100644 --- a/src/pages/SignTransaction/components/LedgerApprovalDialog.tsx +++ b/src/pages/SignTransaction/components/LedgerApprovalDialog.tsx @@ -6,7 +6,7 @@ import { Stack, CircularProgress, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { truncateAddress } from '@src/utils/truncateAddress'; interface LedgerApprovalDialogProps { diff --git a/src/pages/SignTransaction/components/LedgerApprovalOverlay.tsx b/src/pages/SignTransaction/components/LedgerApprovalOverlay.tsx index 2e725bb35..11086b800 100644 --- a/src/pages/SignTransaction/components/LedgerApprovalOverlay.tsx +++ b/src/pages/SignTransaction/components/LedgerApprovalOverlay.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { Overlay } from '@src/components/common/Overlay'; import useIsUsingLedgerWallet from '@src/hooks/useIsUsingLedgerWallet'; diff --git a/src/pages/SignTransaction/components/LedgerDisconnectDialog.tsx b/src/pages/SignTransaction/components/LedgerDisconnectDialog.tsx index 51dbd2a1d..62262510a 100644 --- a/src/pages/SignTransaction/components/LedgerDisconnectDialog.tsx +++ b/src/pages/SignTransaction/components/LedgerDisconnectDialog.tsx @@ -1,5 +1,9 @@ import { useState } from 'react'; -import { CircularProgress, Typography, useTheme } from '@avalabs/k2-components'; +import { + CircularProgress, + Typography, + useTheme, +} from '@avalabs/core-k2-components'; import Dialog from '@src/components/common/Dialog'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/SignTransaction/components/NftAccordion.tsx b/src/pages/SignTransaction/components/NftAccordion.tsx index 1f428ff87..026ed11b4 100644 --- a/src/pages/SignTransaction/components/NftAccordion.tsx +++ b/src/pages/SignTransaction/components/NftAccordion.tsx @@ -4,7 +4,7 @@ import { Stack, Typography, AccordionDetails, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TransactionNft } from '@src/background/services/wallet/handlers/eth_sendTransaction/models'; import { CollectibleMedia } from '@src/pages/Collectibles/components/CollectibleMedia'; import { diff --git a/src/pages/SignTransaction/components/RawTransactionData.tsx b/src/pages/SignTransaction/components/RawTransactionData.tsx index 6203255a7..574d3b935 100644 --- a/src/pages/SignTransaction/components/RawTransactionData.tsx +++ b/src/pages/SignTransaction/components/RawTransactionData.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { Scrollbars, Stack, Typography } from '@avalabs/k2-components'; +import { Scrollbars, Stack, Typography } from '@avalabs/core-k2-components'; import { PageTitle } from '@src/components/common/PageTitle'; import { getHexStringToBytes } from '@src/utils/getHexStringToBytes'; diff --git a/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalConfirmation.tsx b/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalConfirmation.tsx index 540f36c37..baad6be40 100644 --- a/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalConfirmation.tsx +++ b/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalConfirmation.tsx @@ -1,5 +1,10 @@ -import { Divider, Typography, Button, Stack } from '@avalabs/k2-components'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { + Divider, + Typography, + Button, + Stack, +} from '@avalabs/core-k2-components'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; import { Account } from '@src/background/services/accounts/models'; import { WalletConnectSessionInfo } from '@src/background/services/walletConnect/models'; import { t } from 'i18next'; diff --git a/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalDialog.tsx b/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalDialog.tsx index 50f872587..f27ca804a 100644 --- a/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalDialog.tsx +++ b/src/pages/SignTransaction/components/RemoteApproval/RemoteApprovalDialog.tsx @@ -1,4 +1,9 @@ -import { Dialog, IconButton, Typography, XIcon } from '@avalabs/k2-components'; +import { + Dialog, + IconButton, + Typography, + XIcon, +} from '@avalabs/core-k2-components'; import { PropsWithChildren } from 'react'; interface RemoteApprovalDialogProps { diff --git a/src/pages/SignTransaction/components/SignTxErrorBoundary.tsx b/src/pages/SignTransaction/components/SignTxErrorBoundary.tsx index 5c22fc4c6..f62b746a3 100644 --- a/src/pages/SignTransaction/components/SignTxErrorBoundary.tsx +++ b/src/pages/SignTransaction/components/SignTxErrorBoundary.tsx @@ -7,7 +7,7 @@ import { Stack, Typography, toast, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { WithTranslation, withTranslation } from 'react-i18next'; interface SignTxErrorBoundaryProps extends WithTranslation { diff --git a/src/pages/SignTransaction/components/SpendLimitInfo/CustomSpendLimit.tsx b/src/pages/SignTransaction/components/SpendLimitInfo/CustomSpendLimit.tsx index 6cfec6d03..60b05bc49 100644 --- a/src/pages/SignTransaction/components/SpendLimitInfo/CustomSpendLimit.tsx +++ b/src/pages/SignTransaction/components/SpendLimitInfo/CustomSpendLimit.tsx @@ -10,7 +10,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Trans, useTranslation } from 'react-i18next'; import { BNInput } from '@src/components/common/BNInput'; diff --git a/src/pages/SignTransaction/components/SpendLimitInfo/NftCollectionSpendLimit.tsx b/src/pages/SignTransaction/components/SpendLimitInfo/NftCollectionSpendLimit.tsx index ef9d3b2b3..02874f6d8 100644 --- a/src/pages/SignTransaction/components/SpendLimitInfo/NftCollectionSpendLimit.tsx +++ b/src/pages/SignTransaction/components/SpendLimitInfo/NftCollectionSpendLimit.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { ApprovalSection, diff --git a/src/pages/SignTransaction/components/SpendLimitInfo/NftSpendLimit.tsx b/src/pages/SignTransaction/components/SpendLimitInfo/NftSpendLimit.tsx index e85c1a121..2bc38a37c 100644 --- a/src/pages/SignTransaction/components/SpendLimitInfo/NftSpendLimit.tsx +++ b/src/pages/SignTransaction/components/SpendLimitInfo/NftSpendLimit.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { ApprovalSection, diff --git a/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx b/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx index 1f2391842..f61687937 100644 --- a/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx +++ b/src/pages/SignTransaction/components/SpendLimitInfo/TokenSpendLimit.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Dialog, Stack } from '@avalabs/k2-components'; +import { Box, Button, Dialog, Stack } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { ApprovalSection, diff --git a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveContractCallDetails.tsx b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveContractCallDetails.tsx index 225ba2eff..64f48e13b 100644 --- a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveContractCallDetails.tsx +++ b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveContractCallDetails.tsx @@ -1,7 +1,7 @@ -import { Tooltip, Typography } from '@avalabs/k2-components'; +import { Tooltip, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export function ApproveContractCallDetails({ fromAddress, diff --git a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftCollectionDetails.tsx b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftCollectionDetails.tsx index 9a121082b..b967ab0e3 100644 --- a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftCollectionDetails.tsx +++ b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftCollectionDetails.tsx @@ -1,7 +1,7 @@ -import { Tooltip, Typography } from '@avalabs/k2-components'; +import { Tooltip, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export function ApproveNftCollectionDetails({ spender, diff --git a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftDetails.tsx b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftDetails.tsx index 1c54a2415..f13d6492c 100644 --- a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftDetails.tsx +++ b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveNftDetails.tsx @@ -1,7 +1,7 @@ -import { Tooltip, Typography } from '@avalabs/k2-components'; +import { Tooltip, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export function ApproveNftDetails({ spender, diff --git a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveSendDetails.tsx b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveSendDetails.tsx index 609cce2bc..fda0f1261 100644 --- a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveSendDetails.tsx +++ b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveSendDetails.tsx @@ -1,7 +1,7 @@ -import { Tooltip, Typography } from '@avalabs/k2-components'; +import { Tooltip, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export function ApproveSendDetails({ fromAddress, diff --git a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveTokenDetails.tsx b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveTokenDetails.tsx index 8d7d6614c..f89dfbd32 100644 --- a/src/pages/SignTransaction/components/TransactionActionInfo/ApproveTokenDetails.tsx +++ b/src/pages/SignTransaction/components/TransactionActionInfo/ApproveTokenDetails.tsx @@ -1,7 +1,7 @@ -import { Tooltip, Typography } from '@avalabs/k2-components'; +import { Tooltip, Typography } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { TxDetailsRow } from '@src/components/common/approval/TxDetailsRow'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export function ApproveTokenDetails({ spender, diff --git a/src/pages/SignTransaction/components/TransactionErrorDialog.tsx b/src/pages/SignTransaction/components/TransactionErrorDialog.tsx index 66d15bf56..128fdc9e6 100644 --- a/src/pages/SignTransaction/components/TransactionErrorDialog.tsx +++ b/src/pages/SignTransaction/components/TransactionErrorDialog.tsx @@ -1,4 +1,4 @@ -import { Typography, Stack, Button } from '@avalabs/k2-components'; +import { Typography, Stack, Button } from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; export const TransactionErrorDialog = ({ onConfirm }) => { diff --git a/src/pages/SignTransaction/components/TransactionTokenCard.tsx b/src/pages/SignTransaction/components/TransactionTokenCard.tsx index 892bc2dd6..56eaf05ab 100644 --- a/src/pages/SignTransaction/components/TransactionTokenCard.tsx +++ b/src/pages/SignTransaction/components/TransactionTokenCard.tsx @@ -5,8 +5,8 @@ import { Theme, Tooltip, Typography, -} from '@avalabs/k2-components'; -import { balanceToDisplayValue } from '@avalabs/utils-sdk'; +} from '@avalabs/core-k2-components'; +import { balanceToDisplayValue } from '@avalabs/core-utils-sdk'; import { TransactionNft, TransactionToken, diff --git a/src/pages/SignTransaction/components/TxBalanceChange.tsx b/src/pages/SignTransaction/components/TxBalanceChange.tsx index 9a352afd5..cb5474482 100644 --- a/src/pages/SignTransaction/components/TxBalanceChange.tsx +++ b/src/pages/SignTransaction/components/TxBalanceChange.tsx @@ -5,7 +5,7 @@ import { Divider, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; import { ApprovalSection, diff --git a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalConnect.tsx b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalConnect.tsx index f11553e45..dc28a9e5d 100644 --- a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalConnect.tsx +++ b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalConnect.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { WalletConnectCircledIcon } from '../../../ImportWithWalletConnect/components/WalletConnectCircledIcon'; import WalletConnectConnector from '@src/pages/ImportWithWalletConnect/components/WalletConnectConnector'; diff --git a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalOverlay.tsx b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalOverlay.tsx index 2a1bd9bd1..4086659b1 100644 --- a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalOverlay.tsx +++ b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalOverlay.tsx @@ -1,4 +1,4 @@ -import { CircularProgress, Stack } from '@avalabs/k2-components'; +import { CircularProgress, Stack } from '@avalabs/core-k2-components'; import { useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalReview.tsx b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalReview.tsx index ea5ba108b..6998ff225 100644 --- a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalReview.tsx +++ b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalReview.tsx @@ -4,7 +4,7 @@ import { Stack, Typography, styled, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Trans } from 'react-i18next'; import { WalletConnectCircledIcon } from '../../../ImportWithWalletConnect/components/WalletConnectCircledIcon'; import { WalletConnectSessionInfo } from '@src/background/services/walletConnect/models'; diff --git a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalSent.tsx b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalSent.tsx index cf51d1a42..c146bea47 100644 --- a/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalSent.tsx +++ b/src/pages/SignTransaction/components/WalletConnectApproval/WalletConnectApprovalSent.tsx @@ -5,7 +5,7 @@ import { CheckCircleIcon, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useCallback, useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/src/pages/SignTransaction/hooks/useGetTransaction.tsx b/src/pages/SignTransaction/hooks/useGetTransaction.tsx index 105dc9618..74773d19e 100644 --- a/src/pages/SignTransaction/hooks/useGetTransaction.tsx +++ b/src/pages/SignTransaction/hooks/useGetTransaction.tsx @@ -6,7 +6,7 @@ import { useNetworkFeeContext } from '@src/contexts/NetworkFeeProvider'; import { useNativeTokenPrice } from '@src/hooks/useTokenPrice'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { NetworkFee } from '@src/background/services/networkFee/models'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { useFeatureFlagContext } from '@src/contexts/FeatureFlagsProvider'; import { useDialog } from '@src/contexts/DialogContextProvider'; import { FeatureGates } from '@src/background/services/featureFlags/models'; diff --git a/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.test.tsx b/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.test.tsx index 1f2e2c26a..6cea32c85 100644 --- a/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.test.tsx +++ b/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.test.tsx @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { useDialog } from '@src/contexts/DialogContextProvider'; import { LedgerAppType, diff --git a/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.tsx b/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.tsx index 93d43954a..5cdc085c6 100644 --- a/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.tsx +++ b/src/pages/SignTransaction/hooks/useLedgerDisconnectedDialog.tsx @@ -1,4 +1,4 @@ -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { LedgerAppType, REQUIRED_LEDGER_VERSION, diff --git a/src/pages/Swap/Swap.tsx b/src/pages/Swap/Swap.tsx index 7cd3ffccc..0601932bd 100644 --- a/src/pages/Swap/Swap.tsx +++ b/src/pages/Swap/Swap.tsx @@ -31,7 +31,7 @@ import { Button, styled, IconButton, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { TokenSelect } from '@src/components/common/TokenSelect'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { isBitcoinNetwork } from '@src/background/services/network/utils/isBitcoinNetwork'; diff --git a/src/pages/Swap/components/ParaswapNotice.tsx b/src/pages/Swap/components/ParaswapNotice.tsx index e8d871a5f..b49e98611 100644 --- a/src/pages/Swap/components/ParaswapNotice.tsx +++ b/src/pages/Swap/components/ParaswapNotice.tsx @@ -4,7 +4,7 @@ import { Stack, Typography, Tooltip, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { ParaswapIcon } from '@src/components/icons/ParaswapIcon'; export function ParaswapNotice() { diff --git a/src/pages/Swap/components/SlippageToolTip.tsx b/src/pages/Swap/components/SlippageToolTip.tsx index b6577582a..6885abf77 100644 --- a/src/pages/Swap/components/SlippageToolTip.tsx +++ b/src/pages/Swap/components/SlippageToolTip.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next'; -import { InfoCircleIcon, Tooltip } from '@avalabs/k2-components'; +import { InfoCircleIcon, Tooltip } from '@avalabs/core-k2-components'; export function SlippageToolTip() { const { t } = useTranslation(); diff --git a/src/pages/Swap/components/SwapError.tsx b/src/pages/Swap/components/SwapError.tsx index 0acf99476..80fa1a181 100644 --- a/src/pages/Swap/components/SwapError.tsx +++ b/src/pages/Swap/components/SwapError.tsx @@ -7,7 +7,7 @@ import { Tooltip, styled, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; const TryAgainButton = styled('span')` text-decoration: underline; diff --git a/src/pages/Swap/components/SwapRefreshTimer.tsx b/src/pages/Swap/components/SwapRefreshTimer.tsx index 3ca42af73..e6d301329 100644 --- a/src/pages/Swap/components/SwapRefreshTimer.tsx +++ b/src/pages/Swap/components/SwapRefreshTimer.tsx @@ -6,7 +6,7 @@ import { Tooltip, Typography, Card, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface SwapRefreshTimerProps { secondsTimer: number; diff --git a/src/pages/Swap/components/TransactionDetails.tsx b/src/pages/Swap/components/TransactionDetails.tsx index 34a34a197..4ac1a867e 100644 --- a/src/pages/Swap/components/TransactionDetails.tsx +++ b/src/pages/Swap/components/TransactionDetails.tsx @@ -9,7 +9,7 @@ import { ChevronUpIcon, TextField, Grow, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; interface TransactionDetailsProps { fromTokenSymbol: string; diff --git a/src/pages/Swap/hooks/useSwapStateFunctions.ts b/src/pages/Swap/hooks/useSwapStateFunctions.ts index a8ab575f7..f0704a304 100644 --- a/src/pages/Swap/hooks/useSwapStateFunctions.ts +++ b/src/pages/Swap/hooks/useSwapStateFunctions.ts @@ -3,12 +3,12 @@ import { t } from 'i18next'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Amount, DestinationInput, getTokenAddress } from '../utils'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { useTokensWithBalances } from '@src/hooks/useTokensWithBalances'; import { usePageHistory } from '@src/hooks/usePageHistory'; import { useSendAnalyticsData } from '@src/hooks/useSendAnalyticsData'; import BN from 'bn.js'; -import { bnToLocaleString } from '@avalabs/utils-sdk'; +import { bnToLocaleString } from '@avalabs/core-utils-sdk'; import { useSwap } from './useSwap'; import { DISALLOWED_SWAP_ASSETS } from '@src/contexts/SwapProvider/models'; diff --git a/src/pages/Swap/utils/index.tsx b/src/pages/Swap/utils/index.tsx index 8e2b54df2..c96e4aa05 100644 --- a/src/pages/Swap/utils/index.tsx +++ b/src/pages/Swap/utils/index.tsx @@ -4,7 +4,7 @@ import { TokenType, TokenWithBalance, } from '@src/background/services/balances/models'; -import { stringToBN } from '@avalabs/utils-sdk'; +import { stringToBN } from '@avalabs/core-utils-sdk'; import { calculateGasAndFees } from '@src/utils/calculateGasAndFees'; import { OptimalRate } from 'paraswap-core'; import BN from 'bn.js'; diff --git a/src/pages/Wallet/SwitchAccount.tsx b/src/pages/Wallet/SwitchAccount.tsx index 7cd4b8516..618d366cc 100644 --- a/src/pages/Wallet/SwitchAccount.tsx +++ b/src/pages/Wallet/SwitchAccount.tsx @@ -11,7 +11,7 @@ import { WalletIcon, toast, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { Account } from '@src/background/services/accounts/models'; import { useApproveAction } from '@src/hooks/useApproveAction'; diff --git a/src/pages/Wallet/TokenFlow.tsx b/src/pages/Wallet/TokenFlow.tsx index 76176dbe9..dc2412e6e 100644 --- a/src/pages/Wallet/TokenFlow.tsx +++ b/src/pages/Wallet/TokenFlow.tsx @@ -9,7 +9,7 @@ import { useHistory } from 'react-router'; import { Activity } from '../Activity/Activity'; import { useTranslation } from 'react-i18next'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; -import { balanceToDisplayValue } from '@avalabs/utils-sdk'; +import { balanceToDisplayValue } from '@avalabs/core-utils-sdk'; import { ArrowUpRightIcon, BridgeIcon, @@ -20,7 +20,7 @@ import { QRCodeIcon, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { FunctionNames, useIsFunctionAvailable, diff --git a/src/pages/Wallet/WalletLocked.tsx b/src/pages/Wallet/WalletLocked.tsx index 9bbef40ca..7b0438d46 100644 --- a/src/pages/Wallet/WalletLocked.tsx +++ b/src/pages/Wallet/WalletLocked.tsx @@ -14,7 +14,7 @@ import { Stack, TextField, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; const defaultOptions = { loop: false, diff --git a/src/pages/Wallet/WalletRecentTxs.tsx b/src/pages/Wallet/WalletRecentTxs.tsx index f42daa34a..1a4cd25fc 100644 --- a/src/pages/Wallet/WalletRecentTxs.tsx +++ b/src/pages/Wallet/WalletRecentTxs.tsx @@ -24,7 +24,7 @@ import { MenuList, Stack, Typography, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { isNFT } from '@src/background/services/balances/nft/utils/isNFT'; import { usePendingBridgeTransactions } from '../Bridge/hooks/usePendingBridgeTransactions'; import { diff --git a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCard.tsx b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCard.tsx index 8917a7538..8c0ccb7e8 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCard.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCard.tsx @@ -1,4 +1,4 @@ -import { satoshiToBtc } from '@avalabs/bridge-sdk'; +import { satoshiToBtc } from '@avalabs/core-bridge-sdk'; import { Card, ChevronDownIcon, @@ -9,8 +9,8 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; -import { weiToAvax } from '@avalabs/utils-sdk'; +} from '@avalabs/core-k2-components'; +import { weiToAvax } from '@avalabs/core-utils-sdk'; import { isNFT } from '@src/background/services/balances/nft/utils/isNFT'; import { TransactionType, diff --git a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardAmount.tsx b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardAmount.tsx index 5bdf41bdd..419e725bd 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardAmount.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardAmount.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography } from '@avalabs/k2-components'; +import { Stack, Typography } from '@avalabs/core-k2-components'; import { isNFT } from '@src/background/services/balances/nft/utils/isNFT'; import { TransactionType, diff --git a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardDetails.tsx b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardDetails.tsx index 93c790a50..98d74d4bb 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardDetails.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardDetails.tsx @@ -1,10 +1,10 @@ -import { AVAX_TOKEN } from '@avalabs/chains-sdk'; +import { AVAX_TOKEN } from '@avalabs/core-chains-sdk'; import { AvalancheColorIcon, Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { isNFT } from '@src/background/services/balances/nft/utils/isNFT'; import { TransactionType } from '@src/background/services/history/models'; import { TokenIcon } from '@src/components/common/TokenIcon'; diff --git a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardIcon.tsx b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardIcon.tsx index e1472472d..c83af182a 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardIcon.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardIcon.tsx @@ -8,7 +8,7 @@ import { Stack, SwapIcon, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { isNFT } from '@src/background/services/balances/nft/utils/isNFT'; import { TransactionType, diff --git a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardSummary.tsx b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardSummary.tsx index 57d184cf2..9e2e08e67 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardSummary.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/ActivityCardSummary.tsx @@ -1,4 +1,4 @@ -import { Typography } from '@avalabs/k2-components'; +import { Typography } from '@avalabs/core-k2-components'; import { TransactionType } from '@src/background/services/history/models'; import { useAccountsContext } from '@src/contexts/AccountsProvider'; import { truncateAddress } from '@src/utils/truncateAddress'; diff --git a/src/pages/Wallet/components/History/components/ActivityCard/PchainActivityCard.tsx b/src/pages/Wallet/components/History/components/ActivityCard/PchainActivityCard.tsx index f20cfa736..3c39ff466 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/PchainActivityCard.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/PchainActivityCard.tsx @@ -6,7 +6,7 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { PchainTxHistoryItem } from '@src/background/services/history/models'; import { PrimaryNetworkMethodIcon } from './PrimaryNetworkMethodIcon'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; @@ -14,7 +14,7 @@ import { PChainTransactionType } from '@avalabs/glacier-sdk'; import { useTranslation } from 'react-i18next'; import { useMemo } from 'react'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export interface PchainActivityCardProp { historyItem: PchainTxHistoryItem; diff --git a/src/pages/Wallet/components/History/components/ActivityCard/PrimaryNetworkMethodIcon.tsx b/src/pages/Wallet/components/History/components/ActivityCard/PrimaryNetworkMethodIcon.tsx index a00f4655c..8c126acd8 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/PrimaryNetworkMethodIcon.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/PrimaryNetworkMethodIcon.tsx @@ -11,7 +11,7 @@ import { ShareIcon, Stack, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useMemo } from 'react'; import { PChainTransactionType, diff --git a/src/pages/Wallet/components/History/components/ActivityCard/XchainActivityCard.tsx b/src/pages/Wallet/components/History/components/ActivityCard/XchainActivityCard.tsx index 4c8408271..37d33f4e3 100644 --- a/src/pages/Wallet/components/History/components/ActivityCard/XchainActivityCard.tsx +++ b/src/pages/Wallet/components/History/components/ActivityCard/XchainActivityCard.tsx @@ -6,7 +6,7 @@ import { Tooltip, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { XchainTxHistoryItem } from '@src/background/services/history/models'; import { PrimaryNetworkMethodIcon } from './PrimaryNetworkMethodIcon'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; @@ -14,7 +14,7 @@ import { XChainTransactionType } from '@avalabs/glacier-sdk'; import { useTranslation } from 'react-i18next'; import { useMemo } from 'react'; import { useAnalyticsContext } from '@src/contexts/AnalyticsProvider'; -import { truncateAddress } from '@avalabs/utils-sdk'; +import { truncateAddress } from '@avalabs/core-utils-sdk'; export interface XchainActivityCardProp { historyItem: XchainTxHistoryItem; diff --git a/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeActivityCard.tsx b/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeActivityCard.tsx index f943b05cb..ea86639ef 100644 --- a/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeActivityCard.tsx +++ b/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeActivityCard.tsx @@ -1,4 +1,4 @@ -import { BridgeTransaction, useBridgeSDK } from '@avalabs/bridge-sdk'; +import { BridgeTransaction, useBridgeSDK } from '@avalabs/core-bridge-sdk'; import { Button, Card, @@ -9,7 +9,7 @@ import { ToastCard, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useBridgeContext } from '@src/contexts/BridgeProvider'; import { useNetworkContext } from '@src/contexts/NetworkProvider'; import { blockchainToNetwork } from '@src/pages/Bridge/utils/blockchainConversion'; diff --git a/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeIcon.tsx b/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeIcon.tsx index 76f08af73..c84013bbe 100644 --- a/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeIcon.tsx +++ b/src/pages/Wallet/components/History/components/InProgressBridge/InProgressBridgeIcon.tsx @@ -3,7 +3,7 @@ import { CircularProgress, Stack, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export interface InProgressBridgeIconProp { value: number; hasError?: boolean; diff --git a/src/pages/Wallet/components/History/useBlockchainNames.ts b/src/pages/Wallet/components/History/useBlockchainNames.ts index 83d5de78a..fb410d0cc 100644 --- a/src/pages/Wallet/components/History/useBlockchainNames.ts +++ b/src/pages/Wallet/components/History/useBlockchainNames.ts @@ -1,6 +1,6 @@ -import { Blockchain, BridgeTransaction } from '@avalabs/bridge-sdk'; +import { Blockchain, BridgeTransaction } from '@avalabs/core-bridge-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; -import { BITCOIN_NETWORK, ChainId } from '@avalabs/chains-sdk'; +import { BITCOIN_NETWORK, ChainId } from '@avalabs/core-chains-sdk'; import { TxHistoryItem } from '@src/background/services/history/models'; import { isEthereumChainId } from '@src/background/services/network/utils/isEthereumNetwork'; import { useUnifiedBridgeContext } from '@src/contexts/UnifiedBridgeProvider'; diff --git a/src/pages/Wallet/components/NoTransactions.tsx b/src/pages/Wallet/components/NoTransactions.tsx index 4544dd1e4..a414cc44f 100644 --- a/src/pages/Wallet/components/NoTransactions.tsx +++ b/src/pages/Wallet/components/NoTransactions.tsx @@ -3,7 +3,7 @@ import { Stack, Typography, useTheme, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { useTranslation } from 'react-i18next'; export function NoTransactions({ loading = false }: { loading: boolean }) { diff --git a/src/pages/Wallet/components/WalletExtensionButton.tsx b/src/pages/Wallet/components/WalletExtensionButton.tsx index b56be6050..475f08b22 100644 --- a/src/pages/Wallet/components/WalletExtensionButton.tsx +++ b/src/pages/Wallet/components/WalletExtensionButton.tsx @@ -5,7 +5,7 @@ import { CoreIcon, MetaMaskIcon, WalletIcon, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; import { WalletExtensionType } from '@src/background/services/web3/models'; diff --git a/src/popup/AppRoutes.tsx b/src/popup/AppRoutes.tsx index d4835bfb3..60b5ba961 100644 --- a/src/popup/AppRoutes.tsx +++ b/src/popup/AppRoutes.tsx @@ -1,6 +1,6 @@ import { Suspense, lazy } from 'react'; import { Redirect, Route, Switch } from 'react-router-dom'; -import { CircularProgress } from '@avalabs/k2-components'; +import { CircularProgress } from '@avalabs/core-k2-components'; import { LoadingSendForm } from '@src/pages/Send/components/LoadingSendForm'; diff --git a/src/popup/ApprovalRoutes.tsx b/src/popup/ApprovalRoutes.tsx index 55c91bd6b..f9f776fec 100644 --- a/src/popup/ApprovalRoutes.tsx +++ b/src/popup/ApprovalRoutes.tsx @@ -1,6 +1,6 @@ import { Suspense, lazy } from 'react'; import { Route, Switch, SwitchProps } from 'react-router-dom'; -import { CircularProgress, Stack } from '@avalabs/k2-components'; +import { CircularProgress, Stack } from '@avalabs/core-k2-components'; import { SignTxErrorBoundary } from '@src/pages/SignTransaction/components/SignTxErrorBoundary'; diff --git a/src/popup/LoadingContent.tsx b/src/popup/LoadingContent.tsx index 89d5f32f4..b6b3c821f 100644 --- a/src/popup/LoadingContent.tsx +++ b/src/popup/LoadingContent.tsx @@ -1,4 +1,4 @@ -import { Stack, styled } from '@avalabs/k2-components'; +import { Stack, styled } from '@avalabs/core-k2-components'; import { useAppDimensions } from '@src/hooks/useAppDimensions'; diff --git a/src/popup/OfflineContent.tsx b/src/popup/OfflineContent.tsx index 892b3cf02..61c57664b 100644 --- a/src/popup/OfflineContent.tsx +++ b/src/popup/OfflineContent.tsx @@ -1,4 +1,4 @@ -import { Stack, Typography, styled } from '@avalabs/k2-components'; +import { Stack, Typography, styled } from '@avalabs/core-k2-components'; import { BrandName } from '@src/components/icons/BrandName'; import { Logo } from '@src/components/icons/Logo'; diff --git a/src/popup/index.tsx b/src/popup/index.tsx index 29d0304d3..2c9fcf868 100644 --- a/src/popup/index.tsx +++ b/src/popup/index.tsx @@ -14,7 +14,7 @@ import { LoadingContent } from './LoadingContent'; import { FeatureFlagsContextProvider } from '@src/contexts/FeatureFlagsProvider'; import { I18nextProvider } from 'react-i18next'; import i18n from '@src/localization/init'; -import { darkTheme, ThemeProvider } from '@avalabs/k2-components'; +import { darkTheme, ThemeProvider } from '@avalabs/core-k2-components'; const App = lazy(() => { return import(/* webpackChunkName: 'App' */ './popup').then((m) => ({ diff --git a/src/popup/popup.tsx b/src/popup/popup.tsx index f841a7f16..db4f021ac 100644 --- a/src/popup/popup.tsx +++ b/src/popup/popup.tsx @@ -1,4 +1,4 @@ -import { Stack } from '@avalabs/k2-components'; +import { Stack } from '@avalabs/core-k2-components'; import { Header } from '@src/components/common/header/Header'; import { WalletLoading } from '@src/components/common/WalletLoading'; import { AccountsContextProvider } from '@src/contexts/AccountsProvider'; diff --git a/src/tests/resolver.js b/src/tests/resolver.js index 8f26c2cc0..1bdb5327e 100644 --- a/src/tests/resolver.js +++ b/src/tests/resolver.js @@ -6,7 +6,7 @@ * * Our issue is a bit different than the one linked above, but it can be worked around in the same manner. * - * In our case, some of our (deep) dependencies (e.g. is-ipfs, imported by @avalabs/utils-sdk) try to CJS-require + * In our case, some of our (deep) dependencies (e.g. is-ipfs, imported by @avalabs/core-utils-sdk) try to CJS-require * packages which define ESM versions as default for browser env. This results in errors like: * * 1. SyntaxError: Cannot use import statement outside a module diff --git a/src/utils/bigintToBig.ts b/src/utils/bigintToBig.ts index ccbc7ff08..44d2233bd 100644 --- a/src/utils/bigintToBig.ts +++ b/src/utils/bigintToBig.ts @@ -1,4 +1,4 @@ -import { bnToBig } from '@avalabs/utils-sdk'; +import { bnToBig } from '@avalabs/core-utils-sdk'; import Big from 'big.js'; import { BN } from 'bn.js'; diff --git a/src/utils/bridgeTransactionUtils.ts b/src/utils/bridgeTransactionUtils.ts index 544199046..3cd7769ae 100644 --- a/src/utils/bridgeTransactionUtils.ts +++ b/src/utils/bridgeTransactionUtils.ts @@ -1,4 +1,4 @@ -import { BridgeTransaction } from '@avalabs/bridge-sdk'; +import { BridgeTransaction } from '@avalabs/core-bridge-sdk'; import { BridgeTransfer } from '@avalabs/bridge-unified'; import { TxHistoryItem } from '@src/background/services/history/models'; diff --git a/src/utils/caipConversion.ts b/src/utils/caipConversion.ts index f492f113a..e759c277d 100644 --- a/src/utils/caipConversion.ts +++ b/src/utils/caipConversion.ts @@ -1,5 +1,5 @@ -import { ChainId, NetworkVMType } from '@avalabs/chains-sdk'; -import { Avalanche } from '@avalabs/wallets-sdk'; +import { ChainId, NetworkVMType } from '@avalabs/core-chains-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; import { EnsureDefined, PartialBy } from '@src/background/models'; import { Network } from '@src/background/services/network/models'; diff --git a/src/utils/calculateGasAndFees.ts b/src/utils/calculateGasAndFees.ts index 3db529b0b..874dda302 100644 --- a/src/utils/calculateGasAndFees.ts +++ b/src/utils/calculateGasAndFees.ts @@ -1,4 +1,4 @@ -import { bigToLocaleString } from '@avalabs/utils-sdk'; +import { bigToLocaleString } from '@avalabs/core-utils-sdk'; import { bigintToBig } from './bigintToBig'; type GasPriceArgs = diff --git a/src/utils/calculateTotalBalance.test.ts b/src/utils/calculateTotalBalance.test.ts index 0a79cc531..004c4db8e 100644 --- a/src/utils/calculateTotalBalance.test.ts +++ b/src/utils/calculateTotalBalance.test.ts @@ -3,7 +3,7 @@ import { Network, NetworkToken, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '@src/background/services/accounts/models'; import { Balances, @@ -36,6 +36,7 @@ describe('utils/calculateTotalBalance', () => { chainId: ChainId.AVALANCHE_MAINNET_ID, vmName: NetworkVMType.EVM, rpcUrl: 'test.one.com/rpc', + explorerUrl: 'https://explorer.url', networkToken: networkToken1, logoUri: 'test.one.com/logo', primaryColor: 'pink', diff --git a/src/utils/calculateTotalBalance.ts b/src/utils/calculateTotalBalance.ts index 026cd25e4..3f8603557 100644 --- a/src/utils/calculateTotalBalance.ts +++ b/src/utils/calculateTotalBalance.ts @@ -1,4 +1,4 @@ -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { Account } from '@src/background/services/accounts/models'; import { Balances, diff --git a/src/utils/getAddressForChain.test.ts b/src/utils/getAddressForChain.test.ts index 15fe586dd..fdb7cc618 100644 --- a/src/utils/getAddressForChain.test.ts +++ b/src/utils/getAddressForChain.test.ts @@ -1,4 +1,4 @@ -import { ChainId } from '@avalabs/chains-sdk'; +import { ChainId } from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '@src/background/services/accounts/models'; import { getAddressForChain } from '@src/utils/getAddressForChain'; describe('utils/getAddressForChain', () => { diff --git a/src/utils/getExplorerAddress.ts b/src/utils/getExplorerAddress.ts index 125cf915f..ad6f65931 100644 --- a/src/utils/getExplorerAddress.ts +++ b/src/utils/getExplorerAddress.ts @@ -1,6 +1,6 @@ -import { Blockchain } from '@avalabs/bridge-sdk'; +import { Blockchain } from '@avalabs/core-bridge-sdk'; import { Chain } from '@avalabs/bridge-unified'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { networkToBlockchain } from '@src/pages/Bridge/utils/blockchainConversion'; function getAvalancheExplorerBaseUrl(isMainnet = true) { diff --git a/src/utils/hasAccountBalances.test.ts b/src/utils/hasAccountBalances.test.ts index 202824dcb..87bb7b644 100644 --- a/src/utils/hasAccountBalances.test.ts +++ b/src/utils/hasAccountBalances.test.ts @@ -1,4 +1,4 @@ -import { ChainId, NetworkToken } from '@avalabs/chains-sdk'; +import { ChainId, NetworkToken } from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '@src/background/services/accounts/models'; import { Balances, diff --git a/src/utils/ipsfResolverWithFallback.ts b/src/utils/ipsfResolverWithFallback.ts index 70fee6bf4..a471f3d7c 100644 --- a/src/utils/ipsfResolverWithFallback.ts +++ b/src/utils/ipsfResolverWithFallback.ts @@ -1,4 +1,4 @@ -import { ipfsResolver } from '@avalabs/utils-sdk'; +import { ipfsResolver } from '@avalabs/core-utils-sdk'; import { CLOUDFLARE_IPFS_URL } from '@src/background/services/balances/models'; export function ipfsResolverWithFallback( sourceUrl: string | undefined, diff --git a/src/utils/isAddressValid.ts b/src/utils/isAddressValid.ts index 72c8529d3..da724c3a6 100644 --- a/src/utils/isAddressValid.ts +++ b/src/utils/isAddressValid.ts @@ -1,4 +1,4 @@ -import { isBech32Address } from '@avalabs/bridge-sdk'; +import { isBech32Address } from '@avalabs/core-bridge-sdk'; import { isAddress } from 'ethers'; import { isNil, isString } from 'lodash'; import { stripAddressPrefix } from './stripAddressPrefix'; diff --git a/src/utils/isBitcoin.ts b/src/utils/isBitcoin.ts index 3d7bd0636..5b0e75158 100644 --- a/src/utils/isBitcoin.ts +++ b/src/utils/isBitcoin.ts @@ -1,4 +1,4 @@ -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; export function isBitcoin(network?: Network) { return network?.vmName === NetworkVMType.BITCOIN; diff --git a/src/utils/isBtcAddressInNetwork.ts b/src/utils/isBtcAddressInNetwork.ts index adb699545..f9d4c64ba 100644 --- a/src/utils/isBtcAddressInNetwork.ts +++ b/src/utils/isBtcAddressInNetwork.ts @@ -1,7 +1,7 @@ import { isBase58AddressInNetwork, isBech32AddressInNetwork, -} from '@avalabs/bridge-sdk'; +} from '@avalabs/core-bridge-sdk'; /** * Check if the given address is a valid Bitcoin address diff --git a/src/utils/isContactValid.test.ts b/src/utils/isContactValid.test.ts index e552be26e..f12bcfd09 100644 --- a/src/utils/isContactValid.test.ts +++ b/src/utils/isContactValid.test.ts @@ -1,14 +1,14 @@ import { Contact } from '@avalabs/types'; import { isContactValid } from './isContactValid'; import { isAddress } from 'ethers'; -import { isBech32Address } from '@avalabs/bridge-sdk'; +import { isBech32Address } from '@avalabs/core-bridge-sdk'; import { isValidXPAddress } from './isAddressValid'; jest.mock('ethers', () => ({ isAddress: jest.fn(), })); -jest.mock('@avalabs/bridge-sdk', () => ({ +jest.mock('@avalabs/core-bridge-sdk', () => ({ isBech32Address: jest.fn(), })); jest.mock('./isAddressValid', () => ({ diff --git a/src/utils/isContactValid.ts b/src/utils/isContactValid.ts index 1c9c0d329..e5ff463a9 100644 --- a/src/utils/isContactValid.ts +++ b/src/utils/isContactValid.ts @@ -1,6 +1,6 @@ import type { Contact } from '@avalabs/types'; import { isAddress } from 'ethers'; -import { isBech32Address } from '@avalabs/bridge-sdk'; +import { isBech32Address } from '@avalabs/core-bridge-sdk'; import { isValidXPAddress } from './isAddressValid'; export const isContactValid = (contact: Contact) => { diff --git a/src/utils/isPrimarySubnet.ts b/src/utils/isPrimarySubnet.ts index 29e5f17c5..ab7f3b26f 100644 --- a/src/utils/isPrimarySubnet.ts +++ b/src/utils/isPrimarySubnet.ts @@ -1,4 +1,4 @@ -import { Avalanche } from '@avalabs/wallets-sdk'; +import { Avalanche } from '@avalabs/core-wallets-sdk'; export function isPrimarySubnet(subnetId: string) { return subnetId === Avalanche.MainnetContext.pBlockchainID; diff --git a/src/utils/isSwimmerNetwork.ts b/src/utils/isSwimmerNetwork.ts index 22dbd32da..1b267681f 100644 --- a/src/utils/isSwimmerNetwork.ts +++ b/src/utils/isSwimmerNetwork.ts @@ -1,4 +1,4 @@ -import { ChainId, Network } from '@avalabs/chains-sdk'; +import { ChainId, Network } from '@avalabs/core-chains-sdk'; export function isSwimmer(network: Network) { return isSwimmerByChainId(network.chainId); diff --git a/src/utils/jsonRpcEngine.ts b/src/utils/jsonRpcEngine.ts index a2e69e087..5b43d7356 100644 --- a/src/utils/jsonRpcEngine.ts +++ b/src/utils/jsonRpcEngine.ts @@ -1,6 +1,6 @@ import { JsonRpcEngine } from 'json-rpc-engine'; import { createFetchMiddleware } from 'eth-json-rpc-middleware'; -import { Network } from '@avalabs/chains-sdk'; +import { Network } from '@avalabs/core-chains-sdk'; import { addGlacierAPIKeyIfNeeded } from './network/addGlacierAPIKeyIfNeeded'; export async function engine(network: Network) { diff --git a/src/utils/network/getProviderForNetwork.test.ts b/src/utils/network/getProviderForNetwork.test.ts index 90e9ad0bb..6627a8e86 100644 --- a/src/utils/network/getProviderForNetwork.test.ts +++ b/src/utils/network/getProviderForNetwork.test.ts @@ -2,23 +2,23 @@ import { BITCOIN_NETWORK, BITCOIN_TEST_NETWORK, NetworkVMType, -} from '@avalabs/chains-sdk'; +} from '@avalabs/core-chains-sdk'; import { BitcoinProvider, JsonRpcBatchInternal, Avalanche, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { FetchRequest, Network } from 'ethers'; import { addGlacierAPIKeyIfNeeded } from './addGlacierAPIKeyIfNeeded'; import { getProviderForNetwork } from './getProviderForNetwork'; import { decorateWithCaipId } from '../caipConversion'; -jest.mock('@avalabs/wallets-sdk', () => { +jest.mock('@avalabs/core-wallets-sdk', () => { const BitcoinProviderMock = jest.fn(); const JsonRpcBatchInternalMock = jest.fn(); const getDefaultFujiProviderMock = jest.fn(); const getDefaultMainnetProviderMock = jest.fn(); - const actual = jest.requireActual('@avalabs/wallets-sdk'); + const actual = jest.requireActual('@avalabs/core-wallets-sdk'); return { ...actual, @@ -43,8 +43,8 @@ jest.mock('./addGlacierAPIKeyIfNeeded', () => ({ addGlacierAPIKeyIfNeeded: jest.fn(), })); -jest.mock('@avalabs/chains-sdk', () => ({ - ...jest.requireActual('@avalabs/chains-sdk'), +jest.mock('@avalabs/core-chains-sdk', () => ({ + ...jest.requireActual('@avalabs/core-chains-sdk'), getChainsAndTokens: jest.fn(), })); @@ -58,6 +58,7 @@ const mockNetwork = ( chainId: 123, vmName, rpcUrl: 'https://rpcurl.example', + explorerUrl: 'https://explorer.url', networkToken: { name: 'test network token', symbol: 'TNT', diff --git a/src/utils/network/getProviderForNetwork.ts b/src/utils/network/getProviderForNetwork.ts index 3d8244326..1f9852a9c 100644 --- a/src/utils/network/getProviderForNetwork.ts +++ b/src/utils/network/getProviderForNetwork.ts @@ -2,8 +2,8 @@ import { Avalanche, BitcoinProvider, JsonRpcBatchInternal, -} from '@avalabs/wallets-sdk'; -import { NetworkVMType } from '@avalabs/chains-sdk'; +} from '@avalabs/core-wallets-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import { FetchRequest, Network as EthersNetwork } from 'ethers'; import { Network } from '@src/background/services/network/models'; diff --git a/src/utils/send/btcSendUtils.test.ts b/src/utils/send/btcSendUtils.test.ts index 31a92a782..763619cc6 100644 --- a/src/utils/send/btcSendUtils.test.ts +++ b/src/utils/send/btcSendUtils.test.ts @@ -1,11 +1,11 @@ -import { getMaxTransferAmount } from '@avalabs/wallets-sdk'; +import { getMaxTransferAmount } from '@avalabs/core-wallets-sdk'; import { TokenType } from '@src/background/services/balances/models'; import { validateBtcSend } from './btcSendUtils'; import { SendErrorMessage } from './models'; -jest.mock('@avalabs/wallets-sdk'); +jest.mock('@avalabs/core-wallets-sdk'); describe('src/utils/send/btcSendUtils', () => { describe('validateBtcSend', () => { diff --git a/src/utils/send/btcSendUtils.ts b/src/utils/send/btcSendUtils.ts index c7ba943d2..3944175d2 100644 --- a/src/utils/send/btcSendUtils.ts +++ b/src/utils/send/btcSendUtils.ts @@ -3,7 +3,7 @@ import { BitcoinProvider, createTransferTx, getMaxTransferAmount, -} from '@avalabs/wallets-sdk'; +} from '@avalabs/core-wallets-sdk'; import { inputBytes } from 'coinselect/utils'; import { BtcSendOptions } from '@src/pages/Send/models'; diff --git a/src/utils/shouldUseWalletConnectApproval.test.ts b/src/utils/shouldUseWalletConnectApproval.test.ts index 8d4c3ec6c..52d934f99 100644 --- a/src/utils/shouldUseWalletConnectApproval.test.ts +++ b/src/utils/shouldUseWalletConnectApproval.test.ts @@ -1,4 +1,4 @@ -import { NetworkVMType } from '@avalabs/chains-sdk'; +import { NetworkVMType } from '@avalabs/core-chains-sdk'; import shouldUseWalletConnectApproval from './shouldUseWalletConnectApproval'; import { AccountType, @@ -14,6 +14,7 @@ describe('src/utils/shouldUseWalletConnectApproval.ts', () => { chainId: 1234, vmName: NetworkVMType.EVM, rpcUrl: 'network1.rpc.com', + explorerUrl: 'https://explorer.url', networkToken: { name: 'network1 token', symbol: 'NTW1', diff --git a/src/utils/shouldUseWalletConnectApproval.ts b/src/utils/shouldUseWalletConnectApproval.ts index 986a686bb..b151fbdbd 100644 --- a/src/utils/shouldUseWalletConnectApproval.ts +++ b/src/utils/shouldUseWalletConnectApproval.ts @@ -1,4 +1,4 @@ -import { Network, NetworkVMType } from '@avalabs/chains-sdk'; +import { Network, NetworkVMType } from '@avalabs/core-chains-sdk'; import { Account, AccountType } from '@src/background/services/accounts/models'; function shouldUseWalletConnectApproval(network: Network, account: Account) { diff --git a/src/utils/toastCardWithLink.tsx b/src/utils/toastCardWithLink.tsx index 6bdbbaeda..91eb95931 100644 --- a/src/utils/toastCardWithLink.tsx +++ b/src/utils/toastCardWithLink.tsx @@ -4,7 +4,7 @@ import { ExternalLinkIcon, Button, Link, -} from '@avalabs/k2-components'; +} from '@avalabs/core-k2-components'; export const toastCardWithLink = ({ url, title, label, id = '' }) => { const toaster = toast.custom( diff --git a/yarn.lock b/yarn.lock index d17980dd4..cd694dd6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,15 +45,6 @@ "@scure/base" "1.1.5" micro-eth-signer "0.7.2" -"@avalabs/bridge-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/bridge-sdk/-/bridge-sdk-2.8.0-alpha.188.tgz#df716b4dfcb0f255b16a5f7eb90020612aa1c2ca" - integrity sha512-j7bCrjEG3wptsjp8lUig6TXQSTHzOmBKjggZjTtzpBvV+rYlReowP4EpRPHu8FFJMi6n/hiUdXRjsRNs83J/7w== - dependencies: - "@avalabs/coingecko-sdk" "2.8.0-alpha.188" - "@avalabs/utils-sdk" "2.8.0-alpha.188" - "@avalabs/wallets-sdk" "2.8.0-alpha.188" - "@avalabs/bridge-unified@2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@avalabs/bridge-unified/-/bridge-unified-2.1.0.tgz#2b247cf46df387aeac8633b016419a056e12567b" @@ -63,54 +54,47 @@ lodash "4.17.21" viem "1.19.8" -"@avalabs/chains-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/chains-sdk/-/chains-sdk-2.8.0-alpha.188.tgz#e0b685c62b7e3ede2d8b3b81c3ec6d94a6d79a76" - integrity sha512-t7YtmmJp9PAMhY1nzTYU9z1NpJ3VUjPQchs94PJ4PIjd4Z6Uk4g+fs7pvnlaIT8JF1IZ7xFDx9Q7Hub+WDJEuw== +"@avalabs/core-bridge-sdk@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-bridge-sdk/-/core-bridge-sdk-3.0.0.tgz#e5375e31c4939e5fe659349899f302070c2ec657" + integrity sha512-i/7BjMnnQhgs4E9trOuGDml9jmxyv1O02D7EXLe7lZQ0w4HrkYeol4p7j43qLfqPszb6yCMCo8Ra4iCFbv4kUA== dependencies: - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-coingecko-sdk" "^3.0.0" + "@avalabs/core-utils-sdk" "^3.0.0" + "@avalabs/core-wallets-sdk" "^3.0.0" -"@avalabs/coingecko-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/coingecko-sdk/-/coingecko-sdk-2.8.0-alpha.188.tgz#d3653c8d66e7af06a21e77b60b5be791adf8d8f2" - integrity sha512-t/96DaJx6IDAPPO4EFaTfnhp+/jEPrrwShigu/gnezuCdl2UiqvPjmW0DlLkHoT9djqQil7U7Cl6b1u6wAL9bA== +"@avalabs/core-chains-sdk@3.0.0", "@avalabs/core-chains-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-chains-sdk/-/core-chains-sdk-3.0.0.tgz#b5c2f92d8709881f821b68495ed8f89b1adbb3e0" + integrity sha512-7l5cpam+5kEXELTJ5zlheoyFAAe9bBGcgZv3pZCHAMeRrSMVMpHfoAH8upw05kc9Xl7wre3bouQJF6zkheyjMw== dependencies: - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/covalent-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/covalent-sdk/-/covalent-sdk-2.8.0-alpha.188.tgz#53736465968a894215fca973ee6b9fef13d0de14" - integrity sha512-R4zaXt7Jgh6Pe8mT8eHYwGSmM+BU8W69EW9i2kLbAircsWoRWGxwbz2d6rNjRoocMrusoMLLfmPorA2/bWJq6Q== +"@avalabs/core-coingecko-sdk@3.0.0", "@avalabs/core-coingecko-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-coingecko-sdk/-/core-coingecko-sdk-3.0.0.tgz#3c9cb42c2d7586b54f440a840fbcc35d412bd2c4" + integrity sha512-J3idot3eY3TdGpZU+bp8j5c9aebWGmI+44i4kEx02PjIuRlzcT1xU74U2PpuQBJOLl+Ug9Xo9SLo2i9sk52q8w== dependencies: - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/etherscan-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/etherscan-sdk/-/etherscan-sdk-2.8.0-alpha.188.tgz#b7e0c542517e1cf2b038f7e1013eb532cecce41d" - integrity sha512-CY3H5AqbwgLcjscSbgQyxV5Lbn96pH73fIXTvcrMSm1Ng1pgjKjGsn0NegoWxX6aAumjvm7NvSh/tHuEdd6vSw== +"@avalabs/core-covalent-sdk@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-covalent-sdk/-/core-covalent-sdk-3.0.0.tgz#b19471eb3f50b9cf391725b40710dc03e4d79c41" + integrity sha512-6zKpuRYjJz70aenhX5Tg+9EfHsxWEOgCJv14jCtsRle8Y5NEXMd+qlgtG4RShkHSVKVsWRWeh6U05hutv4DYUg== dependencies: - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/glacier-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/glacier-sdk/-/glacier-sdk-2.8.0-alpha.188.tgz#82e4efc4be55b2f67a825e033863a25a14a13915" - integrity sha512-NjtlHXWpxC7aDZE+USb5YkZ1In+IjkCi/THHxOZg0ahv2RyccUiA75VU+daZ0zAZWgIUQCutniTB46HFq5Sjbw== - -"@avalabs/hw-app-avalanche@0.14.1": - version "0.14.1" - resolved "https://registry.yarnpkg.com/@avalabs/hw-app-avalanche/-/hw-app-avalanche-0.14.1.tgz#70b6248e67cf7d64d0640517f88c19632524ac68" - integrity sha512-EHJPqe305LaGls66aEqRIKPvxB8NMV5wU70hX3i58QsySfId/O3hbgiOe+tYzY3HBvJtZz1ih8DZds00JJmXJQ== +"@avalabs/core-etherscan-sdk@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-etherscan-sdk/-/core-etherscan-sdk-3.0.0.tgz#0d9625f4497b784c10107c195967226ec41cbabb" + integrity sha512-bHyct1Ss6DK7wJbbi1EW1tUHlLt71q/8xOOTbI7PeeOIum02HDmJqeNt3X3iUkIyq6WOnszuCA6AsGt98RGpNg== dependencies: - "@ledgerhq/hw-app-eth" "6.34.3" - "@ledgerhq/hw-transport" "6.28.8" - bs58 "5.0.0" - ledger-bitcoin "^0.2.1" - sha3 "2.1.4" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/k2-components@4.18.0-alpha.41": - version "4.18.0-alpha.41" - resolved "https://registry.yarnpkg.com/@avalabs/k2-components/-/k2-components-4.18.0-alpha.41.tgz#55a17dea35521d55d41190ba39d1a35b9fd7fe2a" - integrity sha512-KWtwWhSyL9+5GhcJQNYNfa5zI55PGw8WR1PviUqLn3X4KFMs9xm0vQ6lLZ4gXONHdO/i5+/3yL6tx+Tl9Q2N2g== +"@avalabs/core-k2-components@4.18.0-alpha.44": + version "4.18.0-alpha.44" + resolved "https://registry.yarnpkg.com/@avalabs/core-k2-components/-/core-k2-components-4.18.0-alpha.44.tgz#8daf2d8ab28cc5491adbb11d36201ec91dfc4bce" + integrity sha512-2oIg1SsJ7dGedpxoezOPMTJbIcMK4s+P8fu9ba6Q3ZskjhX5OJizv42H4orvQyCb5RXgN2FvxYkft6FSufNiqA== dependencies: "@emotion/react" "11.11.1" "@emotion/styled" "11.11.0" @@ -130,58 +114,44 @@ react-hotkeys-hook "4.4.3" uuid "9.0.1" -"@avalabs/snowtrace-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/snowtrace-sdk/-/snowtrace-sdk-2.8.0-alpha.188.tgz#b669ce70669e97b03964ef2a03b493d915db61c6" - integrity sha512-Zj5b8H6o2UMDd2h3ugoNnh4qoi0ErYW70b5b+AeC/cqzro8aDt0z+qbpl6C/tNbsXdu7VSya3zlLYAAGGGZJvA== +"@avalabs/core-snowtrace-sdk@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-snowtrace-sdk/-/core-snowtrace-sdk-3.0.0.tgz#3ea02a56480addd64fbb1b8b49ab6981c6cf22e4" + integrity sha512-Tr9cEzHSiRRb3467pGoOG1JnoMH8AvC/Mx6pg+Xj3TvxgY5vnTPyyLb72TzMnGl06SsUL9tpsyPHa7htp0YneA== dependencies: - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/token-prices-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/token-prices-sdk/-/token-prices-sdk-2.8.0-alpha.188.tgz#99ec7ce1c281999384697ca31ad3842a6834b7dd" - integrity sha512-k5XtpwevA1xIuCGMMRN3sRRq9weHy/loOH7ekmVH/TXdQ9M8o9OpfYyD1m0/YWGC2emr3rUHh6yy29BrysIbpQ== +"@avalabs/core-token-prices-sdk@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-token-prices-sdk/-/core-token-prices-sdk-3.0.0.tgz#8f390ba11eb6ac00dca7bb32393702d3e4cafdd3" + integrity sha512-X4JzhTUJi8zKv/XdFh66z4/az4Pyn4DHeQYc4HccSZ/4/5tMixF9tYIXaQAlMbUTTAGKoKj5IOT3hIE3Z1y7aw== dependencies: - "@avalabs/coingecko-sdk" "2.8.0-alpha.188" - "@avalabs/utils-sdk" "2.8.0-alpha.188" + "@avalabs/core-coingecko-sdk" "^3.0.0" + "@avalabs/core-utils-sdk" "^3.0.0" -"@avalabs/types@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/types/-/types-2.8.0-alpha.188.tgz#5f3d6df1983474c362e4345dd7acca7ed18052a3" - integrity sha512-sDKcOzKCvRRjuxPLThsf5KkTj874Ps6Ejoqt5HvrHUEsd5FqcN2TwpXLPrmD+0YPrCyAQ67G3Cdhl+VMBRrNQg== - -"@avalabs/utils-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/utils-sdk/-/utils-sdk-2.8.0-alpha.188.tgz#587829fc51f76fe50f184ab1fb3d99feee3976c1" - integrity sha512-JbmvB/gMhh5XTm545iAphNW18S3U6FD/MSszMdB41geAclAiwjlrJI7KxkQ2yvaQOhaWkLtxbHDOPQKYzgSQOw== +"@avalabs/core-utils-sdk@3.0.0", "@avalabs/core-utils-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-utils-sdk/-/core-utils-sdk-3.0.0.tgz#2712645c5dc4da3fe725fd7ebf0ee415aa0ebc93" + integrity sha512-XBIepxf/UtCRGQNPB8/OYG4bLNSgETaePJjplcRO7oQzgn20DU99534F7adiS0ew3krsJ7HW2cro2gYAwROgZA== dependencies: "@avalabs/avalanchejs" "4.0.5" "@hpke/core" "1.2.5" is-ipfs "6.0.2" -"@avalabs/vm-module-types@0.0.15": - version "0.0.15" - resolved "https://registry.yarnpkg.com/@avalabs/vm-module-types/-/vm-module-types-0.0.15.tgz#f7c656c566539c57d5f4318983642c877a31f3bf" - integrity sha512-EOKFhGo6unCMM9Tt9XxPmr8SUN7SAuWwFjqTX1FMx9FaBGGSwG8ne/eu9HpTBxgSqLfgXFuLsB+j26lStoP3Dg== - dependencies: - "@metamask/rpc-errors" "6.3.0" - ethers "6.8.1" - zod "3.23.8" - -"@avalabs/wallets-sdk@2.8.0-alpha.188": - version "2.8.0-alpha.188" - resolved "https://registry.yarnpkg.com/@avalabs/wallets-sdk/-/wallets-sdk-2.8.0-alpha.188.tgz#3d0ca432086dc265c7179680cc11aad839908258" - integrity sha512-NuP0V5dUuFHt//cWLT9R2tH51ws4i2rqUjSWd82UL1zm0Y2rC0LxIO5Kd6DuIaoxe3d3zLODb54YYgjtfGTJ3w== +"@avalabs/core-wallets-sdk@3.0.0", "@avalabs/core-wallets-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/core-wallets-sdk/-/core-wallets-sdk-3.0.0.tgz#25a57d6af5e98f48243bf70da533b5b7b373ab8e" + integrity sha512-Voml0K8h7FdW8u/n0pgaxR/zGKQ7z4kkX/wboBBjX589Dw/RcHY/WIyQXsfy5qvZZRDjY/lImIYM28UdEW8uPA== dependencies: "@avalabs/avalanchejs" "4.0.5" - "@avalabs/chains-sdk" "2.8.0-alpha.188" - "@avalabs/glacier-sdk" "2.8.0-alpha.188" + "@avalabs/core-chains-sdk" "^3.0.0" + "@avalabs/glacier-sdk" "^3.0.0" "@avalabs/hw-app-avalanche" "0.14.1" "@ledgerhq/hw-app-btc" "10.2.4" "@ledgerhq/hw-app-eth" "6.36.1" "@ledgerhq/hw-transport" "6.30.6" "@metamask/eth-sig-util" "7.0.2" - "@openzeppelin/contracts" "4.9.3" + "@openzeppelin/contracts" "4.9.6" bip32 "2.0.6" bip32-path "0.4.2" bip39 "3.0.4" @@ -192,6 +162,41 @@ ledger-bitcoin "0.2.3" xss "1.0.14" +"@avalabs/glacier-sdk@2.8.0-alpha.188": + version "2.8.0-alpha.188" + resolved "https://registry.yarnpkg.com/@avalabs/glacier-sdk/-/glacier-sdk-2.8.0-alpha.188.tgz#82e4efc4be55b2f67a825e033863a25a14a13915" + integrity sha512-NjtlHXWpxC7aDZE+USb5YkZ1In+IjkCi/THHxOZg0ahv2RyccUiA75VU+daZ0zAZWgIUQCutniTB46HFq5Sjbw== + +"@avalabs/glacier-sdk@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@avalabs/glacier-sdk/-/glacier-sdk-3.0.0.tgz#aa290877dd62e984e720750a19abe5b8e6b6a51a" + integrity sha512-NZOjqDRgM8S/vm9k7cWa8KYnhhvakaNIOb3pz1qn2jK+uYzyFh8X5MT+QhmVQcwfOiXt62Yhh0PUKHwpU+aTyg== + +"@avalabs/hw-app-avalanche@0.14.1": + version "0.14.1" + resolved "https://registry.yarnpkg.com/@avalabs/hw-app-avalanche/-/hw-app-avalanche-0.14.1.tgz#70b6248e67cf7d64d0640517f88c19632524ac68" + integrity sha512-EHJPqe305LaGls66aEqRIKPvxB8NMV5wU70hX3i58QsySfId/O3hbgiOe+tYzY3HBvJtZz1ih8DZds00JJmXJQ== + dependencies: + "@ledgerhq/hw-app-eth" "6.34.3" + "@ledgerhq/hw-transport" "6.28.8" + bs58 "5.0.0" + ledger-bitcoin "^0.2.1" + sha3 "2.1.4" + +"@avalabs/types@2.8.0-alpha.188": + version "2.8.0-alpha.188" + resolved "https://registry.yarnpkg.com/@avalabs/types/-/types-2.8.0-alpha.188.tgz#5f3d6df1983474c362e4345dd7acca7ed18052a3" + integrity sha512-sDKcOzKCvRRjuxPLThsf5KkTj874Ps6Ejoqt5HvrHUEsd5FqcN2TwpXLPrmD+0YPrCyAQ67G3Cdhl+VMBRrNQg== + +"@avalabs/vm-module-types@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@avalabs/vm-module-types/-/vm-module-types-0.1.0.tgz#bea2bee27fa92bec0901608645e1c3ea5f36e631" + integrity sha512-t3vgsVW4LHZB2D/0M7RHmNriQ2Km+xdY/TUJl32F7Mimi2grRpv1zpGL16tPBlIs1ZWFTCQ5pmoNbA9Evq6sFA== + dependencies: + "@metamask/rpc-errors" "6.3.0" + ethers "6.8.1" + zod "3.23.8" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.18.6", "@babel/code-frame@^7.8.3": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" @@ -4818,11 +4823,6 @@ dependencies: "@octokit/openapi-types" "^16.0.0" -"@openzeppelin/contracts@4.9.3": - version "4.9.3" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.3.tgz#00d7a8cf35a475b160b3f0293a6403c511099364" - integrity sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg== - "@openzeppelin/contracts@4.9.6": version "4.9.6" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677"