Skip to content

Commit

Permalink
Disable swap function
Browse files Browse the repository at this point in the history
  • Loading branch information
esen committed Sep 14, 2023
1 parent a9ceb46 commit 6eaae15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ class WalletTokenBalanceViewItemFactory {
var buttons = [WalletModule.Button: ButtonState]()

switch item.element {
case .wallet(let wallet):
case .wallet:
if item.watchAccount {
buttons[.address] = .enabled
} else {
let sendButtonState: ButtonState = item.state == .synced ? .enabled : .disabled

buttons[.send] = sendButtonState
buttons[.receive] = .enabled

if wallet.token.swappable {
buttons[.swap] = sendButtonState
}
}
case .cexAsset(let cexAsset):
buttons[.withdraw] = cexAsset.withdrawEnabled ? .enabled : .disabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ class WalletViewItemFactory {
case .evmPrivateKey, .hdExtendedKey, .mnemonic:
return [
.send: .enabled,
.receive: .enabled,
.swap: .enabled
.receive: .enabled
]
case .evmAddress, .tronAddress: return [:]
}
Expand Down

0 comments on commit 6eaae15

Please sign in to comment.