From 173b076e5a5417af01c03659fce131fe2a14d92e Mon Sep 17 00:00:00 2001 From: Tangem Date: Mon, 25 Apr 2022 21:50:52 +0300 Subject: [PATCH] Updated on 2026-08-14 --- .../addCustomToken/redux/AddCustomTokenHub.kt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenHub.kt b/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenHub.kt index 5d21995d73..f57375ce14 100644 --- a/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenHub.kt +++ b/domain/src/main/java/com/tangem/domain/features/addCustomToken/redux/AddCustomTokenHub.kt @@ -67,16 +67,13 @@ internal class AddCustomTokenHub : BaseStoreHub("AddCustomT if (!action.blockchainNetwork.isUserInput) return val contractAddress = ContractAddress.getFieldValue() - when (validateContractAddressAndNotify(contractAddress)) { - is AddCustomTokenError.InvalidContractAddress -> { - val isAlreadyAdded = isBlockchainPersistIntoAppSavedTokensList( - selectedNetwork = action.blockchainNetwork.value - ) - updateWarningAlreadyAdded(isAlreadyAdded) - checkAndUpdateAddButton() - } - else -> {} - } + validateContractAddressAndNotify(contractAddress) + + val isAlreadyAdded = isBlockchainPersistIntoAppSavedTokensList( + selectedNetwork = action.blockchainNetwork.value + ) + updateWarningAlreadyAdded(isAlreadyAdded) + checkAndUpdateAddButton() } is OnTokenDerivationPathChanged -> { val isAlreadyAdded = if (ContractAddress.isFilled()) {