diff --git a/components/brave_wallet/browser/eth_tx_manager_unittest.cc b/components/brave_wallet/browser/eth_tx_manager_unittest.cc index 14a2a74d714c..85843e10ec77 100644 --- a/components/brave_wallet/browser/eth_tx_manager_unittest.cc +++ b/components/brave_wallet/browser/eth_tx_manager_unittest.cc @@ -31,6 +31,7 @@ #include "brave/components/brave_wallet/browser/json_rpc_service.h" #include "brave/components/brave_wallet/browser/keyring_service.h" #include "brave/components/brave_wallet/browser/pref_names.h" +#include "brave/components/brave_wallet/browser/test_utils.h" #include "brave/components/brave_wallet/browser/tx_service.h" #include "brave/components/brave_wallet/browser/tx_storage_delegate.h" #include "brave/components/brave_wallet/browser/tx_storage_delegate_impl.h" @@ -269,6 +270,7 @@ class EthTxManagerUnitTest : public testing::Test { tx_service_ = std::make_unique( json_rpc_service_.get(), nullptr, keyring_service_.get(), GetPrefs(), temp_dir_.GetPath(), base::SequencedTaskRunner::GetCurrentDefault()); + WaitForTxStorageDelegateInitialized(tx_service_->GetDelegateForTesting()); keyring_service_->CreateWallet("testing123", base::DoNothing()); base::RunLoop().RunUntilIdle(); diff --git a/components/brave_wallet/browser/fil_tx_manager_unittest.cc b/components/brave_wallet/browser/fil_tx_manager_unittest.cc index 15822bc82ae0..12e286747b6b 100644 --- a/components/brave_wallet/browser/fil_tx_manager_unittest.cc +++ b/components/brave_wallet/browser/fil_tx_manager_unittest.cc @@ -87,6 +87,7 @@ class FilTxManagerUnitTest : public testing::Test { tx_service_ = std::make_unique( json_rpc_service_.get(), nullptr, keyring_service_.get(), &prefs_, temp_dir_.GetPath(), base::SequencedTaskRunner::GetCurrentDefault()); + WaitForTxStorageDelegateInitialized(tx_service_->GetDelegateForTesting()); keyring_service_->CreateWallet(kMnemonicDivideCruise, "brave", base::DoNothing());