From 32f5b7131b6a30e881b2b88e10ad749809ec79c5 Mon Sep 17 00:00:00 2001 From: Esenbek Date: Thu, 14 Sep 2023 12:29:34 +0600 Subject: [PATCH] Disable swap function --- .../WalletTokenBalanceViewItemFactory.swift | 6 +----- .../Modules/Wallet/WalletViewItemFactory.swift | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift index 7776682656..399158f2d1 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift @@ -14,7 +14,7 @@ class WalletTokenBalanceViewItemFactory { var buttons = [WalletModule.Button: ButtonState]() switch item.element { - case .wallet(let wallet): + case .wallet: if item.watchAccount { buttons[.address] = .enabled } else { @@ -22,10 +22,6 @@ class WalletTokenBalanceViewItemFactory { buttons[.send] = sendButtonState buttons[.receive] = .enabled - - if wallet.token.swappable { - buttons[.swap] = sendButtonState - } } case .cexAsset(let cexAsset): buttons[.withdraw] = cexAsset.withdrawEnabled ? .enabled : .disabled diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift index da6e27e4a6..cd654bdb2c 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift @@ -143,8 +143,7 @@ class WalletViewItemFactory { case .evmPrivateKey, .hdExtendedKey, .mnemonic: return [ .send: .enabled, - .receive: .enabled, - .swap: .enabled + .receive: .enabled ] case .evmAddress, .tronAddress: return [:] }