diff --git a/components/brave_wallet/browser/json_rpc_service.cc b/components/brave_wallet/browser/json_rpc_service.cc index 6cbcdf2f569b..77df7d51d713 100644 --- a/components/brave_wallet/browser/json_rpc_service.cc +++ b/components/brave_wallet/browser/json_rpc_service.cc @@ -17,6 +17,7 @@ #include "base/functional/bind.h" #include "base/no_destructor.h" #include "base/notreached.h" +#include "base/strings/strcat.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "brave/components/brave_wallet/browser/blockchain_registry.h" @@ -315,7 +316,7 @@ bool ValidateNftIdentifiers( for (const auto& nft : nft_identifiers) { // Create a unique string identifier combining contract, token id, and chain std::string unique_id = - nft->contract_address + "_" + nft->token_id + "_" + nft->chain_id; + base::StrCat({nft->contract_address, nft->token_id, nft->chain_id}); if (!seen_identifiers.insert(unique_id).second) { error_message = l10n_util::GetStringUTF8(IDS_WALLET_INVALID_PARAMETERS); return false;