From c95d1efb72e1dcbfc9c30e87355d7103da90ab40 Mon Sep 17 00:00:00 2001 From: William Muli Date: Wed, 5 Oct 2022 19:34:28 +0300 Subject: [PATCH] Fixed auto-completion in custom token and nft form --- components/brave_wallet_ui/common/hooks/token.ts | 2 +- .../shared/add-custom-token-form/add-custom-token-form.tsx | 2 +- .../components/shared/add-custom-token-form/add-nft-form.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/brave_wallet_ui/common/hooks/token.ts b/components/brave_wallet_ui/common/hooks/token.ts index 168c8b4b8fca..78d7d912746a 100644 --- a/components/brave_wallet_ui/common/hooks/token.ts +++ b/components/brave_wallet_ui/common/hooks/token.ts @@ -47,7 +47,7 @@ export default function useTokenInfo ( }).catch(e => console.log(e)) } setFoundTokenInfoByContractAddress(undefined) - }, [tokenContractAddress, visibleTokens, fullTokenList]) + }, [tokenContractAddress, visibleTokens, fullTokenList, selectedNetwork]) return { onFindTokenInfoByContractAddress: setTokenContractAddress, foundTokenInfoByContractAddress diff --git a/components/brave_wallet_ui/components/shared/add-custom-token-form/add-custom-token-form.tsx b/components/brave_wallet_ui/components/shared/add-custom-token-form/add-custom-token-form.tsx index b100c0258527..57225b10e9d9 100644 --- a/components/brave_wallet_ui/components/shared/add-custom-token-form/add-custom-token-form.tsx +++ b/components/brave_wallet_ui/components/shared/add-custom-token-form/add-custom-token-form.tsx @@ -74,7 +74,7 @@ export const AddCustomTokenForm = (props: Props) => { const { onFindTokenInfoByContractAddress, foundTokenInfoByContractAddress - } = useTokenInfo(getBlockchainTokenInfo, userVisibleTokensInfo, fullTokenList, selectedNetwork) + } = useTokenInfo(getBlockchainTokenInfo, userVisibleTokensInfo, fullTokenList, customAssetsNetwork || selectedNetwork) const { onAddCustomAsset } = useAssetManagement() diff --git a/components/brave_wallet_ui/components/shared/add-custom-token-form/add-nft-form.tsx b/components/brave_wallet_ui/components/shared/add-custom-token-form/add-nft-form.tsx index 42cf4fbbe4de..4e4ae2a13ab3 100644 --- a/components/brave_wallet_ui/components/shared/add-custom-token-form/add-nft-form.tsx +++ b/components/brave_wallet_ui/components/shared/add-custom-token-form/add-nft-form.tsx @@ -75,7 +75,7 @@ export const AddNftForm = (props: Props) => { const { onFindTokenInfoByContractAddress, foundTokenInfoByContractAddress - } = useTokenInfo(getBlockchainTokenInfo, userVisibleTokensInfo, fullTokenList, selectedNetwork) + } = useTokenInfo(getBlockchainTokenInfo, userVisibleTokensInfo, fullTokenList, customAssetsNetwork || selectedNetwork) const { onAddCustomAsset } = useAssetManagement()