Files
safe-ios/Multisig/UI/Safe Management/Create Safe/SafeCreationSuccessViewController.swift
Dirk JäckelandGitHub 1fe99cf3c5 Gh 3131 - Safe creation (#3167)
* gh-3131 Passing on email and use it for key creation. Detect key creation done and safe creation tx relayed.
* gh-3131 omit success screen
* gh-3131 call key creation when screen is fully shown
* gh-3131 email withheld
* gh-3131 Added clarifying comment
2023-07-14 12:11:16 +02:00

52 lines
1.7 KiB
Swift

//
// SafeCreationSuccessViewController.swift
// Multisig
//
// Created by Mouaz on 6/21/23.
// Copyright © 2023 Gnosis Ltd. All rights reserved.
//
import UIKit
import Lottie
class SafeCreationSuccessViewController: UIViewController {
@IBOutlet private weak var animationView: LottieAnimationView!
@IBOutlet private weak var titleLabel: UILabel!
@IBOutlet private weak var bodyLabel: UILabel!
@IBOutlet private weak var continueButton: UIButton!
@IBOutlet private weak var addressInfoView: AddressInfoView!
var safe: Safe!
var chain: Chain!
var onContinue: () -> () = {}
override func viewDidLoad() {
super.viewDidLoad()
titleLabel.setStyle(.title1)
bodyLabel.setStyle(.body)
animationView.animation = LottieAnimation.named(isDarkMode ? "successAnimationDark" : "successAnimation",
animationCache: nil)
animationView.contentMode = .scaleAspectFit
animationView.backgroundBehavior = .pauseAndRestore
animationView.play()
continueButton.setText("Continue", .filled)
addressInfoView.setAddress(Address("0xEa3290590Dd491739f5F731266631A2649eBa661"),
label: "My Safe Account",
browseURL: chain.browserURL(address: "0xEa3290590Dd491739f5F731266631A2649eBa661"))
addressInfoView.backgroundColor = .backgroundLightGreen
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
Tracker.trackEvent(.screenCreatingComplete)
}
@IBAction private func continueButtonTouched(_ sender: Any) {
Tracker.trackEvent(.userCreatingCompleteContinue)
onContinue()
}
}