From 113b3d2c400c4fd8735559e93ee11a912a49d5d3 Mon Sep 17 00:00:00 2001 From: Nick von Pentz Date: Mon, 28 Oct 2024 09:22:17 -0400 Subject: [PATCH] Use base::StrCat --- components/brave_wallet/browser/json_rpc_service.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;