diff --git a/components/brave_wallet/common/brave_wallet.mojom b/components/brave_wallet/common/brave_wallet.mojom index a8a5b725da51..4492e14700e9 100644 --- a/components/brave_wallet/common/brave_wallet.mojom +++ b/components/brave_wallet/common/brave_wallet.mojom @@ -1017,7 +1017,7 @@ struct BlockchainToken { string coingecko_id = ""; string chain_id; CoinType coin; - bool is_shielded = false; // Zcash only, markes whether asset belongs to the shielded pool. + bool is_shielded = false; // Zcash only, marks whether asset belongs to the shielded pool. }; struct AllowanceInfo { diff --git a/components/brave_wallet_ui/page/screens/send/send_screen/send_screen.tsx b/components/brave_wallet_ui/page/screens/send/send_screen/send_screen.tsx index ff298634ab53..af0f1630cbd0 100644 --- a/components/brave_wallet_ui/page/screens/send/send_screen/send_screen.tsx +++ b/components/brave_wallet_ui/page/screens/send/send_screen/send_screen.tsx @@ -159,18 +159,22 @@ export const SendScreen = React.memo((props: Props) => { const tokenId = query.get('tokenId') + const isShielded = query.get('isShielded') === 'true' + return userVisibleTokensInfo.find((token) => tokenId ? token.chainId === networkFromParams.chainId && token.contractAddress.toLowerCase() === contractOrSymbol.toLowerCase() && - token.tokenId === tokenId + token.tokenId === tokenId && + token.isShielded === isShielded : (token.chainId === networkFromParams.chainId && token.contractAddress.toLowerCase() === contractOrSymbol.toLowerCase()) || (token.chainId === networkFromParams.chainId && token.contractAddress === '' && - token.symbol.toLowerCase() === contractOrSymbol.toLowerCase()) + token.symbol.toLowerCase() === contractOrSymbol.toLowerCase()) && + token.isShielded === isShielded ) }, [userVisibleTokensInfo, query, networkFromParams]) diff --git a/components/brave_wallet_ui/utils/routes-utils.ts b/components/brave_wallet_ui/utils/routes-utils.ts index 7eeba0e3413f..ad70d09b0668 100644 --- a/components/brave_wallet_ui/utils/routes-utils.ts +++ b/components/brave_wallet_ui/utils/routes-utils.ts @@ -234,10 +234,15 @@ export const makeSendRoute = ( token: asset.contractAddress || asset.symbol.toUpperCase(), account: account.accountId.uniqueKey } + + const tokenIdQueryParams = asset.tokenId + ? { ...baseQueryParams, tokenId: asset.tokenId } + : baseQueryParams + const params = new URLSearchParams( - asset.tokenId - ? { ...baseQueryParams, tokenId: asset.tokenId } - : baseQueryParams + asset.isShielded + ? {...tokenIdQueryParams, isShielded: 'true'} + : tokenIdQueryParams ) if (isNftTab) {