diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/Token/DataSources/WalletTokenBalance/WalletTokenBalanceViewItemFactory.swift index 399158f2d1..7776682656 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: + case .wallet(let wallet): if item.watchAccount { buttons[.address] = .enabled } else { @@ -22,6 +22,10 @@ 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 cd654bdb2c..da6e27e4a6 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/Wallet/WalletViewItemFactory.swift @@ -143,7 +143,8 @@ class WalletViewItemFactory { case .evmPrivateKey, .hdExtendedKey, .mnemonic: return [ .send: .enabled, - .receive: .enabled + .receive: .enabled, + .swap: .enabled ] case .evmAddress, .tronAddress: return [:] }