-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix/onboarding-tx-preview
- Loading branch information
Showing
24 changed files
with
572 additions
and
602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
DashWallet/Sources/UI/Setup/SecureWallet/Seed/BackupSeedPhraseViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// | ||
// Created by Andrew Podkovyrin | ||
// Copyright © 2019 Dash Core Group. All rights reserved. | ||
// | ||
// Licensed under the MIT License (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://opensource.org/licenses/MIT | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
|
||
import UIKit | ||
|
||
class BackupSeedPhraseViewController: DWPreviewSeedPhraseViewController { | ||
|
||
var shouldCreateNewWalletOnScreenshot: Bool = false | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
self.title = NSLocalizedString("Backup Wallet", comment: "A noun. Used as a title.") | ||
self.actionButton?.isEnabled = false | ||
|
||
self.contentView.displayType = DWSeedPhraseDisplayType.backup | ||
|
||
#if SNAPSHOT | ||
self.actionButton.accessibilityIdentifier = "seedphrase_continue_button" | ||
#endif | ||
} | ||
|
||
var actionButtonTitle: String { | ||
return NSLocalizedString("Continue", comment: "") | ||
} | ||
|
||
@objc override func actionButtonAction(_ sender: Any) { | ||
let seedPhrase = self.contentView.model | ||
|
||
let controller = DWVerifySeedPhraseViewController(seedPhrase: seedPhrase!) | ||
controller.delegate = self.delegate | ||
self.navigationController?.pushViewController(controller, animated: true) | ||
} | ||
|
||
override func screenshotAlertOKAction() { | ||
if !self.shouldCreateNewWalletOnScreenshot { | ||
return | ||
} | ||
|
||
self.model.clearAllWallets() | ||
|
||
self.feedbackGenerator.notificationOccurred(.error) | ||
|
||
let seedPhrase = self.model.getOrCreateNewWallet() | ||
self.contentView.updateSeedPhraseModelAnimated(seedPhrase) | ||
self.contentView.showScreenshotDetectedErrorMessage() | ||
|
||
self.actionButton?.isEnabled = false | ||
} | ||
} |
28 changes: 0 additions & 28 deletions
28
DashWallet/Sources/UI/Setup/SecureWallet/Seed/DWBackupSeedPhraseViewController.h
This file was deleted.
Oops, something went wrong.
73 changes: 0 additions & 73 deletions
73
DashWallet/Sources/UI/Setup/SecureWallet/Seed/DWBackupSeedPhraseViewController.m
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.