Files
raspberry/iOS/Wallet/Sources/DeFi/Controller/DeFiControllerMain.swift
T
2022-10-06 16:17:16 +03:00

60 lines
3.8 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
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()
// title = L10n.TabBar.more
// navigationItem.leftBarButtonItem = .pop(self)
navigationController?.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)
}
}
}