Files
2022-11-16 15:24:36 +03:00

62 lines
3.9 KiB
Swift

//
// DeFiControllerMain.swift
// Wallet
//
// Created by Saveliy Stavitsky on 3/1/21.
// Copyright © 2021 AM. All rights reserved.
//
import UIKit
import class Resolver.Resolver
import WalletFoundation
class DeFiControllerMain: UIViewController {
@IBOutlet var inheritanceButton: CommonViewCard!
@IBOutlet var swapButton: CommonViewCard!
@IBOutlet var cccpButton: CommonViewCard!
@IBOutlet var cccpExchangeRequestsButton: CommonViewCard!
@IBOutlet var settingsButton: CommonViewCard!
override func viewDidLoad() {
super.viewDidLoad()
self.navigationController >>- {
$0.navigationBar.isTranslucent = true
$0.navigationBar.backgroundColor = Asset.snow.color
$0.interactivePopGestureRecognizer?.delegate = nil
}
// swiftlint:disable:next line_length
inheritanceButton.action = .action(icon: Asset.commonArrowRight.image, empty: .init(uuid: "", image: Asset.defiButtonInheritance.image, imageURLs: nil, title: L10n.Defi.Main.Button.Inheritance.title, text: L10n.Defi.Main.Button.Inheritance.description, details: "", badge: nil, action: {
self.navigationController?.pushViewController(StoryboardScene.Inheritance.initial.instantiate(), animated: true)
}), selected: nil) { [weak self] _ in
self?.navigationController?.pushViewController(StoryboardScene.Inheritance.initial.instantiate(), animated: true)
}
// swiftlint:disable:next line_length
swapButton.action = .action(icon: Asset.commonArrowRight.image, empty: .init(uuid: "", image: Asset.defiButtonSwap.image, imageURLs: nil, title: L10n.Defi.Main.Button.Swap.title, text: L10n.Defi.Main.Button.Swap.description, details: "", badge: nil, action: {
self.navigationController?.pushViewController(StoryboardScene.Swap.swapControllerInvestment.instantiate(), animated: true)
}), selected: nil) { [weak self] _ in
self?.navigationController?.pushViewController(StoryboardScene.Swap.swapControllerInvestment.instantiate(), animated: true)
}
// swiftlint:disable:next line_length
cccpButton.action = .action(icon: Asset.commonArrowRight.image, empty: .init(uuid: "", image: Asset.defiButtonCccp.image, imageURLs: nil, title: L10n.More.Cryptocash.title, text: L10n.More.Cryptocash.description, details: "", badge: nil, action: {
self.navigationController?.pushViewController(MainIssueUsdcashViewController.loadFromNib(), animated: true)
}), selected: nil) { [weak self] _ in
self?.navigationController?.pushViewController(MainIssueUsdcashViewController.loadFromNib(), animated: true)
}
// swiftlint:disable:next line_length
cccpExchangeRequestsButton.action = .action(icon: Asset.commonArrowRight.image, empty: .init(uuid: "", image: Asset.defiButtonCccpExchangeRequests.image, imageURLs: nil, title: L10n.More.CryptocashRequest.title, text: L10n.More.CryptocashRequest.description, details: "", badge: nil, action: {
self.navigationController?.pushViewController(ExchangeCryptocashViewController.loadFromNib(), animated: true)
}), selected: nil) { [weak self] _ in
self?.navigationController?.pushViewController(ExchangeCryptocashViewController.loadFromNib(), animated: true)
}
// swiftlint:disable:next line_length
settingsButton.action = .action(icon: Asset.commonArrowRight.image, empty: .init(uuid: "", image: Asset.defiButtonSetttings.image, imageURLs: nil, title: L10n.Defi.Main.Button.Settings.title, text: L10n.Defi.Main.Button.Settings.description, details: "", badge: nil, action: {
self.navigationController?.pushViewController(SettingsViewController.loadFromNib(), animated: true)
}), selected: nil) { [weak self] _ in
self?.navigationController?.pushViewController(SettingsViewController.loadFromNib(), animated: true)
}
}
}