Skip to content

Commit

Permalink
fix(wallet): remove duplication nft_id when fetching nft metadata (up…
Browse files Browse the repository at this point in the history
…lift to 1.71.x) (#26186)

Uplift of #26174 (squashed) to release
  • Loading branch information
brave-builds authored Oct 25, 2024
1 parent 318a894 commit 52816b2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,13 @@ extension BraveWalletJsonRpcService {
guard let self = self else { return [:] }
for (coin, tokensPerCoin) in tokenCoinMap {
group.addTask {
let nftIdentifiers = tokensPerCoin.map {
var uniqueTokensPerCoin: [BraveWallet.BlockchainToken] = []
for token in tokensPerCoin {
if !uniqueTokensPerCoin.contains(token) {
uniqueTokensPerCoin.append(token)
}
}
let nftIdentifiers = uniqueTokensPerCoin.map {
BraveWallet.NftIdentifier(
chainId: $0.chainId,
contractAddress: $0.contractAddress,
Expand Down

0 comments on commit 52816b2

Please sign in to comment.