From 377b6506ef2c7044410fc7c39e0d46e6e3afedc8 Mon Sep 17 00:00:00 2001 From: brave-builds Date: Thu, 24 Oct 2024 00:01:06 +0000 Subject: [PATCH] Uplift of #26174 (squashed) to beta --- .../BraveWallet/Extensions/RpcServiceExtensions.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ios/brave-ios/Sources/BraveWallet/Extensions/RpcServiceExtensions.swift b/ios/brave-ios/Sources/BraveWallet/Extensions/RpcServiceExtensions.swift index 3fff3e48ffc0..ff63ce9f2682 100644 --- a/ios/brave-ios/Sources/BraveWallet/Extensions/RpcServiceExtensions.swift +++ b/ios/brave-ios/Sources/BraveWallet/Extensions/RpcServiceExtensions.swift @@ -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,