Skip to content

Commit

Permalink
Use base::StrCat
Browse files Browse the repository at this point in the history
  • Loading branch information
nvonpentz committed Oct 28, 2024
1 parent 9d5061f commit da42337
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/brave_wallet/browser/json_rpc_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit da42337

Please sign in to comment.